Skip to content

@aldea/sdk / Exports

@aldea/sdk

Table of contents

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

CreateTxCallback

Ƭ CreateTxCallback: (tx: TxBuilder, ref: (idx: number) => InstructionRef) => void | Promise<void>

Type declaration

▸ (tx, ref): void | Promise<void>

Parameters
NameType
txTxBuilder
ref(idx: number) => InstructionRef
Returns

void | Promise<void>

Defined in

packages/sdk/src/aldea.ts:16


TxBuildHook

Ƭ TxBuildHook: (txb: TxBuilder, instruction: Instruction, idx: number) => void | Instruction | Promise<Instruction | void>

Type declaration

▸ (txb, instruction, idx): void | Instruction | Promise<Instruction | void>

Build hook function that can intercept an instruction and mutate it. It must return the same Instruction type.

Parameters
NameType
txbTxBuilder
instructionInstruction
idxnumber
Returns

void | Instruction | Promise<Instruction | void>

Defined in

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


TxBuildStep

Ƭ TxBuildStep: (txb: TxBuilder, ...userArgs: any[]) => Instruction | Promise<Instruction>

Type declaration

▸ (txb, ...userArgs): Instruction | Promise<Instruction>

Build step function that must return an Instruction to append to the built transaction.

Parameters
NameType
txbTxBuilder
...userArgsany[]
Returns

Instruction | Promise<Instruction>

Defined in

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

Variables

InstructionSerializer

Const InstructionSerializer: Serializable<Instruction>

Instruction Serializer object - implements the Serializable interface.

Defined in

packages/core/dist/instruction.d.ts:47


LockSerializer

Const LockSerializer: Serializable<Lock>

Lock Serializer object - implements the Serializable interface.

Defined in

packages/core/dist/lock.d.ts:44


OutputSerializer

Const OutputSerializer: Serializable<Output>

Output Serializer object - implements the Serializable interface.

Defined in

packages/core/dist/output.d.ts:56


PointerSerializer

Const PointerSerializer: Serializable<Pointer>

Pointer Serializer object - implements the Serializable interface.

Defined in

packages/core/dist/pointer.d.ts:29


TxSerializer

Const TxSerializer: Serializable<Tx>

Tx Serializer object - implements the Serializable interface.

Defined in

packages/core/dist/tx.d.ts:66

Functions

abiFromBin

abiFromBin(data): Abi

Parses the given binary data to an ABI interface.

Parameters

NameType
dataUint8Array

Returns

Abi

Defined in

packages/core/dist/abi.d.ts:5


abiFromJson

abiFromJson(json): Abi

Parses the given JSON data to an ABI interface.

Parameters

NameType
jsonstring

Returns

Abi

Defined in

packages/core/dist/abi.d.ts:9


abiToBin

abiToBin(abi): Uint8Array

Serializes the given ABI interface to binary data.

Parameters

NameType
abiAbi

Returns

Uint8Array

Defined in

packages/core/dist/abi.d.ts:13


abiToJson

abiToJson(abi, space?): string

Serializes the given ABI interface to JSON data.

Parameters

NameType
abiAbi
space?number

Returns

string

Defined in

packages/core/dist/abi.d.ts:17


ref

ref(idx): InstructionRef

Wrap a number with InstructionRef

Parameters

NameType
idxnumber

Returns

InstructionRef

Defined in

packages/core/dist/instruction.d.ts:43