Address
Represents a single address in the Stellar network. An address can represent an account, contract, muxed account, claimable balance, or liquidity pool.
Usage
// Parse from string
val accountAddress = Address("GABC...")
val contractAddress = Address("CCJZ5D...")
val muxedAddress = Address("MABC...")
// Create from bytes
val address = Address.fromAccount(publicKeyBytes)
val contract = Address.fromContract(contractIdBytes)
// Convert to XDR
val scAddress = address.toSCAddress()
val scVal = address.toSCVal()
// Get encoded string
val encoded = address.toString() // G..., C..., M..., B..., or L...Content copied to clipboard
Parameters
address
the StrKey encoded format of Stellar address
Throws
if the address is invalid or unsupported
Constructors
Functions
Link copied to clipboard
Gets the encoded string representation of this address.
Link copied to clipboard
Converts this object to its SCAddressXdr XDR object representation.