WithdrawAsset class
Configuration for a withdrawal asset supported by the anchor.
Contains all the details about how withdrawals work for a specific asset, including whether it's enabled, authentication requirements, fee structure, transaction limits, and supported withdrawal types with their required fields.
See also:
- InfoResponse which contains a map of these for all supported assets
- WithdrawRequest for initiating a withdrawal
Constructors
-
WithdrawAsset(bool enabled, bool? authenticationRequired, double? feeFixed, double? feePercent, double? minAmount, double? maxAmount, Map<
String, Map< ? types)String, AnchorField> ?> - Creates a withdrawal asset configuration for SEP-6 transfer operations.
-
WithdrawAsset.fromJson(Map<
String, dynamic> json) -
Creates a WithdrawAsset from JSON returned by the anchor's /info endpoint.
factory
Properties
- authenticationRequired ↔ bool?
-
Optional. true if client must be authenticated before accessing
the withdraw endpoint for this asset. false if not specified.
getter/setter pair
- enabled ↔ bool
-
true if SEP-6 withdrawal for this asset is supported
getter/setter pair
- feeFixed ↔ double?
-
Optional fixed (flat) fee for withdraw, in units of the Stellar asset.
Null if there is no fee or the fee schedule is complex.
getter/setter pair
- feePercent ↔ double?
-
Optional percentage fee for withdraw, in percentage points of the
Stellar asset. Null if there is no fee or the fee schedule is complex.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAmount ↔ double?
-
Optional maximum amount. No limit if not specified.
getter/setter pair
- minAmount ↔ double?
-
Optional minimum amount. No limit if not specified.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
types
↔ Map<
String, Map< ?String, AnchorField> ?> -
A field with each type of withdrawal supported for that asset as a key.
Each type can specify a fields object explaining what fields
are needed and what they do. Anchors are encouraged to use SEP-9
financial account fields, but can also define custom fields if necessary.
If a fields object is not specified, the wallet should assume that no
extra fields are needed for that type of withdrawal. In the case that
the Anchor requires additional fields for a withdrawal, it should set the
transaction status to pending_customer_info_update. The wallet can query
the /transaction endpoint to get the fields needed to complete the
transaction in required_customer_info_updates and then use SEP-12 to
collect the information from the user.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited