Skip to content

EthjsAccount

Constructors

new EthjsAccount()

new EthjsAccount(nonce?, balance?, storageRoot?, codeHash?): EthjsAccount

This constructor assigns and validates the values. Use the static factory methods to assist in creating an Account from varying data types.

Parameters

nonce?: bigint

balance?: bigint

storageRoot?: Uint8Array

codeHash?: Uint8Array

Returns

EthjsAccount

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:21

Properties

_validate

private _validate: any

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:22


balance

balance: bigint

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:11


codeHash

codeHash: Uint8Array

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:13


nonce

nonce: bigint

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:10


storageRoot

storageRoot: Uint8Array

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:12

Methods

isContract()

isContract(): boolean

Returns a Boolean determining if the account is a contract.

Returns

boolean

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:34


isEmpty()

isEmpty(): boolean

Returns a Boolean determining if the account is empty complying to the definition of account emptiness in EIP-161: “An account is considered empty when it has no code and zero nonce and zero balance.”

Returns

boolean

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:40


raw()

raw(): Uint8Array[]

Returns an array of Uint8Arrays of the raw bytes for the account, in order.

Returns

Uint8Array[]

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:26


serialize()

serialize(): Uint8Array

Returns the RLP serialization of the account as a Uint8Array.

Returns

Uint8Array

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:30


fromAccountData()

static fromAccountData(accountData): EthjsAccount

Parameters

accountData: AccountData

Returns

EthjsAccount

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:14


fromRlpSerializedAccount()

static fromRlpSerializedAccount(serialized): EthjsAccount

Parameters

serialized: Uint8Array

Returns

EthjsAccount

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:15


fromValuesArray()

static fromValuesArray(values): EthjsAccount

Parameters

values: Uint8Array[]

Returns

EthjsAccount

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/account.d.ts:16