Skip to content

UpgradedGift

Type · TDLib 1.8.67 · d1085f9c

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

UpgradedGift(
  id: int64,
  regular_gift_id: int64,
  publisher_chat_id: int53,
  title: string,
  name: string,
  number: int32,
  total_upgraded_count: int32,
  max_upgraded_count: int32,
  is_burned: Bool,
  is_crafted: Bool,
  is_premium: Bool,
  is_theme_available: Bool,
  used_theme_chat_id: int53,
  host_id: MessageSender,
  owner_id: MessageSender,
  owner_address: string,
  owner_name: string,
  gift_address: string,
  model: UpgradedGiftModel,
  symbol: UpgradedGiftSymbol,
  backdrop: UpgradedGiftBackdrop,
  original_details: UpgradedGiftOriginalDetails,
  colors: UpgradedGiftColors,
  resale_parameters: GiftResaleParameters,
  can_send_purchase_offer: Bool,
  craft_probability_per_mille: int32,
  value_currency: string,
  value_amount: int53,
  value_usd_amount: int53
) → UpgradedGift

id

int64

Unique identifier of the gift

regular_gift_id

int64

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

publisher_chat_id

int53

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

title

string

The title of the upgraded gift

name

string

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

number

int32

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

total_upgraded_count

int32

Total number of gifts that were upgraded from the same gift

max_upgraded_count

int32

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

is_burned

Bool

True, if the gift was used to craft another gift

is_crafted

Bool

True, if the gift was crafted from other gifts

is_premium

Bool

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

is_theme_available

Bool

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

used_theme_chat_id

int53

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

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

owner_id

MessageSender

Identifier of the user or the chat that owns the upgraded gift; may be null if none or 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_name

string

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

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

model

UpgradedGiftModel

Model of the upgraded gift

symbol

UpgradedGiftSymbol

Symbol of the upgraded gift

backdrop

UpgradedGiftBackdrop

Backdrop of the upgraded gift

original_details

UpgradedGiftOriginalDetails

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

colors

UpgradedGiftColors

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 or unknown

resale_parameters

GiftResaleParameters

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

can_send_purchase_offer

Bool

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

craft_probability_per_mille

int32

Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting

value_currency

string

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

value_amount

int53

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

value_usd_amount

int53

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