AllowTrustOperation
public class AllowTrustOperation : Operation, @unchecked Sendable
Represents an allow trust operation. Updates the authorized flag of an existing trustline. This can only be called by the issuer of a trustline’s asset. The issuer can only clear the authorized flag if the issuer has the AUTH_REVOCABLE_FLAG set. Otherwise, the issuer can only set the authorized flag. See Stellar developer docs
-
The account of the recipient of the trustline.
Declaration
Swift
public let trustor: KeyPair -
The asset code of the trustline.
Declaration
Swift
public let assetCode: String -
Flag indicating whether the trustline is authorized. 0, or any bitwise combination of TrustLineFlags.
Declaration
Swift
public let authorize: UInt32 -
Creates a new AllowTrustOperation object.
Throws
Throws StellarSDKError.invalidArgument if the asset code is empty or has more then 12 characters.Declaration
Swift
public convenience init(sourceAccountId: String?, trustor: KeyPair, assetCode: String, authorize: Bool) throwsParameters
sourceAccountId(optional) source account Id. must start with “M” or “G” and must be valid, otherwise it will be ignored.
trustorThe account of the recipient of the trustline.
assetCodeThe asset code of the trustline. E.g. BTC
authorizeFlag indicating whether the trustline is authorized, true = TrustLineFlags.AUTHORIZED_FLAG
-
Creates a new AllowTrustOperation object.
Throws
Throws StellarSDKError.invalidArgument if the asset code is empty or has more then 12 characters.Declaration
Swift
public init(sourceAccountId: String?, trustor: KeyPair, assetCode: String, authorize: UInt32) throwsParameters
sourceAccountId(optional) source account Id. must start with “M” or “G” and must be valid, otherwise it will be ignored.
trustorThe account of the recipient of the trustline.
assetCodeThe asset code of the trustline. E.g. BTC
authorizeFlag indicating whether the trustline is authorized, 0, or any bitwise combination of TrustLineFlags
-
Creates a new AllowTrustOperation object from the given AllowTrustOperationXDR object.
Declaration
Swift
public init(fromXDR: AllowTrustOperationXDR, sourceAccountId: String?)Parameters
fromXDRthe AllowTrustOperationXDR object to be used to create a new AllowTrustOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash