AnyAddress

Represents an address in C++ for almost any blockchain.

Constructors

Link copied to clipboard
open fun AnyAddress(string: String, coin: CoinType)
Creates an address from a string representation and a coin type.
Link copied to clipboard
open fun AnyAddress(string: String, coin: CoinType, hrp: String)
Creates an bech32 address from a string representation, a coin type and the given hrp.
Link copied to clipboard
open fun AnyAddress(string: String, coin: CoinType, ss58Prefix: Int)
Creates an SS58 address from a string representation, a coin type and the given ss58Prefix.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, coin: CoinType)
Creates an address from a public key.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, coin: CoinType, derivation: Derivation)
Creates an address from a public key and derivation option.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, coin: CoinType, hrp: String)
Creates an bech32 address from a public key and a given hrp.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, coin: CoinType, ss58Prefix: Int)
Creates an SS58 address from a public key and a given ss58Prefix.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, filecoinAddressType: FilecoinAddressType)
Creates a Filecoin address from a public key and a given address type.
Link copied to clipboard
open fun AnyAddress(publicKey: PublicKey, firoAddressType: FiroAddressType)
Creates a Firo address from a public key and a given address type.

Functions

Link copied to clipboard
open fun coin(): CoinType
Returns coin type of address.
Link copied to clipboard
open fun data(): Array<Byte>
Returns underlaying data (public key or key hash)
Link copied to clipboard
open fun description(): String
Returns the address string representation.
Link copied to clipboard
open fun equals(lhs: AnyAddress, rhs: AnyAddress): Boolean
Compares two addresses for equality.
Link copied to clipboard
open fun isValid(string: String, coin: CoinType): Boolean
Determines if the string is a valid Any address.
Link copied to clipboard
open fun isValidBech32(string: String, coin: CoinType, hrp: String): Boolean
Determines if the string is a valid Any address with the given hrp.
Link copied to clipboard
open fun isValidSS58(string: String, coin: CoinType, ss58Prefix: Int): Boolean
Determines if the string is a valid Any address with the given SS58 network prefix.