Options
All
  • Public
  • Public/Protected
  • All
Menu

Structure representing a Stellar Offer.

Hierarchy

  • Offer

Implements

Index

Constructors

constructor

Properties

amount

amount: number

The amount of selling that the account making this offer is willing to sell.

buying

buying: OfferAsset

The asset the seller wants to buy.

Readonly client

client: Client

id

id: string

The id of the offer.

lastModifiedAt

lastModifiedAt: Date

The date when the offer was modified for the last time.

lastModifiedLedgerId

lastModifiedLedgerId: number

The sequence number of the last ledger in which the offer was modified.

lastModifiedTimestamp

lastModifiedTimestamp: number

The timestamp when the offer was modified for the last time.

pagingToken

pagingToken: string

A cursor value for use in pagination.

price

price: string

How many units of buying it takes to get 1 unit of selling. A number representing the decimal form of priceRational.

priceRational

priceRational: PriceRational

A precise representation of the buy and sell price of the assets on offer.

sellerId

sellerId: string

The id of the account making the offer.

selling

selling: OfferAsset

The asset the seller wants to sell.

Optional sponsorId

sponsorId: string

The account id of the sponsor who is paying the reserves for the offer.

Methods

$patch

  • $patch(data: OfferRecord): void

getBuyingAsset

  • getBuyingAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the buying asset if it's not native.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the buying asset instead.

    Returns Promise<undefined | Asset>

    The buying asset if it's not native.

getLastModifiedLedger

  • getLastModifiedLedger(forceUpdate?: boolean): Promise<Ledger>
  • Get the last ledger that included changes to the offer.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the ledger instead.

    Returns Promise<Ledger>

    The last ledger that included changes to the offer.

getSellerAccount

  • getSellerAccount(forceUpdate?: boolean): Promise<Account>
  • Get the seller of the offer.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the seller account instead.

    Returns Promise<Account>

    The account of the seller.

getSellingAsset

  • getSellingAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the selling asset if it's not native.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the selling asset instead.

    Returns Promise<undefined | Asset>

    The selling asset if it's not native.

getSponsor

  • getSponsor(forceUpdate?: boolean): Promise<undefined | Account>
  • Get the sponsor of the offer if there is one.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the sponsor account instead.

    Returns Promise<undefined | Account>

    The account of the sponsor if there is one.

Generated using TypeDoc