Documentation ¶
Index ¶
- Constants
- Variables
- func CheckGetTestTokenIpFrequency(cache *lru.Cache, ctx context.Context) error
- func FilterLog(filter *FilterParam, l *ledger.VmLog) bool
- func Float64ToString(f float64, prec int) string
- func InitConfig(id uint, dexAvailable *bool)
- func InitGetTestTokenLimitPolicy()
- func InitLog(dir, lvl string)
- func InitTestAPIParams(priv, tti string)
- func StakeListToDexRpc(stakeInfos []*dex.DelegateStakeInfo, totalAmount *big.Int, count int, ...) (*apidex.StakeInfoList, error)
- func StringToFloat64(s string) (float64, error)
- func StringToUint64(s string) (uint64, error)
- func TryMakeConcernedError(err error) (newerr error, concerned bool)
- func Uint64ToString(u uint64) string
- func VIPStakingToRpc(chain chain.Chain, address types.Address, info *dex.VIPStaking, bid uint8, ...) (vipStakingRpc *apidex.VIPStakingRpc, err error)
- type AccountBalanceInfo
- type AccountBlock
- type AccountInfo
- type AgentPledgeParam
- type AssetApi
- func (m *AssetApi) GetBurnData() ([]byte, error)
- func (m *AssetApi) GetChangeTokenTypeData(tokenId types.TokenTypeId) ([]byte, error)
- func (m *AssetApi) GetIssueData(param IssueParams) ([]byte, error)
- func (m *AssetApi) GetMintData(param MintageParams) ([]byte, error)
- func (m *AssetApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)deprecated
- func (m *AssetApi) GetTokenInfoList(index int, count int) (*TokenInfoList, error)deprecated
- func (m *AssetApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)deprecated
- func (m *AssetApi) GetTransferOwnerData(param TransferOwnerParams) ([]byte, error)
- func (m AssetApi) String() string
- type BalanceInfo
- type CalcPoWDifficultyParam
- type CalcPoWDifficultyResult
- type CalcQuotaRequiredParam
- type CalcQuotaRequiredResult
- type CallContractParam
- type CallContractResult
- type CallOffChainMethodParam
- type CandidateInfo
- type ConsensusGroup
- type ConsensusGroupApi
- type ConstructorParam
- type ContractApi
- func (c *ContractApi) CallOffChainMethod(param CallOffChainMethodParam) ([]byte, error)
- func (c *ContractApi) CreateContractAddress(address types.Address, height string, previousHash types.Hash) (*types.Address, error)
- func (c *ContractApi) GetCallContractData(abiStr string, methodName string, params []string) ([]byte, error)
- func (c *ContractApi) GetCallOffChainData(abiStr string, offChainName string, params []string) ([]byte, error)
- func (c *ContractApi) GetContractInfo(addr types.Address) (*ContractInfo, error)
- func (c *ContractApi) GetContractStorage(addr types.Address, prefix string) (map[string]string, error)
- func (c *ContractApi) GetCreateContractData(param CreateContractDataParam) ([]byte, error)
- func (c *ContractApi) GetCreateContractParams(abiStr string, params []string) ([]byte, error)
- func (c *ContractApi) GetCreateContractToAddress(selfAddr types.Address, heightStr string, prevHash types.Hash) (*types.Address, error)deprecated
- func (p *ContractApi) GetDelegatedStakeInfo(params StakeQueryParams) (*StakeInfo, error)
- func (p *ContractApi) GetQuotaByAccount(addr types.Address) (*QuotaInfo, error)
- func (p *ContractApi) GetRequiredStakeAmount(qStr string) (*string, error)
- func (r *ContractApi) GetSBP(name string) (*SBPInfo, error)
- func (r *ContractApi) GetSBPList(stakeAddress types.Address) ([]*SBPInfo, error)
- func (r *ContractApi) GetSBPRewardByCycle(cycle string) (*SBPRewardInfo, error)
- func (r *ContractApi) GetSBPRewardByTimestamp(timestamp int64) (*SBPRewardInfo, error)
- func (r *ContractApi) GetSBPRewardPendingWithdrawal(name string) (*SBPReward, error)
- func (v *ContractApi) GetSBPVoteDetailsByCycle(cycle string) ([]*VoteDetail, error)
- func (r *ContractApi) GetSBPVoteList() ([]*SBPVoteInfo, error)
- func (p *ContractApi) GetStakeList(address types.Address, pageIndex int, pageSize int) (*StakeInfoList, error)
- func (p *ContractApi) GetStakeListBySearchKey(snapshotHash types.Hash, lastKey string, size uint64) (*StakeInfoListBySearchKey, error)
- func (m *ContractApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)
- func (m *ContractApi) GetTokenInfoList(pageIndex int, pageSize int) (*TokenInfoList, error)
- func (m *ContractApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)
- func (v *ContractApi) GetVotedSBP(addr types.Address) (*VotedSBPInfo, error)
- func (c ContractApi) String() string
- type ContractInfo
- type CreateContractDataParam
- type CreateContractParam
- type CreateContractResult
- type CreateEntropyFileResponse
- type CreateReceiveTxParms
- type CreateTransactionParms
- type CreateTransferTxParms
- type CreateTxWithPrivKeyParmsTest
- type DashboardApi
- type DataApi
- func (p DataApi) GetDexPledgeListByPage(snapshotHash types.Hash, lastKey string, count int) (*GetPledgeListByPageResult, error)
- func (p DataApi) GetDexUserFundsByPage(snapshotHash types.Hash, lastAddress string, count int) (*apidex.Funds, error)
- func (p *DataApi) GetPledgeListByPage(snapshotHash types.Hash, lastKey string, count uint64) (*GetPledgeListByPageResult, error)
- func (p DataApi) String() string
- type DebugApi
- func (api DebugApi) ClearOnRoadUnconfirmedCache(addr types.Address, hashList []*types.Hash) error
- func (api DebugApi) ConsensusBlockRate(gid types.Gid, startIndex, endIndex uint64) map[string]interface{}
- func (api DebugApi) ConsensusProducers(gid types.Gid, offset int64, index uint64) map[string]interface{}
- func (api DebugApi) Free()
- func (api DebugApi) GetForkInfo() config.ForkPoints
- func (api DebugApi) GetOnRoadInfoUnconfirmed(addr types.Address) ([]*types.Hash, error)
- func (api DebugApi) GetRecentActiveFork() *fork.ForkPointItem
- func (api DebugApi) MachineInfo() map[string]interface{}
- func (api DebugApi) PoolAccount(addr types.Address) map[string]interface{}
- func (api DebugApi) PoolAccountBlockDetail(addr types.Address, hash types.Hash) map[string]interface{}
- func (api DebugApi) PoolAccountChainDetail(addr types.Address, chainId string, height uint64) map[string]interface{}
- func (api DebugApi) PoolInfo() map[string]interface{}
- func (api DebugApi) PoolIrreversible() string
- func (api DebugApi) PoolSnapshot() map[string]interface{}
- func (api DebugApi) PoolSnapshotBlockDetail(hash types.Hash) map[string]interface{}
- func (api DebugApi) PoolSnapshotChainDetail(chainId string, height uint64) map[string]interface{}
- func (api DebugApi) RoadInfo() map[string]interface{}
- func (api DebugApi) SetGetTestTokenLimitSize(size int) error
- func (api DebugApi) UpdateOnRoadInfo(addr types.Address, tkId types.TokenTypeId, number uint64, amountStr *string) error
- type DeriveResult
- type DexApi
- func (f DexApi) GetAccountBalanceInfo(addr types.Address, tokenId *types.TokenTypeId) (map[types.TokenTypeId]*AccountBalanceInfo, error)
- func (f DexApi) GetCancelStakeList(address types.Address, pageIndex int, pageSize int) (*apidex.CancelStakeList, error)
- func (f DexApi) GetCurrentFeesValidForMining() (fees map[int32]string, err error)
- func (f DexApi) GetCurrentMiningInfo() (mineInfo *apidex.NewRpcVxMineInfo, err error)
- func (f DexApi) GetCurrentStakingValidForMining() (string, error)
- func (f DexApi) GetDividendPoolsInfo() (map[types.TokenTypeId]*apidex.DividendPoolInfo, error)
- func (f DexApi) GetInviteCode(address types.Address) (uint32, error)
- func (f DexApi) GetInviteCodeBinding(address types.Address) (uint32, error)
- func (f DexApi) GetMarketInfo(tradeToken, quoteToken types.TokenTypeId) (*apidex.NewRpcMarketInfo, error)
- func (f DexApi) GetMiningStakeInfoList(address types.Address, pageIndex int, pageSize int) (*apidex.StakeInfoList, error)
- func (f DexApi) GetOrderById(orderIdStr string) (*apidex.RpcOrder, error)
- func (f DexApi) GetOrderByTransactionHash(sendHash types.Hash) (*apidex.RpcOrder, error)
- func (f DexApi) GetOrdersForMarket(tradeToken, quoteToken types.TokenTypeId, side bool, begin, end int) (ordersRes *apidex.OrdersRes, err error)
- func (f DexApi) GetPlaceOrderInfo(address types.Address, tradeToken, quoteToken types.TokenTypeId, side bool) (*apidex.PlaceOrderInfo, error)
- func (f DexApi) GetStakedForVIP(address types.Address) (*apidex.VIPStakingRpc, error)
- func (f DexApi) GetTokenInfo(token types.TokenTypeId) (*apidex.RpcDexTokenInfo, error)
- func (f DexApi) GetVIPStakeInfoList(address types.Address, pageIndex int, pageSize int) (*apidex.StakeInfoList, error)
- func (f DexApi) GetVxUnlockList(address types.Address, pageIndex int, pageSize int) (*apidex.VxUnlockList, error)
- func (f DexApi) HasStakedForSVIP(address types.Address) (bool, error)
- func (f DexApi) HasStakedForVIP(address types.Address) (bool, error)
- func (f DexApi) IsAutoLockMinedVx(address types.Address) (bool, error)
- func (f DexApi) IsDexStopped() (bool, error)
- func (f DexApi) IsInviteCodeValid(code uint32) (bool, error)
- func (f DexApi) IsMarketDelegatedTo(principal, agent types.Address, tradeToken, quoteToken types.TokenTypeId) (bool, error)
- func (f DexApi) String() string
- type DexFundApi
- func (f DexFundApi) GetAccountFundInfo(addr types.Address, tokenId *types.TokenTypeId) (map[types.TokenTypeId]*AccountBalanceInfo, error)
- func (f DexFundApi) GetCurrentDividendPools() (map[types.TokenTypeId]*apidex.DividendPoolInfo, error)
- func (f DexFundApi) GetCurrentFeesForMine() (fees map[int32]string, err error)
- func (f DexFundApi) GetCurrentPledgeForVxSum() (string, error)
- func (f DexFundApi) GetCurrentVxMineInfo() (mineInfo *apidex.RpcVxMineInfo, err error)
- func (f DexFundApi) GetInviteeCode(address types.Address) (uint32, error)
- func (f DexFundApi) GetInviterCode(address types.Address) (uint32, error)
- func (f DexFundApi) GetMarketInfo(tradeToken, quoteToken types.TokenTypeId) (*apidex.RpcMarketInfo, error)
- func (f DexFundApi) GetTokenInfo(token types.TokenTypeId) (*apidex.RpcDexTokenInfo, error)
- func (f DexFundApi) IsMarketGrantedToAgent(principal, agent types.Address, tradeToken, quoteToken types.TokenTypeId) (bool, error)
- func (f DexFundApi) IsPledgeSuperVip(address types.Address) (bool, error)
- func (f DexFundApi) IsPledgeVip(address types.Address) (bool, error)
- func (f DexFundApi) IsViteXStopped() (bool, error)
- func (f DexFundApi) String() string
- type DexPrivateApi
- func (f DexPrivateApi) GetAllFeesOfAddress(address types.Address) (*apidex.RpcUserFees, error)
- func (f DexPrivateApi) GetAllMiningStakingInfo() (*apidex.RpcMiningStakings, error)
- func (f DexPrivateApi) GetAllMiningStakingInfoByAddress(address types.Address) (*apidex.RpcMiningStakings, error)
- func (f DexPrivateApi) GetAllTotalVxBalance() (*apidex.RpcVxFunds, error)
- func (f DexPrivateApi) GetAllVxBalanceByAddress(address types.Address) (*apidex.RpcVxFunds, error)
- func (f DexPrivateApi) GetCurrentDexFees() (*apidex.RpcDexFeesByPeriod, error)
- func (f DexPrivateApi) GetCurrentMiningStakingAmountByAddress(address types.Address) (map[string]string, error)
- func (f DexPrivateApi) GetCurrentOperatorFees(operator types.Address) (*apidex.RpcOperatorFeesByPeriod, error)
- func (f DexPrivateApi) GetDelegateStakeInfoById(id types.Hash) (*apidex.DelegateStakeInfo, error)
- func (f DexPrivateApi) GetDexConfig() (map[string]string, error)
- func (f DexPrivateApi) GetDexFeesByPeriod(periodId uint64) (*apidex.RpcDexFeesByPeriod, error)
- func (f DexPrivateApi) GetFirstMiningPeriodId() (uint64, error)
- func (f DexPrivateApi) GetLastPeriodIdByJobType(bizType uint8) (uint64, error)
- func (f DexPrivateApi) GetLastSettledMakerMiningInfo() (map[string]uint64, error)
- func (f DexPrivateApi) GetMakerMiningPool(periodId uint64) (string, error)
- func (f DexPrivateApi) GetMarketInfoById(marketId int32) (ordersRes *apidex.RpcMarketInfo, err error)
- func (f DexPrivateApi) GetMinThresholdForTradeAndMining() (map[int]*apidex.RpcThresholdForTradeAndMine, error)
- func (f DexPrivateApi) GetOperatorFeesByPeriod(periodId uint64, operator types.Address) (*apidex.RpcOperatorFeesByPeriod, error)
- func (f DexPrivateApi) GetOwner() (*types.Address, error)
- func (f DexPrivateApi) GetPeriodId() (uint64, error)
- func (f DexPrivateApi) GetTime() (int64, error)
- func (f DexPrivateApi) GetTradeTimestamp() (timestamp int64, err error)
- func (f DexPrivateApi) GetVIPStakingInfoByAddress(address types.Address) (*dex.VIPStaking, error)
- func (f DexPrivateApi) GetVxBurnBalance() (string, error)
- func (f DexPrivateApi) GetVxPoolBalance() (string, error)
- func (f DexPrivateApi) IsNormalMiningStarted() (bool, error)
- func (f DexPrivateApi) String() string
- func (f DexPrivateApi) VerifyDexBalance() (*dex.FundVerifyRes, error)
- type DexTradeApi
- func (f DexTradeApi) GetMarketInfoById(marketId int32) (ordersRes *apidex.RpcMarketInfo, err error)
- func (f DexTradeApi) GetOrderById(orderIdStr string) (*apidex.RpcOrder, error)
- func (f DexTradeApi) GetOrderBySendHash(sendHash types.Hash) (*apidex.RpcOrder, error)
- func (f DexTradeApi) GetOrdersFromMarket(tradeToken, quoteToken types.TokenTypeId, side bool, begin, end int) (ordersRes *apidex.OrdersRes, err error)
- func (f DexTradeApi) GetTimestamp() (timestamp int64, err error)
- func (f DexTradeApi) String() string
- type FilterParam
- type FindAddrResponse
- type FindAddrResult
- type GcStatus
- type GetBalancesRes
- type GetPledgeListByPageResult
- type GetPoWDifficultyParam
- type GetPoWDifficultyResult
- type GetQuotaRequiredParam
- type GetQuotaRequiredResult
- type Health
- type HeightRange
- type HexSignedTuple
- type IsMayValidKeystoreFileResponse
- type IssueParams
- type JsonRpc2Error
- type LedgerApi
- func (l *LedgerApi) GetAccountBlockByHash(blockHash types.Hash) (*AccountBlock, error)
- func (l *LedgerApi) GetAccountBlockByHeight(addr types.Address, height interface{}) (*AccountBlock, error)
- func (l *LedgerApi) GetAccountBlocks(addr types.Address, originBlockHash *types.Hash, ...) ([]*AccountBlock, error)
- func (l *LedgerApi) GetAccountBlocksByAddress(addr types.Address, index int, count int) ([]*AccountBlock, error)
- func (l *LedgerApi) GetAccountByAccAddr(addr types.Address) (*RpcAccountInfo, error)
- func (l *LedgerApi) GetAccountInfoByAddress(addr types.Address) (*AccountInfo, error)
- func (l *LedgerApi) GetAllUnconfirmedBlocks() []*ledger.AccountBlock
- func (l *LedgerApi) GetBlockByHash(blockHash types.Hash) (*AccountBlock, error)
- func (l *LedgerApi) GetBlockByHeight(addr types.Address, height interface{}) (*AccountBlock, error)
- func (l *LedgerApi) GetBlocksByAccAddr(addr types.Address, index int, count int) ([]*AccountBlock, error)
- func (l *LedgerApi) GetBlocksByHash(addr types.Address, originBlockHash *types.Hash, count uint64) ([]*AccountBlock, error)
- func (l *LedgerApi) GetBlocksByHashInToken(addr types.Address, originBlockHash *types.Hash, tokenTypeId types.TokenTypeId, ...) ([]*AccountBlock, error)
- func (l *LedgerApi) GetBlocksByHeight(addr types.Address, height interface{}, count uint64) ([]*AccountBlock, error)
- func (l *LedgerApi) GetChainStatus() []interfaces.DBStatus
- func (l *LedgerApi) GetChunks(startHeight interface{}, endHeight interface{}) ([]*SnapshotChunk, error)
- func (l *LedgerApi) GetCompleteBlockByHash(blockHash types.Hash) (*AccountBlock, error)
- func (l *LedgerApi) GetConfirmedBalances(snapshotHash types.Hash, addrList []types.Address, ...) (GetBalancesRes, error)
- func (l *LedgerApi) GetLatestAccountBlock(addr types.Address) (*AccountBlock, error)
- func (l *LedgerApi) GetLatestBlock(addr types.Address) (*AccountBlock, error)
- func (l *LedgerApi) GetLatestSnapshotBlock() (*SnapshotBlock, error)
- func (l *LedgerApi) GetLatestSnapshotChainHash() *types.Hash
- func (l *LedgerApi) GetLatestSnapshotHash() *types.Hash
- func (t LedgerApi) GetPoWDifficulty(param GetPoWDifficultyParam) (*GetPoWDifficultyResult, error)
- func (l *LedgerApi) GetRawBlockByHash(blockHash types.Hash) (*ledger.AccountBlock, error)
- func (t LedgerApi) GetRequiredQuota(param GetQuotaRequiredParam) (*GetQuotaRequiredResult, error)
- func (l *LedgerApi) GetSeed(snapshotHash types.Hash, fromHash types.Hash) (uint64, error)
- func (l *LedgerApi) GetSnapshotBlockBeforeTime(timestamp int64) (*SnapshotBlock, error)
- func (l *LedgerApi) GetSnapshotBlockByHash(hash types.Hash) (*SnapshotBlock, error)
- func (l *LedgerApi) GetSnapshotBlockByHeight(height interface{}) (*SnapshotBlock, error)
- func (l *LedgerApi) GetSnapshotBlocks(height interface{}, count int) ([]*SnapshotBlock, error)
- func (l *LedgerApi) GetSnapshotChainHeight() string
- func (l *LedgerApi) GetUnconfirmedBlocks(addr types.Address) []*ledger.AccountBlock
- func (l *LedgerApi) GetUnreceivedBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
- func (l *LedgerApi) GetUnreceivedBlocksInBatch(queryList []PagingQueryBatch) (map[types.Address][]*AccountBlock, error)
- func (l *LedgerApi) GetUnreceivedTransactionSummaryByAddress(address types.Address) (*AccountInfo, error)
- func (l *LedgerApi) GetUnreceivedTransactionSummaryInBatch(addressList []types.Address) ([]*AccountInfo, error)
- func (l *LedgerApi) GetVmLogList(blockHash types.Hash) (ledger.VmLogList, error)
- func (l *LedgerApi) GetVmLogListByHash(logHash types.Hash) (ledger.VmLogList, error)
- func (l *LedgerApi) GetVmLogs(blockHash types.Hash) (ledger.VmLogList, error)
- func (l *LedgerApi) GetVmLogsByFilter(param VmLogFilterParam) ([]*Logs, error)
- func (l *LedgerApi) SendRawTransaction(block *AccountBlock) error
- func (l LedgerApi) String() string
- type LedgerDebugApi
- type Logs
- type MintageParams
- type NetApi
- type NewStoreResponse
- type Nodes
- type NormalRequestRawTxParam
- type OnroadPagingQuery
- type PagingQueryBatch
- type PeriodStats
- type PledgeInfo
- type PledgeInfoList
- type PledgeQueryParams
- type Pow
- type PrivateOnroadApi
- func (pri PrivateOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)deprecated
- func (pri PrivateOnroadApi) GetOnroadBlocksInBatch(queryList []OnroadPagingQuery) (map[types.Address][]*AccountBlock, error)deprecated
- func (pri PrivateOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)deprecated
- func (pri PrivateOnroadApi) GetOnroadInfoInBatch(addrList []types.Address) ([]*RpcAccountInfo, error)deprecated
- func (pri PrivateOnroadApi) String() string
- type PublicOnroadApi
- type QuotaAndTxNum
- type QuotaApi
- func (p *QuotaApi) GetAgentCancelPledgeData(param AgentPledgeParam) ([]byte, error)
- func (p *QuotaApi) GetAgentPledgeData(param AgentPledgeParam) ([]byte, error)
- func (p *QuotaApi) GetAgentPledgeInfo(params PledgeQueryParams) (*PledgeInfo, error)
- func (p *QuotaApi) GetCancelPledgeData(beneficialAddr types.Address, amount string) ([]byte, error)
- func (p *QuotaApi) GetPledgeAmountByUtps(utps string) (*string, error)deprecated
- func (p *QuotaApi) GetPledgeBeneficialAmount(addr types.Address) (string, error)deprecated
- func (p *QuotaApi) GetPledgeData(beneficialAddr types.Address) ([]byte, error)
- func (p *QuotaApi) GetPledgeList(addr types.Address, index int, count int) (*PledgeInfoList, error)deprecated
- func (p *QuotaApi) GetPledgeQuota(addr types.Address) (*QuotaAndTxNum, error)deprecated
- func (p *QuotaApi) GetQuotaCoefficient() (*QuotaCoefficientInfo, error)
- func (p *QuotaApi) GetQuotaUsedList(addr types.Address) ([]types.QuotaInfo, error)
- func (p QuotaApi) String() string
- type QuotaCoefficientInfo
- type QuotaInfo
- type Range
- type RegistParam
- type RegisterApi
- func (r *RegisterApi) GetAvailableReward(gid types.Gid, name string) (*Reward, error)deprecated
- func (r *RegisterApi) GetCancelRegisterData(gid types.Gid, name string) ([]byte, error)
- func (r *RegisterApi) GetCandidateList() ([]*CandidateInfo, error)deprecated
- func (r *RegisterApi) GetRegisterData(gid types.Gid, name string, nodeAddr types.Address) ([]byte, error)
- func (r *RegisterApi) GetRegisterPledgeAddrList(paramList []*RegistParam) ([]*types.Address, error)
- func (r *RegisterApi) GetRegistration(name string, gid types.Gid) (*types.Registration, error)deprecated
- func (r *RegisterApi) GetRegistrationList(gid types.Gid, pledgeAddr types.Address) ([]*RegistrationInfo, error)deprecated
- func (r *RegisterApi) GetRewardByDay(gid types.Gid, timestamp int64) (map[string]*Reward, error)deprecated
- func (r *RegisterApi) GetRewardByIndex(gid types.Gid, indexStr string) (*RewardInfo, error)deprecated
- func (r *RegisterApi) GetRewardData(gid types.Gid, name string, beneficialAddr types.Address) ([]byte, error)
- func (r *RegisterApi) GetUpdateRegistrationData(gid types.Gid, name string, nodeAddr types.Address) ([]byte, error)
- func (r RegisterApi) String() string
- type RegisterConditionParam
- type RegistrationInfo
- type Reward
- type RewardInfo
- type RpcAccountInfo
- type RpcTokenBalanceInfo
- type RpcTokenInfo
- type SBPInfo
- type SBPReward
- type SBPRewardInfo
- type SBPVoteInfo
- type SendTxWithPrivateKeyParam
- type SnapshotBlock
- type SnapshotChunk
- type StakeInfo
- type StakeInfoList
- type StakeInfoListBySearchKey
- type StakeQueryParams
- type StatsApi
- func (c StatsApi) GetDaySBPStats(startIdx uint64, endIdx uint64) ([]map[string]interface{}, error)
- func (c StatsApi) GetHourSBPStats(startIdx uint64, endIdx uint64) ([]map[string]interface{}, error)
- func (c StatsApi) GetPeriodSBPStats(startIdx uint64, endIdx uint64) ([]*PeriodStats, error)
- func (c StatsApi) Index2Time(i uint64, level int) map[string]time.Time
- func (c StatsApi) String() string
- func (c StatsApi) Time2Index(t *time.Time, level int) uint64
- type SyncInfo
- type TestApi
- type TokenInfoList
- type TransferOwnerParams
- type Tx
- func (t Tx) CalcPoWDifficulty(param CalcPoWDifficultyParam) (result *CalcPoWDifficultyResult, err error)deprecated
- func (t Tx) CalcQuotaRequired(param CalcQuotaRequiredParam) (*CalcQuotaRequiredResult, error)deprecated
- func (t Tx) SendRawTx(block *AccountBlock) error
- func (t Tx) SendTxWithPrivateKey(param SendTxWithPrivateKeyParam) (*AccountBlock, error)
- type TxParam
- type TypesApi
- type UnreceivedDebugApi
- type UtilApi
- type VmAccountInfo
- type VmDebugApi
- func (v *VmDebugApi) CallContract(param CallContractParam) (*CallContractResult, error)
- func (v *VmDebugApi) ClearData() error
- func (v *VmDebugApi) CreateContract(param CreateContractParam) ([]*CreateContractResult, error)
- func (v *VmDebugApi) GetContractList() (map[types.Address][]CallContractParam, error)
- func (v *VmDebugApi) GetContractStorage(addr types.Address) (map[string]string, error)
- func (v *VmDebugApi) Init() (*VmAccountInfo, error)
- func (v *VmDebugApi) NewAccount() (*VmAccountInfo, error)
- func (v VmDebugApi) String() string
- type VmLogFilterParam
- type VoteApi
- func (v *VoteApi) GetCancelVoteData(gid types.Gid) ([]byte, error)
- func (v *VoteApi) GetVoteData(gid types.Gid, name string) ([]byte, error)
- func (v *VoteApi) GetVoteDetails(index *uint64) ([]*consensus.VoteDetails, error)deprecated
- func (v *VoteApi) GetVoteInfo(gid types.Gid, addr types.Address) (*VoteInfo, error)deprecated
- func (v VoteApi) String() string
- type VoteConditionParam
- type VoteDetail
- type VoteInfo
- type VotedSBPInfo
- type WalletApi
- func (m WalletApi) AddEntropyStore(filename string) error
- func (m WalletApi) CreateEntropyFile(passphrase string) (*CreateEntropyFileResponse, error)
- func (m WalletApi) CreateTransaction(params CreateTransactionParms) (*types.Hash, error)
- func (m WalletApi) CreateTxWithPassphrase(params CreateTransferTxParms) (*types.Hash, error)
- func (m WalletApi) DeriveAddressByIndex(entropyFile string, index uint32) (*DeriveResult, error)
- func (m WalletApi) DeriveAddressByPath(entropyFile string, bip44Path string) (*DeriveResult, error)
- func (m WalletApi) DeriveAddressesByIndexRange(entropyFile string, startIndex, endIndex uint32) ([]types.Address, error)
- func (m WalletApi) DeriveByFullPath(entropyStore string, fullpath string) (*DeriveResult, error)
- func (m WalletApi) DeriveByIndex(entropyStore string, index uint32) (*DeriveResult, error)
- func (m WalletApi) ExportMnemonic(entropyFile string, passphrase string) (string, error)
- func (m WalletApi) ExtractMnemonic(entropyStore string, passphrase string) (string, error)
- func (m WalletApi) FindAddr(entropyStore string, addr types.Address) (findResult *FindAddrResult, e error)
- func (m WalletApi) FindAddrWithPassphrase(entropyStore string, passphrase string, addr types.Address) (findResult *FindAddrResult, e error)
- func (m WalletApi) FindAddress(address types.Address) (findResult *FindAddrResponse, e error)
- func (m WalletApi) FindAddressInEntropyFile(entropyFile string, address types.Address) (findResult *FindAddrResponse, e error)
- func (m WalletApi) GetAllEntropyFiles() []string
- func (m WalletApi) GetDataDir() string
- func (m WalletApi) GetEntropyFilesInStandardDir() ([]string, error)
- func (m WalletApi) GetPrivateKey(entropyStore string, passphrase string) (*string, error)
- func (m WalletApi) GlobalCheckAddrUnlocked(addr types.Address) bool
- func (m WalletApi) GlobalFindAddr(addr types.Address) (findResult *FindAddrResult, e error)
- func (m WalletApi) GlobalFindAddrWithPassphrase(addr types.Address, passphrase string) (findResult *FindAddrResult, e error)
- func (m WalletApi) IsAddrUnlocked(entropyStore string, addr types.Address) bool
- func (m WalletApi) IsMayValidKeystoreFile(path string) IsMayValidKeystoreFileResponse
- func (m WalletApi) IsUnlocked(entropyFile string) bool
- func (m WalletApi) ListAllEntropyFiles() []string
- func (m WalletApi) ListEntropyFilesInStandardDir() ([]string, error)
- func (m WalletApi) ListEntropyStoreAddresses(entropyStore string, from, to uint32) ([]types.Address, error)
- func (m WalletApi) Lock(entropyFile string) error
- func (m WalletApi) NewMnemonicAndEntropyStore(passphrase string) (*NewStoreResponse, error)
- func (m WalletApi) RecoverEntropyFile(mnemonics string, passphrase string) (*CreateEntropyFileResponse, error)
- func (m WalletApi) RecoverEntropyStoreFromMnemonic(mnemonic string, newPassphrase string) (*NewStoreResponse, error)
- func (m WalletApi) RefreshCache()
- func (m WalletApi) SignData(addr types.Address, hexMsg string) (*HexSignedTuple, error)
- func (m WalletApi) SignDataWithPassphrase(addr types.Address, hexMsg string, passphrase string) (*HexSignedTuple, error)
- func (m WalletApi) String() string
- func (m WalletApi) Unlock(entropyFile string, passphrase string) error
Constants ¶
const InvalidSnapshotMinutes = 3
Variables ¶
var ( ErrStrToBigInt = errors.New("convert to big.Int failed") ErrPoWNotSupportedUnderCongestion = errors.New("PoW service not supported") )
var ( // ErrNotSupport = errors.New("not support this method") IllegalNodeTime = errors.New("The node time is inaccurate, quite different from the time of latest snapshot block.") ErrDecryptKey = JsonRpc2Error{ Message: walleterrors.ErrDecryptEntropy.Error(), Code: -34001, } // -35001 ~ -35999 vm execution error ErrBalanceNotEnough = JsonRpc2Error{ Message: util.ErrInsufficientBalance.Error(), Code: -35001, } ErrQuotaNotEnough = JsonRpc2Error{ Message: util.ErrOutOfQuota.Error(), Code: -35002, } ErrVmIdCollision = JsonRpc2Error{ Message: util.ErrIDCollision.Error(), Code: -35003, } ErrVmInvaildBlockData = JsonRpc2Error{ Message: util.ErrInvalidMethodParam.Error(), Code: -35004, } ErrVmCalPoWTwice = JsonRpc2Error{ Message: util.ErrCalcPoWTwice.Error(), Code: -35005, } ErrVmMethodNotFound = JsonRpc2Error{ Message: util.ErrAbiMethodNotFound.Error(), Code: -35006, } ErrVmInvalidResponseLatency = JsonRpc2Error{ Message: util.ErrInvalidResponseLatency.Error(), Code: -35007, } ErrVmContractNotExists = JsonRpc2Error{ Message: util.ErrContractNotExists.Error(), Code: -35008, } ErrVmNoReliableStatus = JsonRpc2Error{ Message: util.ErrNoReliableStatus.Error(), Code: -35009, } ErrVmInvalidQuotaMultiplier = JsonRpc2Error{ Message: util.ErrInvalidQuotaMultiplier.Error(), Code: -35010, } ErrVmPoWNotSupported = JsonRpc2Error{ Message: ErrPoWNotSupportedUnderCongestion.Error(), Code: -35011, } ErrVmQuotaLimitReached = JsonRpc2Error{ Message: util.ErrBlockQuotaLimitReached.Error(), Code: -35012, } ErrVmInvalidRandomDegree = JsonRpc2Error{ Message: util.ErrInvalidRandomDegree.Error(), Code: -35013, } // -36001 ~ -36999 verifier_account ErrVerifyAccountAddr = JsonRpc2Error{ Message: verifier.ErrVerifyAccountNotInvalid.Error(), Code: -36001, } ErrVerifyHash = JsonRpc2Error{ Message: verifier.ErrVerifyHashFailed.Error(), Code: -36002, } ErrVerifySignature = JsonRpc2Error{ Message: verifier.ErrVerifySignatureFailed.Error(), Code: -36003, } ErrVerifyNonce = JsonRpc2Error{ Message: verifier.ErrVerifyNonceFailed.Error(), Code: -36004, } ErrVerifyPrevBlock = JsonRpc2Error{ Message: verifier.ErrVerifyPrevBlockFailed.Error(), Code: -36005, } ErrVerifyRPCBlockIsPending = JsonRpc2Error{ Message: verifier.ErrVerifyRPCBlockPendingState.Error(), Code: -36006, } ErrVerifyDependentSendBlockNotExists = JsonRpc2Error{ Message: verifier.ErrVerifyDependentSendBlockNotExists.Error(), Code: -36007, } ErrVerifyPowQualificationNotEnough = JsonRpc2Error{ Message: verifier.ErrVerifyPowNotEligible.Error(), Code: -36008, } ErrVerifyProducerIllegal = JsonRpc2Error{ Message: verifier.ErrVerifyProducerIllegal.Error(), Code: -36009, } ErrVerifyBlockFieldData = JsonRpc2Error{ Message: verifier.ErrVerifyBlockFieldData.Error(), Code: -36010, } ErrVerifyIsAlreadyReceived = JsonRpc2Error{ Message: verifier.ErrVerifySendIsAlreadyReceived.Error(), Code: -36011, } ErrVerifyVmResultInconsistent = JsonRpc2Error{ Message: verifier.ErrVerifyVmResultInconsistent.Error(), Code: -36012, } // -37001 ~ -37999 contracts_dex ErrComposeOrderIdFail = JsonRpc2Error{ Message: dex.ComposeOrderIdFailErr.Error(), Code: -37001, } ErrDexInvalidOrderType = JsonRpc2Error{ Message: dex.InvalidOrderTypeErr.Error(), Code: -37002, } ErrDexInvalidOrderPrice = JsonRpc2Error{ Message: dex.InvalidOrderPriceErr.Error(), Code: -37003, } ErrDexInvalidOrderQuantity = JsonRpc2Error{ Message: dex.InvalidOrderQuantityErr.Error(), Code: -37004, } ErrDexOrderAmountTooSmall = JsonRpc2Error{ Message: dex.OrderAmountTooSmallErr.Error(), Code: -37005, } ErrDexTradeMarketExists = JsonRpc2Error{ Message: dex.TradeMarketExistsErr.Error(), Code: -37006, } ErrDexTradeMarketNotExists = JsonRpc2Error{ Message: dex.TradeMarketNotExistsErr.Error(), Code: -37007, } ErrDexTradeOrderNotExistsErr = JsonRpc2Error{ Message: dex.OrderNotExistsErr.Error(), Code: -37008, } ErrDexCancelOrderOwnerInvalid = JsonRpc2Error{ Message: dex.CancelOrderOwnerInvalidErr.Error(), Code: -37009, } ErrDexCancelOrderInvalidStatus = JsonRpc2Error{ Message: dex.CancelOrderInvalidStatusErr.Error(), Code: -37010, } ErrDexTradeMarketInvalidQuoteToken = JsonRpc2Error{ Message: dex.TradeMarketInvalidQuoteTokenErr.Error(), Code: -37011, } ErrDexTradeMarketInvalidTokenPair = JsonRpc2Error{ Message: dex.TradeMarketInvalidTokenPairErr.Error(), Code: -37012, } ErrDexFundUserNotExists = JsonRpc2Error{ Message: dex.DexFundUserNotExists.Error(), Code: -37013, } )
var ( NodeStatusActive uint8 = 1 NodeStatusInActive uint8 = 2 )
Functions ¶
func Float64ToString ¶
func InitConfig ¶ added in v1.3.0
func InitGetTestTokenLimitPolicy ¶
func InitGetTestTokenLimitPolicy()
func InitTestAPIParams ¶
func InitTestAPIParams(priv, tti string)
func StakeListToDexRpc ¶
func StakeListToDexRpc(stakeInfos []*dex.DelegateStakeInfo, totalAmount *big.Int, count int, chain chain.Chain) (*apidex.StakeInfoList, error)
func StringToFloat64 ¶
func StringToUint64 ¶ added in v1.3.2
func TryMakeConcernedError ¶
func Uint64ToString ¶
func VIPStakingToRpc ¶
Types ¶
type AccountBalanceInfo ¶
type AccountBalanceInfo struct { TokenInfo *RpcTokenInfo `json:"tokenInfo,omitempty"` Available string `json:"available"` Locked string `json:"locked"` VxLocked string `json:"vxLocked,omitempty"` VxUnlocking string `json:"vxUnlocking,omitempty"` CancellingStake string `json:"cancellingStake,omitempty"` }
type AccountBlock ¶
type AccountBlock struct { BlockType byte `json:"blockType"` Height string `json:"height"` Hash types.Hash `json:"hash"` PrevHash types.Hash `json:"prevHash"` PreviousHash types.Hash `json:"previousHash"` AccountAddress types.Address `json:"accountAddress"` Address types.Address `json:"address"` PublicKey []byte `json:"publicKey"` Producer types.Address `json:"producer"` FromAddress types.Address `json:"fromAddress"` ToAddress types.Address `json:"toAddress"` FromBlockHash types.Hash `json:"fromBlockHash"` SendBlockHash types.Hash `json:"sendBlockHash"` TokenId types.TokenTypeId `json:"tokenId"` Amount *string `json:"amount"` Fee *string `json:"fee"` Data []byte `json:"data"` Difficulty *string `json:"difficulty"` Nonce []byte `json:"nonce"` Signature []byte `json:"signature"` Quota *string `json:"quota"` QuotaByStake *string `json:"quotaByStake"` QuotaUsed *string `json:"quotaUsed"` TotalQuota *string `json:"totalQuota"` UtUsed *string `json:"utUsed"` // TODO: to remove LogHash *types.Hash `json:"logHash"` VmLogHash *types.Hash `json:"vmLogHash"` SendBlockList []*AccountBlock `json:"sendBlockList"` TriggeredSendBlockList []*AccountBlock `json:"triggeredSendBlockList"` // extra info below TokenInfo *RpcTokenInfo `json:"tokenInfo"` ConfirmedTimes *string `json:"confirmedTimes"` Confirmations *string `json:"confirmations"` ConfirmedHash *types.Hash `json:"confirmedHash"` FirstSnapshotHash *types.Hash `json:"firstSnapshotHash"` FirstSnapshotHeight *string `json:"firstSnapshotHeight"` ReceiveBlockHeight *string `json:"receiveBlockHeight"` ReceiveBlockHash *types.Hash `json:"receiveBlockHash"` Timestamp int64 `json:"timestamp"` }
func (*AccountBlock) ComputeHash ¶
func (block *AccountBlock) ComputeHash() (*types.Hash, error)
func (*AccountBlock) RpcToLedgerBlock ¶
func (block *AccountBlock) RpcToLedgerBlock() (*ledger.AccountBlock, error)
type AccountInfo ¶ added in v1.2.0
type AccountInfo struct { Address types.Address `json:"address"` BlockCount string `json:"blockCount"` BalanceInfoMap map[types.TokenTypeId]*BalanceInfo `json:"balanceInfoMap,omitempty"` }
func ToAccountInfo ¶
func ToAccountInfo(chain chain.Chain, info *ledger.AccountInfo) *AccountInfo
type AgentPledgeParam ¶
type AssetApi ¶
type AssetApi struct {
// contains filtered or unexported fields
}
func NewAssetApi ¶
func (*AssetApi) GetChangeTokenTypeData ¶
func (m *AssetApi) GetChangeTokenTypeData(tokenId types.TokenTypeId) ([]byte, error)
Private
func (*AssetApi) GetIssueData ¶
func (m *AssetApi) GetIssueData(param IssueParams) ([]byte, error)
Private
func (*AssetApi) GetMintData ¶
func (m *AssetApi) GetMintData(param MintageParams) ([]byte, error)
Private
func (*AssetApi) GetTokenInfoById
deprecated
func (m *AssetApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)
Deprecated: use contract_getTokenInfoById instead
func (*AssetApi) GetTokenInfoList
deprecated
func (m *AssetApi) GetTokenInfoList(index int, count int) (*TokenInfoList, error)
Deprecated: use contract_getTokenInfoList instead
func (*AssetApi) GetTokenInfoListByOwner
deprecated
func (m *AssetApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)
Deprecated: use contract_getTokenInfoListByOwner
func (*AssetApi) GetTransferOwnerData ¶
func (m *AssetApi) GetTransferOwnerData(param TransferOwnerParams) ([]byte, error)
Private
type BalanceInfo ¶
type BalanceInfo struct { TokenInfo *RpcTokenInfo `json:"tokenInfo,omitempty"` Balance string `json:"balance"` // big int TransactionCount *string `json:"transactionCount,omitempty"` // uint64 }
type CalcPoWDifficultyParam ¶ added in v1.3.0
type CalcPoWDifficultyParam struct { SelfAddr types.Address `json:"selfAddr"` PrevHash types.Hash `json:"prevHash"` BlockType byte `json:"blockType"` ToAddr *types.Address `json:"toAddr"` Data []byte `json:"data"` UseStakeQuota bool `json:"usePledgeQuota"` Multiple uint16 `json:"multipleOnCongestion"` }
type CalcPoWDifficultyResult ¶
type CalcQuotaRequiredParam ¶
type CalcQuotaRequiredResult ¶
type CallContractParam ¶ added in v1.2.0
type CallContractResult ¶ added in v1.2.0
type CallOffChainMethodParam ¶ added in v1.3.0
type CallOffChainMethodParam struct { SelfAddr types.Address `json:"selfAddr"` // Deprecated: use address field instead Addr *types.Address `json:"address"` OffChainCode string `json:"offchainCode"` // Deprecated: use code field instead OffChainCodeBytes []byte `json:"offchainCodeBytes"` // Deprecated: use code field instead Code []byte `json:"code"` Data []byte `json:"data"` Height *uint64 `json:"height"` SnapshotHash *types.Hash `json:"snapshotHash"` }
type CandidateInfo ¶
type ConsensusGroup ¶
type ConsensusGroup struct { Gid types.Gid `json:"gid"` NodeCount uint8 `json:"nodeCount"` Interval int64 `json:"interval"` PerCount int64 `json:"perCount"` RandCount uint8 `json:"randCount"` RandRank uint8 `json:"randRank"` Repeat uint16 `json:"repeat"` CheckLevel uint8 `json:"checkLevel"` CountingTokenId types.TokenTypeId `json:"countingTokenId"` RegisterConditionId uint8 `json:"registerConditionId"` RegisterConditionParam *RegisterConditionParam `json:"registerConditionParam"` VoteConditionId uint8 `json:"voteConditionId"` VoteConditionParam *VoteConditionParam `json:"voerConditionParam"` Owner types.Address `json:"owner"` PledgeAmount string `json:"pledgeAmount"` WithdrawHeight string `json:"withdrawHeight"` }
type ConsensusGroupApi ¶
type ConsensusGroupApi struct {
// contains filtered or unexported fields
}
func NewConsensusGroupApi ¶
func NewConsensusGroupApi(vite *vite.Vite) *ConsensusGroupApi
func (*ConsensusGroupApi) GetConsensusGroupById ¶
func (c *ConsensusGroupApi) GetConsensusGroupById(gid types.Gid) (*ConsensusGroup, error)
func (*ConsensusGroupApi) GetConsensusGroupList ¶
func (c *ConsensusGroupApi) GetConsensusGroupList() ([]*ConsensusGroup, error)
func (ConsensusGroupApi) String ¶
func (c ConsensusGroupApi) String() string
type ConstructorParam ¶ added in v1.2.0
type ContractApi ¶
type ContractApi struct {
// contains filtered or unexported fields
}
func NewContractApi ¶
func NewContractApi(vite *vite.Vite) *ContractApi
func (*ContractApi) CallOffChainMethod ¶ added in v1.3.0
func (c *ContractApi) CallOffChainMethod(param CallOffChainMethodParam) ([]byte, error)
func (*ContractApi) CreateContractAddress ¶
func (*ContractApi) GetCallContractData ¶ added in v1.2.0
func (c *ContractApi) GetCallContractData(abiStr string, methodName string, params []string) ([]byte, error)
Private
func (*ContractApi) GetCallOffChainData ¶ added in v1.3.0
func (c *ContractApi) GetCallOffChainData(abiStr string, offChainName string, params []string) ([]byte, error)
Private
func (*ContractApi) GetContractInfo ¶
func (c *ContractApi) GetContractInfo(addr types.Address) (*ContractInfo, error)
func (*ContractApi) GetContractStorage ¶
func (*ContractApi) GetCreateContractData ¶ added in v1.2.0
func (c *ContractApi) GetCreateContractData(param CreateContractDataParam) ([]byte, error)
Private
func (*ContractApi) GetCreateContractParams ¶
func (c *ContractApi) GetCreateContractParams(abiStr string, params []string) ([]byte, error)
Private
func (*ContractApi) GetCreateContractToAddress
deprecated
func (*ContractApi) GetDelegatedStakeInfo ¶
func (p *ContractApi) GetDelegatedStakeInfo(params StakeQueryParams) (*StakeInfo, error)
func (*ContractApi) GetQuotaByAccount ¶
func (p *ContractApi) GetQuotaByAccount(addr types.Address) (*QuotaInfo, error)
func (*ContractApi) GetRequiredStakeAmount ¶
func (p *ContractApi) GetRequiredStakeAmount(qStr string) (*string, error)
func (*ContractApi) GetSBPList ¶
func (r *ContractApi) GetSBPList(stakeAddress types.Address) ([]*SBPInfo, error)
func (*ContractApi) GetSBPRewardByCycle ¶
func (r *ContractApi) GetSBPRewardByCycle(cycle string) (*SBPRewardInfo, error)
func (*ContractApi) GetSBPRewardByTimestamp ¶
func (r *ContractApi) GetSBPRewardByTimestamp(timestamp int64) (*SBPRewardInfo, error)
func (*ContractApi) GetSBPRewardPendingWithdrawal ¶
func (r *ContractApi) GetSBPRewardPendingWithdrawal(name string) (*SBPReward, error)
func (*ContractApi) GetSBPVoteDetailsByCycle ¶
func (v *ContractApi) GetSBPVoteDetailsByCycle(cycle string) ([]*VoteDetail, error)
func (*ContractApi) GetSBPVoteList ¶
func (r *ContractApi) GetSBPVoteList() ([]*SBPVoteInfo, error)
func (*ContractApi) GetStakeList ¶
func (p *ContractApi) GetStakeList(address types.Address, pageIndex int, pageSize int) (*StakeInfoList, error)
func (*ContractApi) GetStakeListBySearchKey ¶
func (p *ContractApi) GetStakeListBySearchKey(snapshotHash types.Hash, lastKey string, size uint64) (*StakeInfoListBySearchKey, error)
func (*ContractApi) GetTokenInfoById ¶
func (m *ContractApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)
func (*ContractApi) GetTokenInfoList ¶
func (m *ContractApi) GetTokenInfoList(pageIndex int, pageSize int) (*TokenInfoList, error)
func (*ContractApi) GetTokenInfoListByOwner ¶
func (m *ContractApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)
func (*ContractApi) GetVotedSBP ¶
func (v *ContractApi) GetVotedSBP(addr types.Address) (*VotedSBPInfo, error)
func (ContractApi) String ¶
func (c ContractApi) String() string
type ContractInfo ¶
type ContractInfo struct { Code []byte `json:"code"` Gid types.Gid `json:"gid"` ConfirmTime uint8 `json:"confirmTime"` // Deprecated: use responseLatency instead ResponseLatency uint8 `json:"responseLatency"` SeedCount uint8 `json:"seedCount"` // Deprecated: use randomness instead RandomDegree uint8 `json:"randomDegree"` QuotaRatio uint8 `json:"quotaRatio"` // Deprecated: use quotaMultiplier instead QuotaMultiplier uint8 `json:"quotaMultiplier"` }
type CreateContractDataParam ¶
type CreateContractParam ¶ added in v1.2.0
type CreateContractParam struct { FileName string `json:"fileName"` Params map[string]ConstructorParam `json:"params"` AccountAddr *types.Address `json:"accountAddr"` }
type CreateContractResult ¶ added in v1.2.0
type CreateReceiveTxParms ¶
type CreateTransactionParms ¶
type CreateTransactionParms struct { EntropyFile *string `json:"entropyFile,omitempty"` Address types.Address `json:"address"` ToAddress types.Address `json:"toAddress"` TokenId types.TokenTypeId `json:"tokenId"` Passphrase string `json:"passphrase"` Amount string `json:"amount"` Data []byte `json:"data,omitempty"` Difficulty *string `json:"difficulty,omitempty"` }
type CreateTransferTxParms ¶
type CreateTransferTxParms struct { EntropystoreFile *string `json:"entropystoreFile,omitempty"` SelfAddr types.Address `json:"selfAddr"` ToAddr types.Address `json:"toAddr"` TokenTypeId types.TokenTypeId `json:"tokenTypeId"` Passphrase string `json:"passphrase"` Amount string `json:"amount"` Data []byte `json:"data,omitempty"` Difficulty *string `json:"difficulty,omitempty"` }
type DashboardApi ¶
type DashboardApi struct {
// contains filtered or unexported fields
}
func NewDashboardApi ¶
func NewDashboardApi(v *vite.Vite) *DashboardApi
func (DashboardApi) NetId ¶ added in v1.3.0
func (api DashboardApi) NetId() uint
func (DashboardApi) OsInfo ¶
func (api DashboardApi) OsInfo(id *string) map[string]interface{}
func (DashboardApi) ProcessInfo ¶
func (api DashboardApi) ProcessInfo(id *string) map[string]interface{}
func (DashboardApi) RuntimeInfo ¶
func (api DashboardApi) RuntimeInfo(id *string) map[string]interface{}
type DataApi ¶
type DataApi struct {
// contains filtered or unexported fields
}
func NewDataApi ¶
func (DataApi) GetDexPledgeListByPage ¶
func (DataApi) GetDexUserFundsByPage ¶
func (*DataApi) GetPledgeListByPage ¶
type DebugApi ¶
type DebugApi struct {
// contains filtered or unexported fields
}
func NewDebugApi ¶
func (DebugApi) ClearOnRoadUnconfirmedCache ¶
func (DebugApi) ConsensusBlockRate ¶
func (DebugApi) ConsensusProducers ¶
func (DebugApi) GetForkInfo ¶ added in v1.2.0
func (api DebugApi) GetForkInfo() config.ForkPoints
func (DebugApi) GetOnRoadInfoUnconfirmed ¶
func (DebugApi) GetRecentActiveFork ¶
func (api DebugApi) GetRecentActiveFork() *fork.ForkPointItem
func (DebugApi) MachineInfo ¶
func (DebugApi) PoolAccount ¶
func (DebugApi) PoolAccountBlockDetail ¶ added in v1.3.2
func (DebugApi) PoolAccountChainDetail ¶
func (DebugApi) PoolIrreversible ¶
func (DebugApi) PoolSnapshot ¶
func (DebugApi) PoolSnapshotBlockDetail ¶ added in v1.3.2
func (DebugApi) PoolSnapshotChainDetail ¶
func (DebugApi) SetGetTestTokenLimitSize ¶
func (DebugApi) UpdateOnRoadInfo ¶
type DeriveResult ¶
type DexApi ¶
type DexApi struct {
// contains filtered or unexported fields
}
func (DexApi) GetAccountBalanceInfo ¶
func (f DexApi) GetAccountBalanceInfo(addr types.Address, tokenId *types.TokenTypeId) (map[types.TokenTypeId]*AccountBalanceInfo, error)
func (DexApi) GetCancelStakeList ¶
func (DexApi) GetCurrentFeesValidForMining ¶
func (DexApi) GetCurrentMiningInfo ¶
func (f DexApi) GetCurrentMiningInfo() (mineInfo *apidex.NewRpcVxMineInfo, err error)
func (DexApi) GetCurrentStakingValidForMining ¶
func (DexApi) GetDividendPoolsInfo ¶
func (f DexApi) GetDividendPoolsInfo() (map[types.TokenTypeId]*apidex.DividendPoolInfo, error)
func (DexApi) GetInviteCodeBinding ¶
func (DexApi) GetMarketInfo ¶
func (f DexApi) GetMarketInfo(tradeToken, quoteToken types.TokenTypeId) (*apidex.NewRpcMarketInfo, error)
func (DexApi) GetMiningStakeInfoList ¶
func (DexApi) GetOrderById ¶
func (DexApi) GetOrderByTransactionHash ¶
func (DexApi) GetOrdersForMarket ¶
func (DexApi) GetPlaceOrderInfo ¶
func (f DexApi) GetPlaceOrderInfo(address types.Address, tradeToken, quoteToken types.TokenTypeId, side bool) (*apidex.PlaceOrderInfo, error)
func (DexApi) GetStakedForVIP ¶
func (DexApi) GetTokenInfo ¶
func (f DexApi) GetTokenInfo(token types.TokenTypeId) (*apidex.RpcDexTokenInfo, error)
func (DexApi) GetVIPStakeInfoList ¶
func (DexApi) GetVxUnlockList ¶
func (DexApi) HasStakedForSVIP ¶
func (DexApi) HasStakedForVIP ¶
func (DexApi) IsAutoLockMinedVx ¶
func (DexApi) IsDexStopped ¶
func (DexApi) IsMarketDelegatedTo ¶
type DexFundApi ¶
type DexFundApi struct {
// contains filtered or unexported fields
}
func NewDexFundApi ¶
func NewDexFundApi(vite *vite.Vite) *DexFundApi
func (DexFundApi) GetAccountFundInfo ¶
func (f DexFundApi) GetAccountFundInfo(addr types.Address, tokenId *types.TokenTypeId) (map[types.TokenTypeId]*AccountBalanceInfo, error)
func (DexFundApi) GetCurrentDividendPools ¶
func (f DexFundApi) GetCurrentDividendPools() (map[types.TokenTypeId]*apidex.DividendPoolInfo, error)
func (DexFundApi) GetCurrentFeesForMine ¶
func (f DexFundApi) GetCurrentFeesForMine() (fees map[int32]string, err error)
func (DexFundApi) GetCurrentPledgeForVxSum ¶
func (f DexFundApi) GetCurrentPledgeForVxSum() (string, error)
func (DexFundApi) GetCurrentVxMineInfo ¶
func (f DexFundApi) GetCurrentVxMineInfo() (mineInfo *apidex.RpcVxMineInfo, err error)
func (DexFundApi) GetInviteeCode ¶
func (f DexFundApi) GetInviteeCode(address types.Address) (uint32, error)
func (DexFundApi) GetInviterCode ¶
func (f DexFundApi) GetInviterCode(address types.Address) (uint32, error)
func (DexFundApi) GetMarketInfo ¶
func (f DexFundApi) GetMarketInfo(tradeToken, quoteToken types.TokenTypeId) (*apidex.RpcMarketInfo, error)
func (DexFundApi) GetTokenInfo ¶
func (f DexFundApi) GetTokenInfo(token types.TokenTypeId) (*apidex.RpcDexTokenInfo, error)
func (DexFundApi) IsMarketGrantedToAgent ¶
func (f DexFundApi) IsMarketGrantedToAgent(principal, agent types.Address, tradeToken, quoteToken types.TokenTypeId) (bool, error)
func (DexFundApi) IsPledgeSuperVip ¶
func (f DexFundApi) IsPledgeSuperVip(address types.Address) (bool, error)
func (DexFundApi) IsPledgeVip ¶
func (f DexFundApi) IsPledgeVip(address types.Address) (bool, error)
func (DexFundApi) IsViteXStopped ¶
func (f DexFundApi) IsViteXStopped() (bool, error)
func (DexFundApi) String ¶
func (f DexFundApi) String() string
type DexPrivateApi ¶
type DexPrivateApi struct {
// contains filtered or unexported fields
}
func NewDexPrivateApi ¶
func NewDexPrivateApi(vite *vite.Vite) *DexPrivateApi
func (DexPrivateApi) GetAllFeesOfAddress ¶
func (f DexPrivateApi) GetAllFeesOfAddress(address types.Address) (*apidex.RpcUserFees, error)
func (DexPrivateApi) GetAllMiningStakingInfo ¶
func (f DexPrivateApi) GetAllMiningStakingInfo() (*apidex.RpcMiningStakings, error)
func (DexPrivateApi) GetAllMiningStakingInfoByAddress ¶
func (f DexPrivateApi) GetAllMiningStakingInfoByAddress(address types.Address) (*apidex.RpcMiningStakings, error)
func (DexPrivateApi) GetAllTotalVxBalance ¶
func (f DexPrivateApi) GetAllTotalVxBalance() (*apidex.RpcVxFunds, error)
func (DexPrivateApi) GetAllVxBalanceByAddress ¶
func (f DexPrivateApi) GetAllVxBalanceByAddress(address types.Address) (*apidex.RpcVxFunds, error)
func (DexPrivateApi) GetCurrentDexFees ¶
func (f DexPrivateApi) GetCurrentDexFees() (*apidex.RpcDexFeesByPeriod, error)
func (DexPrivateApi) GetCurrentMiningStakingAmountByAddress ¶
func (DexPrivateApi) GetCurrentOperatorFees ¶
func (f DexPrivateApi) GetCurrentOperatorFees(operator types.Address) (*apidex.RpcOperatorFeesByPeriod, error)
func (DexPrivateApi) GetDelegateStakeInfoById ¶
func (f DexPrivateApi) GetDelegateStakeInfoById(id types.Hash) (*apidex.DelegateStakeInfo, error)
func (DexPrivateApi) GetDexConfig ¶
func (f DexPrivateApi) GetDexConfig() (map[string]string, error)
func (DexPrivateApi) GetDexFeesByPeriod ¶
func (f DexPrivateApi) GetDexFeesByPeriod(periodId uint64) (*apidex.RpcDexFeesByPeriod, error)
func (DexPrivateApi) GetFirstMiningPeriodId ¶
func (f DexPrivateApi) GetFirstMiningPeriodId() (uint64, error)
func (DexPrivateApi) GetLastPeriodIdByJobType ¶
func (f DexPrivateApi) GetLastPeriodIdByJobType(bizType uint8) (uint64, error)
func (DexPrivateApi) GetLastSettledMakerMiningInfo ¶
func (f DexPrivateApi) GetLastSettledMakerMiningInfo() (map[string]uint64, error)
func (DexPrivateApi) GetMakerMiningPool ¶
func (f DexPrivateApi) GetMakerMiningPool(periodId uint64) (string, error)
func (DexPrivateApi) GetMarketInfoById ¶
func (f DexPrivateApi) GetMarketInfoById(marketId int32) (ordersRes *apidex.RpcMarketInfo, err error)
func (DexPrivateApi) GetMinThresholdForTradeAndMining ¶
func (f DexPrivateApi) GetMinThresholdForTradeAndMining() (map[int]*apidex.RpcThresholdForTradeAndMine, error)
func (DexPrivateApi) GetOperatorFeesByPeriod ¶
func (f DexPrivateApi) GetOperatorFeesByPeriod(periodId uint64, operator types.Address) (*apidex.RpcOperatorFeesByPeriod, error)
func (DexPrivateApi) GetPeriodId ¶
func (f DexPrivateApi) GetPeriodId() (uint64, error)
func (DexPrivateApi) GetTime ¶
func (f DexPrivateApi) GetTime() (int64, error)
func (DexPrivateApi) GetTradeTimestamp ¶
func (f DexPrivateApi) GetTradeTimestamp() (timestamp int64, err error)
func (DexPrivateApi) GetVIPStakingInfoByAddress ¶
func (f DexPrivateApi) GetVIPStakingInfoByAddress(address types.Address) (*dex.VIPStaking, error)
func (DexPrivateApi) GetVxBurnBalance ¶
func (f DexPrivateApi) GetVxBurnBalance() (string, error)
func (DexPrivateApi) GetVxPoolBalance ¶
func (f DexPrivateApi) GetVxPoolBalance() (string, error)
func (DexPrivateApi) IsNormalMiningStarted ¶
func (f DexPrivateApi) IsNormalMiningStarted() (bool, error)
func (DexPrivateApi) String ¶
func (f DexPrivateApi) String() string
func (DexPrivateApi) VerifyDexBalance ¶
func (f DexPrivateApi) VerifyDexBalance() (*dex.FundVerifyRes, error)
type DexTradeApi ¶
type DexTradeApi struct {
// contains filtered or unexported fields
}
func NewDexTradeApi ¶
func NewDexTradeApi(vite *vite.Vite) *DexTradeApi
func (DexTradeApi) GetMarketInfoById ¶
func (f DexTradeApi) GetMarketInfoById(marketId int32) (ordersRes *apidex.RpcMarketInfo, err error)
func (DexTradeApi) GetOrderById ¶
func (f DexTradeApi) GetOrderById(orderIdStr string) (*apidex.RpcOrder, error)
func (DexTradeApi) GetOrderBySendHash ¶
func (DexTradeApi) GetOrdersFromMarket ¶
func (f DexTradeApi) GetOrdersFromMarket(tradeToken, quoteToken types.TokenTypeId, side bool, begin, end int) (ordersRes *apidex.OrdersRes, err error)
func (DexTradeApi) GetTimestamp ¶
func (f DexTradeApi) GetTimestamp() (timestamp int64, err error)
func (DexTradeApi) String ¶
func (f DexTradeApi) String() string
type FilterParam ¶
type FilterParam struct { AddrRange map[types.Address]HeightRange Topics [][]types.Hash }
func ToFilterParam ¶
type FindAddrResponse ¶
type FindAddrResult ¶
type GetBalancesRes ¶
type GetPoWDifficultyParam ¶
type GetPoWDifficultyResult ¶
type GetQuotaRequiredParam ¶
type GetQuotaRequiredResult ¶
type GetQuotaRequiredResult struct {
QuotaRequired string `json:"requiredQuota"`
}
type HeightRange ¶
type HexSignedTuple ¶
type IssueParams ¶ added in v1.3.0
type IssueParams struct { TokenId types.TokenTypeId Amount string Beneficial types.Address }
type JsonRpc2Error ¶
func (JsonRpc2Error) Error ¶
func (e JsonRpc2Error) Error() string
func (JsonRpc2Error) ErrorCode ¶
func (e JsonRpc2Error) ErrorCode() int
type LedgerApi ¶
type LedgerApi struct {
// contains filtered or unexported fields
}
func NewLedgerApi ¶
func (*LedgerApi) GetAccountBlockByHash ¶
func (l *LedgerApi) GetAccountBlockByHash(blockHash types.Hash) (*AccountBlock, error)
new api
func (*LedgerApi) GetAccountBlockByHeight ¶
func (l *LedgerApi) GetAccountBlockByHeight(addr types.Address, height interface{}) (*AccountBlock, error)
new api
func (*LedgerApi) GetAccountBlocks ¶
func (l *LedgerApi) GetAccountBlocks(addr types.Address, originBlockHash *types.Hash, tokenTypeId *types.TokenTypeId, count uint64) ([]*AccountBlock, error)
new api
func (*LedgerApi) GetAccountBlocksByAddress ¶
func (l *LedgerApi) GetAccountBlocksByAddress(addr types.Address, index int, count int) ([]*AccountBlock, error)
new api
func (*LedgerApi) GetAccountByAccAddr ¶
func (l *LedgerApi) GetAccountByAccAddr(addr types.Address) (*RpcAccountInfo, error)
old api
func (*LedgerApi) GetAccountInfoByAddress ¶
func (l *LedgerApi) GetAccountInfoByAddress(addr types.Address) (*AccountInfo, error)
new api
func (*LedgerApi) GetAllUnconfirmedBlocks ¶
func (l *LedgerApi) GetAllUnconfirmedBlocks() []*ledger.AccountBlock
func (*LedgerApi) GetBlockByHash ¶
func (l *LedgerApi) GetBlockByHash(blockHash types.Hash) (*AccountBlock, error)
old api
func (*LedgerApi) GetBlockByHeight ¶ added in v1.1.2
func (l *LedgerApi) GetBlockByHeight(addr types.Address, height interface{}) (*AccountBlock, error)
old api
func (*LedgerApi) GetBlocksByAccAddr ¶
func (l *LedgerApi) GetBlocksByAccAddr(addr types.Address, index int, count int) ([]*AccountBlock, error)
old api
func (*LedgerApi) GetBlocksByHash ¶
func (l *LedgerApi) GetBlocksByHash(addr types.Address, originBlockHash *types.Hash, count uint64) ([]*AccountBlock, error)
old api
func (*LedgerApi) GetBlocksByHashInToken ¶ added in v1.2.0
func (l *LedgerApi) GetBlocksByHashInToken(addr types.Address, originBlockHash *types.Hash, tokenTypeId types.TokenTypeId, count uint64) ([]*AccountBlock, error)
in token
func (*LedgerApi) GetBlocksByHeight ¶ added in v1.1.2
func (*LedgerApi) GetChainStatus ¶
func (l *LedgerApi) GetChainStatus() []interfaces.DBStatus
func (*LedgerApi) GetChunks ¶
func (l *LedgerApi) GetChunks(startHeight interface{}, endHeight interface{}) ([]*SnapshotChunk, error)
func (*LedgerApi) GetCompleteBlockByHash ¶
func (l *LedgerApi) GetCompleteBlockByHash(blockHash types.Hash) (*AccountBlock, error)
func (*LedgerApi) GetConfirmedBalances ¶
func (l *LedgerApi) GetConfirmedBalances(snapshotHash types.Hash, addrList []types.Address, tokenIds []types.TokenTypeId) (GetBalancesRes, error)
func (*LedgerApi) GetLatestAccountBlock ¶
func (l *LedgerApi) GetLatestAccountBlock(addr types.Address) (*AccountBlock, error)
new api
func (*LedgerApi) GetLatestBlock ¶
func (l *LedgerApi) GetLatestBlock(addr types.Address) (*AccountBlock, error)
old api
func (*LedgerApi) GetLatestSnapshotBlock ¶
func (l *LedgerApi) GetLatestSnapshotBlock() (*SnapshotBlock, error)
func (*LedgerApi) GetLatestSnapshotChainHash ¶
old api
func (*LedgerApi) GetLatestSnapshotHash ¶
new api
func (LedgerApi) GetPoWDifficulty ¶
func (t LedgerApi) GetPoWDifficulty(param GetPoWDifficultyParam) (*GetPoWDifficultyResult, error)
func (*LedgerApi) GetRawBlockByHash ¶
func (LedgerApi) GetRequiredQuota ¶
func (t LedgerApi) GetRequiredQuota(param GetQuotaRequiredParam) (*GetQuotaRequiredResult, error)
func (*LedgerApi) GetSnapshotBlockBeforeTime ¶
func (l *LedgerApi) GetSnapshotBlockBeforeTime(timestamp int64) (*SnapshotBlock, error)
func (*LedgerApi) GetSnapshotBlockByHash ¶
func (l *LedgerApi) GetSnapshotBlockByHash(hash types.Hash) (*SnapshotBlock, error)
func (*LedgerApi) GetSnapshotBlockByHeight ¶
func (l *LedgerApi) GetSnapshotBlockByHeight(height interface{}) (*SnapshotBlock, error)
func (*LedgerApi) GetSnapshotBlocks ¶
func (l *LedgerApi) GetSnapshotBlocks(height interface{}, count int) ([]*SnapshotBlock, error)
func (*LedgerApi) GetSnapshotChainHeight ¶
func (*LedgerApi) GetUnconfirmedBlocks ¶
func (l *LedgerApi) GetUnconfirmedBlocks(addr types.Address) []*ledger.AccountBlock
func (*LedgerApi) GetUnreceivedBlocksByAddress ¶
func (l *LedgerApi) GetUnreceivedBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
new api: ledger_getUnreceivedBlocksByAddress <- onroad_getOnroadBlocksByAddress
func (*LedgerApi) GetUnreceivedBlocksInBatch ¶
func (l *LedgerApi) GetUnreceivedBlocksInBatch(queryList []PagingQueryBatch) (map[types.Address][]*AccountBlock, error)
new api: ledger_getUnreceivedBlocksInBatch <- onroad_getOnroadBlocksInBatch
func (*LedgerApi) GetUnreceivedTransactionSummaryByAddress ¶
func (l *LedgerApi) GetUnreceivedTransactionSummaryByAddress(address types.Address) (*AccountInfo, error)
new api: ledger_getUnreceivedTransactionSummaryByAddress <- onroad_getOnroadInfoByAddress
func (*LedgerApi) GetUnreceivedTransactionSummaryInBatch ¶
func (l *LedgerApi) GetUnreceivedTransactionSummaryInBatch(addressList []types.Address) ([]*AccountInfo, error)
new api: ledger_getUnreceivedTransactionSummaryInBatch <- onroad_getOnroadInfoInBatch
func (*LedgerApi) GetVmLogList ¶
old api
func (*LedgerApi) GetVmLogListByHash ¶ added in v1.1.2
func (*LedgerApi) GetVmLogsByFilter ¶
func (l *LedgerApi) GetVmLogsByFilter(param VmLogFilterParam) ([]*Logs, error)
func (*LedgerApi) SendRawTransaction ¶
func (l *LedgerApi) SendRawTransaction(block *AccountBlock) error
new api
type LedgerDebugApi ¶
type LedgerDebugApi struct {
// contains filtered or unexported fields
}
func NewLedgerDebugApi ¶
func NewLedgerDebugApi(vite *vite.Vite) *LedgerDebugApi
func (LedgerDebugApi) String ¶
func (ld LedgerDebugApi) String() string
type Logs ¶
type MintageParams ¶
type NetApi ¶
type NetApi struct {
// contains filtered or unexported fields
}
func (*NetApi) SyncDetail ¶ added in v1.3.0
func (n *NetApi) SyncDetail() net.SyncDetail
type NewStoreResponse ¶
type NormalRequestRawTxParam ¶
type NormalRequestRawTxParam struct { BlockType byte `json:"blockType"` // 1 Height string `json:"height"` Hash types.Hash `json:"hash"` PrevHash types.Hash `json:"prevHash"` PreviousHash types.Hash `json:"previousHash"` AccountAddress types.Address `json:"accountAddress"` Address types.Address `json:"address"` PublicKey []byte `json:"publicKey"` ToAddress types.Address `json:"toAddress"` TokenId types.TokenTypeId `json:"tokenId"` Amount string `json:"amount"` Data []byte `json:"data"` Difficulty *string `json:"difficulty"` Nonce []byte `json:"nonce"` Signature []byte `json:"signature"` }
func (NormalRequestRawTxParam) LedgerAccountBlock ¶
func (param NormalRequestRawTxParam) LedgerAccountBlock() (*ledger.AccountBlock, error)
type OnroadPagingQuery ¶
type PagingQueryBatch ¶
type PeriodStats ¶
type PeriodStats struct { *core.PeriodStats // contains filtered or unexported fields }
type PledgeInfo ¶
type PledgeInfo struct { Amount string `json:"amount"` BeneficialAddr types.Address `json:"beneficialAddr"` WithdrawHeight string `json:"withdrawHeight"` WithdrawTime int64 `json:"withdrawTime"` Agent bool `json:"agent"` AgentAddress types.Address `json:"agentAddress"` Bid uint8 `json:"bid"` Id *types.Hash `json:"id"` }
func NewPledgeInfo ¶
func NewPledgeInfo(info *types.StakeInfo, snapshotBlock *ledger.SnapshotBlock) *PledgeInfo
type PledgeInfoList ¶
type PledgeInfoList struct { TotalPledgeAmount string `json:"totalPledgeAmount"` Count int `json:"totalCount"` List []*PledgeInfo `json:"pledgeInfoList"` }
type PledgeQueryParams ¶
type PrivateOnroadApi ¶
type PrivateOnroadApi struct {
// contains filtered or unexported fields
}
func NewPrivateOnroadApi ¶
func NewPrivateOnroadApi(vite *vite.Vite) *PrivateOnroadApi
func (PrivateOnroadApi) GetOnroadBlocksByAddress
deprecated
func (pri PrivateOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
Deprecated: to use ledger_getUnreceivedBlocksByAddress instead
func (PrivateOnroadApi) GetOnroadBlocksInBatch
deprecated
func (pri PrivateOnroadApi) GetOnroadBlocksInBatch(queryList []OnroadPagingQuery) (map[types.Address][]*AccountBlock, error)
Deprecated: to use unreceived_getUnreceivedBlocksInBatch instead
func (PrivateOnroadApi) GetOnroadInfoByAddress
deprecated
func (pri PrivateOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)
Deprecated: to use ledger_getUnreceivedTransactionSummaryByAddress instead
func (PrivateOnroadApi) GetOnroadInfoInBatch
deprecated
func (pri PrivateOnroadApi) GetOnroadInfoInBatch(addrList []types.Address) ([]*RpcAccountInfo, error)
Deprecated: to use unreceived_getUnreceivedTransactionSummaryInBatch instead
func (PrivateOnroadApi) String ¶
func (pri PrivateOnroadApi) String() string
type PublicOnroadApi ¶
type PublicOnroadApi struct {
// contains filtered or unexported fields
}
func NewPublicOnroadApi ¶
func NewPublicOnroadApi(vite *vite.Vite) *PublicOnroadApi
func (PublicOnroadApi) GetOnroadBlocksByAddress
deprecated
func (pub PublicOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
Deprecated: to use ledger_getUnreceivedBlocksByAddress instead
func (PublicOnroadApi) GetOnroadInfoByAddress
deprecated
func (pub PublicOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)
Deprecated: to use ledger_getUnreceivedTransactionSummaryByAddress instead
func (PublicOnroadApi) String ¶
func (pub PublicOnroadApi) String() string
type QuotaAndTxNum ¶
type QuotaAndTxNum struct { QuotaPerSnapshotBlock string `json:"quotaPerSnapshotBlock"` // Deprecated CurrentQuota string `json:"current"` // Deprecated CurrentTxNumPerSec string `json:"utps"` // Deprecated: use currentUt field instead CurrentUt string `json:"currentUt"` Utpe string `json:"utpe"` PledgeAmount string `json:"pledgeAmount"` }
type QuotaApi ¶
type QuotaApi struct {
// contains filtered or unexported fields
}
func NewQuotaApi ¶
func (*QuotaApi) GetAgentCancelPledgeData ¶
func (p *QuotaApi) GetAgentCancelPledgeData(param AgentPledgeParam) ([]byte, error)
Private
func (*QuotaApi) GetAgentPledgeData ¶
func (p *QuotaApi) GetAgentPledgeData(param AgentPledgeParam) ([]byte, error)
Private
func (*QuotaApi) GetAgentPledgeInfo ¶
func (p *QuotaApi) GetAgentPledgeInfo(params PledgeQueryParams) (*PledgeInfo, error)
Deprecated
func (*QuotaApi) GetCancelPledgeData ¶
Private
func (*QuotaApi) GetPledgeAmountByUtps
deprecated
func (*QuotaApi) GetPledgeData ¶
Private
func (*QuotaApi) GetPledgeList
deprecated
func (*QuotaApi) GetPledgeQuota
deprecated
func (p *QuotaApi) GetPledgeQuota(addr types.Address) (*QuotaAndTxNum, error)
Deprecated: use contract_getQuotaByAccount instead
func (*QuotaApi) GetQuotaCoefficient ¶
func (p *QuotaApi) GetQuotaCoefficient() (*QuotaCoefficientInfo, error)
Private
func (*QuotaApi) GetQuotaUsedList ¶
Private
type QuotaCoefficientInfo ¶
type Range ¶
func (*Range) ToHeightRange ¶
func (r *Range) ToHeightRange() (*HeightRange, error)
type RegistParam ¶
type RegisterApi ¶
type RegisterApi struct {
// contains filtered or unexported fields
}
func NewRegisterApi ¶
func NewRegisterApi(vite *vite.Vite) *RegisterApi
func (*RegisterApi) GetAvailableReward
deprecated
func (*RegisterApi) GetCancelRegisterData ¶
Private
func (*RegisterApi) GetCandidateList
deprecated
func (r *RegisterApi) GetCandidateList() ([]*CandidateInfo, error)
Deprecated: usecontract_getSBPVoteList instead
func (*RegisterApi) GetRegisterData ¶
func (r *RegisterApi) GetRegisterData(gid types.Gid, name string, nodeAddr types.Address) ([]byte, error)
Private
func (*RegisterApi) GetRegisterPledgeAddrList ¶
func (r *RegisterApi) GetRegisterPledgeAddrList(paramList []*RegistParam) ([]*types.Address, error)
Deprecated
func (*RegisterApi) GetRegistration
deprecated
func (r *RegisterApi) GetRegistration(name string, gid types.Gid) (*types.Registration, error)
Deprecated: use contract_getSBP instead
func (*RegisterApi) GetRegistrationList
deprecated
func (r *RegisterApi) GetRegistrationList(gid types.Gid, pledgeAddr types.Address) ([]*RegistrationInfo, error)
Deprecated: use contract_getSBPList
func (*RegisterApi) GetRewardByDay
deprecated
func (*RegisterApi) GetRewardByIndex
deprecated
func (r *RegisterApi) GetRewardByIndex(gid types.Gid, indexStr string) (*RewardInfo, error)
Deprecated: use contract_getSBPRewardByCycle instead
func (*RegisterApi) GetRewardData ¶
func (r *RegisterApi) GetRewardData(gid types.Gid, name string, beneficialAddr types.Address) ([]byte, error)
Private
func (*RegisterApi) GetUpdateRegistrationData ¶
func (r *RegisterApi) GetUpdateRegistrationData(gid types.Gid, name string, nodeAddr types.Address) ([]byte, error)
Private
func (RegisterApi) String ¶
func (r RegisterApi) String() string
type RegisterConditionParam ¶
type RegisterConditionParam struct { PledgeAmount string `json:"pledgeAmount"` PledgeToken types.TokenTypeId `json:"pledgeToken"` PledgeHeight string `json:"pledgeHeight"` }
type RegistrationInfo ¶
type RegistrationInfo struct { Name string `json:"name"` NodeAddr types.Address `json:"nodeAddr"` PledgeAddr types.Address `json:"pledgeAddr"` RewardWithdrawAddress types.Address `json:"rewardWithdrawAddress"` PledgeAmount string `json:"pledgeAmount"` WithdrawHeight string `json:"withdrawHeight"` WithdrawTime int64 `json:"withdrawTime"` CancelTime int64 `json:"cancelTime"` }
type Reward ¶
type RewardInfo ¶
type RpcAccountInfo ¶
type RpcAccountInfo struct { AccountAddress types.Address `json:"accountAddress"` TotalNumber string `json:"totalNumber"` // uint64 TokenBalanceInfoMap map[types.TokenTypeId]*RpcTokenBalanceInfo `json:"tokenBalanceInfoMap,omitempty"` }
func ToRpcAccountInfo ¶
func ToRpcAccountInfo(chain chain.Chain, info *ledger.AccountInfo) *RpcAccountInfo
type RpcTokenBalanceInfo ¶
type RpcTokenBalanceInfo struct { TokenInfo *RpcTokenInfo `json:"tokenInfo,omitempty"` TotalAmount string `json:"totalAmount"` Number *string `json:"number,omitempty"` }
type RpcTokenInfo ¶
type RpcTokenInfo struct { TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TotalSupply *string `json:"totalSupply,omitempty"` // *big.Int Decimals uint8 `json:"decimals"` Owner types.Address `json:"owner"` TokenId types.TokenTypeId `json:"tokenId"` MaxSupply *string `json:"maxSupply"` // *big.Int OwnerBurnOnly bool `json:"ownerBurnOnly"` // Deprecated: use IsOwnerBurnOnly instead IsReIssuable bool `json:"isReIssuable"` Index uint16 `json:"index"` // mainnet new IsOwnerBurnOnly bool `json:"isOwnerBurnOnly"` }
func RawTokenInfoToRpc ¶
func RawTokenInfoToRpc(tinfo *types.TokenInfo, tti types.TokenTypeId) *RpcTokenInfo
type SBPInfo ¶
type SBPInfo struct { Name string `json:"name"` BlockProducingAddress types.Address `json:"blockProducingAddress"` RewardWithdrawAddress types.Address `json:"rewardWithdrawAddress"` StakeAddr types.Address `json:"stakeAddress"` StakeAmount string `json:"stakeAmount"` ExpirationHeight string `json:"expirationHeight"` ExpirationTime int64 `json:"expirationTime"` RevokeTime int64 `json:"revokeTime"` }
type SBPReward ¶
type SBPReward struct { BlockReward string `json:"blockProducingReward"` VoteReward string `json:"votingReward"` TotalReward string `json:"totalReward"` BlockNum string `json:"producedBlocks"` ExpectedBlockNum string `json:"targetBlocks"` Drained bool `json:"allRewardWithdrawed"` }
func ToSBPReward ¶
type SBPRewardInfo ¶
type SBPVoteInfo ¶
type SendTxWithPrivateKeyParam ¶
type SendTxWithPrivateKeyParam struct { SelfAddr *types.Address `json:"selfAddr"` ToAddr *types.Address `json:"toAddr"` TokenTypeId types.TokenTypeId `json:"tokenTypeId"` PrivateKey *string `json:"privateKey"` //hex16 Amount *string `json:"amount"` Data []byte `json:"data"` //base64 Difficulty *string `json:"difficulty,omitempty"` PreBlockHash *types.Hash `json:"preBlockHash,omitempty"` BlockType byte `json:"blockType"` }
type SnapshotBlock ¶
type SnapshotChunk ¶
type SnapshotChunk struct { AccountBlocks []*ledger.AccountBlock SnapshotBlock *SnapshotBlock }
type StakeInfo ¶
type StakeInfo struct { Amount string `json:"stakeAmount"` Beneficiary types.Address `json:"beneficiary"` ExpirationHeight string `json:"expirationHeight"` ExpirationTime int64 `json:"expirationTime"` IsDelegated bool `json:"isDelegated"` DelegateAddress types.Address `json:"delegateAddress"` StakeAddress types.Address `json:"stakeAddress"` Bid uint8 `json:"bid"` Id *types.Hash `json:"id"` }
func NewStakeInfo ¶
type StakeInfoList ¶
type StakeQueryParams ¶
type StatsApi ¶
type StatsApi struct {
// contains filtered or unexported fields
}
func NewStatsApi ¶
func (StatsApi) GetDaySBPStats ¶
func (StatsApi) GetHourSBPStats ¶
func (StatsApi) GetPeriodSBPStats ¶
func (c StatsApi) GetPeriodSBPStats(startIdx uint64, endIdx uint64) ([]*PeriodStats, error)
type TestApi ¶
type TestApi struct {
// contains filtered or unexported fields
}
func NewTestApi ¶
func (TestApi) CreateTxWithPrivKey ¶
func (t TestApi) CreateTxWithPrivKey(params CreateTxWithPrivKeyParmsTest) error
func (TestApi) GetTestToken ¶
func (TestApi) ReceiveOnroadTx ¶
func (t TestApi) ReceiveOnroadTx(params CreateReceiveTxParms) error
type TokenInfoList ¶ added in v1.3.0
type TokenInfoList struct { Count int `json:"totalCount"` List []*RpcTokenInfo `json:"tokenInfoList"` }
type TransferOwnerParams ¶ added in v1.3.0
type TransferOwnerParams struct { TokenId types.TokenTypeId NewOwner types.Address }
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (Tx) CalcPoWDifficulty
deprecated
added in
v1.3.0
func (t Tx) CalcPoWDifficulty(param CalcPoWDifficultyParam) (result *CalcPoWDifficultyResult, err error)
Deprecated: use ledger_getPoWDifficulty instead
func (Tx) CalcQuotaRequired
deprecated
func (t Tx) CalcQuotaRequired(param CalcQuotaRequiredParam) (*CalcQuotaRequiredResult, error)
Deprecated: use ledger_getRequiredQuota instead
func (Tx) SendRawTx ¶
func (t Tx) SendRawTx(block *AccountBlock) error
func (Tx) SendTxWithPrivateKey ¶
func (t Tx) SendTxWithPrivateKey(param SendTxWithPrivateKeyParam) (*AccountBlock, error)
type TxParam ¶
type TxParam interface {
LedgerAccountBlock() (*ledger.AccountBlock, error)
}
type TypesApi ¶
type TypesApi struct { }
func (TypesApi) IsValidHexAddress ¶
func (TypesApi) IsValidHexTokenTypeId ¶
type UnreceivedDebugApi ¶
type UnreceivedDebugApi struct {
// contains filtered or unexported fields
}
func NewUnreceivedDebugApi ¶
func NewUnreceivedDebugApi(vite *vite.Vite) *UnreceivedDebugApi
func (*UnreceivedDebugApi) GetContractUnreceivedFrontBlocks ¶
func (pu *UnreceivedDebugApi) GetContractUnreceivedFrontBlocks(addr types.Address, gid *types.Gid) ([]*AccountBlock, error)
private: unreceived_getContractUnreceivedFrontBlocks <- onorad_getContractOnRoadFrontBlocks
func (*UnreceivedDebugApi) GetContractUnreceivedTransactionCount ¶
func (ud *UnreceivedDebugApi) GetContractUnreceivedTransactionCount(addr types.Address, gid *types.Gid) (uint64, error)
private: unreceived_getContractUnreceivedTransactionCount <- onroad_getContractOnRoadTotalNum
type VmAccountInfo ¶
type VmDebugApi ¶ added in v1.2.0
type VmDebugApi struct {
// contains filtered or unexported fields
}
func NewVmDebugApi ¶ added in v1.2.0
func NewVmDebugApi(vite *vite.Vite) *VmDebugApi
func (*VmDebugApi) CallContract ¶ added in v1.2.0
func (v *VmDebugApi) CallContract(param CallContractParam) (*CallContractResult, error)
func (*VmDebugApi) ClearData ¶ added in v1.2.0
func (v *VmDebugApi) ClearData() error
func (*VmDebugApi) CreateContract ¶ added in v1.2.0
func (v *VmDebugApi) CreateContract(param CreateContractParam) ([]*CreateContractResult, error)
func (*VmDebugApi) GetContractList ¶ added in v1.2.0
func (v *VmDebugApi) GetContractList() (map[types.Address][]CallContractParam, error)
func (*VmDebugApi) GetContractStorage ¶ added in v1.2.0
func (*VmDebugApi) Init ¶ added in v1.2.0
func (v *VmDebugApi) Init() (*VmAccountInfo, error)
func (*VmDebugApi) NewAccount ¶ added in v1.2.0
func (v *VmDebugApi) NewAccount() (*VmAccountInfo, error)
func (VmDebugApi) String ¶ added in v1.2.0
func (v VmDebugApi) String() string
type VmLogFilterParam ¶
type VoteApi ¶
type VoteApi struct {
// contains filtered or unexported fields
}
func NewVoteApi ¶
func (*VoteApi) GetCancelVoteData ¶
Private
func (*VoteApi) GetVoteData ¶
Private
func (*VoteApi) GetVoteDetails
deprecated
func (v *VoteApi) GetVoteDetails(index *uint64) ([]*consensus.VoteDetails, error)
Deprecated: use contract_getSBPVotingDetailsByCycle instead
type VoteConditionParam ¶
type VoteConditionParam struct { }
type VoteDetail ¶
type VotedSBPInfo ¶
type WalletApi ¶
type WalletApi struct {
// contains filtered or unexported fields
}
func NewWalletApi ¶
func (WalletApi) AddEntropyStore ¶
func (WalletApi) CreateEntropyFile ¶
func (m WalletApi) CreateEntropyFile(passphrase string) (*CreateEntropyFileResponse, error)
func (WalletApi) CreateTransaction ¶
func (m WalletApi) CreateTransaction(params CreateTransactionParms) (*types.Hash, error)
func (WalletApi) CreateTxWithPassphrase ¶
func (m WalletApi) CreateTxWithPassphrase(params CreateTransferTxParms) (*types.Hash, error)
func (WalletApi) DeriveAddressByIndex ¶
func (m WalletApi) DeriveAddressByIndex(entropyFile string, index uint32) (*DeriveResult, error)
func (WalletApi) DeriveAddressByPath ¶
func (m WalletApi) DeriveAddressByPath(entropyFile string, bip44Path string) (*DeriveResult, error)
func (WalletApi) DeriveAddressesByIndexRange ¶
func (WalletApi) DeriveByFullPath ¶
func (m WalletApi) DeriveByFullPath(entropyStore string, fullpath string) (*DeriveResult, error)
func (WalletApi) DeriveByIndex ¶
func (m WalletApi) DeriveByIndex(entropyStore string, index uint32) (*DeriveResult, error)
func (WalletApi) ExportMnemonic ¶
func (WalletApi) ExtractMnemonic ¶
func (WalletApi) FindAddrWithPassphrase ¶
func (WalletApi) FindAddress ¶
func (m WalletApi) FindAddress(address types.Address) (findResult *FindAddrResponse, e error)
func (WalletApi) FindAddressInEntropyFile ¶
func (WalletApi) GetAllEntropyFiles ¶
func (WalletApi) GetDataDir ¶
func (WalletApi) GetEntropyFilesInStandardDir ¶
func (WalletApi) GetPrivateKey ¶
func (WalletApi) GlobalCheckAddrUnlocked ¶
func (WalletApi) GlobalFindAddr ¶
func (m WalletApi) GlobalFindAddr(addr types.Address) (findResult *FindAddrResult, e error)
func (WalletApi) GlobalFindAddrWithPassphrase ¶
func (WalletApi) IsAddrUnlocked ¶
func (WalletApi) IsMayValidKeystoreFile ¶
func (m WalletApi) IsMayValidKeystoreFile(path string) IsMayValidKeystoreFileResponse
func (WalletApi) IsUnlocked ¶
func (WalletApi) ListAllEntropyFiles ¶
func (WalletApi) ListEntropyFilesInStandardDir ¶
func (WalletApi) ListEntropyStoreAddresses ¶
func (WalletApi) NewMnemonicAndEntropyStore ¶
func (m WalletApi) NewMnemonicAndEntropyStore(passphrase string) (*NewStoreResponse, error)
func (WalletApi) RecoverEntropyFile ¶
func (m WalletApi) RecoverEntropyFile(mnemonics string, passphrase string) (*CreateEntropyFileResponse, error)
func (WalletApi) RecoverEntropyStoreFromMnemonic ¶
func (m WalletApi) RecoverEntropyStoreFromMnemonic(mnemonic string, newPassphrase string) (*NewStoreResponse, error)
func (WalletApi) RefreshCache ¶
func (m WalletApi) RefreshCache()
func (WalletApi) SignDataWithPassphrase ¶
Source Files ¶
- asset.go
- common_error.go
- consensus_group.go
- contract.go
- contract_v2.go
- dashboard.go
- data.go
- debug_api.go
- dex.go
- dex_fund.go
- dex_trade.go
- error_table.go
- health.go
- interface.go
- ledger.go
- ledger_debug.go
- ledger_model.go
- ledger_v2.go
- net.go
- onroad.go
- pow.go
- quota.go
- register.go
- stats.go
- test_api.go
- tx.go
- types.go
- util.go
- utils.go
- vm_debug.go
- vote.go
- wallet.go
- wallet_v2.go