Skip to main content
Class representing a QiTransaction.

Implements

Extends

  • AbstractTransaction<string>

Implements

  • QiTransactionLike

Constructors

new QiTransaction()

Creates a new Transaction with default values.

Returns

QiTransaction

Overrides

AbstractTransaction<string>.constructor

Source

transaction/qi-transaction.ts:185

Accessors

chainId

The chain ID this transaction is valid on.

Returns

bigint

Source

transaction/abstract-transaction.ts:275

data

Get transaction data.
Set transaction data.

Parameters

Returns

Uint8Array The transaction data.

Source

transaction/qi-transaction.ts:99

destZone

Get the zone of the recipient address.

Returns

undefined | Zone The destination zone.

Source

transaction/qi-transaction.ts:177

digest

The pre-image hash of this transaction. This is the digest that a Signer must sign to authorize this transaction.

Returns

string

Source

transaction/abstract-transaction.ts:310

hash

Get the permuted hash of the transaction as specified by QIP-0010.

Throws

If the transaction has no inputs or outputs, or if cross-zone & cross-ledger transactions are not supported.

See

QIP0010

Returns

null | string The transaction hash.

Source

transaction/qi-transaction.ts:121

isExternal

Check if the transaction is external.

Returns

boolean True if the transaction is external.

Source

transaction/abstract-transaction.ts:412

originZone

Get the zone of the sender address.

Returns

undefined | Zone The origin zone.

Source

transaction/qi-transaction.ts:165

serialized

The serialized transaction. This throws if the transaction is unsigned. For the pre-image, use unsignedSerialized .

Returns

string

Source

transaction/abstract-transaction.ts:336

signature

If signed, the signature for this transaction.

Returns

S

Source

transaction/abstract-transaction.ts:285

txInputs

Get transaction inputs.
Set transaction inputs.

Throws

If the value is not an array.

Parameters

Returns

TxInput[] The transaction inputs.

Source

transaction/qi-transaction.ts:55

txOutputs

Get transaction outputs.
Set transaction outputs.

Throws

If the value is not an array.

Parameters

Returns

TxOutput[] The transaction outputs.

Source

transaction/qi-transaction.ts:77

type

The transaction type. If null, the type will be automatically inferred based on explicit properties.

Returns

null | number

Source

transaction/abstract-transaction.ts:235

typeName

The name of the transaction type.

Returns

null | string

Source

transaction/abstract-transaction.ts:259

unsignedSerialized

The transaction pre-image. The hash of this is the digest which needs to be signed to authorize this transaction.

Returns

string

Source

transaction/abstract-transaction.ts:351

Methods

clone()

Create a copy of this transaction.

Returns

QiTransaction The cloned transaction.

Overrides

AbstractTransaction.clone

Source

transaction/qi-transaction.ts:217

inferType()

Return the most “likely” type; currently the highest supported transaction type.

Returns

number The inferred transaction type.

Inherited from

AbstractTransaction.inferType

Source

transaction/abstract-transaction.ts:360

inferTypes()

Validates the explicit properties and returns a list of compatible transaction types.

Returns

number[] The compatible transaction types.

Overrides

AbstractTransaction.inferTypes

Source

transaction/qi-transaction.ts:197

isSigned()

Returns true if signed. This provides a Type Guard that properties requiring a signed transaction are non-null.

Returns

this is AbstractTransaction<string> & Object Indicates if the transaction is signed.

Inherited from

AbstractTransaction.isSigned

Source

transaction/abstract-transaction.ts:321

toJSON()

Return a JSON-friendly object.

Returns

TransactionLike The JSON-friendly object.

Overrides

AbstractTransaction.toJSON

Source

transaction/qi-transaction.ts:226

toProtobuf()

Return a protobuf-friendly JSON object.

Parameters

Returns

ProtoTransaction The protobuf-friendly JSON object.

Overrides

AbstractTransaction.toProtobuf

Source

transaction/qi-transaction.ts:251

from()

Create a Transaction from a serialized transaction or a Transaction-like object.

Parameters

Returns

QiTransaction The decoded transaction.

Throws

If the transaction is unsigned and defines a hash.

Source

transaction/qi-transaction.ts:287

fromProto()

Create a Transaction from a ProtoTransaction object.

Parameters

Returns

QiTransaction The decoded transaction.

Source

transaction/qi-transaction.ts:326