Documentation ¶
Overview ¶
Package rpc is a generated GoMock package.
Package rpc is a generated GoMock package.
Index ¶
- func GetAPIs(apiBackend Backend) []rpc.API
- type AddrLocker
- type ApiBackend
- type Backend
- type Context
- type MockBackend
- type MockBackendMockRecorder
- type MockWallet
- func (m *MockWallet) AutoRefreshBlockchain(arg0 bool, arg1 *common.Address) error
- func (m *MockWallet) Call(arg0 types1.CallArgs, arg1 string) (*hexutil.Bytes, error)
- func (m *MockWallet) CreateSubAccount(arg0 uint64, arg1 *common.Address) error
- func (m *MockWallet) CreateUTXOTransaction(arg0 common.Address, arg1 uint64, arg2 []uint64, arg3 []types0.DestEntry, ...) ([]*types0.UTXOTransaction, error)
- func (m *MockWallet) DelUTXOAddInfo(arg0 common.Hash) error
- func (m *MockWallet) EXPECT() *MockWalletMockRecorder
- func (m *MockWallet) EthEstimateGas(arg0 types1.CallArgs) (*hexutil.Uint64, error)
- func (m *MockWallet) GetAccountInfo(arg0, arg1 *common.Address) (*types1.GetAccountInfoResult, error)
- func (m *MockWallet) GetAddress(arg0 uint64, arg1 *common.Address) (string, error)
- func (m *MockWallet) GetBalance(arg0 uint64, arg1, arg2 *common.Address) (*big.Int, error)
- func (m *MockWallet) GetBlockTransactionCountByHash(arg0 common.Hash) (*hexutil.Uint, error)
- func (m *MockWallet) GetBlockTransactionCountByNumber(arg0 rpc.BlockNumber) (*hexutil.Uint, error)
- func (m *MockWallet) GetHeight(arg0 *common.Address) (*big.Int, *big.Int)
- func (m *MockWallet) GetLocalOutputs(arg0 []hexutil.Uint64, arg1 *common.Address) ([]types1.UTXOOutputDetail, error)
- func (m *MockWallet) GetLocalUTXOTxsByHeight(arg0 *big.Int, arg1 *common.Address) (*types1.UTXOBlock, error)
- func (m *MockWallet) GetMaxOutput(arg0 common.Address, arg1 *common.Address) (*hexutil.Uint64, error)
- func (m *MockWallet) GetRawTransactionByBlockHashAndIndex(arg0 common.Hash, arg1 hexutil.Uint) (hexutil.Bytes, error)
- func (m *MockWallet) GetRawTransactionByBlockNumberAndIndex(arg0 rpc.BlockNumber, arg1 hexutil.Uint) (hexutil.Bytes, error)
- func (m *MockWallet) GetRawTransactionByHash(arg0 common.Hash) (hexutil.Bytes, error)
- func (m *MockWallet) GetTransactionByBlockHashAndIndex(arg0 common.Hash, arg1 hexutil.Uint) (interface{}, error)
- func (m *MockWallet) GetTransactionByBlockNumberAndIndex(arg0 rpc.BlockNumber, arg1 hexutil.Uint) (interface{}, error)
- func (m *MockWallet) GetTransactionByHash(arg0 common.Hash) (interface{}, error)
- func (m *MockWallet) GetTransactionCount(arg0 common.Address, arg1 rpc.BlockNumber) (*hexutil.Uint64, error)
- func (m *MockWallet) GetTransactionReceipt(arg0 common.Hash) (map[string]interface{}, error)
- func (m *MockWallet) GetTxKey(arg0 *common.Hash, arg1 *common.Address) (*types.Key, error)
- func (m *MockWallet) GetUTXOAddInfo(arg0 common.Hash) (*types1.UTXOAddInfo, error)
- func (m *MockWallet) GetUTXOTx(arg0 common.Hash, arg1 *common.Address) (*types0.UTXOTransaction, error)
- func (m *MockWallet) GetWalletEthAddress() (*common.Address, error)
- func (m *MockWallet) LockAccount(arg0 common.Address) error
- func (m *MockWallet) OpenWallet(arg0, arg1 string) error
- func (m *MockWallet) RescanBlockchain(arg0 *common.Address) error
- func (m *MockWallet) SelectAddress(arg0 common.Address) error
- func (m *MockWallet) SendRawTransaction(arg0 hexutil.Bytes) (common.Hash, error)
- func (m *MockWallet) SendRawUTXOTransaction(arg0 hexutil.Bytes) (common.Hash, error)
- func (m *MockWallet) SetRefreshBlockInterval(arg0 time.Duration, arg1 *common.Address) error
- func (m *MockWallet) Status(arg0 *common.Address) *types1.StatusResult
- func (m *MockWallet) Transfer(arg0 []string) []types1.SendTxRet
- type MockWalletMockRecorder
- func (mr *MockWalletMockRecorder) AutoRefreshBlockchain(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) CreateSubAccount(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) CreateUTXOTransaction(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) DelUTXOAddInfo(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) EthEstimateGas(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetAccountInfo(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetAddress(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetBalance(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetBlockTransactionCountByHash(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetBlockTransactionCountByNumber(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetHeight(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetLocalOutputs(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetLocalUTXOTxsByHeight(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetMaxOutput(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetRawTransactionByBlockHashAndIndex(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetRawTransactionByBlockNumberAndIndex(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetRawTransactionByHash(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTransactionByBlockHashAndIndex(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTransactionByBlockNumberAndIndex(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTransactionByHash(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTransactionCount(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTransactionReceipt(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetTxKey(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetUTXOAddInfo(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetUTXOTx(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) GetWalletEthAddress() *gomock.Call
- func (mr *MockWalletMockRecorder) LockAccount(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) OpenWallet(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) RescanBlockchain(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) SelectAddress(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) SendRawTransaction(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) SendRawUTXOTransaction(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) SetRefreshBlockInterval(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) Status(arg0 interface{}) *gomock.Call
- func (mr *MockWalletMockRecorder) Transfer(arg0 interface{}) *gomock.Call
- type PrivateAccountAPI
- func (s *PrivateAccountAPI) GetCue(addr common.Address) (string, error)
- func (s *PrivateAccountAPI) ListAccounts() []common.Address
- func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool
- func (s *PrivateAccountAPI) NewAccount(password string, cue string) (common.Address, error)
- func (s *PrivateAccountAPI) UnlockAccount(addr common.Address, password string, duration *uint64) (bool, error)
- type PublicTransactionPoolAPI
- func (s *PublicTransactionPoolAPI) AutoRefreshBlockchain(ctx context.Context, autoRefresh bool, addr *common.Address) (bool, error)
- func (s *PublicTransactionPoolAPI) Balance(ctx context.Context, args wtypes.BalanceArgs) (*wtypes.BalanceResult, error)
- func (s *PublicTransactionPoolAPI) BlockHeight(ctx context.Context, addr *common.Address) (*wtypes.BlockHeightResult, error)
- func (s *PublicTransactionPoolAPI) Call(ctx context.Context, args wtypes.CallArgs, blockNr rpc.BlockNumber) (*hexutil.Bytes, error)
- func (s *PublicTransactionPoolAPI) CheckProofKey(ctx context.Context, args wtypes.VerifyProofKeyArgs) (*wtypes.VerifyProofKeyRet, error)
- func (s *PublicTransactionPoolAPI) CreateSubAccount(ctx context.Context, maxSub hexutil.Uint64, addr *common.Address) (bool, error)
- func (s *PublicTransactionPoolAPI) EstimateGas(ctx context.Context, args wtypes.CallArgs) (*hexutil.Uint64, error)
- func (s *PublicTransactionPoolAPI) GetAccountInfo(ctx context.Context, tokenID *common.Address, addr *common.Address) (*wtypes.GetAccountInfoResult, error)
- func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
- func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
- func (s *PublicTransactionPoolAPI) GetLocalOutputs(ctx context.Context, args wtypes.LocalOutputsArgs) ([]wtypes.UTXOOutputDetail, error)
- func (s *PublicTransactionPoolAPI) GetLocalUTXOTxsByHeight(ctx context.Context, height *hexutil.Big, addr *common.Address) (*wtypes.UTXOBlock, error)
- func (s *PublicTransactionPoolAPI) GetMaxOutput(ctx context.Context, tokenID common.Address, addr *common.Address) (*hexutil.Uint64, error)
- func (s *PublicTransactionPoolAPI) GetProofKey(ctx context.Context, args wtypes.ProofKeyArgs) (*wtypes.ProofKeyRet, error)
- func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutil.Bytes, error)
- func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutil.Bytes, error)
- func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
- func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (interface{}, error)
- func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (interface{}, error)
- func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (interface{}, error)
- func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error)
- func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
- func (s *PublicTransactionPoolAPI) GetTxKey(ctx context.Context, hash common.Hash, addr *common.Address) (*lkctypes.Key, error)
- func (s *PublicTransactionPoolAPI) RescanBlockchain(ctx context.Context, addr *common.Address) (bool, error)
- func (s *PublicTransactionPoolAPI) SelectAddress(ctx context.Context, addr common.Address) (bool, error)
- func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error)
- func (s *PublicTransactionPoolAPI) SendRawUTXOTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error)
- func (s *PublicTransactionPoolAPI) SendUTXOTransaction(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SendUTXOTransactionResult, error)
- func (s *PublicTransactionPoolAPI) SendUTXOTransactionSplit(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SendUTXOTransactionResult, error)
- func (s *PublicTransactionPoolAPI) SetRefreshBlockInterval(ctx context.Context, interval time.Duration, addr *common.Address) (bool, error)
- func (s *PublicTransactionPoolAPI) SignHash(addr common.Address, hash common.Hash) (hexutil.Bytes, error)
- func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args rtypes.SendTxArgs) (*rtypes.SignTransactionResult, error)
- func (s *PublicTransactionPoolAPI) SignUTXOTransaction(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SignUTXOTransactionResult, error)
- func (s *PublicTransactionPoolAPI) Status(ctx context.Context, addr *common.Address) (*wtypes.StatusResult, error)
- func (s *PublicTransactionPoolAPI) TokenCall(ctx context.Context, args wtypes.CallArgs, blockNr rpc.BlockNumber) (*hexutil.Bytes, error)
- type Service
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddrLocker ¶
type AddrLocker struct {
// contains filtered or unexported fields
}
func (*AddrLocker) LockAddr ¶
func (l *AddrLocker) LockAddr(address common.Address)
LockAddr locks an account's mutex. This is used to prevent another tx getting the same nonce until the lock is released. The mutex prevents the (an identical nonce) from being read again during the time that the first transaction is being signed.
func (*AddrLocker) UnlockAddr ¶
func (l *AddrLocker) UnlockAddr(address common.Address)
UnlockAddr unlocks the mutex of the given account.
type ApiBackend ¶
type ApiBackend struct {
// contains filtered or unexported fields
}
func NewApiBackend ¶
func NewApiBackend(s *Service) *ApiBackend
func (*ApiBackend) AccountManager ¶
func (b *ApiBackend) AccountManager() *accounts.Manager
func (*ApiBackend) GetWallet ¶
func (b *ApiBackend) GetWallet() Wallet
type Backend ¶
Backend interface provides the common API services (that are provided by both full and light clients) with access to necessary functions.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context RPC context
func NewContext ¶
func NewContext() *Context
func (*Context) SetAccountManager ¶
type MockBackend ¶
type MockBackend struct {
// contains filtered or unexported fields
}
MockBackend is a mock of Backend interface
func NewMockBackend ¶
func NewMockBackend(ctrl *gomock.Controller) *MockBackend
NewMockBackend creates a new mock instance
func (*MockBackend) AccountManager ¶
func (m *MockBackend) AccountManager() *accounts.Manager
AccountManager mocks base method
func (*MockBackend) EXPECT ¶
func (m *MockBackend) EXPECT() *MockBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBackend) GetWallet ¶
func (m *MockBackend) GetWallet() Wallet
GetWallet mocks base method
type MockBackendMockRecorder ¶
type MockBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockBackendMockRecorder is the mock recorder for MockBackend
func (*MockBackendMockRecorder) AccountManager ¶
func (mr *MockBackendMockRecorder) AccountManager() *gomock.Call
AccountManager indicates an expected call of AccountManager
func (*MockBackendMockRecorder) GetWallet ¶
func (mr *MockBackendMockRecorder) GetWallet() *gomock.Call
GetWallet indicates an expected call of GetWallet
type MockWallet ¶
type MockWallet struct {
// contains filtered or unexported fields
}
MockWallet is a mock of Wallet interface
func NewMockWallet ¶
func NewMockWallet(ctrl *gomock.Controller) *MockWallet
NewMockWallet creates a new mock instance
func (*MockWallet) AutoRefreshBlockchain ¶
func (m *MockWallet) AutoRefreshBlockchain(arg0 bool, arg1 *common.Address) error
AutoRefreshBlockchain mocks base method
func (*MockWallet) CreateSubAccount ¶
func (m *MockWallet) CreateSubAccount(arg0 uint64, arg1 *common.Address) error
CreateSubAccount mocks base method
func (*MockWallet) CreateUTXOTransaction ¶
func (m *MockWallet) CreateUTXOTransaction(arg0 common.Address, arg1 uint64, arg2 []uint64, arg3 []types0.DestEntry, arg4, arg5 common.Address, arg6 []byte) ([]*types0.UTXOTransaction, error)
CreateUTXOTransaction mocks base method
func (*MockWallet) DelUTXOAddInfo ¶ added in v0.1.2
func (m *MockWallet) DelUTXOAddInfo(arg0 common.Hash) error
DelUTXOAddInfo mocks base method
func (*MockWallet) EXPECT ¶
func (m *MockWallet) EXPECT() *MockWalletMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockWallet) EthEstimateGas ¶
EthEstimateGas mocks base method
func (*MockWallet) GetAccountInfo ¶
func (m *MockWallet) GetAccountInfo(arg0, arg1 *common.Address) (*types1.GetAccountInfoResult, error)
GetAccountInfo mocks base method
func (*MockWallet) GetAddress ¶
GetAddress mocks base method
func (*MockWallet) GetBalance ¶
GetBalance mocks base method
func (*MockWallet) GetBlockTransactionCountByHash ¶
GetBlockTransactionCountByHash mocks base method
func (*MockWallet) GetBlockTransactionCountByNumber ¶
func (m *MockWallet) GetBlockTransactionCountByNumber(arg0 rpc.BlockNumber) (*hexutil.Uint, error)
GetBlockTransactionCountByNumber mocks base method
func (*MockWallet) GetLocalOutputs ¶ added in v0.1.1
func (m *MockWallet) GetLocalOutputs(arg0 []hexutil.Uint64, arg1 *common.Address) ([]types1.UTXOOutputDetail, error)
GetLocalOutputs mocks base method
func (*MockWallet) GetLocalUTXOTxsByHeight ¶ added in v0.1.1
func (m *MockWallet) GetLocalUTXOTxsByHeight(arg0 *big.Int, arg1 *common.Address) (*types1.UTXOBlock, error)
GetLocalUTXOTxsByHeight mocks base method
func (*MockWallet) GetMaxOutput ¶
func (m *MockWallet) GetMaxOutput(arg0 common.Address, arg1 *common.Address) (*hexutil.Uint64, error)
GetMaxOutput mocks base method
func (*MockWallet) GetRawTransactionByBlockHashAndIndex ¶
func (m *MockWallet) GetRawTransactionByBlockHashAndIndex(arg0 common.Hash, arg1 hexutil.Uint) (hexutil.Bytes, error)
GetRawTransactionByBlockHashAndIndex mocks base method
func (*MockWallet) GetRawTransactionByBlockNumberAndIndex ¶
func (m *MockWallet) GetRawTransactionByBlockNumberAndIndex(arg0 rpc.BlockNumber, arg1 hexutil.Uint) (hexutil.Bytes, error)
GetRawTransactionByBlockNumberAndIndex mocks base method
func (*MockWallet) GetRawTransactionByHash ¶
GetRawTransactionByHash mocks base method
func (*MockWallet) GetTransactionByBlockHashAndIndex ¶
func (m *MockWallet) GetTransactionByBlockHashAndIndex(arg0 common.Hash, arg1 hexutil.Uint) (interface{}, error)
GetTransactionByBlockHashAndIndex mocks base method
func (*MockWallet) GetTransactionByBlockNumberAndIndex ¶
func (m *MockWallet) GetTransactionByBlockNumberAndIndex(arg0 rpc.BlockNumber, arg1 hexutil.Uint) (interface{}, error)
GetTransactionByBlockNumberAndIndex mocks base method
func (*MockWallet) GetTransactionByHash ¶
func (m *MockWallet) GetTransactionByHash(arg0 common.Hash) (interface{}, error)
GetTransactionByHash mocks base method
func (*MockWallet) GetTransactionCount ¶
func (m *MockWallet) GetTransactionCount(arg0 common.Address, arg1 rpc.BlockNumber) (*hexutil.Uint64, error)
GetTransactionCount mocks base method
func (*MockWallet) GetTransactionReceipt ¶
func (m *MockWallet) GetTransactionReceipt(arg0 common.Hash) (map[string]interface{}, error)
GetTransactionReceipt mocks base method
func (*MockWallet) GetUTXOAddInfo ¶ added in v0.1.2
func (m *MockWallet) GetUTXOAddInfo(arg0 common.Hash) (*types1.UTXOAddInfo, error)
GetUTXOAddInfo mocks base method
func (*MockWallet) GetUTXOTx ¶
func (m *MockWallet) GetUTXOTx(arg0 common.Hash, arg1 *common.Address) (*types0.UTXOTransaction, error)
GetUTXOTx mocks base method
func (*MockWallet) GetWalletEthAddress ¶
func (m *MockWallet) GetWalletEthAddress() (*common.Address, error)
GetWalletEthAddress mocks base method
func (*MockWallet) LockAccount ¶
func (m *MockWallet) LockAccount(arg0 common.Address) error
LockAccount mocks base method
func (*MockWallet) OpenWallet ¶
func (m *MockWallet) OpenWallet(arg0, arg1 string) error
OpenWallet mocks base method
func (*MockWallet) RescanBlockchain ¶
func (m *MockWallet) RescanBlockchain(arg0 *common.Address) error
RescanBlockchain mocks base method
func (*MockWallet) SelectAddress ¶
func (m *MockWallet) SelectAddress(arg0 common.Address) error
SelectAddress mocks base method
func (*MockWallet) SendRawTransaction ¶
SendRawTransaction mocks base method
func (*MockWallet) SendRawUTXOTransaction ¶ added in v0.1.1
SendRawUTXOTransaction mocks base method
func (*MockWallet) SetRefreshBlockInterval ¶
SetRefreshBlockInterval mocks base method
func (*MockWallet) Status ¶
func (m *MockWallet) Status(arg0 *common.Address) *types1.StatusResult
Status mocks base method
type MockWalletMockRecorder ¶
type MockWalletMockRecorder struct {
// contains filtered or unexported fields
}
MockWalletMockRecorder is the mock recorder for MockWallet
func (*MockWalletMockRecorder) AutoRefreshBlockchain ¶
func (mr *MockWalletMockRecorder) AutoRefreshBlockchain(arg0, arg1 interface{}) *gomock.Call
AutoRefreshBlockchain indicates an expected call of AutoRefreshBlockchain
func (*MockWalletMockRecorder) Call ¶ added in v0.1.3
func (mr *MockWalletMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockWalletMockRecorder) CreateSubAccount ¶
func (mr *MockWalletMockRecorder) CreateSubAccount(arg0, arg1 interface{}) *gomock.Call
CreateSubAccount indicates an expected call of CreateSubAccount
func (*MockWalletMockRecorder) CreateUTXOTransaction ¶
func (mr *MockWalletMockRecorder) CreateUTXOTransaction(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call
CreateUTXOTransaction indicates an expected call of CreateUTXOTransaction
func (*MockWalletMockRecorder) DelUTXOAddInfo ¶ added in v0.1.2
func (mr *MockWalletMockRecorder) DelUTXOAddInfo(arg0 interface{}) *gomock.Call
DelUTXOAddInfo indicates an expected call of DelUTXOAddInfo
func (*MockWalletMockRecorder) EthEstimateGas ¶
func (mr *MockWalletMockRecorder) EthEstimateGas(arg0 interface{}) *gomock.Call
EthEstimateGas indicates an expected call of EthEstimateGas
func (*MockWalletMockRecorder) GetAccountInfo ¶
func (mr *MockWalletMockRecorder) GetAccountInfo(arg0, arg1 interface{}) *gomock.Call
GetAccountInfo indicates an expected call of GetAccountInfo
func (*MockWalletMockRecorder) GetAddress ¶
func (mr *MockWalletMockRecorder) GetAddress(arg0, arg1 interface{}) *gomock.Call
GetAddress indicates an expected call of GetAddress
func (*MockWalletMockRecorder) GetBalance ¶
func (mr *MockWalletMockRecorder) GetBalance(arg0, arg1, arg2 interface{}) *gomock.Call
GetBalance indicates an expected call of GetBalance
func (*MockWalletMockRecorder) GetBlockTransactionCountByHash ¶
func (mr *MockWalletMockRecorder) GetBlockTransactionCountByHash(arg0 interface{}) *gomock.Call
GetBlockTransactionCountByHash indicates an expected call of GetBlockTransactionCountByHash
func (*MockWalletMockRecorder) GetBlockTransactionCountByNumber ¶
func (mr *MockWalletMockRecorder) GetBlockTransactionCountByNumber(arg0 interface{}) *gomock.Call
GetBlockTransactionCountByNumber indicates an expected call of GetBlockTransactionCountByNumber
func (*MockWalletMockRecorder) GetHeight ¶
func (mr *MockWalletMockRecorder) GetHeight(arg0 interface{}) *gomock.Call
GetHeight indicates an expected call of GetHeight
func (*MockWalletMockRecorder) GetLocalOutputs ¶ added in v0.1.1
func (mr *MockWalletMockRecorder) GetLocalOutputs(arg0, arg1 interface{}) *gomock.Call
GetLocalOutputs indicates an expected call of GetLocalOutputs
func (*MockWalletMockRecorder) GetLocalUTXOTxsByHeight ¶ added in v0.1.1
func (mr *MockWalletMockRecorder) GetLocalUTXOTxsByHeight(arg0, arg1 interface{}) *gomock.Call
GetLocalUTXOTxsByHeight indicates an expected call of GetLocalUTXOTxsByHeight
func (*MockWalletMockRecorder) GetMaxOutput ¶
func (mr *MockWalletMockRecorder) GetMaxOutput(arg0, arg1 interface{}) *gomock.Call
GetMaxOutput indicates an expected call of GetMaxOutput
func (*MockWalletMockRecorder) GetRawTransactionByBlockHashAndIndex ¶
func (mr *MockWalletMockRecorder) GetRawTransactionByBlockHashAndIndex(arg0, arg1 interface{}) *gomock.Call
GetRawTransactionByBlockHashAndIndex indicates an expected call of GetRawTransactionByBlockHashAndIndex
func (*MockWalletMockRecorder) GetRawTransactionByBlockNumberAndIndex ¶
func (mr *MockWalletMockRecorder) GetRawTransactionByBlockNumberAndIndex(arg0, arg1 interface{}) *gomock.Call
GetRawTransactionByBlockNumberAndIndex indicates an expected call of GetRawTransactionByBlockNumberAndIndex
func (*MockWalletMockRecorder) GetRawTransactionByHash ¶
func (mr *MockWalletMockRecorder) GetRawTransactionByHash(arg0 interface{}) *gomock.Call
GetRawTransactionByHash indicates an expected call of GetRawTransactionByHash
func (*MockWalletMockRecorder) GetTransactionByBlockHashAndIndex ¶
func (mr *MockWalletMockRecorder) GetTransactionByBlockHashAndIndex(arg0, arg1 interface{}) *gomock.Call
GetTransactionByBlockHashAndIndex indicates an expected call of GetTransactionByBlockHashAndIndex
func (*MockWalletMockRecorder) GetTransactionByBlockNumberAndIndex ¶
func (mr *MockWalletMockRecorder) GetTransactionByBlockNumberAndIndex(arg0, arg1 interface{}) *gomock.Call
GetTransactionByBlockNumberAndIndex indicates an expected call of GetTransactionByBlockNumberAndIndex
func (*MockWalletMockRecorder) GetTransactionByHash ¶
func (mr *MockWalletMockRecorder) GetTransactionByHash(arg0 interface{}) *gomock.Call
GetTransactionByHash indicates an expected call of GetTransactionByHash
func (*MockWalletMockRecorder) GetTransactionCount ¶
func (mr *MockWalletMockRecorder) GetTransactionCount(arg0, arg1 interface{}) *gomock.Call
GetTransactionCount indicates an expected call of GetTransactionCount
func (*MockWalletMockRecorder) GetTransactionReceipt ¶
func (mr *MockWalletMockRecorder) GetTransactionReceipt(arg0 interface{}) *gomock.Call
GetTransactionReceipt indicates an expected call of GetTransactionReceipt
func (*MockWalletMockRecorder) GetTxKey ¶
func (mr *MockWalletMockRecorder) GetTxKey(arg0, arg1 interface{}) *gomock.Call
GetTxKey indicates an expected call of GetTxKey
func (*MockWalletMockRecorder) GetUTXOAddInfo ¶ added in v0.1.2
func (mr *MockWalletMockRecorder) GetUTXOAddInfo(arg0 interface{}) *gomock.Call
GetUTXOAddInfo indicates an expected call of GetUTXOAddInfo
func (*MockWalletMockRecorder) GetUTXOTx ¶
func (mr *MockWalletMockRecorder) GetUTXOTx(arg0, arg1 interface{}) *gomock.Call
GetUTXOTx indicates an expected call of GetUTXOTx
func (*MockWalletMockRecorder) GetWalletEthAddress ¶
func (mr *MockWalletMockRecorder) GetWalletEthAddress() *gomock.Call
GetWalletEthAddress indicates an expected call of GetWalletEthAddress
func (*MockWalletMockRecorder) LockAccount ¶
func (mr *MockWalletMockRecorder) LockAccount(arg0 interface{}) *gomock.Call
LockAccount indicates an expected call of LockAccount
func (*MockWalletMockRecorder) OpenWallet ¶
func (mr *MockWalletMockRecorder) OpenWallet(arg0, arg1 interface{}) *gomock.Call
OpenWallet indicates an expected call of OpenWallet
func (*MockWalletMockRecorder) RescanBlockchain ¶
func (mr *MockWalletMockRecorder) RescanBlockchain(arg0 interface{}) *gomock.Call
RescanBlockchain indicates an expected call of RescanBlockchain
func (*MockWalletMockRecorder) SelectAddress ¶
func (mr *MockWalletMockRecorder) SelectAddress(arg0 interface{}) *gomock.Call
SelectAddress indicates an expected call of SelectAddress
func (*MockWalletMockRecorder) SendRawTransaction ¶
func (mr *MockWalletMockRecorder) SendRawTransaction(arg0 interface{}) *gomock.Call
SendRawTransaction indicates an expected call of SendRawTransaction
func (*MockWalletMockRecorder) SendRawUTXOTransaction ¶ added in v0.1.1
func (mr *MockWalletMockRecorder) SendRawUTXOTransaction(arg0 interface{}) *gomock.Call
SendRawUTXOTransaction indicates an expected call of SendRawUTXOTransaction
func (*MockWalletMockRecorder) SetRefreshBlockInterval ¶
func (mr *MockWalletMockRecorder) SetRefreshBlockInterval(arg0, arg1 interface{}) *gomock.Call
SetRefreshBlockInterval indicates an expected call of SetRefreshBlockInterval
func (*MockWalletMockRecorder) Status ¶
func (mr *MockWalletMockRecorder) Status(arg0 interface{}) *gomock.Call
Status indicates an expected call of Status
func (*MockWalletMockRecorder) Transfer ¶
func (mr *MockWalletMockRecorder) Transfer(arg0 interface{}) *gomock.Call
Transfer indicates an expected call of Transfer
type PrivateAccountAPI ¶
type PrivateAccountAPI struct {
// contains filtered or unexported fields
}
PrivateAccountAPI provides an API to access accounts managed by this node. It offers methods to create, (un)lock en list accounts. Some methods accept passwords and are therefore considered private by default.
func NewPrivateAccountAPI ¶
func NewPrivateAccountAPI(b Backend, nonceLock *AddrLocker) *PrivateAccountAPI
NewPrivateAccountAPI create a new PrivateAccountAPI.
func (*PrivateAccountAPI) GetCue ¶
func (s *PrivateAccountAPI) GetCue(addr common.Address) (string, error)
GetCue will return address cue.
func (*PrivateAccountAPI) ListAccounts ¶
func (s *PrivateAccountAPI) ListAccounts() []common.Address
ListAccounts will return a list of addresses for accounts this node manages.
func (*PrivateAccountAPI) LockAccount ¶
func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool
LockAccount will lock the account associated with the given address when it's unlocked.
func (*PrivateAccountAPI) NewAccount ¶
NewAccount will create a new account and returns the address for the new account.
func (*PrivateAccountAPI) UnlockAccount ¶
func (s *PrivateAccountAPI) UnlockAccount(addr common.Address, password string, duration *uint64) (bool, error)
UnlockAccount will unlock the account associated with the given address with the given password for duration seconds. If duration is nil it will use a default of 300 seconds. It returns an indication if the account was unlocked.
type PublicTransactionPoolAPI ¶
type PublicTransactionPoolAPI struct {
// contains filtered or unexported fields
}
PublicTransactionPoolAPI exposes methods for the RPC interface
func NewPublicTransactionPoolAPI ¶
func NewPublicTransactionPoolAPI(b Backend, nonceLock *AddrLocker) *PublicTransactionPoolAPI
NewPublicTransactionPoolAPI creates a new RPC service with methods specific for the transaction pool.
func (*PublicTransactionPoolAPI) AutoRefreshBlockchain ¶
func (s *PublicTransactionPoolAPI) AutoRefreshBlockchain(ctx context.Context, autoRefresh bool, addr *common.Address) (bool, error)
Balance get account Balance
func (*PublicTransactionPoolAPI) Balance ¶
func (s *PublicTransactionPoolAPI) Balance(ctx context.Context, args wtypes.BalanceArgs) (*wtypes.BalanceResult, error)
Balance get account Balance
func (*PublicTransactionPoolAPI) BlockHeight ¶
func (s *PublicTransactionPoolAPI) BlockHeight(ctx context.Context, addr *common.Address) (*wtypes.BlockHeightResult, error)
BlockHeight get block height
func (*PublicTransactionPoolAPI) Call ¶ added in v0.1.3
func (s *PublicTransactionPoolAPI) Call(ctx context.Context, args wtypes.CallArgs, blockNr rpc.BlockNumber) (*hexutil.Bytes, error)
Call executes the given transaction on the state for the given block number. It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.
func (*PublicTransactionPoolAPI) CheckProofKey ¶
func (s *PublicTransactionPoolAPI) CheckProofKey(ctx context.Context, args wtypes.VerifyProofKeyArgs) (*wtypes.VerifyProofKeyRet, error)
CheckProofKey verify proof key
func (*PublicTransactionPoolAPI) CreateSubAccount ¶
func (s *PublicTransactionPoolAPI) CreateSubAccount(ctx context.Context, maxSub hexutil.Uint64, addr *common.Address) (bool, error)
CreateSubAccount create sub account to max sub index
func (*PublicTransactionPoolAPI) EstimateGas ¶
func (s *PublicTransactionPoolAPI) EstimateGas(ctx context.Context, args wtypes.CallArgs) (*hexutil.Uint64, error)
EstimateGas return gas
func (*PublicTransactionPoolAPI) GetAccountInfo ¶
func (s *PublicTransactionPoolAPI) GetAccountInfo(ctx context.Context, tokenID *common.Address, addr *common.Address) (*wtypes.GetAccountInfoResult, error)
GetAccountInfo get all sub accounts Balance
func (*PublicTransactionPoolAPI) GetBlockTransactionCountByHash ¶
func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash.
func (*PublicTransactionPoolAPI) GetBlockTransactionCountByNumber ¶
func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.
func (*PublicTransactionPoolAPI) GetLocalOutputs ¶ added in v0.1.1
func (s *PublicTransactionPoolAPI) GetLocalOutputs(ctx context.Context, args wtypes.LocalOutputsArgs) ([]wtypes.UTXOOutputDetail, error)
GetLocalOutputs return
func (*PublicTransactionPoolAPI) GetLocalUTXOTxsByHeight ¶ added in v0.1.1
func (s *PublicTransactionPoolAPI) GetLocalUTXOTxsByHeight(ctx context.Context, height *hexutil.Big, addr *common.Address) (*wtypes.UTXOBlock, error)
GetLocalUTXOTxsByHeight return
func (*PublicTransactionPoolAPI) GetMaxOutput ¶
func (s *PublicTransactionPoolAPI) GetMaxOutput(ctx context.Context, tokenID common.Address, addr *common.Address) (*hexutil.Uint64, error)
GetMaxOutput return max output
func (*PublicTransactionPoolAPI) GetProofKey ¶
func (s *PublicTransactionPoolAPI) GetProofKey(ctx context.Context, args wtypes.ProofKeyArgs) (*wtypes.ProofKeyRet, error)
GetProofKey return proof key
func (*PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex ¶
func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutil.Bytes, error)
GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
func (*PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex ¶
func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutil.Bytes, error)
GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index.
func (*PublicTransactionPoolAPI) GetRawTransactionByHash ¶
func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
GetRawTransactionByHash returns the bytes of the transaction for the given hash.
func (*PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex ¶
func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (interface{}, error)
GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.
func (*PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex ¶
func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (interface{}, error)
GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index.
func (*PublicTransactionPoolAPI) GetTransactionByHash ¶
func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (interface{}, error)
GetTransactionByHash returns the transaction for the given hash
func (*PublicTransactionPoolAPI) GetTransactionCount ¶
func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error)
GetTransactionCount returns the number of transactions the given address has sent for the given block number
func (*PublicTransactionPoolAPI) GetTransactionReceipt ¶
func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
GetTransactionReceipt returns the transaction receipt for the given transaction hash.
func (*PublicTransactionPoolAPI) GetTxKey ¶
func (s *PublicTransactionPoolAPI) GetTxKey(ctx context.Context, hash common.Hash, addr *common.Address) (*lkctypes.Key, error)
GetTxKey return tx key
func (*PublicTransactionPoolAPI) RescanBlockchain ¶
func (s *PublicTransactionPoolAPI) RescanBlockchain(ctx context.Context, addr *common.Address) (bool, error)
RescanBlockchain reset wallet block and transfer info
func (*PublicTransactionPoolAPI) SelectAddress ¶
func (s *PublicTransactionPoolAPI) SelectAddress(ctx context.Context, addr common.Address) (bool, error)
SelectAddress set wallet curr account
func (*PublicTransactionPoolAPI) SendRawTransaction ¶
func (*PublicTransactionPoolAPI) SendRawUTXOTransaction ¶ added in v0.1.1
func (*PublicTransactionPoolAPI) SendUTXOTransaction ¶
func (s *PublicTransactionPoolAPI) SendUTXOTransaction(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SendUTXOTransactionResult, error)
SendUTXOTransaction send utxo tx
func (*PublicTransactionPoolAPI) SendUTXOTransactionSplit ¶
func (s *PublicTransactionPoolAPI) SendUTXOTransactionSplit(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SendUTXOTransactionResult, error)
SendUTXOTransactionSplit send utxo tx
func (*PublicTransactionPoolAPI) SetRefreshBlockInterval ¶
func (s *PublicTransactionPoolAPI) SetRefreshBlockInterval(ctx context.Context, interval time.Duration, addr *common.Address) (bool, error)
SetRefreshBlockInterval set wallet curr account
func (*PublicTransactionPoolAPI) SignHash ¶ added in v0.1.3
func (s *PublicTransactionPoolAPI) SignHash(addr common.Address, hash common.Hash) (hexutil.Bytes, error)
SignHash is a rpc function that signs a hash with the private key of the given address.
func (*PublicTransactionPoolAPI) SignTransaction ¶
func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args rtypes.SendTxArgs) (*rtypes.SignTransactionResult, error)
func (*PublicTransactionPoolAPI) SignUTXOTransaction ¶
func (s *PublicTransactionPoolAPI) SignUTXOTransaction(ctx context.Context, args wtypes.SendUTXOTxArgs) (*wtypes.SignUTXOTransactionResult, error)
SignUTXOTransaction will sign the given transaction with the from account. The node needs to have the private key of the account corresponding with the given from address and it needs to be unlocked.
func (*PublicTransactionPoolAPI) Status ¶
func (s *PublicTransactionPoolAPI) Status(ctx context.Context, addr *common.Address) (*wtypes.StatusResult, error)
Status return wallet status
func (*PublicTransactionPoolAPI) TokenCall ¶ added in v0.1.3
func (s *PublicTransactionPoolAPI) TokenCall(ctx context.Context, args wtypes.CallArgs, blockNr rpc.BlockNumber) (*hexutil.Bytes, error)
TokenCall executes the given tokenTransaction on the state for the given block number. It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.
type Service ¶
type Service struct { cmn.BaseService // contains filtered or unexported fields }
Service RPC service
func NewService ¶
NewService create new RPC service
type Wallet ¶
type Wallet interface { CreateUTXOTransaction(from common.Address, nonce uint64, subaddrs []uint64, dests []types.DestEntry, tokenID common.Address, refundAddr common.Address, extra []byte) ([]*types.UTXOTransaction, error) GetBalance(index uint64, token *common.Address, addr *common.Address) (*big.Int, error) GetHeight(addr *common.Address) (localHeight *big.Int, remoteHeight *big.Int) GetAddress(index uint64, addr *common.Address) (string, error) Transfer(txs []string) (ret []wtypes.SendTxRet) OpenWallet(walletfile string, password string) error CreateSubAccount(maxSub uint64, addr *common.Address) error AutoRefreshBlockchain(autoRefresh bool, addr *common.Address) error GetAccountInfo(tokenID *common.Address, addr *common.Address) (*wtypes.GetAccountInfoResult, error) RescanBlockchain(addr *common.Address) error GetWalletEthAddress() (*common.Address, error) Status(addr *common.Address) *wtypes.StatusResult GetTxKey(hash *common.Hash, addr *common.Address) (*lkctypes.Key, error) GetMaxOutput(tokenID common.Address, addr *common.Address) (*hexutil.Uint64, error) GetUTXOTx(hash common.Hash, addr *common.Address) (*types.UTXOTransaction, error) SelectAddress(addr common.Address) error SetRefreshBlockInterval(interval time.Duration, addr *common.Address) error LockAccount(addr common.Address) error // CheckTxKey(hash *common.Hash, txKey *lkctypes.Key, destAddr string) (*hexutil.Uint64, *hexutil.Big, error) // GetBlockTransactionCountByNumber(blockNr rpc.BlockNumber) (*hexutil.Uint, error) GetBlockTransactionCountByHash(blockHash common.Hash) (*hexutil.Uint, error) GetTransactionByBlockNumberAndIndex(blockNr rpc.BlockNumber, index hexutil.Uint) (r interface{}, err error) GetTransactionByBlockHashAndIndex(blockHash common.Hash, index hexutil.Uint) (r interface{}, err error) GetRawTransactionByBlockNumberAndIndex(blockNr rpc.BlockNumber, index hexutil.Uint) (r hexutil.Bytes, err error) GetRawTransactionByBlockHashAndIndex(blockHash common.Hash, index hexutil.Uint) (r hexutil.Bytes, err error) GetTransactionCount(address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error) GetTransactionByHash(hash common.Hash) (r interface{}, err error) GetRawTransactionByHash(hash common.Hash) (r hexutil.Bytes, err error) GetTransactionReceipt(hash common.Hash) (r map[string]interface{}, err error) Call(args wtypes.CallArgs, blockNr string) (*hexutil.Bytes, error) // EthEstimateGas(args wtypes.CallArgs) (*hexutil.Uint64, error) SendRawTransaction(encodedTx hexutil.Bytes) (common.Hash, error) SendRawUTXOTransaction(encodedTx hexutil.Bytes) (common.Hash, error) GetLocalUTXOTxsByHeight(height *big.Int, addr *common.Address) (*wtypes.UTXOBlock, error) GetLocalOutputs(ids []hexutil.Uint64, addr *common.Address) ([]wtypes.UTXOOutputDetail, error) GetUTXOAddInfo(hash common.Hash) (*wtypes.UTXOAddInfo, error) DelUTXOAddInfo(hash common.Hash) error }
Wallet wallet