Represents a Quai transaction.

Extends

Implements

  • QuaiTransactionLike

Constructors

new QuaiTransaction()

new QuaiTransaction(from?): QuaiTransaction

Creates a new Transaction with default values.

Parameters

ParameterTypeDescription
from?stringThe sender address.

Returns

QuaiTransaction

Overrides

AbstractTransaction<Signature>.constructor

Source

transaction/quai-transaction.ts:295

Accessors

accessList

get accessList(): null | AccessList

The access list.

An access list permits discounted (but pre-paid) access to bytecode and state variable access within contract execution.

Returns

null | AccessList

Source

transaction/quai-transaction.ts:279


chainId

get chainId(): bigint

The chain ID this transaction is valid on.

Returns

bigint

Source

transaction/abstract-transaction.ts:280


data

get data(): string

The transaction data. For init transactions this is the deployment code.

Returns

string

Source

transaction/quai-transaction.ts:252


destZone

get destZone(): undefined | Zone

The zone of the recipient address

Returns

undefined | Zone

Source

transaction/quai-transaction.ts:186


digest

get digest(): string

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:315


gasLimit

get gasLimit(): bigint

The gas limit.

Returns

bigint

Source

transaction/quai-transaction.ts:208


gasPrice

get gasPrice(): null | bigint

The maximum total fee per unit of gas to pay. On legacy networks this should be null.

Returns

null | bigint

Source

transaction/quai-transaction.ts:236


hash

get hash(): null | string

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

Throws

If the transaction is not signed.

Returns

null | string

Source

transaction/quai-transaction.ts:141


isExternal

get isExternal(): boolean

Check if the transaction is external.

Returns

boolean

True if the transaction is external.

Source

transaction/abstract-transaction.ts:417


minerTip

get minerTip(): null | bigint

The maximum priority fee per unit of gas to pay. On legacy networks this should be null.

Returns

null | bigint

Source

transaction/quai-transaction.ts:220


nonce

get nonce(): number

The transaction nonce.

Returns

number

Source

transaction/quai-transaction.ts:196


originZone

get originZone(): undefined | Zone

The zone of the sender address

Returns

undefined | Zone

Source

transaction/quai-transaction.ts:176


serialized

get serialized(): string

The serialized transaction.

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

Returns

string

Source

transaction/abstract-transaction.ts:341


signature

get signature(): S

If signed, the signature for this transaction.

Returns

S

Source

transaction/abstract-transaction.ts:290


to

get to(): null | string

The to address for the transaction or null if the transaction is an init transaction.

Returns

null | string

Source

transaction/quai-transaction.ts:126


type

get type(): null | number

The transaction type.

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

Returns

null | number

Source

transaction/abstract-transaction.ts:240


typeName

get typeName(): null | string

The name of the transaction type.

Returns

null | string

Source

transaction/abstract-transaction.ts:264


unsignedSerialized

get unsignedSerialized(): string

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:356


value

get value(): bigint

The amount of ether to send in this transactions.

Returns

bigint

Source

transaction/quai-transaction.ts:264

Methods

clone()

clone(): QuaiTransaction

Create a copy of this transaction.

Returns

QuaiTransaction

The cloned transaction.

Overrides

AbstractTransaction.clone

Source

transaction/quai-transaction.ts:347


inferType()

inferType(): number

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:365


inferTypes()

inferTypes(): number[]

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

Returns

number[]

The compatible transaction types.

Overrides

AbstractTransaction.inferTypes

Source

transaction/quai-transaction.ts:314


isSigned()

isSigned(): this is AbstractTransaction<Signature> & Object

Returns true if signed.

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

Returns

this is AbstractTransaction<Signature> & Object

Indicates if the transaction is signed.

Inherited from

AbstractTransaction.isSigned

Source

transaction/abstract-transaction.ts:326


toJSON()

toJSON(): QuaiTransactionLike

Return a JSON-friendly object.

Returns

QuaiTransactionLike

The JSON-friendly object.

Overrides

AbstractTransaction.toJSON

Source

transaction/quai-transaction.ts:356


toProtobuf()

toProtobuf(includeSignature?): ProtoTransaction

Return a protobuf-friendly JSON object.

Parameters

ParameterTypeDefault valueDescription
includeSignature?booleantrueWhether to include the signature. Default is true

Returns

ProtoTransaction

The protobuf-friendly JSON object.

Overrides

AbstractTransaction.toProtobuf

Source

transaction/quai-transaction.ts:387


from()

static from(tx): QuaiTransaction

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

Parameters

ParameterTypeDescription
txstring | QuaiTransactionLikeThe transaction to decode.

Returns

QuaiTransaction

The decoded transaction.

Source

transaction/quai-transaction.ts:426


fromProto()

static fromProto(protoTx): QuaiTransaction

Create a Transaction from a ProtoTransaction object.

Parameters

ParameterTypeDescription
protoTxProtoTransactionThe transaction to decode.

Returns

QuaiTransaction

The decoded transaction.

Source

transaction/quai-transaction.ts:491