Documentation
¶
Index ¶
- Constants
- Variables
- type AccountInput
- type AccountOutput
- type BalanceArgs
- type BalanceResult
- type BlockHeightResult
- type CallArgs
- type CheckTxKeyArgs
- type CheckTxKeyResult
- type EthAccount
- type GetAccountInfoResult
- type LocalOutputsArgs
- type NetConfig
- type ProofKeyArgs
- type ProofKeyRet
- type RPCErr
- type RPCInput
- type RPCOutput
- type RPCResponse
- type SendTxRet
- type SendUTXOTransactionResult
- type SendUTXOTxArgs
- type SignUTXORet
- type SignUTXOTransactionResult
- type StatusResult
- type UTXOAccount
- type UTXOAddInfo
- type UTXOBlock
- type UTXOInput
- type UTXOOutput
- type UTXOOutputDetail
- type UTXOTransaction
- type VerifyProofKey
- type VerifyProofKeyArgs
- type VerifyProofKeyRet
Constants ¶
View Source
const ( UTXO_DESTS_MAX_NUM = 16 UTXO_ADDR_STR_LEN = 94 )
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) ErrNoNeedToProof = errors.New("account input utxo trans do not need proof") ErrBlockNotFound = errors.New("block not found") ErrBlockParentHash = errors.New("err block parent hash") ErrOutputNotFound = errors.New("output not found") ErrSubAccountTooLarge = errors.New("subaccount is too large") ErrSaveAccountSubCnt = errors.New("save AccountSubCnt fail") ErrAddInfoNotFound = errors.New("utxo add info not found") )
Functions ¶
This section is empty.
Types ¶
type AccountInput ¶ added in v0.1.1
type AccountOutput ¶ added in v0.1.1
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 EthAccount struct {
Address common.Address `json:"address"`
Balance *hexutil.Big `json:"balance"`
Nonce hexutil.Uint64 `json:"nonce"`
}
func (*EthAccount) Equal ¶ added in v0.1.1
func (ea *EthAccount) Equal(t *EthAccount) bool
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"`
}
func (*GetAccountInfoResult) Equal ¶ added in v0.1.1
func (g *GetAccountInfoResult) Equal(t *GetAccountInfoResult) bool
type LocalOutputsArgs ¶ added in v0.1.1
type NetConfig ¶
type ProofKeyArgs ¶
type ProofKeyRet ¶
type ProofKeyRet struct {
ProofKey string `json:"proof_key"`
}
type RPCOutput ¶ added in v0.1.1
type RPCOutput interface {
}
Output represents a utxo or account output
type RPCResponse ¶
type RPCResponse struct {
ID uint64 `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.Big `json:"remote_height"`
LocalHeight *hexutil.Big `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"`
InitBlockHeight hexutil.Uint64 `json:"init_block_height"`
}
type UTXOAccount ¶
type UTXOAccount struct {
Address string `json:"address"`
Index hexutil.Uint64 `json:"index"`
Balance *hexutil.Big `json:"balance"`
}
func (*UTXOAccount) Equal ¶ added in v0.1.1
func (ua *UTXOAccount) Equal(t *UTXOAccount) bool
type UTXOAddInfo ¶ added in v0.1.1
type UTXOBlock ¶ added in v0.1.1
type UTXOBlock struct {
Height *hexutil.Big `json:"height"`
Time *hexutil.Big `json:"timestamp"`
Txs []UTXOTransaction `json:"txs"`
}
type UTXOOutput ¶ added in v0.1.1
type UTXOOutput struct {
OTAddr common.Hash `json:"otaddr"`
GlobalIndex hexutil.Uint64 `json:"global_index"`
}
UTXOOutput represents a utxo output
type UTXOOutputDetail ¶ added in v0.1.1
type UTXOTransaction ¶ added in v0.1.1
type UTXOTransaction struct {
Inputs []RPCInput `json:"inputs"`
Outputs []RPCOutput `json:"outputs"`
TokenID common.Address `json:"token_id"` //current version one Tx support only one token
Fee *hexutil.Big `json:"fee"` //fee charge only LKC, without unit (different from gas)
Hash common.Hash `json:"hash"`
TxFlag uint8 `json:"tx_flag"` // 1 - income,2- output,3-in and out
}
type VerifyProofKey ¶
type VerifyProofKeyArgs ¶
type VerifyProofKeyRet ¶
type VerifyProofKeyRet struct {
Records []*VerifyProofKey `json:"records"`
}
Click to show internal directories.
Click to hide internal directories.