Documentation
¶
Index ¶
- Constants
- func MockACLCheckAddress(_ *MockStub, parameters ...string) *peer.Response
- func MockACLCheckKeys(_ *MockStub, parameters ...string) *peer.Response
- func MockACLGetAccountInfo(_ *MockStub, _ ...string) *peer.Response
- func MockACLGetAccountsInfo(mockStub *MockStub, parameters ...string) *peer.Response
- type ExecutorRequest
- type MockStub
- func (ms *MockStub) CreateAndSetConfig(name, symbol string, decimals uint, issuer string, feeSetter string, ...) string
- func (ms *MockStub) NbTxInvokeChaincode(chaincode *core.Chaincode, functionName string, parameters ...string) *peer.Response
- func (ms *MockStub) NbTxInvokeChaincodeSigned(chaincode *core.Chaincode, functionName string, user *mocks.UserFoundation, ...) *peer.Response
- func (ms *MockStub) QueryChaincode(chaincode *core.Chaincode, functionName string, parameters ...string) *peer.Response
- func (ms *MockStub) SetConfig(config string)
- func (ms *MockStub) TxInvokeChaincode(chaincode *core.Chaincode, functionName string, parameters ...string) (string, *peer.Response)
- func (ms *MockStub) TxInvokeChaincodeMultisigned(chaincode *core.Chaincode, functionName string, ...) (string, *peer.Response)
- func (ms *MockStub) TxInvokeChaincodeSigned(chaincode *core.Chaincode, functionName string, user *mocks.UserFoundation, ...) (string, *peer.Response)
- func (ms *MockStub) TxInvokeTaskExecutor(chaincode *core.Chaincode, requestID string, chaincodeName string, ...) (string, *peer.Response)
Constants ¶
const ( FnCheckAddress = "checkAddress" FnCheckKeys = "checkKeys" FnGetAccountInfo = "getAccountInfo" FnGetAccountsInfo = "getAccountsInfo" )
ACL chaincode functions
const ( KeyLengthEd25519 = 32 KeyLengthSecp256k1 = 65 KeyLengthGOST = 64 PrefixUncompressedSecp259k1Key = 0x04 )
Key length
Variables ¶
This section is empty.
Functions ¶
func MockACLCheckAddress ¶
Types ¶
type ExecutorRequest ¶
type ExecutorRequest struct {
User *mocks.UserFoundation
Task *pbfound.Task
}
type MockStub ¶
type MockStub struct {
*mocks.ChaincodeStub
GetStateCallsMap map[string][]byte
InvokeACLMap map[string]func(mockStub *MockStub, parameters ...string) *peer.Response
}
MockStub represents mock stub structure
func (*MockStub) CreateAndSetConfig ¶
func (ms *MockStub) CreateAndSetConfig( name, symbol string, decimals uint, issuer string, feeSetter string, feeAddressSetter string, admin string, tracingCollectorEndpoint *pbfound.CollectorEndpoint, ) string
CreateAndSetConfig creates config for token, based on BaseToken. If feeSetter is not set or empty, Token.FeeSetter will be nil. If feeAddressSetter is not set or empty, Token.FeeAddressSetter will be nil.
func (*MockStub) NbTxInvokeChaincode ¶
func (ms *MockStub) NbTxInvokeChaincode( chaincode *core.Chaincode, functionName string, parameters ...string, ) *peer.Response
NbTxInvokeChaincode returns non batched transaction result
func (*MockStub) NbTxInvokeChaincodeSigned ¶
func (ms *MockStub) NbTxInvokeChaincodeSigned( chaincode *core.Chaincode, functionName string, user *mocks.UserFoundation, requestID string, chaincodeName string, channelName string, parameters ...string, ) *peer.Response
NbTxInvokeChaincodeSigned returns non-batched transaction result with signed arguments
func (*MockStub) QueryChaincode ¶
func (ms *MockStub) QueryChaincode(chaincode *core.Chaincode, functionName string, parameters ...string) *peer.Response
QueryChaincode returns query result
func (*MockStub) TxInvokeChaincode ¶
func (ms *MockStub) TxInvokeChaincode( chaincode *core.Chaincode, functionName string, parameters ...string, ) (string, *peer.Response)
TxInvokeChaincode returns result of batchExecute transaction
func (*MockStub) TxInvokeChaincodeMultisigned ¶
func (ms *MockStub) TxInvokeChaincodeMultisigned( chaincode *core.Chaincode, functionName string, user *mocks.UserFoundationMultisigned, requestID string, chaincodeName string, channelName string, parameters ...string, ) (string, *peer.Response)
TxInvokeChaincodeMultisigned returns result of batchExecute transaction with signed arguments
func (*MockStub) TxInvokeChaincodeSigned ¶
func (ms *MockStub) TxInvokeChaincodeSigned( chaincode *core.Chaincode, functionName string, user *mocks.UserFoundation, requestID string, chaincodeName string, channelName string, parameters ...string, ) (string, *peer.Response)
TxInvokeChaincodeSigned returns result of batchExecute transaction with signed arguments