Skip to content

@aldea/sdk / Exports / Output

Class: Output

Transaction Execution Output

When a transaction is executed it creates one or more outputs. An output has the following fields:

  • origin: a 36-byte pointer to the transaction the instance was first instantiated
  • location: a 36-byte pointer to the transaction of the current state of the instance
  • class: a 36-byte pointer to the package the class is found in
  • lock: the Lock type and data
  • state: BCS encoded output state

The Output class is a generic wrapper for any output, and provides a way to access the parsed state as a JavaScript object.

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Output(origin, location, classPtr, lock, stateBuf, abi?): Output

Parameters

NameType
originPointer
locationPointer
classPtrPointer
lockLock
stateBufUint8Array
abi?Abi

Returns

Output

Defined in

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

Properties

#private

Private #private: any

Defined in

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


classPtr

classPtr: Pointer

Defined in

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


location

location: Pointer

Defined in

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


lock

lock: Lock

Defined in

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


origin

origin: Pointer

Defined in

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


stateBuf

stateBuf: Uint8Array

Defined in

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

Accessors

abi

get abi(): void | Abi

Returns

void | Abi

Defined in

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

set abi(abi): void

Parameters

NameType
abivoid | Abi

Returns

void

Defined in

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


className

get className(): string | void

Returns

string | void

Defined in

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


classNode

get classNode(): void | ClassNode

Returns

void | ClassNode

Defined in

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


hash

get hash(): Uint8Array

Returns

Uint8Array

Defined in

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


id

get id(): string

Returns

string

Defined in

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


props

get props(): void | { [key: string]: any; }

Returns

void | { [key: string]: any; }

Defined in

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

Methods

toBytes

toBytes(): Uint8Array

Returns

Uint8Array

Defined in

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


toHex

toHex(): string

Returns

string

Defined in

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


toJson

toJson(): OutputInterface

Returns

OutputInterface

Defined in

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


fromBytes

fromBytes(bytes, abi?): Output

Parameters

NameType
bytesUint8Array
abi?Abi

Returns

Output

Defined in

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


fromHex

fromHex(hex, abi?): Output

Parameters

NameType
hexstring
abi?Abi

Returns

Output

Defined in

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


fromJson

fromJson(data, abi?): Output

Parameters

NameType
dataOutputInterface
abi?Abi

Returns

Output

Defined in

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