Address
Defined in: packages/common/src/address.ts:42
Represents an Algorand address
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Address(
publicKey):Address
Defined in: packages/common/src/address.ts:55
Create a new Address object from its binary form.
Parameters
Section titled “Parameters”publicKey
Section titled “publicKey”Uint8Array
The binary form of the address. Must be 32 bytes.
Returns
Section titled “Returns”Address
Properties
Section titled “Properties”publicKey
Section titled “publicKey”
readonlypublicKey:Uint8Array
Defined in: packages/common/src/address.ts:46
The binary form of the address. For standard accounts, this is the public key.
Methods
Section titled “Methods”checksum()
Section titled “checksum()”checksum():
Uint8Array
Defined in: packages/common/src/address.ts:72
Compute the 4 byte checksum of the address.
Returns
Section titled “Returns”Uint8Array
equals()
Section titled “equals()”equals(
other):boolean
Defined in: packages/common/src/address.ts:65
Check if the address is equal to another address.
Parameters
Section titled “Parameters”Address
Returns
Section titled “Returns”boolean
toString()
Section titled “toString()”toString():
string
Defined in: packages/common/src/address.ts:79
Encode the address into a string form.
Returns
Section titled “Returns”string
fromString()
Section titled “fromString()”
staticfromString(address):Address
Defined in: packages/common/src/address.ts:89
Decode an address from a string.
Parameters
Section titled “Parameters”address
Section titled “address”string
The address to decode. Must be 58 characters long.
Returns
Section titled “Returns”Address
An Address object corresponding to the input string.
zeroAddress()
Section titled “zeroAddress()”
staticzeroAddress():Address
Defined in: packages/common/src/address.ts:113
Get the zero address.
Returns
Section titled “Returns”Address