esdt

package
v1.2.23 Latest Latest
Warning

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

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

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

type MetaDataVersion added in v1.2.22

type MetaDataVersion struct {
	Name       uint64 `protobuf:"varint,1,opt,name=Name,proto3" json:"Name"`
	Creator    uint64 `protobuf:"varint,2,opt,name=Creator,proto3" json:"Creator"`
	Royalties  uint64 `protobuf:"varint,3,opt,name=Royalties,proto3" json:"Royalties"`
	Hash       uint64 `protobuf:"varint,4,opt,name=Hash,proto3" json:"Hash"`
	URIs       uint64 `protobuf:"varint,5,opt,name=URIs,proto3" json:"URIs"`
	Attributes uint64 `protobuf:"varint,6,opt,name=Attributes,proto3" json:"Attributes"`
}

func (*MetaDataVersion) Descriptor added in v1.2.22

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

func (*MetaDataVersion) Equal added in v1.2.22

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

func (*MetaDataVersion) GetAttributes added in v1.2.22

func (m *MetaDataVersion) GetAttributes() uint64

func (*MetaDataVersion) GetCreator added in v1.2.22

func (m *MetaDataVersion) GetCreator() uint64

func (*MetaDataVersion) GetHash added in v1.2.22

func (m *MetaDataVersion) GetHash() uint64

func (*MetaDataVersion) GetName added in v1.2.22

func (m *MetaDataVersion) GetName() uint64

func (*MetaDataVersion) GetRoyalties added in v1.2.22

func (m *MetaDataVersion) GetRoyalties() uint64

func (*MetaDataVersion) GetURIs added in v1.2.22

func (m *MetaDataVersion) GetURIs() uint64

func (*MetaDataVersion) GoString added in v1.2.22

func (this *MetaDataVersion) GoString() string

func (*MetaDataVersion) Marshal added in v1.2.22

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

func (*MetaDataVersion) MarshalTo added in v1.2.22

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

func (*MetaDataVersion) MarshalToSizedBuffer added in v1.2.22

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

func (*MetaDataVersion) ProtoMessage added in v1.2.22

func (*MetaDataVersion) ProtoMessage()

func (*MetaDataVersion) Reset added in v1.2.22

func (m *MetaDataVersion) Reset()

func (*MetaDataVersion) Size added in v1.2.22

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

func (*MetaDataVersion) String added in v1.2.22

func (this *MetaDataVersion) String() string

func (*MetaDataVersion) Unmarshal added in v1.2.22

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

func (*MetaDataVersion) XXX_DiscardUnknown added in v1.2.22

func (m *MetaDataVersion) XXX_DiscardUnknown()

func (*MetaDataVersion) XXX_Marshal added in v1.2.22

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

func (*MetaDataVersion) XXX_Merge added in v1.2.22

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

func (*MetaDataVersion) XXX_Size added in v1.2.22

func (m *MetaDataVersion) XXX_Size() int

func (*MetaDataVersion) XXX_Unmarshal added in v1.2.22

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

Jump to

Keyboard shortcuts

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