Account
Index
Constructors
publicconstructor
Parameters
nonce: bigint = _0n
balance: bigint = _0n
storageRoot: Buffer = KECCAK256_RLP
codeHash: Buffer = KECCAK256_NULL
Returns Account
Properties
publicbalance
publiccodeHash
publicnonce
publicstorageRoot
Methods
publicisContract
Returns a
Boolean
determining if the account is a contract.Returns boolean
publicisEmpty
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
publicraw
Returns a Buffer Array of the raw Buffers for the account, in order.
Returns Buffer[]
publicserialize
Returns the RLP serialization of the account as a
Buffer
.Returns Buffer
publicstaticfromAccountData
Parameters
accountData: AccountData
Returns Account
publicstaticfromRlpSerializedAccount
Parameters
serialized: Buffer
Returns Account
publicstaticfromValuesArray
Parameters
values: Buffer[]
Returns Account
This constructor assigns and validates the values. Use the static factory methods to assist in creating an Account from varying data types.