Versions in this module Expand all Collapse all v1 v1.5.0 Dec 9, 2022 v1.0.0 Nov 22, 2022 Changes in this version + const BoolFalse + const BoolTrue + const EC_KEY_TYPE_BLOCK_HEITHT + const EC_KEY_TYPE_FIELD + const EC_KEY_TYPE_IS_DELETE + const EC_KEY_TYPE_KEY + const EC_KEY_TYPE_TIMESTAMP + const EC_KEY_TYPE_TX_ID + const EC_KEY_TYPE_VALUE + const ERROR + const FuncKeyHistoryIterClose + const FuncKeyHistoryIterHasNext + const FuncKeyHistoryIterNext + const FuncKvIteratorClose + const FuncKvIteratorCreate + const FuncKvIteratorHasNext + const FuncKvIteratorNext + const FuncKvPreIteratorCreate + const KeyBlockHeight + const KeyCallContractReq + const KeyCallContractResp + const KeyContractName + const KeyHistoryIterField + const KeyHistoryIterKey + const KeyIsDelete + const KeyIterIndex + const KeyIterLimitField + const KeyIterLimitKey + const KeyIterStartField + const KeyIterStartKey + const KeyIteratorFuncName + const KeyIteratorHasNext + const KeyKVIterKey + const KeyRegisterProcessName + const KeySenderAddr + const KeyStateKey + const KeyStateValue + const KeyTimestamp + const KeyTxId + const KeyUserField + const KeyUserKey + const KeyWriteMap + const MapSize + const OK + func Error(msg string) protogo.Response + func Success(payload []byte) protogo.Response + type Bool int32 + type Contract interface + InitContract func() protogo.Response + InvokeContract func(method string) protogo.Response + UpgradeContract func() protogo.Response + type ECKeyType = string + type Hash struct + type KeyHistoryKvIter interface + Next func() (*KeyModification, error) + type KeyHistoryKvIterImpl struct + func (k *KeyHistoryKvIterImpl) Close() (bool, error) + func (k *KeyHistoryKvIterImpl) HasNext() bool + func (k *KeyHistoryKvIterImpl) Next() (*KeyModification, error) + func (k *KeyHistoryKvIterImpl) NextRow() (*serialize.EasyCodec, error) + type KeyModification struct + BlockHeight int + Field string + IsDelete bool + Key string + Timestamp string + TxId string + Value []byte + type MockContract struct + func NewMockContract(ctrl *gomock.Controller) *MockContract + func (m *MockContract) EXPECT() *MockContractMockRecorder + func (m *MockContract) InitContract() protogo.Response + func (m *MockContract) InvokeContract(method string) protogo.Response + func (m *MockContract) UpgradeContract() protogo.Response + type MockContractMockRecorder struct + func (mr *MockContractMockRecorder) InitContract() *gomock.Call + func (mr *MockContractMockRecorder) InvokeContract(method interface{}) *gomock.Call + func (mr *MockContractMockRecorder) UpgradeContract() *gomock.Call + type MockKeyHistoryKvIter struct + func NewMockKeyHistoryKvIter(ctrl *gomock.Controller) *MockKeyHistoryKvIter + func (m *MockKeyHistoryKvIter) Close() (bool, error) + func (m *MockKeyHistoryKvIter) EXPECT() *MockKeyHistoryKvIterMockRecorder + func (m *MockKeyHistoryKvIter) HasNext() bool + func (m *MockKeyHistoryKvIter) Next() (*KeyModification, error) + func (m *MockKeyHistoryKvIter) NextRow() (*serialize.EasyCodec, error) + type MockKeyHistoryKvIterMockRecorder struct + func (mr *MockKeyHistoryKvIterMockRecorder) Close() *gomock.Call + func (mr *MockKeyHistoryKvIterMockRecorder) HasNext() *gomock.Call + func (mr *MockKeyHistoryKvIterMockRecorder) Next() *gomock.Call + func (mr *MockKeyHistoryKvIterMockRecorder) NextRow() *gomock.Call + type MockResultSet struct + func NewMockResultSet(ctrl *gomock.Controller) *MockResultSet + func (m *MockResultSet) Close() (bool, error) + func (m *MockResultSet) EXPECT() *MockResultSetMockRecorder + func (m *MockResultSet) HasNext() bool + func (m *MockResultSet) NextRow() (*serialize.EasyCodec, error) + type MockResultSetKV struct + func NewMockResultSetKV(ctrl *gomock.Controller) *MockResultSetKV + func (m *MockResultSetKV) Close() (bool, error) + func (m *MockResultSetKV) EXPECT() *MockResultSetKVMockRecorder + func (m *MockResultSetKV) HasNext() bool + func (m *MockResultSetKV) Next() (string, string, []byte, error) + func (m *MockResultSetKV) NextRow() (*serialize.EasyCodec, error) + type MockResultSetKVMockRecorder struct + func (mr *MockResultSetKVMockRecorder) Close() *gomock.Call + func (mr *MockResultSetKVMockRecorder) HasNext() *gomock.Call + func (mr *MockResultSetKVMockRecorder) Next() *gomock.Call + func (mr *MockResultSetKVMockRecorder) NextRow() *gomock.Call + type MockResultSetMockRecorder struct + func (mr *MockResultSetMockRecorder) Close() *gomock.Call + func (mr *MockResultSetMockRecorder) HasNext() *gomock.Call + func (mr *MockResultSetMockRecorder) NextRow() *gomock.Call + type MockSDKInterface struct + func NewMockSDKInterface(ctrl *gomock.Controller) *MockSDKInterface + func (m *MockSDKInterface) CallContract(contractName, method string, args map[string][]byte) protogo.Response + func (m *MockSDKInterface) Debugf(format string, a ...interface{}) + func (m *MockSDKInterface) DelState(key, field string) error + func (m *MockSDKInterface) DelStateFromKey(key string) error + func (m *MockSDKInterface) EXPECT() *MockSDKInterfaceMockRecorder + func (m *MockSDKInterface) EmitEvent(topic string, data []string) + func (m *MockSDKInterface) Errorf(format string, a ...interface{}) + func (m *MockSDKInterface) GetArgs() map[string][]byte + func (m *MockSDKInterface) GetBatchState(batchKeys []*vm.BatchKey) ([]*vm.BatchKey, error) + func (m *MockSDKInterface) GetBlockHeight() (int, error) + func (m *MockSDKInterface) GetCreatorOrgId() (string, error) + func (m *MockSDKInterface) GetCreatorPk() (string, error) + func (m *MockSDKInterface) GetCreatorRole() (string, error) + func (m *MockSDKInterface) GetSenderAddr() (string, error) + func (m *MockSDKInterface) GetSenderOrgId() (string, error) + func (m *MockSDKInterface) GetSenderPk() (string, error) + func (m *MockSDKInterface) GetSenderRole() (string, error) + func (m *MockSDKInterface) GetState(key, field string) (string, error) + func (m *MockSDKInterface) GetStateByte(key, field string) ([]byte, error) + func (m *MockSDKInterface) GetStateFromKey(key string) (string, error) + func (m *MockSDKInterface) GetStateFromKeyByte(key string) ([]byte, error) + func (m *MockSDKInterface) GetTxId() (string, error) + func (m *MockSDKInterface) GetTxInfo(txId string) protogo.Response + func (m *MockSDKInterface) GetTxTimeStamp() (string, error) + func (m *MockSDKInterface) Infof(format string, a ...interface{}) + func (m *MockSDKInterface) Log(message string) + func (m *MockSDKInterface) NewHistoryKvIterForKey(key, field string) (KeyHistoryKvIter, error) + func (m *MockSDKInterface) NewIterator(startKey, limitKey string) (ResultSetKV, error) + func (m *MockSDKInterface) NewIteratorPrefixWithKey(key string) (ResultSetKV, error) + func (m *MockSDKInterface) NewIteratorPrefixWithKeyField(key, field string) (ResultSetKV, error) + func (m *MockSDKInterface) NewIteratorWithField(key, startField, limitField string) (ResultSetKV, error) + func (m *MockSDKInterface) Origin() (string, error) + func (m *MockSDKInterface) PutState(key, field, value string) error + func (m *MockSDKInterface) PutStateByte(key, field string, value []byte) error + func (m *MockSDKInterface) PutStateFromKey(key, value string) error + func (m *MockSDKInterface) PutStateFromKeyByte(key string, value []byte) error + func (m *MockSDKInterface) Sender() (string, error) + func (m *MockSDKInterface) Warnf(format string, a ...interface{}) + type MockSDKInterfaceMockRecorder struct + func (mr *MockSDKInterfaceMockRecorder) CallContract(contractName, method, args interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Debugf(format interface{}, a ...interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) DelState(key, field interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) DelStateFromKey(key interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) EmitEvent(topic, data interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Errorf(format interface{}, a ...interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetArgs() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetBatchState(batchKeys interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetBlockHeight() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetCreatorOrgId() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetCreatorPk() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetCreatorRole() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetSenderAddr() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetSenderOrgId() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetSenderPk() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetSenderRole() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetState(key, field interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetStateByte(key, field interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetStateFromKey(key interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetStateFromKeyByte(key interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetTxId() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetTxInfo(txId interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) GetTxTimeStamp() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Infof(format interface{}, a ...interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Log(message interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) NewHistoryKvIterForKey(key, field interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) NewIterator(startKey, limitKey interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) NewIteratorPrefixWithKey(key interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) NewIteratorPrefixWithKeyField(key, field interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) NewIteratorWithField(key, startField, limitField interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Origin() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) PutState(key, field, value interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) PutStateByte(key, field, value interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) PutStateFromKey(key, value interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) PutStateFromKeyByte(key, value interface{}) *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Sender() *gomock.Call + func (mr *MockSDKInterfaceMockRecorder) Warnf(format interface{}, a ...interface{}) *gomock.Call + type Options func(*Hash) + func WithHashType(hashType crypto.HashType) Options + type ResultSet interface + Close func() (bool, error) + HasNext func() bool + NextRow func() (*serialize.EasyCodec, error) + type ResultSetKV interface + Next func() (string, string, []byte, error) + type ResultSetKvImpl struct + func (r *ResultSetKvImpl) Close() (bool, error) + func (r *ResultSetKvImpl) HasNext() bool + func (r *ResultSetKvImpl) Next() (string, string, []byte, error) + func (r *ResultSetKvImpl) NextRow() (*serialize.EasyCodec, error) + type SDK struct + func NewSDK(crossCtx *protogo.CrossContext, ...) *SDK + func (s *SDK) CallContract(contractName, method string, args map[string][]byte) protogo.Response + func (s *SDK) Debugf(format string, a ...interface{}) + func (s *SDK) DelState(key, field string) error + func (s *SDK) DelStateFromKey(key string) error + func (s *SDK) EmitEvent(topic string, data []string) + func (s *SDK) Errorf(format string, a ...interface{}) + func (s *SDK) GetArgs() map[string][]byte + func (s *SDK) GetBatchState(batchKeys []*vmPb.BatchKey) ([]*vmPb.BatchKey, error) + func (s *SDK) GetBlockHeight() (int, error) + func (s *SDK) GetCreatorOrgId() (string, error) + func (s *SDK) GetCreatorPk() (string, error) + func (s *SDK) GetCreatorRole() (string, error) + func (s *SDK) GetEvents() []*protogo.Event + func (s *SDK) GetReadMap() map[string][]byte + func (s *SDK) GetSenderAddr() (string, error) + func (s *SDK) GetSenderOrgId() (string, error) + func (s *SDK) GetSenderPk() (string, error) + func (s *SDK) GetSenderRole() (string, error) + func (s *SDK) GetState(key, field string) (string, error) + func (s *SDK) GetStateByte(key, field string) ([]byte, error) + func (s *SDK) GetStateFromKey(key string) (string, error) + func (s *SDK) GetStateFromKeyByte(key string) ([]byte, error) + func (s *SDK) GetTxId() (string, error) + func (s *SDK) GetTxInfo(txId string) protogo.Response + func (s *SDK) GetTxTimeStamp() (string, error) + func (s *SDK) GetWriteMap() map[string][]byte + func (s *SDK) Infof(format string, a ...interface{}) + func (s *SDK) Log(message string) + func (s *SDK) NewHistoryKvIterForKey(key, field string) (KeyHistoryKvIter, error) + func (s *SDK) NewIterator(startKey string, limitKey string) (ResultSetKV, error) + func (s *SDK) NewIteratorPrefixWithKey(key string) (ResultSetKV, error) + func (s *SDK) NewIteratorPrefixWithKeyField(startKey string, startField string) (ResultSetKV, error) + func (s *SDK) NewIteratorWithField(key string, startField string, limitField string) (ResultSetKV, error) + func (s *SDK) Origin() (string, error) + func (s *SDK) PutState(key, field string, value string) error + func (s *SDK) PutStateByte(key, field string, value []byte) error + func (s *SDK) PutStateFromKey(key string, value string) error + func (s *SDK) PutStateFromKeyByte(key string, value []byte) error + func (s *SDK) Sender() (string, error) + func (s *SDK) Warnf(format string, a ...interface{}) + type SDKInterface interface + CallContract func(contractName, method string, args map[string][]byte) protogo.Response + Debugf func(format string, a ...interface{}) + DelState func(key, field string) error + DelStateFromKey func(key string) error + EmitEvent func(topic string, data []string) + Errorf func(format string, a ...interface{}) + GetArgs func() map[string][]byte + GetBatchState func(batchKeys []*vmPb.BatchKey) ([]*vmPb.BatchKey, error) + GetBlockHeight func() (int, error) + GetCreatorOrgId func() (string, error) + GetCreatorPk func() (string, error) + GetCreatorRole func() (string, error) + GetSenderAddr func() (string, error) + GetSenderOrgId func() (string, error) + GetSenderPk func() (string, error) + GetSenderRole func() (string, error) + GetState func(key, field string) (string, error) + GetStateByte func(key, field string) ([]byte, error) + GetStateFromKey func(key string) (string, error) + GetStateFromKeyByte func(key string) ([]byte, error) + GetTxId func() (string, error) + GetTxInfo func(txId string) protogo.Response + GetTxTimeStamp func() (string, error) + Infof func(format string, a ...interface{}) + Log func(message string) + NewHistoryKvIterForKey func(key, field string) (KeyHistoryKvIter, error) + NewIterator func(startKey string, limitKey string) (ResultSetKV, error) + NewIteratorPrefixWithKey func(key string) (ResultSetKV, error) + NewIteratorPrefixWithKeyField func(key string, field string) (ResultSetKV, error) + NewIteratorWithField func(key string, startField string, limitField string) (ResultSetKV, error) + Origin func() (string, error) + PutState func(key, field string, value string) error + PutStateByte func(key, field string, value []byte) error + PutStateFromKey func(key string, value string) error + PutStateFromKeyByte func(key string, value []byte) error + Sender func() (string, error) + Warnf func(format string, a ...interface{}) + var Instance SDKInterface + type StoreMap struct + Depth int64 + HashType crypto.HashType + Name string + func NewStoreMap(name string, depth int64, hashType ...crypto.HashType) (*StoreMap, error) + func (c *StoreMap) Del(key []string) (err error) + func (c *StoreMap) Exist(key []string) (ok bool, err error) + func (c *StoreMap) Get(key []string) ([]byte, error) + func (c *StoreMap) NewStoreMapIteratorPrefixWithKey(key []string) (ResultSetKV, error) + func (c *StoreMap) Set(key []string, value []byte) (err error)