Versions in this module Expand all Collapse all v1 v1.4.2 May 30, 2023 v1.4.0 May 30, 2023 Changes in this version + const DelayTxType + const FirstBlockTxType + const SmartContractTxType + const StopNetworkTxType + const TransferSelfTxType + const UtxoTxType + var BlockSyncMethod_name = map[int32]string + var BlockSyncMethod_value = map[string]int32 + var ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow") + var ErrIntOverflowPlay = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthPlay = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrMaxBlockSize = func(max int64, size int) error + var ErrMinBlockSize = func(min int, size int) error + var ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group") + var ErrUnexpectedEndOfGroupPlay = fmt.Errorf("proto: unexpected end of group") + var ErrUnmarshallBlock = errors.New("Unmarshall block") + var ErrZeroBlockSize = errors.New("Block size is zero") + func ConvertMap(in any) any + func DoZlibCompress(src []byte) []byte + func DoZlibUnCompress(compressSrc []byte) []byte + func MerkleTreeRoot(dataArray [][]byte) []byte + type AfterTx struct + Lts *LogTransaction + UpdTxStatus *pbgo.TxResult + UsedTx []byte + func (*AfterTx) Descriptor() ([]byte, []int) + func (*AfterTx) ProtoMessage() + func (m *AfterTx) GetLts() *LogTransaction + func (m *AfterTx) GetUpdTxStatus() *pbgo.TxResult + func (m *AfterTx) GetUsedTx() []byte + func (m *AfterTx) Marshal() (dAtA []byte, err error) + func (m *AfterTx) MarshalTo(dAtA []byte) (int, error) + func (m *AfterTx) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AfterTx) Reset() + func (m *AfterTx) Size() (n int) + func (m *AfterTx) String() string + func (m *AfterTx) Unmarshal(dAtA []byte) error + func (m *AfterTx) XXX_DiscardUnknown() + func (m *AfterTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *AfterTx) XXX_Merge(src proto.Message) + func (m *AfterTx) XXX_Size() int + func (m *AfterTx) XXX_Unmarshal(b []byte) error + type AfterTxs struct + Rts []*RollbackTx + Txs []*AfterTx + func (*AfterTxs) Descriptor() ([]byte, []int) + func (*AfterTxs) ProtoMessage() + func (m *AfterTxs) GetRts() []*RollbackTx + func (m *AfterTxs) GetTxs() []*AfterTx + func (m *AfterTxs) Marshal() (dAtA []byte, err error) + func (m *AfterTxs) MarshalTo(dAtA []byte) (int, error) + func (m *AfterTxs) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *AfterTxs) Reset() + func (m *AfterTxs) Size() (n int) + func (m *AfterTxs) String() string + func (m *AfterTxs) Unmarshal(dAtA []byte) error + func (m *AfterTxs) XXX_DiscardUnknown() + func (m *AfterTxs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *AfterTxs) XXX_Merge(src proto.Message) + func (m *AfterTxs) XXX_Size() int + func (m *AfterTxs) XXX_Unmarshal(b []byte) error + type BlockCandidateNode struct + ID int64 + ReplyCount int64 + type BlockData struct + AfterTxs *AfterTxs + BinData []byte + Header *BlockHeader + MerkleRoot []byte + PrevHeader *BlockHeader + SysUpdate bool + TxFullData [][]byte + func (*BlockData) Descriptor() ([]byte, []int) + func (*BlockData) ProtoMessage() + func (b *BlockData) Apply(opts ...BlockDataOption) error + func (b *BlockData) GenMerkleRoot() []byte + func (b *BlockData) GetSign(key []byte) ([]byte, error) + func (b *BlockData) MarshallBlock(key []byte) ([]byte, error) + func (b *BlockData) UnmarshallBlock(data []byte) error + func (b BlockData) ForSign() string + func (m *BlockData) GetAfterTxs() *AfterTxs + func (m *BlockData) GetBinData() []byte + func (m *BlockData) GetHeader() *BlockHeader + func (m *BlockData) GetMerkleRoot() []byte + func (m *BlockData) GetPrevHeader() *BlockHeader + func (m *BlockData) GetSysUpdate() bool + func (m *BlockData) GetTxFullData() [][]byte + func (m *BlockData) Marshal() (dAtA []byte, err error) + func (m *BlockData) MarshalTo(dAtA []byte) (int, error) + func (m *BlockData) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *BlockData) Reset() + func (m *BlockData) Size() (n int) + func (m *BlockData) String() string + func (m *BlockData) Unmarshal(dAtA []byte) error + func (m *BlockData) XXX_DiscardUnknown() + func (m *BlockData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlockData) XXX_Merge(src proto.Message) + func (m *BlockData) XXX_Size() int + func (m *BlockData) XXX_Unmarshal(b []byte) error + type BlockDataOption func(b *BlockData) error + func WithAfterTxs(a *AfterTxs) BlockDataOption + func WithCurHeader(cur *BlockHeader) BlockDataOption + func WithPrevHeader(pre *BlockHeader) BlockDataOption + func WithSysUpdate(a bool) BlockDataOption + func WithTxFullData(data [][]byte) BlockDataOption + type BlockHeader struct + BlockHash []byte + BlockId int64 + CandidateNodes []byte + ConsensusMode int32 + EcosystemId int64 + KeyId int64 + NetworkId int64 + NodePosition int64 + RollbacksHash []byte + Sign []byte + Timestamp int64 + Version int32 + func ParseBlockHeader(buf *bytes.Buffer, maxBlockSize int64) (header *BlockHeader, err error) + func (*BlockHeader) Descriptor() ([]byte, []int) + func (*BlockHeader) ProtoMessage() + func (b *BlockHeader) ForSha(prev *BlockHeader, mrklRoot []byte) string + func (b *BlockHeader) ForSign(prev *BlockHeader, mrklRoot []byte) string + func (b *BlockHeader) GenHash(prev *BlockHeader, mrklRoot []byte) []byte + func (m *BlockHeader) GetBlockHash() []byte + func (m *BlockHeader) GetBlockId() int64 + func (m *BlockHeader) GetCandidateNodes() []byte + func (m *BlockHeader) GetConsensusMode() int32 + func (m *BlockHeader) GetEcosystemId() int64 + func (m *BlockHeader) GetKeyId() int64 + func (m *BlockHeader) GetNetworkId() int64 + func (m *BlockHeader) GetNodePosition() int64 + func (m *BlockHeader) GetRollbacksHash() []byte + func (m *BlockHeader) GetSign() []byte + func (m *BlockHeader) GetTimestamp() int64 + func (m *BlockHeader) GetVersion() int32 + func (m *BlockHeader) Marshal() (dAtA []byte, err error) + func (m *BlockHeader) MarshalTo(dAtA []byte) (int, error) + func (m *BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *BlockHeader) Reset() + func (m *BlockHeader) Size() (n int) + func (m *BlockHeader) String() string + func (m *BlockHeader) Unmarshal(dAtA []byte) error + func (m *BlockHeader) XXX_DiscardUnknown() + func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *BlockHeader) XXX_Merge(src proto.Message) + func (m *BlockHeader) XXX_Size() int + func (m *BlockHeader) XXX_Unmarshal(b []byte) error + type BlockSyncMethod int32 + const BlockSyncMethod_CONTRACTVM + const BlockSyncMethod_SQLDML + func (BlockSyncMethod) EnumDescriptor() ([]byte, []int) + func (x BlockSyncMethod) String() string + type ClientTxPreprocessor interface + ProcessClientTxBatches func([][]byte, int64, *log.Entry) ([]string, error) + type DaemonFactory interface + GetDaemonsList func() []string + Load func(context.Context) error + type EcosystemGetter interface + GetEcosystemLookup func() ([]int64, []string, error) + GetEcosystemName func(id int64) (string, error) + ValidateId func(id, clientID int64, le *log.Entry) (int64, error) + type FirstBlock struct + KeyID int64 + NodePublicKey []byte + PrivateBlockchain uint64 + PublicKey []byte + StopNetworkCertBundle []byte + Test int64 + Time int64 + func (t *FirstBlock) TxType() byte + type Header struct + EcosystemID int64 + ID int + KeyID int64 + NetworkID int64 + PublicKey []byte + Time int64 + type Link struct + type LogTransaction struct + Address int64 + Block int64 + ContractName string + EcosystemId int64 + Hash []byte + InvokeStatus pbgo.TxInvokeStatusCode + Timestamp int64 + func (*LogTransaction) Descriptor() ([]byte, []int) + func (*LogTransaction) ProtoMessage() + func (m *LogTransaction) GetAddress() int64 + func (m *LogTransaction) GetBlock() int64 + func (m *LogTransaction) GetContractName() string + func (m *LogTransaction) GetEcosystemId() int64 + func (m *LogTransaction) GetHash() []byte + func (m *LogTransaction) GetInvokeStatus() pbgo.TxInvokeStatusCode + func (m *LogTransaction) GetTimestamp() int64 + func (m *LogTransaction) Marshal() (dAtA []byte, err error) + func (m *LogTransaction) MarshalTo(dAtA []byte) (int, error) + func (m *LogTransaction) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *LogTransaction) Reset() + func (m *LogTransaction) Size() (n int) + func (m *LogTransaction) String() string + func (m *LogTransaction) Unmarshal(dAtA []byte) error + func (m *LogTransaction) XXX_DiscardUnknown() + func (m *LogTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *LogTransaction) XXX_Merge(src proto.Message) + func (m *LogTransaction) XXX_Size() int + func (m *LogTransaction) XXX_Unmarshal(b []byte) error + type Map struct + func LoadMap(init map[string]any) (ret *Map) + func NewFile() *Map + func NewFileFromMap(m map[string]any) (f *Map, ok bool) + func NewMap() *Map + func (m *Map) Clear() + func (m *Map) Get(key string) (value any, found bool) + func (m *Map) IsEmpty() bool + func (m *Map) Keys() []string + func (m *Map) MarshalJSON() ([]byte, error) + func (m *Map) Remove(key string) + func (m *Map) Set(key string, value any) + func (m *Map) Size() int + func (m *Map) String() string + func (m *Map) Values() []any + type Notifications interface + AddAccounts func(ecosystem int64, accounts ...string) + AddRoles func(ecosystem int64, roles ...int64) + Send func() + Size func() int + type RollbackTx struct + BlockId int64 + Data string + DataHash []byte + Id int64 + NameTable string + TableId string + TxHash []byte + func (*RollbackTx) Descriptor() ([]byte, []int) + func (*RollbackTx) ProtoMessage() + func (m *RollbackTx) GetBlockId() int64 + func (m *RollbackTx) GetData() string + func (m *RollbackTx) GetDataHash() []byte + func (m *RollbackTx) GetId() int64 + func (m *RollbackTx) GetNameTable() string + func (m *RollbackTx) GetTableId() string + func (m *RollbackTx) GetTxHash() []byte + func (m *RollbackTx) Marshal() (dAtA []byte, err error) + func (m *RollbackTx) MarshalTo(dAtA []byte) (int, error) + func (m *RollbackTx) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *RollbackTx) Reset() + func (m *RollbackTx) Size() (n int) + func (m *RollbackTx) String() string + func (m *RollbackTx) Unmarshal(dAtA []byte) error + func (m *RollbackTx) XXX_DiscardUnknown() + func (m *RollbackTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *RollbackTx) XXX_Merge(src proto.Message) + func (m *RollbackTx) XXX_Size() int + func (m *RollbackTx) XXX_Unmarshal(b []byte) error + type SmartContractRunner interface + RunContract func(data, hash []byte, keyID, tnow int64, le *log.Entry) error + type SmartTransaction struct + Expedite string + Lang string + MaxSum string + Params map[string]any + PayOver string + SignedBy int64 + TransferSelf *TransferSelf + UTXO *UTXO + func (s *SmartTransaction) Marshal() ([]byte, error) + func (s *SmartTransaction) TxType() byte + func (s *SmartTransaction) Unmarshal(buffer []byte) error + func (s *SmartTransaction) WithPrivate(privateKey []byte, internal bool) error + func (t SmartTransaction) Hash() ([]byte, error) + func (txSmart *SmartTransaction) Validate() error + type StopNetwork struct + KeyID int64 + StopNetworkCert []byte + Time int64 + func (t *StopNetwork) TxType() byte + type TransferSelf struct + Source string + Target string + Value string + type UTXO struct + Comment string + ToID int64 + Value string