TrustlineCreatedEffectResponse class
Represents a trustline created effect response from Horizon.
This effect occurs when an account establishes a new trustline to an asset or liquidity pool. A trustline must be created before an account can hold non-native assets.
Triggered by: ChangeTrustOperation Returned by: Horizon API effects endpoint when querying for trustline creation effects
Example:
final effects = await sdk.effects.forAccount('account_id').execute();
for (var effect in effects.records) {
if (effect is TrustlineCreatedEffectResponse) {
print('Trustline created: ${effect.assetCode ?? "Pool"} with limit ${effect.limit}');
}
}
See also:
- ChangeTrustOperation for creating trustlines
- TrustlineRemovedEffectResponse for the opposite effect
- Stellar developer docs
- Inheritance
-
- Object
- Response
- EffectResponse
- TrustlineCUDResponse
- TrustlineCreatedEffectResponse
Constructors
- TrustlineCreatedEffectResponse(String limit, String assetType, String? assetCode, String? assetIssuer, String? liquidityPoolId, String id, int type_i, String type, String createdAt, String pagingToken, String account, EffectResponseLinks links)
- Creates a TrustlineCreatedEffectResponse with limit, asset or pool details and effect details.
-
TrustlineCreatedEffectResponse.fromJson(Map<
String, dynamic> json) -
Creates a trustline created effect from Horizon API JSON response.
factory
Properties
- account ↔ String
-
Account ID affected by this effect
getter/setter pairinherited
- accountMuxed ↔ String?
-
Muxed account address if the account is a muxed account
getter/setter pairinherited
- accountMuxedId ↔ String?
-
Muxed account sub-account ID if applicable
getter/setter pairinherited
- asset → Asset?
-
Returns the trustline asset as an Asset object.
no setterinherited
- assetCode ↔ String?
-
Asset code (e.g., 'USD', 'EUR'), null for native XLM or liquidity pool shares
getter/setter pairinherited
- assetIssuer ↔ String?
-
Asset issuer account ID, null for native XLM or liquidity pool shares
getter/setter pairinherited
- assetType ↔ String
-
The type of asset being trusted ('native', 'credit_alphanum4', 'credit_alphanum12', or 'liquidity_pool_shares')
getter/setter pairinherited
- createdAt ↔ String
-
When this effect occurred in ISO 8601 format
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
Unique identifier for this effect
getter/setter pairinherited
- limit ↔ String
-
The maximum amount of the asset the account is willing to hold
getter/setter pairinherited
- links ↔ EffectResponseLinks
-
Links to related resources
getter/setter pairinherited
- liquidityPoolId ↔ String?
-
Liquidity pool ID if the trustline is for liquidity pool shares
getter/setter pairinherited
- pagingToken ↔ String
-
Cursor for pagination
getter/setter pairinherited
- rateLimitLimit ↔ int?
-
Maximum number of requests allowed in the current rate limit window.
getter/setter pairinherited
- rateLimitRemaining ↔ int?
-
Number of requests remaining in the current rate limit window.
getter/setter pairinherited
- rateLimitReset ↔ int?
-
Unix timestamp when the rate limit window will reset.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String
-
Human-readable effect type name
getter/setter pairinherited
- type_i ↔ int
-
Effect type as integer code
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setHeaders(
Map< String, String> headers) → void -
Populates rate limit fields from HTTP response headers.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited