Interface UpgradedGift

Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.

interface UpgradedGift {
    @type: "upgradedGift";
    backdrop: UpgradedGiftBackdrop;
    can_send_purchase_offer?: boolean;
    colors: UpgradedGiftColors;
    gift_address: string;
    host_id: MessageSender;
    id: string;
    is_premium?: boolean;
    is_theme_available?: boolean;
    max_upgraded_count: number;
    model: UpgradedGiftModel;
    name: string;
    number: number;
    original_details: UpgradedGiftOriginalDetails;
    owner_address: string;
    owner_id: MessageSender;
    owner_name: string;
    publisher_chat_id: number;
    regular_gift_id: string;
    resale_parameters: GiftResaleParameters;
    symbol: UpgradedGiftSymbol;
    title: string;
    total_upgraded_count: number;
    used_theme_chat_id: number;
    value_amount: number;
    value_currency: string;
    value_usd_amount: number;
}

Properties

@type: "upgradedGift"

Backdrop of the upgraded gift.

can_send_purchase_offer?: boolean

True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.

Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none.

gift_address: string

Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.

host_id: MessageSender

Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.

id: string

Unique identifier of the gift.

is_premium?: boolean

True, if the original gift could have been bought only by Telegram Premium subscribers.

is_theme_available?: boolean

True, if the gift can be used to set a theme in a chat.

max_upgraded_count: number

The maximum number of gifts that can be upgraded from the same gift.

Model of the upgraded gift.

name: string

Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.

number: number

Unique number of the upgraded gift among gifts upgraded from the same gift.

original_details: UpgradedGiftOriginalDetails

Information about the originally sent gift; may be null if unknown.

owner_address: string

Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.

owner_id: MessageSender

Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.

owner_name: string

Name of the owner for the case when owner identifier and address aren't known.

publisher_chat_id: number

Identifier of the chat that published the gift; 0 if none.

regular_gift_id: string

Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.

resale_parameters: GiftResaleParameters

Resale parameters of the gift; may be null if resale isn't possible.

Symbol of the upgraded gift.

title: string

The title of the upgraded gift.

total_upgraded_count: number

Total number of gifts that were upgraded from the same gift.

used_theme_chat_id: number

Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.

value_amount: number

Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.

value_currency: string

ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.

value_usd_amount: number

Estimated value of the gift in USD; in USD cents; 0 if unavailable.