Address class
Represents a single address in the Stellar network.
An address can represent an account, a contract, a muxed account, (>= p23), a claimable balance (>= p23), or a liquidity pool (=>p23).
To create an address, call Address.new or use Address.forAccountId to create an Address for a given accountId ("G...") or use Address.forContractId to create an Address for a given contractId or use Address.forMuxedAccountId to create an Address for a given muxed accountId ("M...") or use Address.forClaimableBalanceId to create an Address for a given claimable balance id or use Address.forLiquidityPoolId to create an Address for a given liquidity pool id or use Address.fromXdr to create an Address for a given XdrSCAddress.
Constructors
- Address.new(int _type, {String? accountId, String? contractId, String? muxedAccountId, String? claimableBalanceId, String? liquidityPoolId})
- Constructs an Address for the given type which can be one of: Address.TYPE_ACCOUNT, Address.TYPE_CONTRACT, Address.TYPE_CLAIMABLE_BALANCE, Address.TYPE_LIQUIDITY_POOL.
Properties
- accountId ↔ String?
-
The id of the account if type is TYPE_ACCOUNT otherwise null.
getter/setter pair
- claimableBalanceId ↔ String?
-
The id of the claimable balance if type is TYPE_CLAIMABLE_BALANCE otherwise null.
getter/setter pair
- contractId ↔ String?
-
The id of the contract if type is TYPE_CONTRACT otherwise null.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- liquidityPoolId ↔ String?
-
The id of the liquidity pool if type is TYPE_LIQUIDITY_POOL otherwise null.
getter/setter pair
- muxedAccountId ↔ String?
-
The id of the account if type is TYPE_MUXED_ACCOUNT otherwise null.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → dynamic
-
The type of the Address (TYPE_ACCOUNT or TYPE_CONTRACT).
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toXdr(
) → XdrSCAddress - Returns a XdrSCAddress object created from this Address object.
-
toXdrSCVal(
) → XdrSCVal -
Returns a XdrSCVal containing an
XdrSCObject
for this Address.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
forAccountId(
String accountId) → Address -
Constructs an Address of type Address.TYPE_ACCOUNT for the given
accountId
("G..."). -
forClaimableBalanceId(
String claimableBalanceId) → Address -
Constructs an Address of type Address.TYPE_CLAIMABLE_BALANCE for the given
claimableBalanceId
. -
forContractId(
String contractId) → Address -
Constructs an Address of type Address.TYPE_CONTRACT for the given
contractId
. -
forLiquidityPoolId(
String liquidityPoolId) → Address -
Constructs an Address of type Address.TYPE_LIQUIDITY_POOL for the given
liquidityPoolId
. -
forMuxedAccountId(
String muxedAccountId) → Address -
Constructs an Address of type Address.TYPE_MUXED_ACCOUNT for the given
muxedAccountId
("M..."). -
fromXdr(
XdrSCAddress xdr) → Address -
Constructs an Address from the given
xdr
. -
fromXdrSCVal(
XdrSCVal val) → Address
Constants
- TYPE_ACCOUNT → const int
- TYPE_CLAIMABLE_BALANCE → const int
- TYPE_CONTRACT → const int
- TYPE_LIQUIDITY_POOL → const int
- TYPE_MUXED_ACCOUNT → const int