SendGiftOnChainPurchaseOffer class
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 Returns GiftOnChainPurchaseOfferTransaction
- Inheritance
-
- Object
- TdFunction
- SendGiftOnChainPurchaseOffer
- Available extensions
- Annotations
-
- @immutable
Constructors
- SendGiftOnChainPurchaseOffer({required String giftName, required int gramAmount, required int duration})
-
const
Properties
- duration → int
-
duration Duration of the offer, in seconds; must be one of 21600, 43200,
86400, 129600, 172800, or 259200
final
- giftName → String
-
giftName Name of the upgraded gift
final
- gramAmount → int
-
gramAmount 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
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? giftName, int? gramAmount, int? duration}) → SendGiftOnChainPurchaseOffer -
Available on SendGiftOnChainPurchaseOffer, provided by the SendGiftOnChainPurchaseOfferExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- constructor → const String