esdt

package
v1.2.21 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-3.0 Imports: 11 Imported by: 52

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEsdt        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEsdt          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEsdt = fmt.Errorf("proto: unexpected end of group")
)

Functions

func IsTickerValid added in v1.2.21

func IsTickerValid(ticker string) bool

IsTickerValid checks if the token ticker is valid

func IsTokenTickerLenCorrect added in v1.2.21

func IsTokenTickerLenCorrect(tokenTickerLen int) bool

IsTokenTickerLenCorrect checks if the token ticker len is correct

func IsValidPrefixedToken added in v1.2.21

func IsValidPrefixedToken(token string) (string, bool)

IsValidPrefixedToken checks if the provided token is valid, and returns if prefix if so

func IsValidTokenPrefix added in v1.2.21

func IsValidTokenPrefix(prefix string) bool

IsValidTokenPrefix checks if the token prefix is valid

Types

type ESDTRoles

type ESDTRoles struct {
	Roles [][]byte `protobuf:"bytes,1,rep,name=Roles,proto3" json:"roles"`
}

ESDTRoles holds the roles for a given token and the given address

func (*ESDTRoles) Descriptor

func (*ESDTRoles) Descriptor() ([]byte, []int)

func (*ESDTRoles) Equal

func (this *ESDTRoles) Equal(that interface{}) bool

func (*ESDTRoles) GetRoles

func (m *ESDTRoles) GetRoles() [][]byte

func (*ESDTRoles) GoString

func (this *ESDTRoles) GoString() string

func (*ESDTRoles) Marshal

func (m *ESDTRoles) Marshal() (dAtA []byte, err error)

func (*ESDTRoles) MarshalTo

func (m *ESDTRoles) MarshalTo(dAtA []byte) (int, error)

func (*ESDTRoles) MarshalToSizedBuffer

func (m *ESDTRoles) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ESDTRoles) ProtoMessage

func (*ESDTRoles) ProtoMessage()

func (*ESDTRoles) Reset

func (m *ESDTRoles) Reset()

func (*ESDTRoles) Size

func (m *ESDTRoles) Size() (n int)

func (*ESDTRoles) String

func (this *ESDTRoles) String() string

func (*ESDTRoles) Unmarshal

func (m *ESDTRoles) Unmarshal(dAtA []byte) error

func (*ESDTRoles) XXX_DiscardUnknown

func (m *ESDTRoles) XXX_DiscardUnknown()

func (*ESDTRoles) XXX_Marshal

func (m *ESDTRoles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ESDTRoles) XXX_Merge

func (m *ESDTRoles) XXX_Merge(src proto.Message)

func (*ESDTRoles) XXX_Size

func (m *ESDTRoles) XXX_Size() int

func (*ESDTRoles) XXX_Unmarshal

func (m *ESDTRoles) XXX_Unmarshal(b []byte) error

type ESDigitalToken

type ESDigitalToken struct {
	Type          uint32        `protobuf:"varint,1,opt,name=Type,proto3" json:"Type"`
	Value         *math_big.Int `` /* 136-byte string literal not displayed */
	Properties    []byte        `protobuf:"bytes,3,opt,name=Properties,proto3" json:"Properties"`
	TokenMetaData *MetaData     `protobuf:"bytes,4,opt,name=TokenMetaData,proto3" json:"MetaData"`
	Reserved      []byte        `protobuf:"bytes,5,opt,name=Reserved,proto3" json:"Reserved"`
}

ESDigitalToken holds the data for a electronic standard digital token transaction

func New

func New() *ESDigitalToken

New returns a new batch from given buffers

func (*ESDigitalToken) Descriptor

func (*ESDigitalToken) Descriptor() ([]byte, []int)

func (*ESDigitalToken) Equal

func (this *ESDigitalToken) Equal(that interface{}) bool

func (*ESDigitalToken) GetProperties

func (m *ESDigitalToken) GetProperties() []byte

func (*ESDigitalToken) GetReserved

func (m *ESDigitalToken) GetReserved() []byte

func (*ESDigitalToken) GetTokenMetaData

func (m *ESDigitalToken) GetTokenMetaData() *MetaData

func (*ESDigitalToken) GetType

func (m *ESDigitalToken) GetType() uint32

func (*ESDigitalToken) GetValue

func (m *ESDigitalToken) GetValue() *math_big.Int

func (*ESDigitalToken) GoString

func (this *ESDigitalToken) GoString() string

func (*ESDigitalToken) Marshal

func (m *ESDigitalToken) Marshal() (dAtA []byte, err error)

func (*ESDigitalToken) MarshalTo

func (m *ESDigitalToken) MarshalTo(dAtA []byte) (int, error)

func (*ESDigitalToken) MarshalToSizedBuffer

func (m *ESDigitalToken) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ESDigitalToken) ProtoMessage

func (*ESDigitalToken) ProtoMessage()

func (*ESDigitalToken) Reset

func (m *ESDigitalToken) Reset()

func (*ESDigitalToken) Size

func (m *ESDigitalToken) Size() (n int)

func (*ESDigitalToken) String

func (this *ESDigitalToken) String() string

func (*ESDigitalToken) Unmarshal

func (m *ESDigitalToken) Unmarshal(dAtA []byte) error

func (*ESDigitalToken) XXX_DiscardUnknown

func (m *ESDigitalToken) XXX_DiscardUnknown()

func (*ESDigitalToken) XXX_Marshal

func (m *ESDigitalToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ESDigitalToken) XXX_Merge

func (m *ESDigitalToken) XXX_Merge(src proto.Message)

func (*ESDigitalToken) XXX_Size

func (m *ESDigitalToken) XXX_Size() int

func (*ESDigitalToken) XXX_Unmarshal

func (m *ESDigitalToken) XXX_Unmarshal(b []byte) error

type MetaData

type MetaData struct {
	Nonce      uint64   `protobuf:"varint,1,opt,name=Nonce,proto3" json:"Nonce"`
	Name       []byte   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name"`
	Creator    []byte   `protobuf:"bytes,3,opt,name=Creator,proto3" json:"Creator"`
	Royalties  uint32   `protobuf:"varint,4,opt,name=Royalties,proto3" json:"Royalties"`
	Hash       []byte   `protobuf:"bytes,5,opt,name=Hash,proto3" json:"Hash"`
	URIs       [][]byte `protobuf:"bytes,6,rep,name=URIs,proto3" json:"URIs"`
	Attributes []byte   `protobuf:"bytes,7,opt,name=Attributes,proto3" json:"Attributes"`
}

MetaData hold the metadata structure for the ESDT token

func (*MetaData) Descriptor

func (*MetaData) Descriptor() ([]byte, []int)

func (*MetaData) Equal

func (this *MetaData) Equal(that interface{}) bool

func (*MetaData) GetAttributes

func (m *MetaData) GetAttributes() []byte

func (*MetaData) GetCreator

func (m *MetaData) GetCreator() []byte

func (*MetaData) GetHash

func (m *MetaData) GetHash() []byte

func (*MetaData) GetName

func (m *MetaData) GetName() []byte

func (*MetaData) GetNonce

func (m *MetaData) GetNonce() uint64

func (*MetaData) GetRoyalties

func (m *MetaData) GetRoyalties() uint32

func (*MetaData) GetURIs

func (m *MetaData) GetURIs() [][]byte

func (*MetaData) GoString

func (this *MetaData) GoString() string

func (*MetaData) Marshal

func (m *MetaData) Marshal() (dAtA []byte, err error)

func (*MetaData) MarshalTo

func (m *MetaData) MarshalTo(dAtA []byte) (int, error)

func (*MetaData) MarshalToSizedBuffer

func (m *MetaData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetaData) ProtoMessage

func (*MetaData) ProtoMessage()

func (*MetaData) Reset

func (m *MetaData) Reset()

func (*MetaData) Size

func (m *MetaData) Size() (n int)

func (*MetaData) String

func (this *MetaData) String() string

func (*MetaData) Unmarshal

func (m *MetaData) Unmarshal(dAtA []byte) error

func (*MetaData) XXX_DiscardUnknown

func (m *MetaData) XXX_DiscardUnknown()

func (*MetaData) XXX_Marshal

func (m *MetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetaData) XXX_Merge

func (m *MetaData) XXX_Merge(src proto.Message)

func (*MetaData) XXX_Size

func (m *MetaData) XXX_Size() int

func (*MetaData) XXX_Unmarshal

func (m *MetaData) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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