The Bundle subclass to use.
The agent that will execute the batched transaction.
Optional
callbackEvaluating this defines the contents of the bundle.
Nested bundles are flattened, this counts the depth.
Next message id.
Messages in this bundle, unencrypted.
The address from which transactions are signed and sent.
Disallowed in bundle - do it beforehand or afterwards.
The default denomination in which the agent operates.
Get a client instance for talking to a specific smart contract as this executor.
Optional
address: stringOptional
codeHash: stringRest
...args: unknown[]Get an uploader instance which performs code uploads and optionally caches them.
Optional
options: Partial<U>Disallowed in bundle - do it beforehand or afterwards.
The friendly name of the agent.
Disallowed in bundle - do it beforehand or afterwards.
Complete the asynchronous initialization of this Agent.
Add a message to the bundle.
Nested bundles are "flattened": trying to create a bundle from inside a bundle returns the same bundle.
Optional
cb: BundleCallback<B>Add an init message to the bundle.
the unmodified input.
await agent.instantiate(template.define({ label, initMsg })
Add multiple init messages to the bundle.
the unmodified inputs.
await agent.bundle().wrap(async bundle=>{
await bundle.instantiateMany(template.instances({
One: { label, initMsg },
Two: { label, initMsg },
}))
await agent.instantiateMany({
One: template1.instance({ label, initMsg }),
Two: template2.instance({ label, initMsg }),
})
})
Queries are disallowed in the middle of a bundle because even though the bundle API is structured as multiple function calls, the bundle is ultimately submitted as a single transaction and it doesn't make sense to query state in the middle of that.
Either submit or save the bundle.
Uploads are disallowed in the middle of a bundle because it's easy to go over the max request size, and difficult to know what that is in advance.
Optional
meta: Partial<Uploadable>Uploads are disallowed in the middle of a bundle because it's easy to go over the max request size, and difficult to know what that is in advance.
Generated using TypeDoc
Bundle is an alternate executor that collects collects messages to broadcast as a single transaction in order to execute them simultaneously. For that, it uses the API of its parent Agent. You can use it in scripts with: await agent.bundle().wrap(async bundle=>{ client.as(bundle).exec(...) })