EthjsAddress
Handling and generating Ethereum addresses
Constructors
new EthjsAddress()
new EthjsAddress(
bytes):EthjsAddress
Parameters
• bytes: Uint8Array
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:6
Properties
bytes
readonlybytes:Uint8Array
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:5
Methods
equals()
equals(
address):boolean
Is address equal to another.
Parameters
• address: EthjsAddress
Returns
boolean
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:42
isPrecompileOrSystemAddress()
isPrecompileOrSystemAddress():
boolean
True if address is in the address range defined by EIP-1352
Returns
boolean
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:51
isZero()
isZero():
boolean
Is address zero.
Returns
boolean
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:46
toBytes()
toBytes():
Uint8Array
Returns a new Uint8Array representation of address.
Returns
Uint8Array
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:59
toString()
toString():
string
Returns hex encoding of address.
Returns
string
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:55
fromPrivateKey()
staticfromPrivateKey(privateKey):EthjsAddress
Returns an address for a given private key.
Parameters
• privateKey: Uint8Array
A private key must be 256 bits wide
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:25
fromPublicKey()
staticfromPublicKey(pubKey):EthjsAddress
Returns an address for a given public key.
Parameters
• pubKey: Uint8Array
The two points of an uncompressed key
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:20
fromString()
staticfromString(str):EthjsAddress
Returns an Address object from a hex-encoded string.
Parameters
• str: string
Hex-encoded address
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:15
generate()
staticgenerate(from,nonce):EthjsAddress
Generates an address for a newly created contract.
Parameters
• from: EthjsAddress
The address which is creating this new address
• nonce: bigint
The nonce of the from account
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:31
generate2()
staticgenerate2(from,salt,initCode):EthjsAddress
Generates an address for a contract created using CREATE2.
Parameters
• from: EthjsAddress
The address which is creating this new address
• salt: Uint8Array
A salt
• initCode: Uint8Array
The init code of the contract being created
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:38
zero()
staticzero():EthjsAddress
Returns the zero address.
Returns
Source
node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/address.d.ts:10