QuaiTransaction
Represents a Quai transaction.
Extends
AbstractTransaction
<Signature
>
Implements
QuaiTransactionLike
Constructors
new QuaiTransaction()
new QuaiTransaction(from?): QuaiTransaction
Creates a new Transaction with default values.
Parameters
Parameter | Type | Description |
---|---|---|
from ? | string | The sender address. |
Returns
Overrides
AbstractTransaction<Signature>.constructor
Source
transaction/quai-transaction.ts:310
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:294
chainId
get chainId(): bigint
The chain ID this transaction is valid on.
Returns
bigint
Source
transaction/abstract-transaction.ts:267
data
get data(): string
The transaction data. For init
transactions this is the deployment code.
Returns
string
Source
transaction/quai-transaction.ts:267
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:302
gasLimit
get gasLimit(): bigint
The gas limit.
Returns
bigint
Source
transaction/quai-transaction.ts:208
gasPrice
get gasPrice(): null | bigint
The gas price.
On legacy networks this defines the fee that will be paid. On EIP-1559 networks, this should be null
.
Returns
null
| bigint
Source
transaction/quai-transaction.ts:222
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:404
maxFeePerGas
get maxFeePerGas(): 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:251
maxPriorityFeePerGas
get maxPriorityFeePerGas(): 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:235
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:328
signature
get signature(): S
If signed, the signature for this transaction.
Returns
S
Source
transaction/abstract-transaction.ts:277
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:227
typeName
get typeName(): null | string
The name of the transaction type.
Returns
null
| string
Source
transaction/abstract-transaction.ts:251
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:343
value
get value(): bigint
The amount of ether to send in this transactions.
Returns
bigint
Source
transaction/quai-transaction.ts:279
Methods
clone()
clone(): QuaiTransaction
Create a copy of this transaction.
Returns
The cloned transaction.
Overrides
AbstractTransaction.clone
Source
transaction/quai-transaction.ts:365
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:352
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:329
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:313
toJSON()
toJSON(): QuaiTransactionLike
Return a JSON-friendly object.
Returns
QuaiTransactionLike
The JSON-friendly object.
Overrides
AbstractTransaction.toJSON
Source
transaction/quai-transaction.ts:374
toProtobuf()
toProtobuf(includeSignature?): ProtoTransaction
Return a protobuf-friendly JSON object.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
includeSignature ? | boolean | true | Whether to include the signature. Default is true |
Returns
ProtoTransaction
The protobuf-friendly JSON object.
Overrides
AbstractTransaction.toProtobuf
Source
transaction/quai-transaction.ts:406
from()
static from(tx): QuaiTransaction
Create a Transaction from a serialized transaction or a Transaction-like object.
Parameters
Parameter | Type | Description |
---|---|---|
tx | string | QuaiTransactionLike | The transaction to decode. |
Returns
The decoded transaction.
Source
transaction/quai-transaction.ts:435
fromProto()
static fromProto(protoTx): QuaiTransaction
Create a Transaction from a ProtoTransaction object.
Parameters
Parameter | Type | Description |
---|---|---|
protoTx | ProtoTransaction | The transaction to decode. |
Returns
The decoded transaction.
Source
Was this page helpful?