Address
Index
Constructors
publicconstructor
Parameters
buf: Buffer
Returns Address
Properties
publicreadonlybuf
Methods
publicequals
Is address equal to another.
Parameters
address: Address
Returns boolean
publicisPrecompileOrSystemAddress
True if address is in the address range defined by EIP-1352
Returns boolean
publicisZero
Is address zero.
Returns boolean
publictoBuffer
Returns Buffer representation of address.
Returns Buffer
publictoString
Returns hex encoding of address.
Returns string
publicstaticfromPrivateKey
Returns an address for a given private key.
Parameters
privateKey: Buffer
A private key must be 256 bits wide
Returns Address
publicstaticfromPublicKey
Returns an address for a given public key.
Parameters
pubKey: Buffer
The two points of an uncompressed key
Returns Address
publicstaticfromString
Returns an Address object from a hex-encoded string.
Parameters
str: string
Hex-encoded address
Returns Address
publicstaticgenerate
publicstaticgenerate2
publicstaticzero
Returns the zero address.
Returns Address
Handling and generating Ethereum addresses