Skip to main content

payments.craftStarGift

Craft a new collectible gift » by combining 1 to 4 owned collectible gifts of the same base gift type. The passed gifts must all have the same starGiftUnique.gift_id, must be usable for crafting, and must not be blocked by a future can_craft_at timestamp. The first passed gift must not be located on the TON blockchain.

func (c *Client) PaymentsCraftStarGift(ctx context.Context, stargift []InputSavedStarGiftClass) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsCraftStarGift(ctx, stargift)
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
Stargift[]InputSavedStarGiftClassyes1 to 4 owned collectible gifts of the same type to use for crafting ». The first gift's ID is reused if crafting succeeds.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400SAVED_ID_EMPTYThe passed inputSavedStarGiftChat.saved_id is empty.

References