Documentation
¶
Index ¶
- Constants
- Variables
- type BalanceArgs
- type BalanceResult
- type BlockHeightResult
- type CallArgs
- type CheckTxKeyArgs
- type CheckTxKeyResult
- type EthAccount
- type GetAccountInfoResult
- type NetConfig
- type ProofKeyArgs
- type ProofKeyRet
- type RPCErr
- type RPCResponse
- type SendTxRet
- type SendUTXOTransactionResult
- type SendUTXOTxArgs
- type SignUTXORet
- type SignUTXOTransactionResult
- type StatusResult
- type UTXOAccount
- type VerifyProofKey
- type VerifyProofKeyArgs
- type VerifyProofKeyRet
Constants ¶
View Source
const (
UTXO_DESTS_MAX_NUM = 16
)
Variables ¶
View Source
var ( ErrNoConnectionToDaemon = errors.New("no_connection_to_daemon") // ErrDaemonBusy = errors.New("daemon_busy") // ErrGetHashes = errors.New("get_hashes_error") // ErrGetBlocks = errors.New("get_blocks_error") ErrWalletNotOpen = errors.New("wallet not open") ErrNotFoundTxKey = errors.New("not found tx key") ErrTxNotFound = errors.New("tx not found") ErrNoTransInTx = errors.New("no trans in tx") ErrArgsInvalid = errors.New("args invalid") ErrUTXONotSupportToken = errors.New("utxo not support token") ErrUTXODestsOverLimit = fmt.Errorf("utxo dests over limit, should less than %d", UTXO_DESTS_MAX_NUM) )
Functions ¶
This section is empty.
Types ¶
type BalanceArgs ¶
type BalanceResult ¶
type BlockHeightResult ¶
type CallArgs ¶
type CallArgs struct {
From common.Address `json:"from"`
TokenAddress common.Address `json:"tokenAddress"`
To *common.Address `json:"to"`
Gas hexutil.Uint64 `json:"gas"`
GasPrice hexutil.Big `json:"gasPrice"`
Value hexutil.Big `json:"value"`
Data hexutil.Bytes `json:"data"`
Nonce hexutil.Uint64 `json:"nonce"`
UTXOKind types.UTXOKind `json:"utxokind"`
Outputs []types.OutputData `json:"outputs"`
}
CallArgs represents the arguments for a call.
type CheckTxKeyArgs ¶
type CheckTxKeyResult ¶
type EthAccount ¶
type GetAccountInfoResult ¶
type GetAccountInfoResult struct {
EthAccount EthAccount `json:"eth_account"`
UTXOAccounts []UTXOAccount `json:"utxo_accounts"`
TotalBalance *hexutil.Big `json:"total_balance"`
TokenID *common.Address `json:"token"`
}
type NetConfig ¶
type ProofKeyArgs ¶
type ProofKeyRet ¶
type ProofKeyRet struct {
ProofKey string `json:"proof_key"`
}
type RPCResponse ¶
type RPCResponse struct {
ID string `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Result json.RawMessage `json:"result"`
Error RPCErr `json:"error"`
}
type SendUTXOTransactionResult ¶
type SendUTXOTransactionResult struct {
Txs []SendTxRet `json:"tx"`
}
type SendUTXOTxArgs ¶
type SendUTXOTxArgs struct {
From common.Address `json:"from"`
Nonce *hexutil.Uint64 `json:"nonce"`
SubAddrs []uint64 `json:"subaddrs"`
Dests []*types.UTXODest `json:"dests"`
TokenID *common.Address `json:"token"`
}
func (*SendUTXOTxArgs) SetDefaults ¶
func (s *SendUTXOTxArgs) SetDefaults()
type SignUTXORet ¶
type SignUTXOTransactionResult ¶
type SignUTXOTransactionResult struct {
Txs []SignUTXORet `json:"txs"`
}
type StatusResult ¶
type StatusResult struct {
RemoteHeight hexutil.Uint64 `json:"remote_height"`
LocalHeight hexutil.Uint64 `json:"local_height"`
WalletOpen bool `json:"wallet_open"`
AutoRefresh bool `json:"auto_refresh"`
WalletVersion string `json:"wallet_version"`
ChainVersion string `json:"chain_version"`
EthAddress common.Address `json:"eth_address"`
RefreshBlockInterval time.Duration `json:"refresh_block_interval"`
}
type UTXOAccount ¶
type VerifyProofKey ¶
type VerifyProofKeyArgs ¶
type VerifyProofKeyRet ¶
type VerifyProofKeyRet struct {
Records []*VerifyProofKey `json:"records"`
}
Click to show internal directories.
Click to hide internal directories.