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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransactionBuilder(
network):TransactionBuilder
Defined in: ootle/src/builder.ts:81
Parameters
Section titled “Parameters”network
Section titled “network”number
Returns
Section titled “Returns”TransactionBuilder
Methods
Section titled “Methods”addFeeInstruction()
Section titled “addFeeInstruction()”addFeeInstruction(
instruction):this
Defined in: ootle/src/builder.ts:242
Parameters
Section titled “Parameters”instruction
Section titled “instruction”Instruction
Returns
Section titled “Returns”this
addInput()
Section titled “addInput()”addInput(
input):this
Defined in: ootle/src/builder.ts:263
Parameters
Section titled “Parameters”SubstateRequirement
Returns
Section titled “Returns”this
addInstruction()
Section titled “addInstruction()”addInstruction(
instruction):this
Defined in: ootle/src/builder.ts:237
Parameters
Section titled “Parameters”instruction
Section titled “instruction”Instruction
Returns
Section titled “Returns”this
allocateAddress()
Section titled “allocateAddress()”allocateAddress(
allocatableType,workspaceIdName):this
Defined in: ootle/src/builder.ts:167
Parameters
Section titled “Parameters”allocatableType
Section titled “allocatableType”AllocatableAddressType
workspaceIdName
Section titled “workspaceIdName”string
Returns
Section titled “Returns”this
buildUnsignedTransaction()
Section titled “buildUnsignedTransaction()”buildUnsignedTransaction():
UnsignedTransactionWithBlobs
Defined in: ootle/src/builder.ts:308
Returns
Section titled “Returns”callFunction()
Section titled “callFunction()”callFunction<
T>(func,args):this
Defined in: ootle/src/builder.ts:101
Type Parameters
Section titled “Type Parameters”T extends TariFunctionDefinition
Parameters
Section titled “Parameters”T
Exclude<T["args"], undefined>
Returns
Section titled “Returns”this
callMethod()
Section titled “callMethod()”callMethod<
T>(method,args):this
Defined in: ootle/src/builder.ts:116
Type Parameters
Section titled “Type Parameters”T extends TariMethodDefinition
Parameters
Section titled “Parameters”method
Section titled “method”T
Exclude<T["args"], undefined>
Returns
Section titled “Returns”this
Throws
Section titled “Throws”if method provides neither componentAddress
nor fromWorkspace, or if fromWorkspace references an undefined variable.
claimBurn()
Section titled “claimBurn()”claimBurn(
claim,output_data):this
Defined in: ootle/src/builder.ts:161
Parameters
Section titled “Parameters”MinotariBurnClaimProof
output_data
Section titled “output_data”ClaimBurnOutputData
Returns
Section titled “Returns”this
createAccount()
Section titled “createAccount()”createAccount(
ownerPublicKey,workspaceBucket?):this
Defined in: ootle/src/builder.ts:139
Parameters
Section titled “Parameters”ownerPublicKey
Section titled “ownerPublicKey”string
workspaceBucket?
Section titled “workspaceBucket?”string
Returns
Section titled “Returns”this
createProof()
Section titled “createProof()”createProof(
account,resourceAddress):this
Defined in: ootle/src/builder.ts:151
Parameters
Section titled “Parameters”account
Section titled “account”string
resourceAddress
Section titled “resourceAddress”string
Returns
Section titled “Returns”this
dropAllProofsInWorkspace()
Section titled “dropAllProofsInWorkspace()”dropAllProofsInWorkspace():
this
Defined in: ootle/src/builder.ts:217
Returns
Section titled “Returns”this
feeTransactionPayFromComponent()
Section titled “feeTransactionPayFromComponent()”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.
Parameters
Section titled “Parameters”componentAddress
Section titled “componentAddress”string
maxFee
Section titled “maxFee”bigint
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”_componentAddress
Section titled “_componentAddress”string
_proof
Section titled “_proof”ConfidentialWithdrawProof
Returns
Section titled “Returns”this
Throws
Section titled “Throws”always.
publishTemplate()
Section titled “publishTemplate()”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.
Parameters
Section titled “Parameters”binaryBase64
Section titled “binaryBase64”string
the template WASM, standard-base64 encoded
metadataHash?
Section titled “metadataHash?”string | null
optional multihash of off-chain CBOR metadata
Returns
Section titled “Returns”this
resolveWorkspaceOffsetId()
Section titled “resolveWorkspaceOffsetId()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”WorkspaceOffsetId
Throws
Section titled “Throws”if no workspace variable with that name has been defined.
saveVar()
Section titled “saveVar()”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" }.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withFeeInstructions()
Section titled “withFeeInstructions()”withFeeInstructions(
instructions):this
Defined in: ootle/src/builder.ts:252
Parameters
Section titled “Parameters”instructions
Section titled “instructions”Instruction[]
Returns
Section titled “Returns”this
withFeeInstructionsBuilder()
Section titled “withFeeInstructionsBuilder()”withFeeInstructionsBuilder(
builder):this
Defined in: ootle/src/builder.ts:257
Parameters
Section titled “Parameters”builder
Section titled “builder”(b) => TransactionBuilder
Returns
Section titled “Returns”this
withInputs()
Section titled “withInputs()”withInputs(
inputs):this
Defined in: ootle/src/builder.ts:268
Parameters
Section titled “Parameters”inputs
Section titled “inputs”SubstateRequirement[]
Returns
Section titled “Returns”this
withInstructions()
Section titled “withInstructions()”withInstructions(
instructions):this
Defined in: ootle/src/builder.ts:247
Parameters
Section titled “Parameters”instructions
Section titled “instructions”Instruction[]
Returns
Section titled “Returns”this
withMaxEpoch()
Section titled “withMaxEpoch()”withMaxEpoch(
maxEpoch):this
Defined in: ootle/src/builder.ts:278
Parameters
Section titled “Parameters”maxEpoch
Section titled “maxEpoch”number
Returns
Section titled “Returns”this
withMinEpoch()
Section titled “withMinEpoch()”withMinEpoch(
minEpoch):this
Defined in: ootle/src/builder.ts:273
Parameters
Section titled “Parameters”minEpoch
Section titled “minEpoch”number
Returns
Section titled “Returns”this
withUnsignedTransaction()
Section titled “withUnsignedTransaction()”withUnsignedTransaction(
unsignedTransaction):this
Defined in: ootle/src/builder.ts:283
Parameters
Section titled “Parameters”unsignedTransaction
Section titled “unsignedTransaction”UnsignedTransactionV1
Returns
Section titled “Returns”this
staticnew(network):TransactionBuilder
Defined in: ootle/src/builder.ts:97
Parameters
Section titled “Parameters”network
Section titled “network”number
Returns
Section titled “Returns”TransactionBuilder