Abstract The Bundle subclass to use.
Optional addressThe address from which transactions are signed and sent.
Optional chainThe chain on which this agent operates.
Optional feesDefault fee maximums for send, upload, init, and execute.
Optional mnemonicThe wallet's mnemonic.
Optional nameThe friendly name of the agent.
Static BundleThe default Bundle class used by this Agent.
This agent's balance in the chain's native token.
The default denomination in which the agent operates.
The chain's current block height.
Wait until the block height increments.
Complete the asynchronous initialization of this Agent.
Execute a transaction bundle.
Bundle if called with no arguments
Promise<any[]> if called with Bundle#wrap args
Optional cb: BundleCallback<B>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>Create a new smart contract from a code id, label and init message.
await agent.instantiate(template.define({ label, initMsg })
AnyContract with no address populated yet.
This will be populated after executing the bundle.
Create multiple smart contracts from a Template (providing code id) and a list or map of label/initmsg pairs. Uses this agent's Bundle class to instantiate them in a single transaction.
await agent.instantiateMany(template.instances({
One: { label, initMsg },
Two: { label, initMsg },
}))
await agent.instantiateMany({
One: template1.instance({ label, initMsg }),
Two: template2.instance({ label, initMsg }),
}))
either an Array
Upload code, generating a new code id/hash pair.
Optional meta: Partial<Uploadable>Generated using TypeDoc
By authenticating to a network you obtain an Agent, which can perform transactions as the authenticated identity.