public class Address
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Address.AddressType
Represents the type of the address.
|
Constructor and Description |
---|
Address(java.lang.String address)
Creates a new
Address from a Stellar public key (G...), contract ID (C...), med25519
public key (M...), liquidity pool ID (L...), or claimable balance ID (B...). |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static Address |
fromAccount(byte[] accountId)
Creates a new
Address from a Stellar public key. |
static Address |
fromClaimableBalance(byte[] claimableBalanceId)
Creates a new
Address from a Stellar Claimable Balance ID. |
static Address |
fromContract(byte[] contractId)
Creates a new
Address from a Stellar Contract ID. |
static Address |
fromLiquidityPool(byte[] liquidityPoolId)
Creates a new
Address from a Stellar Liquidity Pool ID. |
static Address |
fromMuxedAccount(byte[] muxedAccountId)
Creates a new
Address from a Stellar med25519 public key. |
static Address |
fromSCAddress(SCAddress scAddress)
|
static Address |
fromSCVal(SCVal scVal)
|
Address.AddressType |
getAddressType()
Returns the type of this address.
|
byte[] |
getBytes()
Returns the byte array of the Stellar public key or contract ID.
|
java.lang.String |
getEncodedAddress()
Gets the encoded string representation of this address.
|
int |
hashCode() |
SCAddress |
toSCAddress()
Converts this object to its
SCAddress XDR object representation. |
SCVal |
toSCVal()
Converts this object to its
SCVal XDR object representation. |
java.lang.String |
toString() |
public Address(java.lang.String address)
Address
from a Stellar public key (G...), contract ID (C...), med25519
public key (M...), liquidity pool ID (L...), or claimable balance ID (B...).address
- the StrKey encoded format of Stellar address.public static Address fromAccount(byte[] accountId)
Address
from a Stellar public key.accountId
- the byte array of the Stellar public key (G...).Address
object from the given Stellar public key.public static Address fromContract(byte[] contractId)
Address
from a Stellar Contract ID.contractId
- the byte array of the Stellar Contract ID.Address
object from the given Stellar Contract ID.public static Address fromMuxedAccount(byte[] muxedAccountId)
Address
from a Stellar med25519 public key.muxedAccountId
- the byte array of the Stellar med25519 public key (M...).Address
object from the given Stellar med25519 public key.public static Address fromClaimableBalance(byte[] claimableBalanceId)
Address
from a Stellar Claimable Balance ID.claimableBalanceId
- the byte array of the Stellar Claimable Balance ID (B...).Address
object from the given Stellar Claimable Balance ID.public static Address fromLiquidityPool(byte[] liquidityPoolId)
Address
from a Stellar Liquidity Pool ID.liquidityPoolId
- the byte array of the Stellar Liquidity Pool ID (L...).Address
object from the given Stellar Liquidity Pool ID.public SCAddress toSCAddress()
SCAddress
XDR object representation.SCAddress
object from this objectpublic SCVal toSCVal()
SCVal
XDR object representation.SCVal
object from this objectpublic byte[] getBytes()
public Address.AddressType getAddressType()
public java.lang.String getEncodedAddress()
java.lang.IllegalArgumentException
- if the address type is unknownpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object