AnyAddress

open fun AnyAddress(string: String, coin: CoinType)

Creates an address from a string representation and a coin type. Must be deleted with TWAnyAddressDelete after use.

Return

TWAnyAddress pointer or nullptr if address and coin are invalid.

Parameters

string

address to create.

coin

coin type of the address.


open fun AnyAddress(string: String, coin: CoinType, hrp: String)

Creates an bech32 address from a string representation, a coin type and the given hrp. Must be deleted with TWAnyAddressDelete after use.

Return

TWAnyAddress pointer or nullptr if address and coin are invalid.

Parameters

string

address to create.

coin

coin type of the address.

hrp

hrp of the address.


open fun AnyAddress(string: String, coin: CoinType, ss58Prefix: Int)

Creates an SS58 address from a string representation, a coin type and the given ss58Prefix. Must be deleted with TWAnyAddressDelete after use.

Return

TWAnyAddress pointer or nullptr if address and coin are invalid.

Parameters

string

address to create.

coin

coin type of the address.

ss58Prefix

ss58Prefix of the SS58 address.


open fun AnyAddress(publicKey: PublicKey, coin: CoinType)

Creates an address from a public key.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

coin

coin type of the address.


open fun AnyAddress(publicKey: PublicKey, coin: CoinType, derivation: Derivation)

Creates an address from a public key and derivation option.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

coin

coin type of the address.

derivation

the custom derivation to use.


open fun AnyAddress(publicKey: PublicKey, coin: CoinType, hrp: String)

Creates an bech32 address from a public key and a given hrp.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

coin

coin type of the address.

hrp

hrp of the address.


open fun AnyAddress(publicKey: PublicKey, coin: CoinType, ss58Prefix: Int)

Creates an SS58 address from a public key and a given ss58Prefix.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

coin

coin type of the address.

ss58Prefix

ss58Prefix of the SS58 address.


open fun AnyAddress(publicKey: PublicKey, filecoinAddressType: FilecoinAddressType)

Creates a Filecoin address from a public key and a given address type.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

filecoinAddressType

Filecoin address type.


open fun AnyAddress(publicKey: PublicKey, firoAddressType: FiroAddressType)

Creates a Firo address from a public key and a given address type.

Return

TWAnyAddress pointer or nullptr if public key is invalid.

Parameters

publicKey

derivates the address from the public key.

firoAddressType

Firo address type.