Documentation ¶
Index ¶
- func GetQngAddrsFromPrivateKey(privateKeyStr string, param *params.Params) ([]types.Address, error)
- type PrivateWalletManagerAPI
- func (api *PrivateWalletManagerAPI) ImportRawKey(privkey string, password string) (common.Address, error)
- func (api *PrivateWalletManagerAPI) ListAccount() (interface{}, error)
- func (api *PrivateWalletManagerAPI) Lock(addres string) error
- func (api *PrivateWalletManagerAPI) SendToAddress(fromAddress string, to string, lockTime int64) (string, error)
- func (api *PrivateWalletManagerAPI) Unlock(account, passphrase string, timeout time.Duration) error
- type PublicWalletManagerAPI
- type QngKeyStore
- type WalletManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateWalletManagerAPI ¶
type PrivateWalletManagerAPI struct {
// contains filtered or unexported fields
}
PrivateWalletManagerAPI provides an API to access Qng wallet function information.
func NewPrivateWalletAPI ¶
func NewPrivateWalletAPI(m *WalletManager) *PrivateWalletManagerAPI
func (*PrivateWalletManagerAPI) ImportRawKey ¶
func (api *PrivateWalletManagerAPI) ImportRawKey(privkey string, password string) (common.Address, error)
ImportRawKey stores the given hex encoded ECDSA key into the key directory, encrypting it with the passphrase.
func (*PrivateWalletManagerAPI) ListAccount ¶
func (api *PrivateWalletManagerAPI) ListAccount() (interface{}, error)
func (*PrivateWalletManagerAPI) Lock ¶
func (api *PrivateWalletManagerAPI) Lock(addres string) error
Lock removes the private key with the given address from memory.
func (*PrivateWalletManagerAPI) SendToAddress ¶
func (api *PrivateWalletManagerAPI) SendToAddress(fromAddress string, to string, lockTime int64) (string, error)
SendToAddress handles a sendtoaddress RPC request by creating a new transaction spending unspent transaction outputs for a wallet to another payment address. Leftover inputs not sent to the payment address or a fee for the miner are sent back to a new address in the wallet. Upon success, the TxID for the created transaction is returned.
type PublicWalletManagerAPI ¶
type PublicWalletManagerAPI struct {
// contains filtered or unexported fields
}
PublicWalletManagerAPI provides an API to access Qng wallet function information.
type QngKeyStore ¶
func NewQngKeyStore ¶
func NewQngKeyStore(ks *keystore.KeyStore) *QngKeyStore
type WalletManager ¶
func (*WalletManager) APIs ¶
func (a *WalletManager) APIs() []api.API
func (*WalletManager) CollectUtxoToEvm ¶
func (a *WalletManager) CollectUtxoToEvm()
func (*WalletManager) Load ¶
func (acc *WalletManager) Load() error
func (*WalletManager) MakeAddress ¶
func (acc *WalletManager) MakeAddress(ks *QngKeyStore, account string) (accounts.Account, error)
func (*WalletManager) Start ¶
func (a *WalletManager) Start() error
func (*WalletManager) Stop ¶
func (a *WalletManager) Stop() error