Skip to content

AccountInvokeBuilder

Defined in: ootle/src/builtin-templates.ts:28

Fluent builder for common account component invocations. Mirrors AccountInvokeBuilder from the Rust ootle-rs crate.

const tx = new AccountInvokeBuilder(network)
.feeTransactionPayFromComponent(accountAddress, 1000n)
.publicTransfer(accountAddress, resourceAddress, 500n, recipientAddress)
.build();

new AccountInvokeBuilder(network): AccountInvokeBuilder

Defined in: ootle/src/builtin-templates.ts:31

number

AccountInvokeBuilder

build(): UnsignedTransactionWithBlobs

Defined in: ootle/src/builtin-templates.ts:92

UnsignedTransactionWithBlobs


feeTransactionPayFromComponent(componentAddress, maxFee): this

Defined in: ootle/src/builtin-templates.ts:47

Adds a fee instruction paying from the account’s default vault.

string

bigint

this


publicTransfer(sourceAccount, resourceAddress, amount, destinationAddress): this

Defined in: ootle/src/builtin-templates.ts:56

Transfers amount of resource from sourceAccount to destinationAddress. Mirrors AccountInvokeBuilder::public_transfer from ootle-rs.

string

string

bigint

string

this


publishTemplate(_sourceAccount, templateBinaryBase64, workspaceBucket?): this

Defined in: ootle/src/builtin-templates.ts:80

Publishes a compiled template WASM blob (standard-base64 encoded). Mirrors AccountInvokeBuilder::publish_template from ootle-rs.

sourceAccount is the fee payer; declare it via feeTransactionPayFromComponent and withInputs. Pass workspaceBucket to capture the new template address for a follow-up instruction.

string

string

string

this


withInputs(inputs): this

Defined in: ootle/src/builtin-templates.ts:39

Declares the transaction’s substate inputs (e.g. the source account and its vaults) so the indexer resolves their versions before submission.

SubstateRequirement[]

this