@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 instantiatedlocation
: a 36-byte pointer to the transaction of the current state of the instanceclass
: a 36-byte pointer to the package the class is found inlock
: the Lock type and datastate
: 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
Name | Type |
---|---|
origin | Pointer |
location | Pointer |
classPtr | Pointer |
lock | Lock |
stateBuf | Uint8Array |
abi? | Abi |
Returns
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
Name | Type |
---|---|
abi | void | 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
Defined in
packages/core/dist/output.d.ts:51
fromBytes
▸ fromBytes(bytes
, abi?
): Output
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
abi? | Abi |
Returns
Defined in
packages/core/dist/output.d.ts:37
fromHex
▸ fromHex(hex
, abi?
): Output
Parameters
Name | Type |
---|---|
hex | string |
abi? | Abi |
Returns
Defined in
packages/core/dist/output.d.ts:38
fromJson
▸ fromJson(data
, abi?
): Output
Parameters
Name | Type |
---|---|
data | OutputInterface |
abi? | Abi |
Returns
Defined in
packages/core/dist/output.d.ts:39