Documentation ¶
Overview ¶
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
Index ¶
- Constants
- Variables
- func ConvertMap(in any) any
- func DoZlibCompress(src []byte) []byte
- func DoZlibUnCompress(compressSrc []byte) []byte
- func MerkleTreeRoot(dataArray [][]byte) []byte
- type AfterTx
- func (*AfterTx) Descriptor() ([]byte, []int)
- 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 (*AfterTx) ProtoMessage()
- 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
- func (*AfterTxs) Descriptor() ([]byte, []int)
- 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 (*AfterTxs) ProtoMessage()
- 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
- type BlockData
- func (b *BlockData) Apply(opts ...BlockDataOption) error
- func (*BlockData) Descriptor() ([]byte, []int)
- func (b BlockData) ForSign() string
- func (b *BlockData) GenMerkleRoot() []byte
- 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 (b *BlockData) GetSign(key []byte) ([]byte, error)
- 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 (b *BlockData) MarshallBlock(key []byte) ([]byte, error)
- func (*BlockData) ProtoMessage()
- func (m *BlockData) Reset()
- func (m *BlockData) Size() (n int)
- func (m *BlockData) String() string
- func (m *BlockData) Unmarshal(dAtA []byte) error
- func (b *BlockData) UnmarshallBlock(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
- type BlockHeader
- func (*BlockHeader) Descriptor() ([]byte, []int)
- 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 (*BlockHeader) ProtoMessage()
- 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
- type ClientTxPreprocessor
- type DaemonFactory
- type EcosystemGetter
- type FirstBlock
- type Header
- type Link
- type LogTransaction
- func (*LogTransaction) Descriptor() ([]byte, []int)
- 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 (*LogTransaction) ProtoMessage()
- 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
- 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
- type RollbackTx
- func (*RollbackTx) Descriptor() ([]byte, []int)
- 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 (*RollbackTx) ProtoMessage()
- 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
- type SmartTransaction
- func (t SmartTransaction) Hash() ([]byte, error)
- func (s *SmartTransaction) Marshal() ([]byte, error)
- func (s *SmartTransaction) TxType() byte
- func (s *SmartTransaction) Unmarshal(buffer []byte) error
- func (txSmart *SmartTransaction) Validate() error
- func (s *SmartTransaction) WithPrivate(privateKey []byte, internal bool) error
- type StopNetwork
- type TransferSelf
- type UTXO
Constants ¶
const ( FirstBlockTxType = iota + 1 StopNetworkTxType SmartContractTxType DelayTxType UtxoTxType TransferSelfTxType )
Transaction types.
Variables ¶
var ( ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group") )
var ( ErrMaxBlockSize = func(max int64, size int) error { return fmt.Errorf("block size exceeds maximum %d limit, size is %d", max, size) } ErrMinBlockSize = func(min int, size int) error { return fmt.Errorf("block size exceeds minimum %d limit, size is %d", min, size) } ErrZeroBlockSize = errors.New("Block size is zero") ErrUnmarshallBlock = errors.New("Unmarshall block") )
var ( ErrInvalidLengthPlay = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlay = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPlay = fmt.Errorf("proto: unexpected end of group") )
var BlockSyncMethod_name = map[int32]string{
0: "CONTRACTVM",
1: "SQLDML",
}
var BlockSyncMethod_value = map[string]int32{
"CONTRACTVM": 0,
"SQLDML": 1,
}
Functions ¶
func ConvertMap ¶
func DoZlibCompress ¶
func DoZlibUnCompress ¶
func MerkleTreeRoot ¶
MerkleTreeRoot return Merkle value
Types ¶
type AfterTx ¶
type AfterTx struct { UsedTx []byte `protobuf:"bytes,1,opt,name=used_tx,json=usedTx,proto3" json:"used_tx,omitempty"` Lts *LogTransaction `protobuf:"bytes,2,opt,name=lts,proto3" json:"lts,omitempty"` UpdTxStatus *pbgo.TxResult `protobuf:"bytes,3,opt,name=upd_tx_status,json=updTxStatus,proto3" json:"upd_tx_status,omitempty"` }
func (*AfterTx) Descriptor ¶
func (*AfterTx) GetLts ¶
func (m *AfterTx) GetLts() *LogTransaction
func (*AfterTx) GetUpdTxStatus ¶
func (*AfterTx) MarshalToSizedBuffer ¶
func (*AfterTx) ProtoMessage ¶
func (*AfterTx) ProtoMessage()
func (*AfterTx) XXX_DiscardUnknown ¶
func (m *AfterTx) XXX_DiscardUnknown()
func (*AfterTx) XXX_Marshal ¶
func (*AfterTx) XXX_Unmarshal ¶
type AfterTxs ¶
type AfterTxs struct { Txs []*AfterTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` //TxBinLogSql defined contract exec sql for tx DML // repeated bytes tx_bin_log_sql = 2; Rts []*RollbackTx `protobuf:"bytes,3,rep,name=rts,proto3" json:"rts,omitempty"` }
AfterTxs defined block batch process tx for sql DML
func (*AfterTxs) Descriptor ¶
func (*AfterTxs) GetRts ¶
func (m *AfterTxs) GetRts() []*RollbackTx
func (*AfterTxs) MarshalToSizedBuffer ¶
func (*AfterTxs) ProtoMessage ¶
func (*AfterTxs) ProtoMessage()
func (*AfterTxs) XXX_DiscardUnknown ¶
func (m *AfterTxs) XXX_DiscardUnknown()
func (*AfterTxs) XXX_Marshal ¶
func (*AfterTxs) XXX_Unmarshal ¶
type BlockCandidateNode ¶
type BlockData ¶
type BlockData struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` PrevHeader *BlockHeader `protobuf:"bytes,2,opt,name=prev_header,json=prevHeader,proto3" json:"prev_header,omitempty"` MerkleRoot []byte `protobuf:"bytes,3,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` BinData []byte `protobuf:"bytes,4,opt,name=bin_data,json=binData,proto3" json:"bin_data,omitempty"` TxFullData [][]byte `protobuf:"bytes,5,rep,name=tx_full_data,json=txFullData,proto3" json:"tx_full_data,omitempty"` AfterTxs *AfterTxs `protobuf:"bytes,6,opt,name=after_txs,json=afterTxs,proto3" json:"after_txs,omitempty"` SysUpdate bool `protobuf:"varint,7,opt,name=sys_update,json=sysUpdate,proto3" json:"sys_update,omitempty"` }
BlockData is a structure of the block's
func (*BlockData) Apply ¶
func (b *BlockData) Apply(opts ...BlockDataOption) error
func (*BlockData) Descriptor ¶
func (*BlockData) GenMerkleRoot ¶
func (*BlockData) GetAfterTxs ¶
func (*BlockData) GetBinData ¶
func (*BlockData) GetHeader ¶
func (m *BlockData) GetHeader() *BlockHeader
func (*BlockData) GetMerkleRoot ¶
func (*BlockData) GetPrevHeader ¶
func (m *BlockData) GetPrevHeader() *BlockHeader
func (*BlockData) GetSysUpdate ¶
func (*BlockData) GetTxFullData ¶
func (*BlockData) MarshalToSizedBuffer ¶
func (*BlockData) MarshallBlock ¶
MarshallBlock is marshalling block
func (*BlockData) ProtoMessage ¶
func (*BlockData) ProtoMessage()
func (*BlockData) UnmarshallBlock ¶
func (*BlockData) XXX_DiscardUnknown ¶
func (m *BlockData) XXX_DiscardUnknown()
func (*BlockData) XXX_Marshal ¶
func (*BlockData) XXX_Unmarshal ¶
type BlockDataOption ¶
func WithAfterTxs ¶
func WithAfterTxs(a *AfterTxs) BlockDataOption
func WithCurHeader ¶
func WithCurHeader(cur *BlockHeader) BlockDataOption
func WithPrevHeader ¶
func WithPrevHeader(pre *BlockHeader) BlockDataOption
func WithSysUpdate ¶
func WithSysUpdate(a bool) BlockDataOption
func WithTxFullData ¶
func WithTxFullData(data [][]byte) BlockDataOption
type BlockHeader ¶
type BlockHeader struct { BlockId int64 `protobuf:"varint,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` EcosystemId int64 `protobuf:"varint,3,opt,name=ecosystem_id,json=ecosystemId,proto3" json:"ecosystem_id,omitempty"` KeyId int64 `protobuf:"varint,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` NodePosition int64 `protobuf:"varint,5,opt,name=node_position,json=nodePosition,proto3" json:"node_position,omitempty"` Sign []byte `protobuf:"bytes,6,opt,name=sign,proto3" json:"sign,omitempty"` BlockHash []byte `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` //differences with before and after in tx modification table RollbacksHash []byte `protobuf:"bytes,8,opt,name=rollbacks_hash,json=rollbacksHash,proto3" json:"rollbacks_hash,omitempty"` Version int32 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"` ConsensusMode int32 `protobuf:"varint,10,opt,name=consensus_mode,json=consensusMode,proto3" json:"consensus_mode,omitempty"` CandidateNodes []byte `protobuf:"bytes,11,opt,name=candidate_nodes,json=candidateNodes,proto3" json:"candidate_nodes,omitempty"` NetworkId int64 `protobuf:"varint,12,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` }
BlockHeader is a structure of the block's header
func ParseBlockHeader ¶
func ParseBlockHeader(buf *bytes.Buffer, maxBlockSize int64) (header *BlockHeader, err error)
ParseBlockHeader is parses block header
func (*BlockHeader) Descriptor ¶
func (*BlockHeader) Descriptor() ([]byte, []int)
func (*BlockHeader) ForSha ¶
func (b *BlockHeader) ForSha(prev *BlockHeader, mrklRoot []byte) string
func (*BlockHeader) ForSign ¶
func (b *BlockHeader) ForSign(prev *BlockHeader, mrklRoot []byte) string
ForSign from 128 bytes to 512 bytes. Signature of TYPE, BLOCK_ID, PREV_BLOCK_HASH, TIME, WALLET_ID, state_id, MRKL_ROOT
func (*BlockHeader) GenHash ¶
func (b *BlockHeader) GenHash(prev *BlockHeader, mrklRoot []byte) []byte
func (*BlockHeader) GetBlockHash ¶
func (m *BlockHeader) GetBlockHash() []byte
func (*BlockHeader) GetBlockId ¶
func (m *BlockHeader) GetBlockId() int64
func (*BlockHeader) GetCandidateNodes ¶
func (m *BlockHeader) GetCandidateNodes() []byte
func (*BlockHeader) GetConsensusMode ¶
func (m *BlockHeader) GetConsensusMode() int32
func (*BlockHeader) GetEcosystemId ¶
func (m *BlockHeader) GetEcosystemId() int64
func (*BlockHeader) GetKeyId ¶
func (m *BlockHeader) GetKeyId() int64
func (*BlockHeader) GetNetworkId ¶
func (m *BlockHeader) GetNetworkId() int64
func (*BlockHeader) GetNodePosition ¶
func (m *BlockHeader) GetNodePosition() int64
func (*BlockHeader) GetRollbacksHash ¶
func (m *BlockHeader) GetRollbacksHash() []byte
func (*BlockHeader) GetSign ¶
func (m *BlockHeader) GetSign() []byte
func (*BlockHeader) GetTimestamp ¶
func (m *BlockHeader) GetTimestamp() int64
func (*BlockHeader) GetVersion ¶
func (m *BlockHeader) GetVersion() int32
func (*BlockHeader) Marshal ¶
func (m *BlockHeader) Marshal() (dAtA []byte, err error)
func (*BlockHeader) MarshalToSizedBuffer ¶
func (m *BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockHeader) ProtoMessage ¶
func (*BlockHeader) ProtoMessage()
func (*BlockHeader) Reset ¶
func (m *BlockHeader) Reset()
func (*BlockHeader) Size ¶
func (m *BlockHeader) Size() (n int)
func (*BlockHeader) String ¶
func (m *BlockHeader) String() string
func (*BlockHeader) Unmarshal ¶
func (m *BlockHeader) Unmarshal(dAtA []byte) error
func (*BlockHeader) XXX_DiscardUnknown ¶
func (m *BlockHeader) XXX_DiscardUnknown()
func (*BlockHeader) XXX_Marshal ¶
func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockHeader) XXX_Merge ¶
func (m *BlockHeader) XXX_Merge(src proto.Message)
func (*BlockHeader) XXX_Size ¶
func (m *BlockHeader) XXX_Size() int
func (*BlockHeader) XXX_Unmarshal ¶
func (m *BlockHeader) XXX_Unmarshal(b []byte) error
type BlockSyncMethod ¶
type BlockSyncMethod int32
BlockSyncMethod define block sync method.
const ( BlockSyncMethod_CONTRACTVM BlockSyncMethod = 0 BlockSyncMethod_SQLDML BlockSyncMethod = 1 )
func (BlockSyncMethod) EnumDescriptor ¶
func (BlockSyncMethod) EnumDescriptor() ([]byte, []int)
func (BlockSyncMethod) String ¶
func (x BlockSyncMethod) String() string
type ClientTxPreprocessor ¶
type ClientTxPreprocessor interface { //ProcessClientTranstaction([]byte, int64, *log.Entry) (string, error) ProcessClientTxBatches([][]byte, int64, *log.Entry) ([]string, error) }
ClientTxPreprocessor procees tx from client
type DaemonFactory ¶
type EcosystemGetter ¶
type FirstBlock ¶
type FirstBlock struct { KeyID int64 Time int64 PublicKey []byte NodePublicKey []byte StopNetworkCertBundle []byte Test int64 PrivateBlockchain uint64 }
FirstBlock is the header of first block transaction
func (*FirstBlock) TxType ¶
func (t *FirstBlock) TxType() byte
type Header ¶
type Header struct { ID int EcosystemID int64 KeyID int64 Time int64 NetworkID int64 PublicKey []byte }
Header is contain header data
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
Link represents a node of doubly linked list
type LogTransaction ¶
type LogTransaction struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Block int64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` // bytes tx_data = 3; Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Address int64 `protobuf:"varint,5,opt,name=address,proto3" json:"address,omitempty"` EcosystemId int64 `protobuf:"varint,6,opt,name=ecosystem_id,json=ecosystemId,proto3" json:"ecosystem_id,omitempty"` ContractName string `protobuf:"bytes,7,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"` InvokeStatus pbgo.TxInvokeStatusCode `` /* 127-byte string literal not displayed */ }
func (*LogTransaction) Descriptor ¶
func (*LogTransaction) Descriptor() ([]byte, []int)
func (*LogTransaction) GetAddress ¶
func (m *LogTransaction) GetAddress() int64
func (*LogTransaction) GetBlock ¶
func (m *LogTransaction) GetBlock() int64
func (*LogTransaction) GetContractName ¶
func (m *LogTransaction) GetContractName() string
func (*LogTransaction) GetEcosystemId ¶
func (m *LogTransaction) GetEcosystemId() int64
func (*LogTransaction) GetHash ¶
func (m *LogTransaction) GetHash() []byte
func (*LogTransaction) GetInvokeStatus ¶
func (m *LogTransaction) GetInvokeStatus() pbgo.TxInvokeStatusCode
func (*LogTransaction) GetTimestamp ¶
func (m *LogTransaction) GetTimestamp() int64
func (*LogTransaction) Marshal ¶
func (m *LogTransaction) Marshal() (dAtA []byte, err error)
func (*LogTransaction) MarshalToSizedBuffer ¶
func (m *LogTransaction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LogTransaction) ProtoMessage ¶
func (*LogTransaction) ProtoMessage()
func (*LogTransaction) Reset ¶
func (m *LogTransaction) Reset()
func (*LogTransaction) Size ¶
func (m *LogTransaction) Size() (n int)
func (*LogTransaction) String ¶
func (m *LogTransaction) String() string
func (*LogTransaction) Unmarshal ¶
func (m *LogTransaction) Unmarshal(dAtA []byte) error
func (*LogTransaction) XXX_DiscardUnknown ¶
func (m *LogTransaction) XXX_DiscardUnknown()
func (*LogTransaction) XXX_Marshal ¶
func (m *LogTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LogTransaction) XXX_Merge ¶
func (m *LogTransaction) XXX_Merge(src proto.Message)
func (*LogTransaction) XXX_Size ¶
func (m *LogTransaction) XXX_Size() int
func (*LogTransaction) XXX_Unmarshal ¶
func (m *LogTransaction) XXX_Unmarshal(b []byte) error
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map holds the elements in go's native map, also maintains the head and tail link to keep the elements in insertion order
func LoadMap ¶
LoadMap instantiates a linked hash map and initializing it from map[string]interface{}.
func (*Map) Get ¶
Get searches the element in the map by key and returns its value or nil if key doesn't exists. Second return parameter is true if key was found, otherwise false.
func (*Map) MarshalJSON ¶
type Notifications ¶
type RollbackTx ¶
type RollbackTx struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` BlockId int64 `protobuf:"varint,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` TxHash []byte `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` NameTable string `protobuf:"bytes,4,opt,name=name_table,json=nameTable,proto3" json:"name_table,omitempty"` TableId string `protobuf:"bytes,5,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` Data string `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` }
func (*RollbackTx) Descriptor ¶
func (*RollbackTx) Descriptor() ([]byte, []int)
func (*RollbackTx) GetBlockId ¶
func (m *RollbackTx) GetBlockId() int64
func (*RollbackTx) GetData ¶
func (m *RollbackTx) GetData() string
func (*RollbackTx) GetDataHash ¶
func (m *RollbackTx) GetDataHash() []byte
func (*RollbackTx) GetId ¶
func (m *RollbackTx) GetId() int64
func (*RollbackTx) GetNameTable ¶
func (m *RollbackTx) GetNameTable() string
func (*RollbackTx) GetTableId ¶
func (m *RollbackTx) GetTableId() string
func (*RollbackTx) GetTxHash ¶
func (m *RollbackTx) GetTxHash() []byte
func (*RollbackTx) Marshal ¶
func (m *RollbackTx) Marshal() (dAtA []byte, err error)
func (*RollbackTx) MarshalToSizedBuffer ¶
func (m *RollbackTx) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RollbackTx) ProtoMessage ¶
func (*RollbackTx) ProtoMessage()
func (*RollbackTx) Reset ¶
func (m *RollbackTx) Reset()
func (*RollbackTx) Size ¶
func (m *RollbackTx) Size() (n int)
func (*RollbackTx) String ¶
func (m *RollbackTx) String() string
func (*RollbackTx) Unmarshal ¶
func (m *RollbackTx) Unmarshal(dAtA []byte) error
func (*RollbackTx) XXX_DiscardUnknown ¶
func (m *RollbackTx) XXX_DiscardUnknown()
func (*RollbackTx) XXX_Marshal ¶
func (m *RollbackTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RollbackTx) XXX_Merge ¶
func (m *RollbackTx) XXX_Merge(src proto.Message)
func (*RollbackTx) XXX_Size ¶
func (m *RollbackTx) XXX_Size() int
func (*RollbackTx) XXX_Unmarshal ¶
func (m *RollbackTx) XXX_Unmarshal(b []byte) error
type SmartContractRunner ¶
type SmartContractRunner interface {
RunContract(data, hash []byte, keyID, tnow int64, le *log.Entry) error
}
SmartContractRunner run serialized contract
type SmartTransaction ¶
type SmartTransaction struct { *Header MaxSum string PayOver string Lang string Expedite string SignedBy int64 TransferSelf *TransferSelf UTXO *UTXO Params map[string]any }
SmartTransaction is storing smart contract data
func (SmartTransaction) Hash ¶
func (t SmartTransaction) Hash() ([]byte, error)
func (*SmartTransaction) Marshal ¶
func (s *SmartTransaction) Marshal() ([]byte, error)
func (*SmartTransaction) TxType ¶
func (s *SmartTransaction) TxType() byte
func (*SmartTransaction) Unmarshal ¶
func (s *SmartTransaction) Unmarshal(buffer []byte) error
func (*SmartTransaction) Validate ¶
func (txSmart *SmartTransaction) Validate() error
func (*SmartTransaction) WithPrivate ¶
func (s *SmartTransaction) WithPrivate(privateKey []byte, internal bool) error
type StopNetwork ¶
func (*StopNetwork) TxType ¶
func (t *StopNetwork) TxType() byte