CreatePassiveOfferOperation
public class CreatePassiveOfferOperation : Operation, @unchecked Sendable
Represents a create passive offer operation. A passive offer is an offer that does not act on and take a reverse offer of equal price. Instead, they only take offers of lesser price. See Stellar developer docs
-
The asset being sold.
Declaration
Swift
public let selling: Asset -
The asset being bought.
Declaration
Swift
public let buying: Asset -
The amount of the selling asset being offered.
Declaration
Swift
public let amount: Decimal -
The price of 1 unit of selling in terms of buying.
Declaration
Swift
public let price: Price -
Creates a new CreatePassiveOfferOperation object.
Declaration
Parameters
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
sellingThe asset you would like to sell.
buyingThe asset you would like to buy.
amountAmount of selling being sold..
pricePrice of 1 unit of selling in terms of buying. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be {numerator, denominator} = {5,30}.
-
Creates a new CreatePassiveSellOfferOperation object from the given CreatePassiveOfferOperationXDR object.
Declaration
Swift
public init(fromXDR: CreatePassiveOfferOperationXDR, sourceAccountId: String?)Parameters
fromXDRthe CreatePassiveOfferOperationXDR object to be used to create a new CreatePassiveSellOfferOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash