AccountInvokeBuilder
Defined in: ootle/src/builtin-templates.ts:29
Fluent builder for common account component invocations.
Mirrors AccountInvokeBuilder from the Rust ootle-rs crate.
Example
Section titled “Example”const tx = new AccountInvokeBuilder(network, maxEpoch) .feeTransactionPayFromComponent(accountAddress, 1000n) .publicTransfer(accountAddress, resourceAddress, 500n, recipientAddress) .build();Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AccountInvokeBuilder(
network,maxEpoch):AccountInvokeBuilder
Defined in: ootle/src/builtin-templates.ts:32
Parameters
Section titled “Parameters”network
Section titled “network”number
maxEpoch
Section titled “maxEpoch”number
Returns
Section titled “Returns”AccountInvokeBuilder
Methods
Section titled “Methods”build()
Section titled “build()”build():
UnsignedTransactionV1
Defined in: ootle/src/builtin-templates.ts:93
Returns
Section titled “Returns”UnsignedTransactionV1
feeTransactionPayFromComponent()
Section titled “feeTransactionPayFromComponent()”feeTransactionPayFromComponent(
componentAddress,maxFee):this
Defined in: ootle/src/builtin-templates.ts:48
Adds a fee instruction paying from the account’s default vault.
Parameters
Section titled “Parameters”componentAddress
Section titled “componentAddress”string
maxFee
Section titled “maxFee”bigint
Returns
Section titled “Returns”this
publicTransfer()
Section titled “publicTransfer()”publicTransfer(
sourceAccount,resourceAddress,amount,destinationAddress):this
Defined in: ootle/src/builtin-templates.ts:57
Transfers amount of resource from sourceAccount to destinationAddress.
Mirrors AccountInvokeBuilder::public_transfer from ootle-rs.
Parameters
Section titled “Parameters”sourceAccount
Section titled “sourceAccount”string
resourceAddress
Section titled “resourceAddress”string
amount
Section titled “amount”bigint
destinationAddress
Section titled “destinationAddress”string
Returns
Section titled “Returns”this
publishTemplate()
Section titled “publishTemplate()”publishTemplate(
_sourceAccount,templateBinaryBase64,workspaceBucket?):this
Defined in: ootle/src/builtin-templates.ts:81
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.
Parameters
Section titled “Parameters”_sourceAccount
Section titled “_sourceAccount”string
templateBinaryBase64
Section titled “templateBinaryBase64”string
workspaceBucket?
Section titled “workspaceBucket?”string
Returns
Section titled “Returns”this
withInputs()
Section titled “withInputs()”withInputs(
inputs):this
Defined in: ootle/src/builtin-templates.ts:40
Declares the transaction’s substate inputs (e.g. the source account and its vaults) so the indexer resolves their versions before submission.
Parameters
Section titled “Parameters”inputs
Section titled “inputs”(InputDeclaration | SubstateRequirement)[]
Returns
Section titled “Returns”this