@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
- callInstruction
- deployInstruction
- execInstruction
- fundInstruction
- importInstruction
- loadByOriginInstruction
- loadInstruction
- lockInstruction
- newInstruction
- signInstruction
- signToInstruction
Functions
callInstruction
▸ callInstruction(txb
, ref
, methodName
, args
): CallInstruction
Creates and returns a CALL instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
ref | InstructionRef |
methodName | string |
args | any [] |
Returns
Defined in
packages/sdk/src/tx-builder.ts:449
deployInstruction
▸ deployInstruction(_txb
, entry
, code
): DeployInstruction
Creates and returns a DEPLOY instruction.
Parameters
Name | Type |
---|---|
_txb | TxBuilder |
entry | string [] |
code | Map <string , string > |
Returns
Defined in
packages/sdk/src/tx-builder.ts:488
execInstruction
▸ execInstruction(txb
, ref
, functionName
, args
): ExecInstruction
Creates and returns an EXEC instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
ref | InstructionRef |
functionName | string |
args | any [] |
Returns
Defined in
packages/sdk/src/tx-builder.ts:462
fundInstruction
▸ fundInstruction(txb
, ref
): FundInstruction
Creates and returns a FUND instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
ref | InstructionRef |
Returns
Defined in
packages/sdk/src/tx-builder.ts:472
importInstruction
▸ importInstruction(_txb
, pkgId
): ImportInstruction
Creates and returns an IMPORT instruction.
Parameters
Name | Type |
---|---|
_txb | TxBuilder |
pkgId | Uint8Array |
Returns
Defined in
packages/sdk/src/tx-builder.ts:418
loadByOriginInstruction
▸ loadByOriginInstruction(_txb
, origin
): LoadByOriginInstruction
Creates and returns a LOADBYORIGIN instruction.
Parameters
Name | Type |
---|---|
_txb | TxBuilder |
origin | Pointer |
Returns
Defined in
packages/sdk/src/tx-builder.ts:432
loadInstruction
▸ loadInstruction(_txb
, outputId
): LoadInstruction
Creates and returns a LOAD instruction.
Parameters
Name | Type |
---|---|
_txb | TxBuilder |
outputId | Uint8Array |
Returns
Defined in
packages/sdk/src/tx-builder.ts:425
lockInstruction
▸ lockInstruction(txb
, ref
, address
): LockInstruction
Creates and returns a LOCK instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
ref | InstructionRef |
address | Address |
Returns
Defined in
packages/sdk/src/tx-builder.ts:480
newInstruction
▸ newInstruction(txb
, ref
, className
, args
): NewInstruction
Creates and returns a NEW instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
ref | InstructionRef |
className | string |
args | any [] |
Returns
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
Name | Type | Default value |
---|---|---|
txb | TxBuilder | undefined |
privKey | PrivKey | HDPrivKey | undefined |
fakeIt | boolean | false |
Returns
Defined in
packages/sdk/src/tx-builder.ts:500
signToInstruction
▸ signToInstruction(txb
, privKey
): SignToInstruction
Creates and returns a SIGNTO instruction.
Parameters
Name | Type |
---|---|
txb | TxBuilder |
privKey | PrivKey | HDPrivKey |
Returns
Defined in
packages/sdk/src/tx-builder.ts:514