jetton

package
v1.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidTransfer = errors.New("transfer is not verified")

Functions

This section is empty.

Types

type BurnPayload

type BurnPayload struct {
	QueryID             uint64           `tlb:"## 64"`
	Amount              tlb.Coins        `tlb:"."`
	ResponseDestination *address.Address `tlb:"addr"`
	CustomPayload       *cell.Cell       `tlb:"maybe ^"`
	// contains filtered or unexported fields
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewJettonMasterClient

func NewJettonMasterClient(api TonApi, masterContractAddr *address.Address) *Client

func (*Client) GetJettonData

func (c *Client) GetJettonData(ctx context.Context) (*Data, error)

func (*Client) GetJettonDataAtBlock added in v1.4.0

func (c *Client) GetJettonDataAtBlock(ctx context.Context, b *ton.BlockIDExt) (*Data, error)

func (*Client) GetJettonWallet

func (c *Client) GetJettonWallet(ctx context.Context, ownerAddr *address.Address) (*WalletClient, error)

func (*Client) GetJettonWalletAtBlock added in v1.4.0

func (c *Client) GetJettonWalletAtBlock(ctx context.Context, ownerAddr *address.Address, b *ton.BlockIDExt) (*WalletClient, error)

type Data

type Data struct {
	TotalSupply *big.Int
	Mintable    bool
	AdminAddr   *address.Address
	Content     nft.ContentAny
	WalletCode  *cell.Cell
}

type MintPayload

type MintPayload struct {
	QueryID   uint64               `tlb:"## 64"`
	ToAddress *address.Address     `tlb:"addr"`
	Amount    tlb.Coins            `tlb:"."`
	MasterMsg MintPayloadMasterMsg `tlb:"^"`
	// contains filtered or unexported fields
}

type MintPayloadMasterMsg added in v1.7.1

type MintPayloadMasterMsg struct {
	Opcode       uint32     `tlb:"## 32"`
	QueryID      uint64     `tlb:"## 64"`
	JettonAmount tlb.Coins  `tlb:"."`
	RestData     *cell.Cell `tlb:"."`
}

type TonApi

type TonApi interface {
	WaitForBlock(seqno uint32) ton.APIClientWrapped
	CurrentMasterchainInfo(ctx context.Context) (_ *ton.BlockIDExt, err error)
	RunGetMethod(ctx context.Context, blockInfo *ton.BlockIDExt, addr *address.Address, method string, params ...any) (*ton.ExecutionResult, error)
	SubscribeOnTransactions(workerCtx context.Context, addr *address.Address, lastProcessedLT uint64, channel chan<- *tlb.Transaction)
}

type TransferNotification added in v1.9.9

type TransferNotification struct {
	QueryID        uint64           `tlb:"## 64"`
	Amount         tlb.Coins        `tlb:"."`
	Sender         *address.Address `tlb:"addr"`
	ForwardPayload *cell.Cell       `tlb:"either . ^"`
	// contains filtered or unexported fields
}

type TransferPayload

type TransferPayload struct {
	QueryID             uint64           `tlb:"## 64"`
	Amount              tlb.Coins        `tlb:"."`
	Destination         *address.Address `tlb:"addr"`
	ResponseDestination *address.Address `tlb:"addr"`
	CustomPayload       *cell.Cell       `tlb:"maybe ^"`
	ForwardTONAmount    tlb.Coins        `tlb:"."`
	ForwardPayload      *cell.Cell       `tlb:"either . ^"`
	// contains filtered or unexported fields
}

type WalletClient

type WalletClient struct {
	// contains filtered or unexported fields
}

func (*WalletClient) Address

func (c *WalletClient) Address() *address.Address

func (*WalletClient) BuildBurnPayload

func (c *WalletClient) BuildBurnPayload(amountCoins tlb.Coins, notifyAddr *address.Address) (*cell.Cell, error)

func (*WalletClient) BuildTransferPayload deprecated

func (c *WalletClient) BuildTransferPayload(to *address.Address, amountCoins, amountForwardTON tlb.Coins, payloadForward *cell.Cell) (*cell.Cell, error)

Deprecated: use BuildTransferPayloadV2

func (*WalletClient) BuildTransferPayloadV2 added in v1.9.2

func (c *WalletClient) BuildTransferPayloadV2(to, responseTo *address.Address, amountCoins, amountForwardTON tlb.Coins, payloadForward, customPayload *cell.Cell) (*cell.Cell, error)

func (*WalletClient) GetBalance

func (c *WalletClient) GetBalance(ctx context.Context) (*big.Int, error)

func (*WalletClient) GetBalanceAtBlock added in v1.4.0

func (c *WalletClient) GetBalanceAtBlock(ctx context.Context, b *ton.BlockIDExt) (*big.Int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL