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
- type WErr
Constants ¶
View Source
const ( UTXO_DESTS_MAX_NUM = 16 UTXO_ADDR_STR_LEN = 94 )
Variables ¶
View Source
var ( ErrArgsInvalid = NewWErr(-600001, "args invalid") ErrUTXONotSupportToken = NewWErr(-600002, "utxo not support token") ErrPasswdEmpty = NewWErr(-600003, "password empty") ErrCueTooLong = NewWErr(-600004, "cue too long") ErrUTXODestsOverLimit = NewWErr(-600005, fmt.Sprintf("utxo dests over limit, should less than %d", UTXO_DESTS_MAX_NUM)) ErrAccDestsOverLimit = NewWErr(-600006, "account output too more") ErrTxTypeNotSupport = NewWErr(-600007, "not support tx type") ErrNoNeedToProof = NewWErr(-600008, "account input utxo trans do not need proof") ErrNoTransInTx = NewWErr(-600009, "no trans in tx") ErrWalletNotOpen = NewWErr(-600010, "wallet not open") ErrAccountNeedUnlock = NewWErr(-600011, "account need unlock") ErrNewUTXOAccount = NewWErr(-600012, "fail new UTXO account") ErrAccountNotFound = NewWErr(-601001, "account not found") ErrNewAccount = NewWErr(-601002, "new account fail") ErrStrToAddressInvalid = NewWErr(-601003, "str to address invalid") ErrStrToAddressCheckSum = NewWErr(-601004, "str to address check sum fail") ErrAccBalanceUpdate = NewWErr(-601005, "update balance fail") ErrSubaddrIdxOverRange = NewWErr(-601006, "subaddr index over range") ErrSubAccountOverLimit = NewWErr(-601007, "subaccount over limit") ErrTransNeedSplit = NewWErr(-602001, "Transaction would be too large. try transfer_split") ErrBlockParentHash = NewWErr(-602002, "err block parent hash") ErrOutputQueryNotMatch = NewWErr(-602003, "output query not match") ErrOutputEmpty = NewWErr(-602004, "output empty") ErrOutputMoneyInvalid = NewWErr(-602005, "output money invalid") ErrOutputMoneyOverFlow = NewWErr(-602006, "sum output money over flow") ErrBalanceNotEnough = NewWErr(-602007, "balance not enough") ErrSignTx = NewWErr(-602008, "sign tx err") ErrNewAinTrans = NewWErr(-602009, "new account input transaction err") ErrNoMoreOutput = NewWErr(-602010, "no more output") ErrTxTooBig = NewWErr(-602011, "tx too big") ErrNewUinTrans = NewWErr(-602012, "new utxo input transaction err") ErrUinTransWithSign = NewWErr(-602013, "utxo transaction with sign err") ErrNotSupportContractTx = NewWErr(-602014, "not support contract tx") ErrMixInputNotSupport = NewWErr(-602015, "mix input not support") ErrTransInvalid = NewWErr(-602016, "transaction output amount invalid") ErrExactMatchFail = NewWErr(-602017, "DFS exact mathch fail") ErrDestsMergeFail = NewWErr(-602018, "dests merge fail") ErrTokenFeeNotEnough = NewWErr(-602019, "balance not enough for token fee") ErrAddingFeeNotEnough = NewWErr(-602020, "balance not enough for fee when transfer split") ErrUtxoPoolDeplete = NewWErr(-602021, "utxo pool deplete when transfer split") ErrNoConnectionToDaemon = NewWErr(-603001, "no_connection_to_daemon") ErrDaemonResponseBody = NewWErr(-603002, "dameon response body err") ErrDaemonResponseCode = NewWErr(-603003, "dameon response code err") ErrDaemonResponseData = NewWErr(-603004, "dameon response data err") ErrSubmitTrans = NewWErr(-603005, "submit transaction fail") ErrGetTransactionCount = NewWErr(-603006, "getTransactionCount fail") ErrSendRawTransaction = NewWErr(-603007, "sendRawTransaction fail") ErrSendRawUTXOTransaction = NewWErr(-603008, "sendRawUTXOTransaction fail") ErrEstimateGas = NewWErr(-603009, "estimateGas fail") ErrSaveAccountSubCnt = NewWErr(-604001, "save AccountSubCnt fail") ErrNotFoundTxKey = NewWErr(-604002, "not found tx key") ErrBlockNotFound = NewWErr(-604003, "block not found") ErrOutputNotFound = NewWErr(-604004, "output not found") ErrBatchSave = NewWErr(-604005, "batch save fail") ErrBatchCommit = NewWErr(-604006, "batch commit fail") ErrSaveTxKey = NewWErr(-604007, "tx key save fail") ErrTxNotFound = NewWErr(-604008, "tx not found") ErrUTXOTxCommit = NewWErr(-604009, "utxo tx commit fail") ErrAddInfoNotFound = NewWErr(-604010, "utxo add info not found") ErrTxAddInfoCommit = NewWErr(-604011, "tx add info commit fail") ErrTxAddInfoDel = NewWErr(-604012, "tx add info del fail") ErrInnerServer = NewWErr(-605001, "server inner error") )
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 UTXOOutput ¶ added in v0.1.1
type UTXOOutput struct { OTAddr common.Hash `json:"otaddr"` GlobalIndex hexutil.Uint64 `json:"global_index"` IsChange bool `json:"is_change"` }
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.