Documentation ¶
Overview ¶
Package adaptor is a generated GoMock package.
Package adaptor is a generated GoMock package.
Package adaptor is a generated GoMock package.
Index ¶
- Variables
- type AmountAsset
- type BindTxAndSignatureInput
- type BindTxAndSignatureOutput
- type BlockInfo
- type CalcTxHashInput
- type CalcTxHashOutput
- type CreateContractInitialTxInput
- type CreateContractInitialTxOutput
- type CreateContractInstallTxInput
- type CreateContractInstallTxOutput
- type CreateContractInvokeTxInput
- type CreateContractInvokeTxOutput
- type CreateMultiSigAddressInput
- type CreateMultiSigAddressOutput
- type CreateMultiSigPayoutTxInput
- type CreateMultiSigPayoutTxOutput
- type CreateTransferTokenTxInput
- type CreateTransferTokenTxOutput
- type GetAddrTxHistoryInput
- type GetAddrTxHistoryOutput
- type GetAddressInput
- type GetAddressOutput
- type GetAssetDecimalInput
- type GetAssetDecimalOutput
- type GetBalanceInput
- type GetBalanceOutput
- type GetBlockInfoInput
- type GetBlockInfoOutput
- type GetContractInitialTxInput
- type GetContractInitialTxOutput
- type GetContractInstallTxInput
- type GetContractInstallTxOutput
- type GetContractInvokeTxInput
- type GetContractInvokeTxOutput
- type GetPalletOneMappingAddressInput
- type GetPalletOneMappingAddressOutput
- type GetPublicKeyInput
- type GetPublicKeyOutput
- type GetTransferTxInput
- type GetTransferTxOutput
- type GetTxBasicInfoInput
- type GetTxBasicInfoOutput
- type HashMessageInput
- type HashMessageOutput
- type ICryptoCurrency
- type ISmartContract
- type IUtility
- type MockICryptoCurrency
- func (m *MockICryptoCurrency) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
- func (m *MockICryptoCurrency) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
- func (m *MockICryptoCurrency) CreateMultiSigAddress(input *CreateMultiSigAddressInput) (*CreateMultiSigAddressOutput, error)
- func (m *MockICryptoCurrency) CreateTransferTokenTx(input *CreateTransferTokenTxInput) (*CreateTransferTokenTxOutput, error)
- func (m *MockICryptoCurrency) EXPECT() *MockICryptoCurrencyMockRecorder
- func (m *MockICryptoCurrency) GetAddrTxHistory(input *GetAddrTxHistoryInput) (*GetAddrTxHistoryOutput, error)
- func (m *MockICryptoCurrency) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
- func (m *MockICryptoCurrency) GetAssetDecimal(asset *GetAssetDecimalInput) (*GetAssetDecimalOutput, error)
- func (m *MockICryptoCurrency) GetBalance(input *GetBalanceInput) (*GetBalanceOutput, error)
- func (m *MockICryptoCurrency) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
- func (m *MockICryptoCurrency) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
- func (m *MockICryptoCurrency) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
- func (m *MockICryptoCurrency) GetTransferTx(input *GetTransferTxInput) (*GetTransferTxOutput, error)
- func (m *MockICryptoCurrency) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
- func (m *MockICryptoCurrency) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
- func (m *MockICryptoCurrency) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
- func (m *MockICryptoCurrency) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
- func (m *MockICryptoCurrency) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
- func (m *MockICryptoCurrency) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
- type MockICryptoCurrencyMockRecorder
- func (mr *MockICryptoCurrencyMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) CalcTxHash(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) CreateMultiSigAddress(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) CreateTransferTokenTx(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetAddrTxHistory(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetAddress(key interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetAssetDecimal(asset interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetBalance(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetPublicKey(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetTransferTx(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) SendTransaction(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) SignMessage(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) SignTransaction(input interface{}) *gomock.Call
- func (mr *MockICryptoCurrencyMockRecorder) VerifySignature(input interface{}) *gomock.Call
- type MockISmartContract
- func (m *MockISmartContract) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
- func (m *MockISmartContract) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
- func (m *MockISmartContract) CreateContractInitialTx(input *CreateContractInitialTxInput) (*CreateContractInitialTxOutput, error)
- func (m *MockISmartContract) CreateContractInstallTx(input *CreateContractInstallTxInput) (*CreateContractInstallTxOutput, error)
- func (m *MockISmartContract) CreateContractInvokeTx(input *CreateContractInvokeTxInput) (*CreateContractInvokeTxOutput, error)
- func (m *MockISmartContract) EXPECT() *MockISmartContractMockRecorder
- func (m *MockISmartContract) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
- func (m *MockISmartContract) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
- func (m *MockISmartContract) GetContractInitialTx(input *GetContractInitialTxInput) (*GetContractInitialTxOutput, error)
- func (m *MockISmartContract) GetContractInstallTx(input *GetContractInstallTxInput) (*GetContractInstallTxOutput, error)
- func (m *MockISmartContract) GetContractInvokeTx(input *GetContractInvokeTxInput) (*GetContractInvokeTxOutput, error)
- func (m *MockISmartContract) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
- func (m *MockISmartContract) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
- func (m *MockISmartContract) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
- func (m *MockISmartContract) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
- func (m *MockISmartContract) QueryContract(input *QueryContractInput) (*QueryContractOutput, error)
- func (m *MockISmartContract) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
- func (m *MockISmartContract) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
- func (m *MockISmartContract) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
- func (m *MockISmartContract) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
- type MockISmartContractMockRecorder
- func (mr *MockISmartContractMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) CalcTxHash(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) CreateContractInitialTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) CreateContractInstallTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) CreateContractInvokeTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetAddress(key interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetContractInitialTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetContractInstallTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetContractInvokeTx(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetPublicKey(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) QueryContract(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) SendTransaction(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) SignMessage(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) SignTransaction(input interface{}) *gomock.Call
- func (mr *MockISmartContractMockRecorder) VerifySignature(input interface{}) *gomock.Call
- type MockIUtility
- func (m *MockIUtility) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
- func (m *MockIUtility) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
- func (m *MockIUtility) EXPECT() *MockIUtilityMockRecorder
- func (m *MockIUtility) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
- func (m *MockIUtility) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
- func (m *MockIUtility) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
- func (m *MockIUtility) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
- func (m *MockIUtility) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
- func (m *MockIUtility) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
- func (m *MockIUtility) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
- func (m *MockIUtility) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
- func (m *MockIUtility) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
- func (m *MockIUtility) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
- type MockIUtilityMockRecorder
- func (mr *MockIUtilityMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) CalcTxHash(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) GetAddress(key interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) GetPublicKey(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) SendTransaction(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) SignMessage(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) SignTransaction(input interface{}) *gomock.Call
- func (mr *MockIUtilityMockRecorder) VerifySignature(input interface{}) *gomock.Call
- type NewPrivateKeyInput
- type NewPrivateKeyOutput
- type QueryContractInput
- type QueryContractOutput
- type SendTransactionInput
- type SendTransactionOutput
- type SignMessageInput
- type SignMessageOutput
- type SignTransactionInput
- type SignTransactionOutput
- type SimpleTransferTokenTx
- type TxBasicInfo
- type VerifySignatureInput
- type VerifySignatureOutput
Constants ¶
This section is empty.
Variables ¶
var ErrApiException = errors.New("api exception") //API端发生异常
var ErrNotFound = errors.New("not found") //未找到对应的结果
Functions ¶
This section is empty.
Types ¶
type AmountAsset ¶ added in v1.0.0
type AmountAsset struct { Amount *big.Int `json:"amount"` //金额,最小单位 Asset string `json:"asset"` //资产标识 }
AmountAsset Token的金额和资产标识
func NewAmountAsset ¶ added in v1.0.0
func NewAmountAsset(amount *big.Int, asset string) *AmountAsset
func NewAmountAssetString ¶ added in v1.0.0
func NewAmountAssetString(amount string, asset string) *AmountAsset
func NewAmountAssetUint64 ¶ added in v1.0.0
func NewAmountAssetUint64(amount uint64, asset string) *AmountAsset
func (*AmountAsset) String ¶ added in v1.0.0
func (aa *AmountAsset) String() string
type BindTxAndSignatureInput ¶ added in v1.0.0
type BindTxAndSignatureOutput ¶ added in v1.0.0
type BlockInfo ¶ added in v1.0.0
type BlockInfo struct { BlockID []byte `json:"block_id"` //交易被打包到了哪个区块ID BlockHeight uint `json:"block_height"` //交易被打包到的区块的高度 Timestamp uint64 `json:"timestamp"` //交易被打包的时间戳 ParentBlockID []byte `json:"parent_block_id"` //父区块ID HeaderRawData []byte `json:"header_raw_data"` //区块头的原始信息 TxsRoot []byte `json:"txs_root"` //默克尔根 ProducerAddress string `json:"producer_address"` //生产者地址 IsStable bool `json:"is_stable"` //是否已经稳定不可逆 }
BlockInfo 区块的基本信息
func (*BlockInfo) MarshalJSON ¶ added in v1.0.0
func (*BlockInfo) UnmarshalJSON ¶ added in v1.0.0
type CalcTxHashInput ¶ added in v1.0.0
type CalcTxHashOutput ¶ added in v1.0.0
type CreateContractInitialTxInput ¶ added in v1.0.0
type CreateContractInitialTxInput struct { Address string `json:"address"` Fee *AmountAsset `json:"fee"` Contract []byte `json:"contract"` Args [][]byte `json:"args"` Extra []byte `json:"extra"` }
type CreateContractInitialTxOutput ¶ added in v1.0.0
type CreateContractInstallTxInput ¶ added in v1.0.0
type CreateContractInstallTxInput struct { Address string `json:"address"` Fee *AmountAsset `json:"fee"` Contract []byte `json:"contract"` Extra []byte `json:"extra"` }
type CreateContractInstallTxOutput ¶ added in v1.0.0
type CreateContractInvokeTxInput ¶ added in v1.0.0
type CreateContractInvokeTxInput struct { //合约调用的发起方地址 Address string `json:"address"` //调用合约时转了多少Token给合约 Amount *AmountAsset `json:"amount"` //调用合约时支付的手续费 Fee *AmountAsset `json:"fee"` //被调用的合约地址 ContractAddress string `json:"contract_address"` //调用合约的函数名 Function string `json:"function"` //调用合约时传入的参数 Args [][]byte `json:"args"` Extra []byte `json:"extra"` }
type CreateContractInvokeTxOutput ¶ added in v1.0.0
type CreateMultiSigAddressInput ¶ added in v1.0.0
type CreateMultiSigAddressOutput ¶ added in v1.0.0
type CreateMultiSigPayoutTxInput ¶ added in v1.0.1
type CreateMultiSigPayoutTxInput struct { FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` Amount *AmountAsset `json:"amount"` Fee *AmountAsset `json:"fee"` //BTC: 可以指定要排除的UTXO Extra []byte `json:"extra"` }
type CreateMultiSigPayoutTxOutput ¶ added in v1.0.1
type CreateTransferTokenTxInput ¶ added in v1.0.0
type CreateTransferTokenTxInput struct { FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` Amount *AmountAsset `json:"amount"` Fee *AmountAsset `json:"fee"` Extra []byte `json:"extra"` }
type CreateTransferTokenTxOutput ¶ added in v1.0.0
type GetAddrTxHistoryInput ¶ added in v1.0.0
type GetAddrTxHistoryInput struct { FromAddress string `json:"from_address"` //转账的付款方地址 ToAddress string `json:"to_address"` //转账的收款方地址 Asset string `json:"asset"` //资产标识 PageSize uint32 `json:"page_size"` //分页大小,0表示不分页 PageIndex uint32 `json:"page_index"` //分页后的第几页数据 AddressLogicAndOr bool `json:"address_logic_and_or"` //付款地址,收款地址是And=1关系还是Or=0关系 Asc bool `json:"asc"` //按时间顺序从老到新 Extra []byte `json:"extra"` }
type GetAddrTxHistoryOutput ¶ added in v1.0.0
type GetAddrTxHistoryOutput struct { Txs []*SimpleTransferTokenTx `json:"transactions"` //返回的交易列表 Count uint32 `json:"count"` //忽略分页,有多少条记录 Extra []byte `json:"extra"` }
type GetAddressInput ¶ added in v1.0.0
type GetAddressOutput ¶ added in v1.0.0
type GetAssetDecimalInput ¶ added in v1.0.0
获得某种资产小数位数时的输入
type GetAssetDecimalOutput ¶ added in v1.0.0
获得的资产的小数位数
type GetBalanceInput ¶ added in v1.0.0
type GetBalanceInput struct { Address string `json:"address"` Asset string `json:"asset"` Extra []byte `json:"extra"` }
查询余额时的输入参数
type GetBalanceOutput ¶ added in v1.0.0
type GetBalanceOutput struct { Balance AmountAsset `json:"balance"` Extra []byte `json:"extra"` }
查询余额的返回值
type GetBlockInfoInput ¶ added in v1.0.0
type GetBlockInfoOutput ¶ added in v1.0.0
type GetContractInitialTxInput ¶ added in v1.0.0
type GetContractInitialTxOutput ¶ added in v1.0.0
type GetContractInitialTxOutput struct { TxBasicInfo ContractAddress string `json:"contract_address"` Extra []byte `json:"extra"` }
type GetContractInstallTxInput ¶ added in v1.0.0
type GetContractInstallTxOutput ¶ added in v1.0.0
type GetContractInstallTxOutput struct { TxBasicInfo TemplateID []byte `json:"template_id"` }
type GetContractInvokeTxInput ¶ added in v1.0.0
type GetContractInvokeTxOutput ¶ added in v1.0.0
type GetContractInvokeTxOutput struct { TxBasicInfo UpdateStateSuccess bool `json:"update_state_success"` //读写集一致,成功更新StateDB InvokeResult []byte `json:"invoke_result"` Extra []byte `json:"extra"` }
type GetPalletOneMappingAddressInput ¶ added in v1.0.0
type GetPalletOneMappingAddressOutput ¶ added in v1.0.0
type GetPublicKeyInput ¶ added in v1.0.0
type GetPublicKeyOutput ¶ added in v1.0.0
type GetTransferTxInput ¶ added in v1.0.0
type GetTransferTxOutput ¶ added in v1.0.0
type GetTransferTxOutput struct { Tx SimpleTransferTokenTx `json:"transaction"` Extra []byte `json:"extra"` }
type GetTxBasicInfoInput ¶ added in v1.0.0
type GetTxBasicInfoOutput ¶ added in v1.0.0
type GetTxBasicInfoOutput struct { Tx TxBasicInfo `json:"transaction"` Extra []byte `json:"extra"` }
type HashMessageInput ¶ added in v1.0.1
type HashMessageOutput ¶ added in v1.0.1
type ICryptoCurrency ¶ added in v1.0.0
type ICryptoCurrency interface { IUtility //获取某地址下持有某资产的数量,返回数量为该资产的最小单位 GetBalance(input *GetBalanceInput) (*GetBalanceOutput, error) //获取某资产的小数点位数 GetAssetDecimal(asset *GetAssetDecimalInput) (*GetAssetDecimalOutput, error) //创建一个转账交易,但是未签名 CreateTransferTokenTx(input *CreateTransferTokenTxInput) (*CreateTransferTokenTxOutput, error) //获取某个地址对某种Token的交易历史,支持分页和升序降序排列 GetAddrTxHistory(input *GetAddrTxHistoryInput) (*GetAddrTxHistoryOutput, error) //根据交易ID获得对应的转账交易 GetTransferTx(input *GetTransferTxInput) (*GetTransferTxOutput, error) //创建一个多签地址,该地址必须要满足signCount个签名才能解锁 CreateMultiSigAddress(input *CreateMultiSigAddressInput) (*CreateMultiSigAddressOutput, error) //构造一个从多签地址付出Token的交易 CreateMultiSigPayoutTx(input *CreateMultiSigPayoutTxInput) (*CreateMultiSigPayoutTxOutput, error) }
ICryptoCurrency 加密货币相关的API
type ISmartContract ¶ added in v1.0.0
type ISmartContract interface { IUtility //创建一个安装合约的交易,未签名 CreateContractInstallTx(input *CreateContractInstallTxInput) (*CreateContractInstallTxOutput, error) //查询合约安装的结果的交易 GetContractInstallTx(input *GetContractInstallTxInput) (*GetContractInstallTxOutput, error) //初始化合约实例 CreateContractInitialTx(input *CreateContractInitialTxInput) (*CreateContractInitialTxOutput, error) //查询初始化合约实例的交易 GetContractInitialTx(input *GetContractInitialTxInput) (*GetContractInitialTxOutput, error) //调用合约方法 CreateContractInvokeTx(input *CreateContractInvokeTxInput) (*CreateContractInvokeTxOutput, error) //查询调用合约方法的交易 GetContractInvokeTx(input *GetContractInvokeTxInput) (*GetContractInvokeTxOutput, error) //调用合约的查询方法 QueryContract(input *QueryContractInput) (*QueryContractOutput, error) }
ISmartContract 智能合约的相关操作接口
type IUtility ¶ added in v1.0.0
type IUtility interface { //创建一个新的私钥 NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error) //根据私钥创建公钥 GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) //根据Key创建地址 GetAddress(key *GetAddressInput) (*GetAddressOutput, error) //获得原链的地址和PalletOne的地址的映射 GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error) //计算一条消息的Hash值 HashMessage(input *HashMessageInput) (*HashMessageOutput, error) //对一条消息进行签名 SignMessage(input *SignMessageInput) (*SignMessageOutput, error) //对签名进行验证 VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error) //对一条交易进行签名,并返回签名结果 SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error) //将未签名的原始交易与签名进行绑定,返回一个签名后的交易 BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error) //根据交易内容,计算交易Hash CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error) //将签名后的交易广播到网络中,如果发送交易需要手续费,指定最多支付的手续费 SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error) //根据交易ID获得交易的基本信息 GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error) //查询获得一个区块的信息 GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error) }
IUtility 钱包相关的API接口,区块链相关API接口
type MockICryptoCurrency ¶ added in v1.0.0
type MockICryptoCurrency struct {
// contains filtered or unexported fields
}
MockICryptoCurrency is a mock of ICryptoCurrency interface
func NewMockICryptoCurrency ¶ added in v1.0.0
func NewMockICryptoCurrency(ctrl *gomock.Controller) *MockICryptoCurrency
NewMockICryptoCurrency creates a new mock instance
func (*MockICryptoCurrency) BindTxAndSignature ¶ added in v1.0.0
func (m *MockICryptoCurrency) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
BindTxAndSignature mocks base method
func (*MockICryptoCurrency) CalcTxHash ¶ added in v1.0.0
func (m *MockICryptoCurrency) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
CalcTxHash mocks base method
func (*MockICryptoCurrency) CreateMultiSigAddress ¶ added in v1.0.0
func (m *MockICryptoCurrency) CreateMultiSigAddress(input *CreateMultiSigAddressInput) (*CreateMultiSigAddressOutput, error)
CreateMultiSigAddress mocks base method
func (*MockICryptoCurrency) CreateTransferTokenTx ¶ added in v1.0.0
func (m *MockICryptoCurrency) CreateTransferTokenTx(input *CreateTransferTokenTxInput) (*CreateTransferTokenTxOutput, error)
CreateTransferTokenTx mocks base method
func (*MockICryptoCurrency) EXPECT ¶ added in v1.0.0
func (m *MockICryptoCurrency) EXPECT() *MockICryptoCurrencyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockICryptoCurrency) GetAddrTxHistory ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetAddrTxHistory(input *GetAddrTxHistoryInput) (*GetAddrTxHistoryOutput, error)
GetAddrTxHistory mocks base method
func (*MockICryptoCurrency) GetAddress ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
GetAddress mocks base method
func (*MockICryptoCurrency) GetAssetDecimal ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetAssetDecimal(asset *GetAssetDecimalInput) (*GetAssetDecimalOutput, error)
GetAssetDecimal mocks base method
func (*MockICryptoCurrency) GetBalance ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetBalance(input *GetBalanceInput) (*GetBalanceOutput, error)
GetBalance mocks base method
func (*MockICryptoCurrency) GetBlockInfo ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
GetBlockInfo mocks base method
func (*MockICryptoCurrency) GetPalletOneMappingAddress ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
GetPalletOneMappingAddress mocks base method
func (*MockICryptoCurrency) GetPublicKey ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
GetPublicKey mocks base method
func (*MockICryptoCurrency) GetTransferTx ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetTransferTx(input *GetTransferTxInput) (*GetTransferTxOutput, error)
GetTransferTx mocks base method
func (*MockICryptoCurrency) GetTxBasicInfo ¶ added in v1.0.0
func (m *MockICryptoCurrency) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
GetTxBasicInfo mocks base method
func (*MockICryptoCurrency) NewPrivateKey ¶ added in v1.0.0
func (m *MockICryptoCurrency) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
NewPrivateKey mocks base method
func (*MockICryptoCurrency) SendTransaction ¶ added in v1.0.0
func (m *MockICryptoCurrency) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
SendTransaction mocks base method
func (*MockICryptoCurrency) SignMessage ¶ added in v1.0.0
func (m *MockICryptoCurrency) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
SignMessage mocks base method
func (*MockICryptoCurrency) SignTransaction ¶ added in v1.0.0
func (m *MockICryptoCurrency) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
SignTransaction mocks base method
func (*MockICryptoCurrency) VerifySignature ¶ added in v1.0.0
func (m *MockICryptoCurrency) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
VerifySignature mocks base method
type MockICryptoCurrencyMockRecorder ¶ added in v1.0.0
type MockICryptoCurrencyMockRecorder struct {
// contains filtered or unexported fields
}
MockICryptoCurrencyMockRecorder is the mock recorder for MockICryptoCurrency
func (*MockICryptoCurrencyMockRecorder) BindTxAndSignature ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
BindTxAndSignature indicates an expected call of BindTxAndSignature
func (*MockICryptoCurrencyMockRecorder) CalcTxHash ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) CalcTxHash(input interface{}) *gomock.Call
CalcTxHash indicates an expected call of CalcTxHash
func (*MockICryptoCurrencyMockRecorder) CreateMultiSigAddress ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) CreateMultiSigAddress(input interface{}) *gomock.Call
CreateMultiSigAddress indicates an expected call of CreateMultiSigAddress
func (*MockICryptoCurrencyMockRecorder) CreateTransferTokenTx ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) CreateTransferTokenTx(input interface{}) *gomock.Call
CreateTransferTokenTx indicates an expected call of CreateTransferTokenTx
func (*MockICryptoCurrencyMockRecorder) GetAddrTxHistory ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetAddrTxHistory(input interface{}) *gomock.Call
GetAddrTxHistory indicates an expected call of GetAddrTxHistory
func (*MockICryptoCurrencyMockRecorder) GetAddress ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetAddress(key interface{}) *gomock.Call
GetAddress indicates an expected call of GetAddress
func (*MockICryptoCurrencyMockRecorder) GetAssetDecimal ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetAssetDecimal(asset interface{}) *gomock.Call
GetAssetDecimal indicates an expected call of GetAssetDecimal
func (*MockICryptoCurrencyMockRecorder) GetBalance ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetBalance(input interface{}) *gomock.Call
GetBalance indicates an expected call of GetBalance
func (*MockICryptoCurrencyMockRecorder) GetBlockInfo ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
GetBlockInfo indicates an expected call of GetBlockInfo
func (*MockICryptoCurrencyMockRecorder) GetPalletOneMappingAddress ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
GetPalletOneMappingAddress indicates an expected call of GetPalletOneMappingAddress
func (*MockICryptoCurrencyMockRecorder) GetPublicKey ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetPublicKey(input interface{}) *gomock.Call
GetPublicKey indicates an expected call of GetPublicKey
func (*MockICryptoCurrencyMockRecorder) GetTransferTx ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetTransferTx(input interface{}) *gomock.Call
GetTransferTx indicates an expected call of GetTransferTx
func (*MockICryptoCurrencyMockRecorder) GetTxBasicInfo ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
GetTxBasicInfo indicates an expected call of GetTxBasicInfo
func (*MockICryptoCurrencyMockRecorder) NewPrivateKey ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
NewPrivateKey indicates an expected call of NewPrivateKey
func (*MockICryptoCurrencyMockRecorder) SendTransaction ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) SendTransaction(input interface{}) *gomock.Call
SendTransaction indicates an expected call of SendTransaction
func (*MockICryptoCurrencyMockRecorder) SignMessage ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) SignMessage(input interface{}) *gomock.Call
SignMessage indicates an expected call of SignMessage
func (*MockICryptoCurrencyMockRecorder) SignTransaction ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) SignTransaction(input interface{}) *gomock.Call
SignTransaction indicates an expected call of SignTransaction
func (*MockICryptoCurrencyMockRecorder) VerifySignature ¶ added in v1.0.0
func (mr *MockICryptoCurrencyMockRecorder) VerifySignature(input interface{}) *gomock.Call
VerifySignature indicates an expected call of VerifySignature
type MockISmartContract ¶ added in v1.0.0
type MockISmartContract struct {
// contains filtered or unexported fields
}
MockISmartContract is a mock of ISmartContract interface
func NewMockISmartContract ¶ added in v1.0.0
func NewMockISmartContract(ctrl *gomock.Controller) *MockISmartContract
NewMockISmartContract creates a new mock instance
func (*MockISmartContract) BindTxAndSignature ¶ added in v1.0.0
func (m *MockISmartContract) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
BindTxAndSignature mocks base method
func (*MockISmartContract) CalcTxHash ¶ added in v1.0.0
func (m *MockISmartContract) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
CalcTxHash mocks base method
func (*MockISmartContract) CreateContractInitialTx ¶ added in v1.0.0
func (m *MockISmartContract) CreateContractInitialTx(input *CreateContractInitialTxInput) (*CreateContractInitialTxOutput, error)
CreateContractInitialTx mocks base method
func (*MockISmartContract) CreateContractInstallTx ¶ added in v1.0.0
func (m *MockISmartContract) CreateContractInstallTx(input *CreateContractInstallTxInput) (*CreateContractInstallTxOutput, error)
CreateContractInstallTx mocks base method
func (*MockISmartContract) CreateContractInvokeTx ¶ added in v1.0.0
func (m *MockISmartContract) CreateContractInvokeTx(input *CreateContractInvokeTxInput) (*CreateContractInvokeTxOutput, error)
CreateContractInvokeTx mocks base method
func (*MockISmartContract) EXPECT ¶ added in v1.0.0
func (m *MockISmartContract) EXPECT() *MockISmartContractMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockISmartContract) GetAddress ¶ added in v1.0.0
func (m *MockISmartContract) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
GetAddress mocks base method
func (*MockISmartContract) GetBlockInfo ¶ added in v1.0.0
func (m *MockISmartContract) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
GetBlockInfo mocks base method
func (*MockISmartContract) GetContractInitialTx ¶ added in v1.0.0
func (m *MockISmartContract) GetContractInitialTx(input *GetContractInitialTxInput) (*GetContractInitialTxOutput, error)
GetContractInitialTx mocks base method
func (*MockISmartContract) GetContractInstallTx ¶ added in v1.0.0
func (m *MockISmartContract) GetContractInstallTx(input *GetContractInstallTxInput) (*GetContractInstallTxOutput, error)
GetContractInstallTx mocks base method
func (*MockISmartContract) GetContractInvokeTx ¶ added in v1.0.0
func (m *MockISmartContract) GetContractInvokeTx(input *GetContractInvokeTxInput) (*GetContractInvokeTxOutput, error)
GetContractInvokeTx mocks base method
func (*MockISmartContract) GetPalletOneMappingAddress ¶ added in v1.0.0
func (m *MockISmartContract) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
GetPalletOneMappingAddress mocks base method
func (*MockISmartContract) GetPublicKey ¶ added in v1.0.0
func (m *MockISmartContract) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
GetPublicKey mocks base method
func (*MockISmartContract) GetTxBasicInfo ¶ added in v1.0.0
func (m *MockISmartContract) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
GetTxBasicInfo mocks base method
func (*MockISmartContract) NewPrivateKey ¶ added in v1.0.0
func (m *MockISmartContract) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
NewPrivateKey mocks base method
func (*MockISmartContract) QueryContract ¶ added in v1.0.0
func (m *MockISmartContract) QueryContract(input *QueryContractInput) (*QueryContractOutput, error)
QueryContract mocks base method
func (*MockISmartContract) SendTransaction ¶ added in v1.0.0
func (m *MockISmartContract) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
SendTransaction mocks base method
func (*MockISmartContract) SignMessage ¶ added in v1.0.0
func (m *MockISmartContract) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
SignMessage mocks base method
func (*MockISmartContract) SignTransaction ¶ added in v1.0.0
func (m *MockISmartContract) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
SignTransaction mocks base method
func (*MockISmartContract) VerifySignature ¶ added in v1.0.0
func (m *MockISmartContract) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
VerifySignature mocks base method
type MockISmartContractMockRecorder ¶ added in v1.0.0
type MockISmartContractMockRecorder struct {
// contains filtered or unexported fields
}
MockISmartContractMockRecorder is the mock recorder for MockISmartContract
func (*MockISmartContractMockRecorder) BindTxAndSignature ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
BindTxAndSignature indicates an expected call of BindTxAndSignature
func (*MockISmartContractMockRecorder) CalcTxHash ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) CalcTxHash(input interface{}) *gomock.Call
CalcTxHash indicates an expected call of CalcTxHash
func (*MockISmartContractMockRecorder) CreateContractInitialTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) CreateContractInitialTx(input interface{}) *gomock.Call
CreateContractInitialTx indicates an expected call of CreateContractInitialTx
func (*MockISmartContractMockRecorder) CreateContractInstallTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) CreateContractInstallTx(input interface{}) *gomock.Call
CreateContractInstallTx indicates an expected call of CreateContractInstallTx
func (*MockISmartContractMockRecorder) CreateContractInvokeTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) CreateContractInvokeTx(input interface{}) *gomock.Call
CreateContractInvokeTx indicates an expected call of CreateContractInvokeTx
func (*MockISmartContractMockRecorder) GetAddress ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetAddress(key interface{}) *gomock.Call
GetAddress indicates an expected call of GetAddress
func (*MockISmartContractMockRecorder) GetBlockInfo ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
GetBlockInfo indicates an expected call of GetBlockInfo
func (*MockISmartContractMockRecorder) GetContractInitialTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetContractInitialTx(input interface{}) *gomock.Call
GetContractInitialTx indicates an expected call of GetContractInitialTx
func (*MockISmartContractMockRecorder) GetContractInstallTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetContractInstallTx(input interface{}) *gomock.Call
GetContractInstallTx indicates an expected call of GetContractInstallTx
func (*MockISmartContractMockRecorder) GetContractInvokeTx ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetContractInvokeTx(input interface{}) *gomock.Call
GetContractInvokeTx indicates an expected call of GetContractInvokeTx
func (*MockISmartContractMockRecorder) GetPalletOneMappingAddress ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
GetPalletOneMappingAddress indicates an expected call of GetPalletOneMappingAddress
func (*MockISmartContractMockRecorder) GetPublicKey ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetPublicKey(input interface{}) *gomock.Call
GetPublicKey indicates an expected call of GetPublicKey
func (*MockISmartContractMockRecorder) GetTxBasicInfo ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
GetTxBasicInfo indicates an expected call of GetTxBasicInfo
func (*MockISmartContractMockRecorder) NewPrivateKey ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
NewPrivateKey indicates an expected call of NewPrivateKey
func (*MockISmartContractMockRecorder) QueryContract ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) QueryContract(input interface{}) *gomock.Call
QueryContract indicates an expected call of QueryContract
func (*MockISmartContractMockRecorder) SendTransaction ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) SendTransaction(input interface{}) *gomock.Call
SendTransaction indicates an expected call of SendTransaction
func (*MockISmartContractMockRecorder) SignMessage ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) SignMessage(input interface{}) *gomock.Call
SignMessage indicates an expected call of SignMessage
func (*MockISmartContractMockRecorder) SignTransaction ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) SignTransaction(input interface{}) *gomock.Call
SignTransaction indicates an expected call of SignTransaction
func (*MockISmartContractMockRecorder) VerifySignature ¶ added in v1.0.0
func (mr *MockISmartContractMockRecorder) VerifySignature(input interface{}) *gomock.Call
VerifySignature indicates an expected call of VerifySignature
type MockIUtility ¶ added in v1.0.0
type MockIUtility struct {
// contains filtered or unexported fields
}
MockIUtility is a mock of IUtility interface
func NewMockIUtility ¶ added in v1.0.0
func NewMockIUtility(ctrl *gomock.Controller) *MockIUtility
NewMockIUtility creates a new mock instance
func (*MockIUtility) BindTxAndSignature ¶ added in v1.0.0
func (m *MockIUtility) BindTxAndSignature(input *BindTxAndSignatureInput) (*BindTxAndSignatureOutput, error)
BindTxAndSignature mocks base method
func (*MockIUtility) CalcTxHash ¶ added in v1.0.0
func (m *MockIUtility) CalcTxHash(input *CalcTxHashInput) (*CalcTxHashOutput, error)
CalcTxHash mocks base method
func (*MockIUtility) EXPECT ¶ added in v1.0.0
func (m *MockIUtility) EXPECT() *MockIUtilityMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockIUtility) GetAddress ¶ added in v1.0.0
func (m *MockIUtility) GetAddress(key *GetAddressInput) (*GetAddressOutput, error)
GetAddress mocks base method
func (*MockIUtility) GetBlockInfo ¶ added in v1.0.0
func (m *MockIUtility) GetBlockInfo(input *GetBlockInfoInput) (*GetBlockInfoOutput, error)
GetBlockInfo mocks base method
func (*MockIUtility) GetPalletOneMappingAddress ¶ added in v1.0.0
func (m *MockIUtility) GetPalletOneMappingAddress(addr *GetPalletOneMappingAddressInput) (*GetPalletOneMappingAddressOutput, error)
GetPalletOneMappingAddress mocks base method
func (*MockIUtility) GetPublicKey ¶ added in v1.0.0
func (m *MockIUtility) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error)
GetPublicKey mocks base method
func (*MockIUtility) GetTxBasicInfo ¶ added in v1.0.0
func (m *MockIUtility) GetTxBasicInfo(input *GetTxBasicInfoInput) (*GetTxBasicInfoOutput, error)
GetTxBasicInfo mocks base method
func (*MockIUtility) NewPrivateKey ¶ added in v1.0.0
func (m *MockIUtility) NewPrivateKey(input *NewPrivateKeyInput) (*NewPrivateKeyOutput, error)
NewPrivateKey mocks base method
func (*MockIUtility) SendTransaction ¶ added in v1.0.0
func (m *MockIUtility) SendTransaction(input *SendTransactionInput) (*SendTransactionOutput, error)
SendTransaction mocks base method
func (*MockIUtility) SignMessage ¶ added in v1.0.0
func (m *MockIUtility) SignMessage(input *SignMessageInput) (*SignMessageOutput, error)
SignMessage mocks base method
func (*MockIUtility) SignTransaction ¶ added in v1.0.0
func (m *MockIUtility) SignTransaction(input *SignTransactionInput) (*SignTransactionOutput, error)
SignTransaction mocks base method
func (*MockIUtility) VerifySignature ¶ added in v1.0.0
func (m *MockIUtility) VerifySignature(input *VerifySignatureInput) (*VerifySignatureOutput, error)
VerifySignature mocks base method
type MockIUtilityMockRecorder ¶ added in v1.0.0
type MockIUtilityMockRecorder struct {
// contains filtered or unexported fields
}
MockIUtilityMockRecorder is the mock recorder for MockIUtility
func (*MockIUtilityMockRecorder) BindTxAndSignature ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) BindTxAndSignature(input interface{}) *gomock.Call
BindTxAndSignature indicates an expected call of BindTxAndSignature
func (*MockIUtilityMockRecorder) CalcTxHash ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) CalcTxHash(input interface{}) *gomock.Call
CalcTxHash indicates an expected call of CalcTxHash
func (*MockIUtilityMockRecorder) GetAddress ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) GetAddress(key interface{}) *gomock.Call
GetAddress indicates an expected call of GetAddress
func (*MockIUtilityMockRecorder) GetBlockInfo ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) GetBlockInfo(input interface{}) *gomock.Call
GetBlockInfo indicates an expected call of GetBlockInfo
func (*MockIUtilityMockRecorder) GetPalletOneMappingAddress ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) GetPalletOneMappingAddress(addr interface{}) *gomock.Call
GetPalletOneMappingAddress indicates an expected call of GetPalletOneMappingAddress
func (*MockIUtilityMockRecorder) GetPublicKey ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) GetPublicKey(input interface{}) *gomock.Call
GetPublicKey indicates an expected call of GetPublicKey
func (*MockIUtilityMockRecorder) GetTxBasicInfo ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) GetTxBasicInfo(input interface{}) *gomock.Call
GetTxBasicInfo indicates an expected call of GetTxBasicInfo
func (*MockIUtilityMockRecorder) NewPrivateKey ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) NewPrivateKey(input interface{}) *gomock.Call
NewPrivateKey indicates an expected call of NewPrivateKey
func (*MockIUtilityMockRecorder) SendTransaction ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) SendTransaction(input interface{}) *gomock.Call
SendTransaction indicates an expected call of SendTransaction
func (*MockIUtilityMockRecorder) SignMessage ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) SignMessage(input interface{}) *gomock.Call
SignMessage indicates an expected call of SignMessage
func (*MockIUtilityMockRecorder) SignTransaction ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) SignTransaction(input interface{}) *gomock.Call
SignTransaction indicates an expected call of SignTransaction
func (*MockIUtilityMockRecorder) VerifySignature ¶ added in v1.0.0
func (mr *MockIUtilityMockRecorder) VerifySignature(input interface{}) *gomock.Call
VerifySignature indicates an expected call of VerifySignature
type NewPrivateKeyInput ¶ added in v1.0.0
type NewPrivateKeyOutput ¶ added in v1.0.0
type QueryContractInput ¶ added in v1.0.0
type QueryContractOutput ¶ added in v1.0.0
type SendTransactionInput ¶ added in v1.0.0
type SendTransactionInput struct { Transaction []byte `json:"transaction"` Fee *AmountAsset `json:"fee"` Extra []byte `json:"extra"` }
type SendTransactionOutput ¶ added in v1.0.0
type SignMessageInput ¶ added in v1.0.0
type SignMessageOutput ¶ added in v1.0.0
type SignTransactionInput ¶ added in v1.0.0
type SignTransactionOutput ¶ added in v1.0.0
type SimpleTransferTokenTx ¶ added in v1.0.0
type SimpleTransferTokenTx struct { TxBasicInfo FromAddress string `json:"from_address"` //转出地址 ToAddress string `json:"to_address"` //转入地址 Amount *AmountAsset `json:"amount"` //转账金额 Fee *AmountAsset `json:"fee"` //转账交易费 AttachData []byte `json:"attach_data"` //附加的数据(备注之类的) }
SimpleTransferTokenTx 一个简单的Token转账交易
func (*SimpleTransferTokenTx) MarshalJSON ¶ added in v1.0.0
func (tx *SimpleTransferTokenTx) MarshalJSON() ([]byte, error)
func (*SimpleTransferTokenTx) String ¶ added in v1.0.0
func (tx *SimpleTransferTokenTx) String() string
func (*SimpleTransferTokenTx) UnmarshalJSON ¶ added in v1.0.0
func (tx *SimpleTransferTokenTx) UnmarshalJSON(input []byte) error
type TxBasicInfo ¶ added in v1.0.0
type TxBasicInfo struct { TxID []byte `json:"tx_id"` //交易的ID,Hash TxRawData []byte `json:"tx_raw"` //交易的二进制数据 CreatorAddress string `json:"creator_address"` //交易的发起人 TargetAddress string `json:"target_address"` //交易的目标地址(被调用的合约、收款人) IsInBlock bool `json:"is_in_block"` //是否已经被打包到区块链中 IsSuccess bool `json:"is_success"` //是被标记为成功执行 IsStable bool `json:"is_stable"` //是否已经稳定不可逆 BlockID []byte `json:"block_id"` //交易被打包到了哪个区块ID BlockHeight uint `json:"block_height"` //交易被打包到的区块的高度 TxIndex uint `json:"tx_index"` //Tx在区块中的位置 Timestamp uint64 `json:"timestamp"` //交易被打包的时间戳 }
TxBasicInfo 一个交易的基本信息
func (*TxBasicInfo) MarshalJSON ¶ added in v1.0.0
func (tx *TxBasicInfo) MarshalJSON() ([]byte, error)
func (*TxBasicInfo) String ¶ added in v1.0.0
func (tx *TxBasicInfo) String() string
func (*TxBasicInfo) UnmarshalJSON ¶ added in v1.0.0
func (tx *TxBasicInfo) UnmarshalJSON(input []byte) error