ChangeTrustOperation
public class ChangeTrustOperation : Operation, @unchecked Sendable
Represents a change trust operation. Creates, updates, or deletes a trustline. See Stellar developer docs
-
The asset of the trustline.
Declaration
Swift
public let asset: ChangeTrustAsset -
The limit of the trustline. If nil, defaults to maximum limit.
Declaration
Swift
public let limit: Decimal? -
Creates a new ChangeTrustOperation object.
Declaration
Swift
public init(sourceAccountId: String?, asset: ChangeTrustAsset, limit: Decimal? = nil)Parameters
sourceAccountId(optional) source account Id. must start with “M” or “G” and must be valid, otherwise it will be ignored.
assetThe asset of the trustline. For example, if a user extends a trustline of up to 200 USD to an anchor, the line is USD:anchor.
limitThe limit of the trustline. In the previous example, the limit would be 200.
-
Creates a new ChangeTrustOperation object from the given ChangeTrustOperationXDR object.
Declaration
Swift
public init(fromXDR: ChangeTrustOperationXDR, sourceAccountId: String?) throwsParameters
fromXDRthe ChangeTrustOperationXDR object to be used to create a new ChangeTrustOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash