Skip to content

@aldea/sdk / Exports / TxBuilder

Namespace: TxBuilder ​

The TxBuilder namespace also exports a number of static functions for creating individual instructions. These are used internally by the TxBuilder but exposed as can be useful when overriding and customising the TxBuilder.

Table of contents ​

Functions ​

Functions ​

callInstruction ​

▸ callInstruction(txb, ref, methodName, args): CallInstruction

Creates and returns a CALL instruction.

Parameters ​

NameType
txbTxBuilder
refInstructionRef
methodNamestring
argsany[]

Returns ​

CallInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:449


deployInstruction ​

▸ deployInstruction(_txb, entry, code): DeployInstruction

Creates and returns a DEPLOY instruction.

Parameters ​

NameType
_txbTxBuilder
entrystring[]
codeMap<string, string>

Returns ​

DeployInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:488


execInstruction ​

▸ execInstruction(txb, ref, functionName, args): ExecInstruction

Creates and returns an EXEC instruction.

Parameters ​

NameType
txbTxBuilder
refInstructionRef
functionNamestring
argsany[]

Returns ​

ExecInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:462


fundInstruction ​

▸ fundInstruction(txb, ref): FundInstruction

Creates and returns a FUND instruction.

Parameters ​

NameType
txbTxBuilder
refInstructionRef

Returns ​

FundInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:472


importInstruction ​

▸ importInstruction(_txb, pkgId): ImportInstruction

Creates and returns an IMPORT instruction.

Parameters ​

NameType
_txbTxBuilder
pkgIdUint8Array

Returns ​

ImportInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:418


loadByOriginInstruction ​

▸ loadByOriginInstruction(_txb, origin): LoadByOriginInstruction

Creates and returns a LOADBYORIGIN instruction.

Parameters ​

NameType
_txbTxBuilder
originPointer

Returns ​

LoadByOriginInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:432


loadInstruction ​

▸ loadInstruction(_txb, outputId): LoadInstruction

Creates and returns a LOAD instruction.

Parameters ​

NameType
_txbTxBuilder
outputIdUint8Array

Returns ​

LoadInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:425


lockInstruction ​

▸ lockInstruction(txb, ref, address): LockInstruction

Creates and returns a LOCK instruction.

Parameters ​

NameType
txbTxBuilder
refInstructionRef
addressAddress

Returns ​

LockInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:480


newInstruction ​

▸ newInstruction(txb, ref, className, args): NewInstruction

Creates and returns a NEW instruction.

Parameters ​

NameType
txbTxBuilder
refInstructionRef
classNamestring
argsany[]

Returns ​

NewInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:439


signInstruction ​

▸ signInstruction(txb, privKey, fakeIt?): SignInstruction

Creates and returns a SIGN instruction.

The last arg allows the signature to be fakes with 64 empty bytes. The TxBuilder will fake the signature on first pass, and when the entire TX is built will re-sign and blanked sigs.

Parameters ​

NameTypeDefault value
txbTxBuilderundefined
privKeyPrivKey | HDPrivKeyundefined
fakeItbooleanfalse

Returns ​

SignInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:500


signToInstruction ​

▸ signToInstruction(txb, privKey): SignToInstruction

Creates and returns a SIGNTO instruction.

Parameters ​

NameType
txbTxBuilder
privKeyPrivKey | HDPrivKey

Returns ​

SignToInstruction

Defined in ​

packages/sdk/src/tx-builder.ts:514