Documentation ¶
Index ¶
- Variables
- func CheckGetTestTokenIpFrequency(cache *lru.Cache, ctx context.Context) error
- func InitConfig(id uint)
- func InitGetTestTokenLimitPolicy()
- func InitLog(dir, lvl string)
- func InitTestAPIParams(priv, tti string)
- func StringToUint64(s string) (uint64, error)
- func TryMakeConcernedError(err error) (newerr error, concerned bool)
- type AccountBlock
- type AccountInfo
- type AgentPledgeParam
- type CalcPoWDifficultyParam
- type CalcPoWDifficultyResult
- type CallContractParam
- type CallContractResult
- type CallOffChainMethodParam
- type CandidateInfo
- type ConsensusGroup
- type ConsensusGroupApi
- func (c *ConsensusGroupApi) GetCancelConsensusGroupData(gid types.Gid) ([]byte, error)
- func (c *ConsensusGroupApi) GetConditionRegisterOfPledge(amount *big.Int, tokenId types.TokenTypeId, height uint64) ([]byte, error)
- func (c *ConsensusGroupApi) GetConditionVoteOfDefault() ([]byte, error)
- func (c *ConsensusGroupApi) GetConditionVoteOfKeepToken(amount *big.Int, tokenId types.TokenTypeId) ([]byte, error)
- func (c *ConsensusGroupApi) GetConsensusGroupById(gid types.Gid) (*ConsensusGroup, error)
- func (c *ConsensusGroupApi) GetConsensusGroupList() ([]*ConsensusGroup, error)
- func (c *ConsensusGroupApi) GetCreateConsensusGroupData(param CreateConsensusGroupParam) ([]byte, error)
- func (c *ConsensusGroupApi) GetReCreateConsensusGroupData(gid types.Gid) ([]byte, error)
- func (c ConsensusGroupApi) String() string
- type ConstructorParam
- type ContractApi
- func (c *ContractApi) CallOffChainMethod(param CallOffChainMethodParam) ([]byte, 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)
- func (c ContractApi) String() string
- type ContractInfo
- type CreateConsensusGroupParam
- type CreateContractDataParam
- type CreateContractParam
- type CreateContractResult
- type CreateReceiveTxParms
- type CreateTransferTxParms
- type CreateTxWithPrivKeyParmsTest
- type DashboardApi
- type DebugApi
- 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) 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) map[string]interface{}
- func (api DebugApi) PoolInfo(addr *types.Address) string
- 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) map[string]interface{}
- func (api DebugApi) RoadInfo() map[string]interface{}
- func (api DebugApi) SetGetTestTokenLimitSize(size int) error
- type DeriveResult
- type FindAddrResult
- type GcStatus
- type HexSignedTuple
- type IsMayValidKeystoreFileResponse
- type IssueParams
- type JsonRpc2Error
- type LedgerApi
- func (l *LedgerApi) GetAccountByAccAddr(addr types.Address) (*RpcAccountInfo, error)
- 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) GetLatestBlock(addr types.Address) (*AccountBlock, error)
- func (l *LedgerApi) GetLatestSnapshotChainHash() *types.Hash
- func (l *LedgerApi) GetRawBlockByHash(blockHash types.Hash) (*ledger.AccountBlock, error)
- func (l *LedgerApi) GetSeed(snapshotHash types.Hash, fromHash types.Hash) (uint64, 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) GetVmLogList(blockHash types.Hash) (ledger.VmLogList, error)
- func (l *LedgerApi) GetVmLogListByHash(logHash types.Hash) (ledger.VmLogList, error)
- func (l LedgerApi) String() string
- type MintageApi
- func (m *MintageApi) GetBurnData() ([]byte, error)
- func (m *MintageApi) GetChangeTokenTypeData(tokenId types.TokenTypeId) ([]byte, error)
- func (m *MintageApi) GetIssueData(param IssueParams) ([]byte, error)
- func (m *MintageApi) GetMintData(param MintageParams) ([]byte, error)
- func (m *MintageApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)
- func (m *MintageApi) GetTokenInfoList(index int, count int) (*TokenInfoList, error)
- func (m *MintageApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)
- func (m *MintageApi) GetTransferOwnerData(param TransferOwnerParams) ([]byte, error)
- func (m MintageApi) String() string
- type MintageParams
- type NetApi
- type NewStoreResponse
- type Nodes
- type OnroadPagingQuery
- type PeriodStats
- type PledgeApi
- func (p *PledgeApi) GetAgentCancelPledgeData(param AgentPledgeParam) ([]byte, error)
- func (p *PledgeApi) GetAgentPledgeData(param AgentPledgeParam) ([]byte, error)
- func (p *PledgeApi) GetCancelPledgeData(beneficialAddr types.Address, amount string) ([]byte, error)
- func (p *PledgeApi) GetPledgeBeneficialAmount(addr types.Address) (string, error)
- func (p *PledgeApi) GetPledgeData(beneficialAddr types.Address) ([]byte, error)
- func (p *PledgeApi) GetPledgeList(addr types.Address, index int, count int) (*PledgeInfoList, error)
- func (p *PledgeApi) GetPledgeQuota(addr types.Address) (*QuotaAndTxNum, error)
- func (p *PledgeApi) GetQuotaUsedList(addr types.Address) ([]types.QuotaInfo, error)
- func (p PledgeApi) String() string
- type PledgeInfo
- type PledgeInfoList
- type Pow
- type PrivateOnroadApi
- func (pri PrivateOnroadApi) GetContractAddrListByGid(gid types.Gid) ([]types.Address, error)
- func (pri PrivateOnroadApi) GetContractOnRoadFrontBlocks(addr types.Address, gid *types.Gid) ([]*AccountBlock, error)
- func (pri PrivateOnroadApi) GetContractOnRoadTotalNum(addr types.Address, gid *types.Gid) (uint64, error)
- func (pri PrivateOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
- func (pri PrivateOnroadApi) GetOnroadBlocksInBatch(queryList []OnroadPagingQuery) (map[types.Address][]*AccountBlock, error)
- func (pri PrivateOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)
- func (pri PrivateOnroadApi) GetOnroadInfoInBatch(addrList []types.Address) ([]*RpcAccountInfo, error)
- func (pri PrivateOnroadApi) String() string
- type PublicOnroadApi
- type QuotaAndTxNum
- type RawTxBlock
- type RegistParam
- type RegisterApi
- func (r *RegisterApi) GetAvailableReward(gid types.Gid, name string) (*Reward, error)
- func (r *RegisterApi) GetCancelRegisterData(gid types.Gid, name string) ([]byte, error)
- func (r *RegisterApi) GetCandidateList() ([]*CandidateInfo, error)
- 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)
- func (r *RegisterApi) GetRegistrationList(gid types.Gid, pledgeAddr types.Address) ([]*RegistrationInfo, error)
- func (r *RegisterApi) GetRewardByDay(gid types.Gid, timestamp int64) (map[string]*Reward, error)
- 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 RpcAccountInfo
- type RpcTokenBalanceInfo
- type RpcTokenInfo
- type SendTxWithPrivateKeyParam
- type SnapshotBlock
- type SnapshotChunk
- 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
- type TypesApi
- 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() (*AccountInfo, error)
- func (v *VmDebugApi) NewAccount() (*AccountInfo, error)
- func (v VmDebugApi) String() string
- 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)
- func (v *VoteApi) GetVoteInfo(gid types.Gid, addr types.Address) (*VoteInfo, error)
- func (v VoteApi) String() string
- type VoteConditionParam
- type VoteInfo
- type WalletApi
- func (m WalletApi) AddEntropyStore(filename string) error
- func (m WalletApi) CreateTxWithPassphrase(params CreateTransferTxParms) (*types.Hash, error)
- func (m WalletApi) DeriveByFullPath(entropyStore string, fullpath string) (*DeriveResult, error)
- func (m WalletApi) DeriveByIndex(entropyStore string, index uint32) (*DeriveResult, 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) GetDataDir() string
- 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(entropyStore 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(entropyStore string) error
- func (m WalletApi) NewMnemonicAndEntropyStore(passphrase string) (*NewStoreResponse, 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(entropyStore string, passphrase string) error
Constants ¶
This section is empty.
Variables ¶
View Source
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, } ErrVmInvalidConfirmTime = JsonRpc2Error{ Message: util.ErrInvalidConfirmTime.Error(), Code: -35007, } ErrVmContractNotExists = JsonRpc2Error{ Message: util.ErrContractNotExists.Error(), Code: -35008, } ErrVmNoReliableStatus = JsonRpc2Error{ Message: util.ErrNoReliableStatus.Error(), Code: -35009, } ErrVmInvalidQuotaRatio = JsonRpc2Error{ Message: util.ErrInvalidQuotaRatio.Error(), Code: -35010, } // -36001 ~ -36999 verifier_account ErrVerifyAccountAddr = JsonRpc2Error{ Message: verifier.ErrVerifyAccountTypeNotSure.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, } )
View Source
var MaxBatchQuery = 10
Functions ¶
func CheckGetTestTokenIpFrequency ¶
func InitGetTestTokenLimitPolicy ¶
func InitGetTestTokenLimitPolicy()
Types ¶
type AccountBlock ¶
type AccountBlock struct { *RawTxBlock TokenInfo *RpcTokenInfo `json:"tokenInfo"` ConfirmedTimes *string `json:"confirmedTimes"` ConfirmedHash *types.Hash `json:"confirmedHash"` ReceiveBlockHeight *string `json:"receiveBlockHeight"` ReceiveBlockHash *types.Hash `json:"receiveBlockHash"` Timestamp int64 `json:"timestamp"` }
type AccountInfo ¶ added in v1.2.0
type AgentPledgeParam ¶
type CalcPoWDifficultyParam ¶ added in v1.3.0
type CalcPoWDifficultyResult ¶
type CallContractParam ¶ added in v1.2.0
type CallContractResult ¶ added in v1.2.0
type CallOffChainMethodParam ¶ added in v1.3.0
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) GetCancelConsensusGroupData ¶
func (c *ConsensusGroupApi) GetCancelConsensusGroupData(gid types.Gid) ([]byte, error)
func (*ConsensusGroupApi) GetConditionRegisterOfPledge ¶
func (c *ConsensusGroupApi) GetConditionRegisterOfPledge(amount *big.Int, tokenId types.TokenTypeId, height uint64) ([]byte, error)
func (*ConsensusGroupApi) GetConditionVoteOfDefault ¶
func (c *ConsensusGroupApi) GetConditionVoteOfDefault() ([]byte, error)
func (*ConsensusGroupApi) GetConditionVoteOfKeepToken ¶
func (c *ConsensusGroupApi) GetConditionVoteOfKeepToken(amount *big.Int, tokenId types.TokenTypeId) ([]byte, error)
func (*ConsensusGroupApi) GetConsensusGroupById ¶
func (c *ConsensusGroupApi) GetConsensusGroupById(gid types.Gid) (*ConsensusGroup, error)
func (*ConsensusGroupApi) GetConsensusGroupList ¶
func (c *ConsensusGroupApi) GetConsensusGroupList() ([]*ConsensusGroup, error)
func (*ConsensusGroupApi) GetCreateConsensusGroupData ¶
func (c *ConsensusGroupApi) GetCreateConsensusGroupData(param CreateConsensusGroupParam) ([]byte, error)
func (*ConsensusGroupApi) GetReCreateConsensusGroupData ¶
func (c *ConsensusGroupApi) GetReCreateConsensusGroupData(gid types.Gid) ([]byte, 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) GetCallContractData ¶ added in v1.2.0
func (*ContractApi) GetCallOffChainData ¶ added in v1.3.0
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)
func (*ContractApi) GetCreateContractParams ¶
func (c *ContractApi) GetCreateContractParams(abiStr string, params []string) ([]byte, error)
func (*ContractApi) GetCreateContractToAddress ¶
func (ContractApi) String ¶
func (c ContractApi) String() string
type ContractInfo ¶
type CreateConsensusGroupParam ¶
type CreateConsensusGroupParam struct { SelfAddr types.Address Height uint64 PrevHash types.Hash SnapshotHash types.Hash NodeCount uint8 Interval int64 PerCount int64 RandCount uint8 RandRank uint8 Repeat uint16 CheckLevel uint8 CountingTokenId types.TokenTypeId RegisterConditionId uint8 RegisterConditionParam []byte VoteConditionId uint8 VoteConditionParam []byte }
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 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 CreateTxWithPrivKeyParmsTest ¶
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 DebugApi ¶
type DebugApi struct {
// contains filtered or unexported fields
}
func (DebugApi) ConsensusBlockRate ¶
func (DebugApi) ConsensusProducers ¶
func (DebugApi) GetForkInfo ¶ added in v1.2.0
func (api DebugApi) GetForkInfo() config.ForkPoints
func (DebugApi) PoolAccount ¶
func (DebugApi) PoolAccountBlockDetail ¶ added in v1.3.2
func (DebugApi) PoolAccountChainDetail ¶
func (DebugApi) PoolSnapshotBlockDetail ¶ added in v1.3.2
func (DebugApi) PoolSnapshotChainDetail ¶
type DeriveResult ¶
type FindAddrResult ¶
type GcStatus ¶
type HexSignedTuple ¶
type IsMayValidKeystoreFileResponse ¶
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 (*LedgerApi) GetAccountByAccAddr ¶
func (l *LedgerApi) GetAccountByAccAddr(addr types.Address) (*RpcAccountInfo, error)
func (*LedgerApi) GetBlockByHash ¶
func (l *LedgerApi) GetBlockByHash(blockHash types.Hash) (*AccountBlock, error)
func (*LedgerApi) GetBlockByHeight ¶ added in v1.1.2
func (l *LedgerApi) GetBlockByHeight(addr types.Address, height interface{}) (*AccountBlock, error)
func (*LedgerApi) GetBlocksByAccAddr ¶
func (*LedgerApi) GetBlocksByHash ¶
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) GetLatestBlock ¶
func (l *LedgerApi) GetLatestBlock(addr types.Address) (*AccountBlock, error)
func (*LedgerApi) GetLatestSnapshotChainHash ¶
func (*LedgerApi) GetRawBlockByHash ¶
func (*LedgerApi) GetSeed ¶
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) GetVmLogList ¶
func (*LedgerApi) GetVmLogListByHash ¶ added in v1.1.2
type MintageApi ¶
type MintageApi struct {
// contains filtered or unexported fields
}
func NewMintageApi ¶
func NewMintageApi(vite *vite.Vite) *MintageApi
func (*MintageApi) GetBurnData ¶ added in v1.3.0
func (m *MintageApi) GetBurnData() ([]byte, error)
func (*MintageApi) GetChangeTokenTypeData ¶ added in v1.3.0
func (m *MintageApi) GetChangeTokenTypeData(tokenId types.TokenTypeId) ([]byte, error)
func (*MintageApi) GetIssueData ¶ added in v1.3.0
func (m *MintageApi) GetIssueData(param IssueParams) ([]byte, error)
func (*MintageApi) GetMintData ¶ added in v1.3.0
func (m *MintageApi) GetMintData(param MintageParams) ([]byte, error)
func (*MintageApi) GetTokenInfoById ¶ added in v1.3.0
func (m *MintageApi) GetTokenInfoById(tokenId types.TokenTypeId) (*RpcTokenInfo, error)
func (*MintageApi) GetTokenInfoList ¶ added in v1.3.0
func (m *MintageApi) GetTokenInfoList(index int, count int) (*TokenInfoList, error)
func (*MintageApi) GetTokenInfoListByOwner ¶ added in v1.3.0
func (m *MintageApi) GetTokenInfoListByOwner(owner types.Address) ([]*RpcTokenInfo, error)
func (*MintageApi) GetTransferOwnerData ¶ added in v1.3.0
func (m *MintageApi) GetTransferOwnerData(param TransferOwnerParams) ([]byte, error)
func (MintageApi) String ¶
func (m MintageApi) String() string
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 OnroadPagingQuery ¶
type PeriodStats ¶
type PeriodStats struct { *core.PeriodStats // contains filtered or unexported fields }
type PledgeApi ¶
type PledgeApi struct {
// contains filtered or unexported fields
}
func (*PledgeApi) GetAgentCancelPledgeData ¶
func (p *PledgeApi) GetAgentCancelPledgeData(param AgentPledgeParam) ([]byte, error)
func (*PledgeApi) GetAgentPledgeData ¶
func (p *PledgeApi) GetAgentPledgeData(param AgentPledgeParam) ([]byte, error)
func (*PledgeApi) GetCancelPledgeData ¶
func (*PledgeApi) GetPledgeBeneficialAmount ¶
func (*PledgeApi) GetPledgeData ¶
func (*PledgeApi) GetPledgeList ¶
func (*PledgeApi) GetPledgeQuota ¶
func (p *PledgeApi) GetPledgeQuota(addr types.Address) (*QuotaAndTxNum, error)
func (*PledgeApi) GetQuotaUsedList ¶
type PledgeInfo ¶
type PledgeInfoList ¶
type PledgeInfoList struct { TotalPledgeAmount string `json:"totalPledgeAmount"` Count int `json:"totalCount"` List []*PledgeInfo `json:"pledgeInfoList"` }
type Pow ¶
type Pow struct { }
type PrivateOnroadApi ¶
type PrivateOnroadApi struct {
// contains filtered or unexported fields
}
func NewPrivateOnroadApi ¶
func NewPrivateOnroadApi(vite *vite.Vite) *PrivateOnroadApi
func (PrivateOnroadApi) GetContractAddrListByGid ¶ added in v1.3.0
func (PrivateOnroadApi) GetContractOnRoadFrontBlocks ¶
func (pri PrivateOnroadApi) GetContractOnRoadFrontBlocks(addr types.Address, gid *types.Gid) ([]*AccountBlock, error)
func (PrivateOnroadApi) GetContractOnRoadTotalNum ¶
func (PrivateOnroadApi) GetOnroadBlocksByAddress ¶
func (pri PrivateOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
func (PrivateOnroadApi) GetOnroadBlocksInBatch ¶
func (pri PrivateOnroadApi) GetOnroadBlocksInBatch(queryList []OnroadPagingQuery) (map[types.Address][]*AccountBlock, error)
func (PrivateOnroadApi) GetOnroadInfoByAddress ¶
func (pri PrivateOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)
func (PrivateOnroadApi) GetOnroadInfoInBatch ¶
func (pri PrivateOnroadApi) GetOnroadInfoInBatch(addrList []types.Address) ([]*RpcAccountInfo, error)
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 ¶
func (pub PublicOnroadApi) GetOnroadBlocksByAddress(address types.Address, index, count uint64) ([]*AccountBlock, error)
func (PublicOnroadApi) GetOnroadInfoByAddress ¶
func (pub PublicOnroadApi) GetOnroadInfoByAddress(address types.Address) (*RpcAccountInfo, error)
func (PublicOnroadApi) String ¶
func (pub PublicOnroadApi) String() string
type QuotaAndTxNum ¶
type RawTxBlock ¶
type RawTxBlock struct { BlockType byte `json:"blockType"` Height string `json:"height"` Hash types.Hash `json:"hash"` PrevHash types.Hash `json:"prevHash"` AccountAddress types.Address `json:"accountAddress"` PublicKey []byte `json:"publicKey"` FromAddress types.Address `json:"fromAddress"` ToAddress types.Address `json:"toAddress"` FromBlockHash types.Hash `json:"fromBlockHash"` 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"` QuotaUsed *string `json:"quotaUsed"` LogHash *types.Hash `json:"logHash"` SendBlockList []*RawTxBlock `json:"sendBlockList"` }
func (*RawTxBlock) ComputeHash ¶
func (block *RawTxBlock) ComputeHash() (*types.Hash, error)
func (*RawTxBlock) RpcToLedgerBlock ¶
func (block *RawTxBlock) RpcToLedgerBlock() (*ledger.AccountBlock, error)
type RegistParam ¶
type RegisterApi ¶
type RegisterApi struct {
// contains filtered or unexported fields
}
func NewRegisterApi ¶
func NewRegisterApi(vite *vite.Vite) *RegisterApi
func (*RegisterApi) GetAvailableReward ¶
func (*RegisterApi) GetCancelRegisterData ¶
func (*RegisterApi) GetCandidateList ¶
func (r *RegisterApi) GetCandidateList() ([]*CandidateInfo, error)
func (*RegisterApi) GetRegisterData ¶
func (*RegisterApi) GetRegisterPledgeAddrList ¶
func (r *RegisterApi) GetRegisterPledgeAddrList(paramList []*RegistParam) ([]*types.Address, error)
func (*RegisterApi) GetRegistration ¶
func (r *RegisterApi) GetRegistration(name string, gid types.Gid) (*types.Registration, error)
func (*RegisterApi) GetRegistrationList ¶
func (r *RegisterApi) GetRegistrationList(gid types.Gid, pledgeAddr types.Address) ([]*RegistrationInfo, error)
func (*RegisterApi) GetRewardByDay ¶
func (*RegisterApi) GetRewardData ¶
func (*RegisterApi) GetUpdateRegistrationData ¶
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"` PledgeAmount string `json:"pledgeAmount"` WithdrawHeight string `json:"withdrawHeight"` WithdrawTime int64 `json:"withdrawTime"` CancelTime int64 `json:"cancelTime"` }
type Reward ¶
type RpcAccountInfo ¶
type RpcAccountInfo struct { AccountAddress types.Address `json:"accountAddress"` TotalNumber string `json:"totalNumber"` // uint64 TokenBalanceInfoMap map[types.TokenTypeId]*RpcTokenBalanceInfo `json:"tokenBalanceInfoMap,omitempty"` }
type RpcTokenBalanceInfo ¶
type RpcTokenBalanceInfo struct { TokenInfo *RpcTokenInfo `json:"tokenInfo,omitempty"` TotalAmount string `json:"totalAmount"` // big int Number *string `json:"number,omitempty"` // uint64 }
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"` IsReIssuable bool `json:"isReIssuable"` Index uint16 `json:"index"` }
func RawTokenInfoToRpc ¶
func RawTokenInfoToRpc(tinfo *types.TokenInfo, tti types.TokenTypeId) *RpcTokenInfo
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 SnapshotBlock struct { *ledger.SnapshotBlock Timestamp int64 `json:"timestamp"` }
type SnapshotChunk ¶
type SnapshotChunk struct { AccountBlocks []*ledger.AccountBlock SnapshotBlock *SnapshotBlock }
type StatsApi ¶
type StatsApi struct {
// contains filtered or unexported fields
}
func (StatsApi) GetDaySBPStats ¶
func (StatsApi) GetHourSBPStats ¶
type SyncInfo ¶
type TestApi ¶
type TestApi struct {
// contains filtered or unexported fields
}
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 ¶ added in v1.3.0
func (t Tx) CalcPoWDifficulty(param CalcPoWDifficultyParam) (result *CalcPoWDifficultyResult, err error)
func (Tx) SendRawTx ¶
func (t Tx) SendRawTx(block *AccountBlock) error
func (Tx) SendTxWithPrivateKey ¶
func (t Tx) SendTxWithPrivateKey(param SendTxWithPrivateKeyParam) (*AccountBlock, error)
type TypesApi ¶
type TypesApi struct { }
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() (*AccountInfo, error)
func (*VmDebugApi) NewAccount ¶ added in v1.2.0
func (v *VmDebugApi) NewAccount() (*AccountInfo, error)
func (VmDebugApi) String ¶ added in v1.2.0
func (v VmDebugApi) String() string
type VoteApi ¶
type VoteApi struct {
// contains filtered or unexported fields
}
func (*VoteApi) GetCancelVoteData ¶
func (*VoteApi) GetVoteData ¶
func (*VoteApi) GetVoteDetails ¶
func (v *VoteApi) GetVoteDetails(index *uint64) ([]*consensus.VoteDetails, error)
func (*VoteApi) GetVoteInfo ¶
type VoteConditionParam ¶
type VoteConditionParam struct { }
type VoteInfo ¶
type WalletApi ¶
type WalletApi struct {
// contains filtered or unexported fields
}
func (WalletApi) CreateTxWithPassphrase ¶
func (m WalletApi) CreateTxWithPassphrase(params CreateTransferTxParms) (*types.Hash, error)
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) ExtractMnemonic ¶
func (WalletApi) FindAddr ¶
func (WalletApi) FindAddrWithPassphrase ¶
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) ListEntropyFilesInStandardDir ¶
func (WalletApi) ListEntropyStoreAddresses ¶
func (WalletApi) NewMnemonicAndEntropyStore ¶
func (m WalletApi) NewMnemonicAndEntropyStore(passphrase string) (*NewStoreResponse, error)
func (WalletApi) RecoverEntropyStoreFromMnemonic ¶
func (m WalletApi) RecoverEntropyStoreFromMnemonic(mnemonic string, newPassphrase string) (*NewStoreResponse, error)
func (WalletApi) SignData ¶
func (WalletApi) SignDataWithPassphrase ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.