Claimant
public final class Claimant : Sendable
Represents a claimant authorized to claim a claimable balance with optional predicates.
-
The account ID that can claim the balance.
Declaration
Swift
public final let destination: String -
The conditions that must be met for the destination to claim the balance.
Declaration
Swift
public final let predicate: ClaimPredicateXDR -
Constructor
Declaration
Swift
public init(destination: String, predicate: ClaimPredicateXDR? = nil)Parameters
destinationThe destination account ID.
predicateThe claim predicate. Optional, if none is passed an unconditional predicate will be used.
-
Returns an unconditional claim predicate
Declaration
Swift
public static func predicateUnconditional() -> ClaimPredicateXDR -
Returns an
andclaim predicateDeclaration
Swift
public static func predicateAnd(left: ClaimPredicateXDR, right: ClaimPredicateXDR) -> ClaimPredicateXDRParameters
lefta claim predicate
righta claim predicate
-
Returns an
orclaim predicateDeclaration
Swift
public static func predicateOr(left: ClaimPredicateXDR, right: ClaimPredicateXDR) -> ClaimPredicateXDRParameters
lefta claim predicate
righta claim predicate
-
Returns a
notclaim predicateDeclaration
Swift
public static func predicateNot(predicate: ClaimPredicateXDR) -> ClaimPredicateXDRParameters
predicatea claim predicate
-
Returns a
BeforeAbsoluteTimeclaim predicate. This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation is less than this (absolute) Unix timestamp.Declaration
Swift
public static func predicateBeforeAbsoluteTime(unixEpoch: Int64) -> ClaimPredicateXDRParameters
unixEpochUnix timestamp
-
Returns a
BeforeRelativeTimeclaim predicate. This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation plus this relative time delta (in seconds) is less than the current time.Declaration
Swift
public static func predicateBeforeRelativeTime(seconds: Int64) -> ClaimPredicateXDRParameters
secondsseconds seconds since closeTime of the ledger in which the ClaimableBalanceEntry was created
-
Returns the xdr object for this claimant.
Throws
Throws StellarSDKError.xdrEncodingError if the XDR Object could not be created.Declaration
Swift
public func toXDR() throws -> ClaimantXDR -
Returns a claimant object from its XDR object representation.
Throws
Throws StellarSDKError.xdrDecodingError if the Claimant object could not be created from the given ClaimantXDR object.
Declaration
Swift
public static func fromXDR(claimantXDR: ClaimantXDR) throws -> ClaimantParameters
claimantXDRthe ClaimantXDR object to be used create the Claimant object.
View on GitHub
Install in Dash