nft

package
v0.0.0-...-da90e6b Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionChangeOwner

type CollectionChangeOwner struct {
	QueryID  uint64           `tlb:"## 64"`
	NewOwner *address.Address `tlb:"addr"`
	// contains filtered or unexported fields
}

type CollectionClient

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

func NewCollectionClient

func NewCollectionClient(api TonApi, collectionAddr *address.Address) *CollectionClient

func (*CollectionClient) BuildMintEditablePayload

func (c *CollectionClient) BuildMintEditablePayload(index *big.Int, owner, editor *address.Address, amountForward tlb.Coins, content ContentAny) (_ *cell.Cell, err error)

func (*CollectionClient) BuildMintPayload

func (c *CollectionClient) BuildMintPayload(index *big.Int, owner *address.Address, amountForward tlb.Coins, content ContentAny) (_ *cell.Cell, err error)

func (*CollectionClient) GetCollectionData

func (c *CollectionClient) GetCollectionData(ctx context.Context) (*CollectionData, error)

func (*CollectionClient) GetCollectionDataAtBlock

func (c *CollectionClient) GetCollectionDataAtBlock(ctx context.Context, b *ton.BlockIDExt) (*CollectionData, error)

func (*CollectionClient) GetNFTAddressByIndex

func (c *CollectionClient) GetNFTAddressByIndex(ctx context.Context, index *big.Int) (*address.Address, error)

func (*CollectionClient) GetNFTAddressByIndexAtBlock

func (c *CollectionClient) GetNFTAddressByIndexAtBlock(ctx context.Context, index *big.Int, b *ton.BlockIDExt) (*address.Address, error)

func (*CollectionClient) GetNFTContent

func (c *CollectionClient) GetNFTContent(ctx context.Context, index *big.Int, individualNFTContent ContentAny) (ContentAny, error)

func (*CollectionClient) GetNFTContentAtBlock

func (c *CollectionClient) GetNFTContentAtBlock(ctx context.Context, index *big.Int, individualNFTContent ContentAny, b *ton.BlockIDExt) (ContentAny, error)

func (*CollectionClient) RoyaltyParams

func (c *CollectionClient) RoyaltyParams(ctx context.Context) (*CollectionRoyaltyParams, error)

func (*CollectionClient) RoyaltyParamsAtBlock

func (c *CollectionClient) RoyaltyParamsAtBlock(ctx context.Context, b *ton.BlockIDExt) (*CollectionRoyaltyParams, error)

type CollectionData

type CollectionData struct {
	NextItemIndex *big.Int
	Content       ContentAny
	OwnerAddress  *address.Address
}

type CollectionRoyaltyParams

type CollectionRoyaltyParams struct {
	Factor  uint16
	Base    uint16
	Address *address.Address
}

type ContentAny

type ContentAny interface {
	ContentCell() (*cell.Cell, error)
}

func ContentFromCell

func ContentFromCell(c *cell.Cell) (ContentAny, error)

func ContentFromSlice

func ContentFromSlice(s *cell.Slice) (ContentAny, error)

type ContentOffchain

type ContentOffchain struct {
	URI string
}

func (*ContentOffchain) ContentCell

func (c *ContentOffchain) ContentCell() (*cell.Cell, error)

type ContentOnchain

type ContentOnchain struct {
	Name        string
	Description string
	Image       string
	ImageData   []byte
	// contains filtered or unexported fields
}

func (*ContentOnchain) ContentCell

func (c *ContentOnchain) ContentCell() (*cell.Cell, error)

func (*ContentOnchain) GetAttribute

func (c *ContentOnchain) GetAttribute(name string) string

func (*ContentOnchain) GetAttributeBinary

func (c *ContentOnchain) GetAttributeBinary(name string) []byte

func (*ContentOnchain) SetAttribute

func (c *ContentOnchain) SetAttribute(name, value string) error

func (*ContentOnchain) SetAttributeBinary

func (c *ContentOnchain) SetAttributeBinary(name string, value []byte) error

func (*ContentOnchain) SetAttributeCell

func (c *ContentOnchain) SetAttributeCell(key string, cl *cell.Cell) error

type ContentSemichain

type ContentSemichain struct {
	ContentOffchain
	ContentOnchain
}

func (*ContentSemichain) ContentCell

func (c *ContentSemichain) ContentCell() (*cell.Cell, error)

type ItemClient

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

func NewItemClient

func NewItemClient(api TonApi, nftAddr *address.Address) *ItemClient

func (*ItemClient) BuildTransferPayload

func (c *ItemClient) BuildTransferPayload(newOwner *address.Address, amountForward tlb.Coins, payloadForward *cell.Cell, responseTo ...*address.Address) (*cell.Cell, error)

func (*ItemClient) GetNFTAddress

func (c *ItemClient) GetNFTAddress() *address.Address

func (*ItemClient) GetNFTData

func (c *ItemClient) GetNFTData(ctx context.Context) (*ItemData, error)

func (*ItemClient) GetNFTDataAtBlock

func (c *ItemClient) GetNFTDataAtBlock(ctx context.Context, b *ton.BlockIDExt) (*ItemData, error)

type ItemData

type ItemData struct {
	Initialized       bool
	Index             *big.Int
	CollectionAddress *address.Address
	OwnerAddress      *address.Address
	Content           ContentAny
}

type ItemEditPayload

type ItemEditPayload struct {
	QueryID uint64     `tlb:"## 64"`
	Content *cell.Cell `tlb:"^"`
	// contains filtered or unexported fields
}

type ItemEditableClient

type ItemEditableClient struct {
	*ItemClient
}

func NewItemEditableClient

func NewItemEditableClient(api TonApi, nftAddr *address.Address) *ItemEditableClient

func (*ItemEditableClient) BuildEditPayload

func (c *ItemEditableClient) BuildEditPayload(content ContentAny) (*cell.Cell, error)

func (*ItemEditableClient) GetEditor

func (c *ItemEditableClient) GetEditor(ctx context.Context) (*address.Address, error)

func (*ItemEditableClient) GetEditorAtBlock

func (c *ItemEditableClient) GetEditorAtBlock(ctx context.Context, b *ton.BlockIDExt) (*address.Address, error)

type ItemMintPayload

type ItemMintPayload struct {
	QueryID   uint64     `tlb:"## 64"`
	Index     *big.Int   `tlb:"## 64"`
	TonAmount tlb.Coins  `tlb:"."`
	Content   *cell.Cell `tlb:"^"`
	// contains filtered or unexported fields
}

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)
}

type TransferPayload

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

Jump to

Keyboard shortcuts

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