Skip to content

TransactionBuilder

Defined in: ootle/src/builder.ts:76

Fluent builder for constructing UnsignedTransactionV1 objects.

Only buildUnsignedTransaction() is exposed — signing is handled separately via the Signer interface and signTransaction flow function.

new TransactionBuilder(network): TransactionBuilder

Defined in: ootle/src/builder.ts:81

number

TransactionBuilder

addFeeInstruction(instruction): this

Defined in: ootle/src/builder.ts:242

Instruction

this


addInput(input): this

Defined in: ootle/src/builder.ts:263

SubstateRequirement

this


addInstruction(instruction): this

Defined in: ootle/src/builder.ts:237

Instruction

this


allocateAddress(allocatableType, workspaceIdName): this

Defined in: ootle/src/builder.ts:167

AllocatableAddressType

string

this


buildUnsignedTransaction(): UnsignedTransactionWithBlobs

Defined in: ootle/src/builder.ts:308

UnsignedTransactionWithBlobs


callFunction<T>(func, args): this

Defined in: ootle/src/builder.ts:101

T extends TariFunctionDefinition

T

Exclude<T["args"], undefined>

this


callMethod<T>(method, args): this

Defined in: ootle/src/builder.ts:116

T extends TariMethodDefinition

T

Exclude<T["args"], undefined>

this

if method provides neither componentAddress nor fromWorkspace, or if fromWorkspace references an undefined variable.


claimBurn(claim, output_data): this

Defined in: ootle/src/builder.ts:161

MinotariBurnClaimProof

ClaimBurnOutputData

this


createAccount(ownerPublicKey, workspaceBucket?): this

Defined in: ootle/src/builder.ts:139

string

string

this


createProof(account, resourceAddress): this

Defined in: ootle/src/builder.ts:151

string

string

this


dropAllProofsInWorkspace(): this

Defined in: ootle/src/builder.ts:217

this


feeTransactionPayFromComponent(componentAddress, maxFee): this

Defined in: ootle/src/builder.ts:189

Adds a fee instruction that calls pay_fee on the given component. The component must call vault.pay_fee and reveal enough confidential XTR.

string

bigint

this


feeTransactionPayFromComponentConfidential()

Section titled “feeTransactionPayFromComponentConfidential()”

feeTransactionPayFromComponentConfidential(_componentAddress, _proof): this

Defined in: ootle/src/builder.ts:207

NOT IMPLEMENTED — always throws. A confidential pay_fee needs a ConfidentialWithdrawProof Literal that requires tari_bor struct encoding the TS SDK does not yet provide. Use feeTransactionPayFromComponent for revealed-fee payment.

string

ConfidentialWithdrawProof

this

always.


publishTemplate(binaryBase64, metadataHash?): this

Defined in: ootle/src/builder.ts:228

Publishes a compiled WASM template. The binary is stored as a transaction blob and referenced by index from the PublishTemplate instruction.

string

the template WASM, standard-base64 encoded

string | null

optional multihash of off-chain CBOR metadata

this


resolveWorkspaceOffsetId(name): WorkspaceOffsetId

Defined in: ootle/src/builder.ts:304

Resolves a workspace variable name (supporting dot-notation offsets, e.g. "bucket.0") to its WorkspaceOffsetId. The variable must have been declared by a prior saveVar (or other allocating call). Use this when constructing an Instruction that takes a WorkspaceOffsetId directly (e.g. the native StealthTransfer variant’s revealed_input_bucket), where the builder’s automatic { Workspace: "name" } arg resolution does not apply.

string

WorkspaceOffsetId

if no workspace variable with that name has been defined.


saveVar(name): this

Defined in: ootle/src/builder.ts:178

Saves the last instruction output to a named workspace variable. The variable can be referenced by subsequent instructions using { Workspace: "name" }.

string

this


withFeeInstructions(instructions): this

Defined in: ootle/src/builder.ts:252

Instruction[]

this


withFeeInstructionsBuilder(builder): this

Defined in: ootle/src/builder.ts:257

(b) => TransactionBuilder

this


withInputs(inputs): this

Defined in: ootle/src/builder.ts:268

SubstateRequirement[]

this


withInstructions(instructions): this

Defined in: ootle/src/builder.ts:247

Instruction[]

this


withMaxEpoch(maxEpoch): this

Defined in: ootle/src/builder.ts:278

number

this


withMinEpoch(minEpoch): this

Defined in: ootle/src/builder.ts:273

number

this


withUnsignedTransaction(unsignedTransaction): this

Defined in: ootle/src/builder.ts:283

UnsignedTransactionV1

this


static new(network): TransactionBuilder

Defined in: ootle/src/builder.ts:97

number

TransactionBuilder