Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedContentType = errors.New("unsupported content type")
)
Functions ¶
This section is empty.
Types ¶
type ContentLayout ¶
type ContentLayout int
const ( Undefined ContentLayout = iota OffChain OnChain SemiChain )
type FullContent ¶
type FullContent struct {
Layout ContentLayout
Data []byte
// OnchainMetadata contains a decoded metadata when the layout is onchain.
OnchainMetadata *Metadata
// OffchainURL contains a link to JSON when the layout is offchain.
OffchainURL string
}
FullContent is either a link to metadata or metadata itself depending on the layout.
func DecodeFullContent ¶
func DecodeFullContent(content tlb.FullContent) (FullContent, error)
func DecodeFullContentFromCell ¶ added in v1.1.0
func DecodeFullContentFromCell(cell *boc.Cell) (FullContent, error)
type Metadata ¶
type Metadata struct {
Uri string `json:"uri,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Image string `json:"image,omitempty"`
ImageData []byte `json:"image_data,omitempty"`
Symbol string `json:"symbol,omitempty"`
Decimals string `json:"decimals,omitempty"`
RenderType string `json:"render_type,omitempty"`
AmountStyle string `json:"amount_style,omitempty"`
}
func ConvertOnchainData ¶ added in v1.0.14
func ConvertOnchainData(content tlb.FullContent) (Metadata, error)
TEP-64 Token Data Standard https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md
Click to show internal directories.
Click to hide internal directories.