jetton

package
v0.0.0-...-bcde84c Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	Index     uint64     `tlb:"## 64"`
	TonAmount tlb.Coins  `tlb:"."`
	Content   *cell.Cell `tlb:"^"`
	// contains filtered or unexported fields
}

type TonApi

type TonApi interface {
	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)
}

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

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

func (*WalletClient) GetBalance

func (c *WalletClient) GetBalance(ctx context.Context) (tlb.Coins, error)

func (*WalletClient) GetBalanceAtBlock

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

Jump to

Keyboard shortcuts

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