Interface SendGiftOnChainPurchaseOffer

Sends an on-chain offer to purchase an upgraded gift for TON Grams; can be used only if getOption("can_use_ton_wallet"). Returns the transaction that must be sent from the TON wallet of the current user to create the offer. The offer is created only after the transaction is executed on the TON blockchain. Request type for Tdjson#sendGiftOnChainPurchaseOffer.

interface SendGiftOnChainPurchaseOffer {
    @type: "sendGiftOnChainPurchaseOffer";
    duration: number;
    gift_name: string;
    gram_amount: string;
}

Properties

@type: "sendGiftOnChainPurchaseOffer"
duration: number

Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200.

gift_name: string

Name of the upgraded gift.

gram_amount: string

The price offered for the gift, in the smallest units of TON Grams; must be at least upgradedGift.min_on_chain_purchase_offer_gram_amount.