jetton

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

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

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

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

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

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