nft

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 22

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 *ton.APIClient, collectionAddr *address.Address) *CollectionClient

func (*CollectionClient) BuildMintEditablePayload

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

func (*CollectionClient) BuildMintPayload

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

func (*CollectionClient) GetCollectionData

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

func (*CollectionClient) GetNFTAddressByIndex

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

func (*CollectionClient) GetNFTContent

func (c *CollectionClient) GetNFTContent(ctx context.Context, index uint64, individualNFTContent *cell.Cell) (ContentAny, error)

func (*CollectionClient) RoyaltyParams

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

type CollectionData

type CollectionData struct {
	NextItemIndex uint64
	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)

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)

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 *ton.APIClient, nftAddr *address.Address) *ItemClient

func (*ItemClient) BuildTransferPayload

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

func (*ItemClient) GetNFTData

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

type ItemData

type ItemData struct {
	Initialized       bool
	Index             uint64
	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 *ton.APIClient, 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)

type ItemMintPayload

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

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