Skip to main content

Class: ExternalTransactionEnvelope

The envelope for an external transaction (a transaction sent by a user, a dApp, etc.)

ExternalTransactionEnvelope

Constructors

new ExternalTransactionEnvelope()

new ExternalTransactionEnvelope(param0): ExternalTransactionEnvelope

Creates an instance of ExternalTransactionEnvelope.

Parameters

ParameterTypeDescription

param0

ExternalTransaction

The object representing the external transaction.

Returns

ExternalTransactionEnvelope

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:113

Properties

authData

authData: Uint8Array<ArrayBufferLike>;

The auth data attached to the transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:81


chainId

chainId: number;

The chain ID.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:63


data

data: Uint8Array<ArrayBufferLike>;

The transaction data.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:75


feeCredit

feeCredit: bigint;

The amount of tokens the user is willing to pay for the transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:87


isDeploy

isDeploy: boolean;

The flag that determines whether the external transaction is a deployment transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:51


maxFeePerGas

maxFeePerGas: bigint;

The max fee per gas the user is willing to spend for the transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:99


maxPriorityFeePerGas

maxPriorityFeePerGas: bigint;

The max tip the user is willing to pay for the transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:93


seqno

seqno: number;

The transaction sequence number.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:69


to

to: Uint8Array<ArrayBufferLike>;

The destination address of the transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:57

Methods

encode()

encode(): Uint8Array<ArrayBufferLike>

Encodes the external transaction into a Uint8Array.

Returns

Uint8Array<ArrayBufferLike>

The encoded external transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:141


encodeWithSignature()

encodeWithSignature(signer): Promise<object>

Encodes the external transaction with its signature.

Parameters

ParameterTypeDescription

signer

ISigner

The transaction signer.

Returns

Promise<object>

The object containing the encoded transaction and its hash.

hash
hash: Uint8Array<ArrayBufferLike>;
raw
raw: Uint8Array<ArrayBufferLike>;

Async

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:178


hash()

hash(): Uint8Array<ArrayBufferLike>

Provides the hash tree root of the external transaction.

Returns

Uint8Array<ArrayBufferLike>

The hash tree root of the external transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:150


hexAddress()

hexAddress(): 0x${string}

Returns the hex address of the given bytes.

Returns

0x${string}

The hex address.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:219


send()

send(client): Promise<0x${string}>

Sends the external transaction.

Parameters

ParameterTypeDescription

client

PublicClient

The client sending the transaction.

Returns

Promise<0x${string}>

The hash of the external transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:229


sign()

sign(signer): Promise<Uint8Array<ArrayBufferLike>>

Signs the external transaction.

Parameters

ParameterTypeDescription

signer

ISigner

The transaction signer.

Returns

Promise<Uint8Array<ArrayBufferLike>>

The transaction signature.

Async

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:198


signingHash()

signingHash(): Uint8Array<ArrayBufferLike>

Provides the signing hash of the external transaction.

Returns

Uint8Array<ArrayBufferLike>

The signing hash of the external transaction.

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:162


updateAuthdata()

updateAuthdata(signer): Promise<Uint8Array<ArrayBufferLike>>

Updates the authentication data in the external transaction and returns the result.

Parameters

ParameterTypeDescription

signer

ISigner

The auth data signer.

Returns

Promise<Uint8Array<ArrayBufferLike>>

The signed auth data.

Async

Defined

@nilfoundation/niljs/src/encoding/externalTransaction.ts:209