Interface SearchGiftsForResale

Returns upgraded gifts that can be bought from other owners using sendResoldGift or getGiftOnChainPurchaseTransaction. Request type for Tdjson#searchGiftsForResale.

interface SearchGiftsForResale {
    @type: "searchGiftsForResale";
    attributes: UpgradedGiftAttributeId[];
    for_crafting?: boolean;
    for_fragment?: boolean;
    for_grams?: boolean;
    for_stars?: boolean;
    gift_id: string;
    limit: number;
    offset: string;
    order: GiftForResaleOrder;
}

Properties

@type: "searchGiftsForResale"

Attributes used to filter gifts. If multiple attributes of the same type are specified, then all of them are allowed. If no attributes of a specific type are specified, then all values for this attribute type are allowed.

for_crafting?: boolean

Pass true to get only gifts suitable for crafting.

for_fragment?: boolean

Pass true to get gifts sold on-chain on Fragment; may be true only if getOption("can_buy_on_chain_gifts") is true. Must be false if for_crafting is true or if the gift will be bought for another user or a channel chat.

for_grams?: boolean

Pass true to get gifts that can be bought using TON Grams, including gifts sold on-chain using a fixed-price sale contract if getOption("can_buy_on_chain_fixed_price_gifts") is true. The filter must be shown only if getOption("show_gift_resale_gram_filter") is true and must be selected by default if getOption("select_gift_resale_gram_filter_by_default") is true.

for_stars?: boolean

Pass true to get gifts that can be bought using Telegram Stars. If none of for_stars, for_grams, and for_fragment is true, then gifts that can be bought using Telegram Stars or TON Grams are returned, except gifts sold on-chain. The filter must be shown only if getOption("show_gift_resale_star_filter") is true and must be selected by default if getOption("select_gift_resale_star_filter_by_default") is true.

gift_id: string

Identifier of the regular gift that was upgraded to a unique gift.

limit: number

The maximum number of gifts to return.

offset: string

Offset of the first entry to return as received from the previous request with the same order and attributes; use an empty string to get the first chunk of results.

Order in which the results will be sorted.