apis

package
v1.4.2-beta3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountApi

type AccountApi struct {
	// contains filtered or unexported fields
}

func NewAccountApi

func NewAccountApi() *AccountApi

func (*AccountApi) Create

func (a *AccountApi) Create(ctx context.Context, para *pb.CreateRequest) (*pb.CreateResponse, error)

func (*AccountApi) ForPublicKey

func (a *AccountApi) ForPublicKey(ctx context.Context, str *pb.String) (*pbtypes.Address, error)

func (*AccountApi) NewAccounts

func (a *AccountApi) NewAccounts(ctx context.Context, count *pb.UInt32) (*pb.AccountsResponse, error)

func (*AccountApi) NewSeed

func (a *AccountApi) NewSeed(context.Context, *empty.Empty) (*pb.String, error)

func (*AccountApi) PublicKey

func (a *AccountApi) PublicKey(ctx context.Context, addr *pbtypes.Address) (*pb.String, error)

func (*AccountApi) Validate

func (a *AccountApi) Validate(ctx context.Context, str *pb.String) (*pb.Boolean, error)

type BlackHoleAPI

type BlackHoleAPI struct {
	// contains filtered or unexported fields
}

func NewBlackHoleAPI

func NewBlackHoleAPI(l ledger.Store, cc *chainctx.ChainContext) *BlackHoleAPI

func (*BlackHoleAPI) GetDestroyInfoDetail

func (b *BlackHoleAPI) GetDestroyInfoDetail(ctx context.Context, param *pbtypes.Address) (*pbtypes.DestroyInfos, error)

func (*BlackHoleAPI) GetRewardsBlock

func (b *BlackHoleAPI) GetRewardsBlock(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*BlackHoleAPI) GetSendBlock

func (b *BlackHoleAPI) GetSendBlock(ctx context.Context, param *pb.DestroyParam) (*pbtypes.StateBlock, error)

func (*BlackHoleAPI) GetTotalDestroyInfo

func (b *BlackHoleAPI) GetTotalDestroyInfo(ctx context.Context, param *pbtypes.Address) (*pbtypes.Balance, error)

type ChainAPI

type ChainAPI struct {
	// contains filtered or unexported fields
}

func NewChainAPI

func NewChainAPI(l ledger.Store) *ChainAPI

func (*ChainAPI) LedgerSize

func (*ChainAPI) Version

type ContractAPI

type ContractAPI struct {
	// contains filtered or unexported fields
}

func NewContractAPI

func NewContractAPI(cc *chainctx.ChainContext, l ledger.Store) *ContractAPI

func (*ContractAPI) ContractAddressList

func (c *ContractAPI) ContractAddressList(ctx context.Context, param *empty.Empty) (*pbtypes.Addresses, error)

func (*ContractAPI) GenerateRewardBlock

func (c *ContractAPI) GenerateRewardBlock(ctx context.Context, param *pb.ContractRewardBlockPara) (*pbtypes.StateBlock, error)

func (*ContractAPI) GenerateSendBlock

func (c *ContractAPI) GenerateSendBlock(ctx context.Context, param *pb.ContractSendBlockPara) (*pbtypes.StateBlock, error)

func (*ContractAPI) GetAbiByContractAddress

func (c *ContractAPI) GetAbiByContractAddress(ctx context.Context, param *pbtypes.Address) (*pb.String, error)

func (*ContractAPI) PackChainContractData

func (c *ContractAPI) PackChainContractData(ctx context.Context, param *pb.PackChainContractDataRequest) (*pb.Bytes, error)

func (*ContractAPI) PackContractData

func (c *ContractAPI) PackContractData(ctx context.Context, param *pb.PackContractDataRequest) (*pb.Bytes, error)

type LedgerAPI

type LedgerAPI struct {
	// contains filtered or unexported fields
}

func (*LedgerAPI) AccountBlocksCount

func (l *LedgerAPI) AccountBlocksCount(ctx context.Context, addr *pbtypes.Address) (*pb.Int64, error)

func (*LedgerAPI) AccountHistoryTopn

func (l *LedgerAPI) AccountHistoryTopn(ctx context.Context, param *pb.AccountHistoryTopnReq) (*pb.APIBlocks, error)

func (*LedgerAPI) AccountInfo

func (l *LedgerAPI) AccountInfo(ctx context.Context, addr *pbtypes.Address) (*pb.APIAccount, error)

func (*LedgerAPI) AccountRepresentative

func (l *LedgerAPI) AccountRepresentative(ctx context.Context, addr *pbtypes.Address) (*pbtypes.Address, error)

func (*LedgerAPI) AccountVotingWeight

func (l *LedgerAPI) AccountVotingWeight(ctx context.Context, addr *pbtypes.Address) (*pbtypes.Balance, error)

func (*LedgerAPI) Accounts

func (l *LedgerAPI) Accounts(ctx context.Context, para *pb.Offset) (*pbtypes.Addresses, error)

func (*LedgerAPI) AccountsBalance

func (l *LedgerAPI) AccountsBalance(ctx context.Context, addresses *pbtypes.Addresses) (*pb.AccountsBalanceRsp, error)

func (*LedgerAPI) AccountsCount

func (l *LedgerAPI) AccountsCount(context.Context, *empty.Empty) (*pb.UInt64, error)

func (*LedgerAPI) AccountsFrontiers

func (l *LedgerAPI) AccountsFrontiers(ctx context.Context, addresses *pbtypes.Addresses) (*pb.AccountsFrontiersRsp, error)

func (*LedgerAPI) AccountsPending

func (l *LedgerAPI) AccountsPending(ctx context.Context, ap *pb.AccountsPendingReq) (*pb.AccountsPendingRsp, error)

func (*LedgerAPI) AllGenesisBlocks

func (l *LedgerAPI) AllGenesisBlocks(context.Context, *empty.Empty) (*pbtypes.StateBlocks, error)

func (*LedgerAPI) BalanceChange

func (l *LedgerAPI) BalanceChange(addr *pbtypes.Address, srv pb.LedgerAPI_BalanceChangeServer) error

func (*LedgerAPI) BlockAccount

func (l *LedgerAPI) BlockAccount(ctx context.Context, hash *pbtypes.Hash) (*pbtypes.Address, error)

func (*LedgerAPI) BlockConfirmedStatus

func (l *LedgerAPI) BlockConfirmedStatus(ctx context.Context, hash *pbtypes.Hash) (*pb.Boolean, error)

func (*LedgerAPI) BlockHash

func (l *LedgerAPI) BlockHash(ctx context.Context, block *pbtypes.StateBlock) (*pbtypes.Hash, error)

func (*LedgerAPI) Blocks

func (l *LedgerAPI) Blocks(ctx context.Context, param *pb.Offset) (*pb.APIBlocks, error)

func (*LedgerAPI) BlocksCount

func (l *LedgerAPI) BlocksCount(context.Context, *empty.Empty) (*pb.BlocksCountRsp, error)

func (*LedgerAPI) BlocksCount2

func (l *LedgerAPI) BlocksCount2(context.Context, *empty.Empty) (*pb.BlocksCountRsp, error)

func (*LedgerAPI) BlocksCountByType

func (l *LedgerAPI) BlocksCountByType(context.Context, *empty.Empty) (*pb.BlocksCountRsp, error)

func (*LedgerAPI) BlocksInfo

func (l *LedgerAPI) BlocksInfo(ctx context.Context, hashes *pbtypes.Hashes) (*pb.APIBlocks, error)

func (*LedgerAPI) Chain

func (l *LedgerAPI) Chain(ctx context.Context, para *pb.ChainReq) (*pbtypes.Hashes, error)

func (*LedgerAPI) ChainToken

func (l *LedgerAPI) ChainToken(context.Context, *empty.Empty) (*pbtypes.Hash, error)

func (*LedgerAPI) ConfirmedAccountInfo

func (l *LedgerAPI) ConfirmedAccountInfo(ctx context.Context, addr *pbtypes.Address) (*pb.APIAccount, error)

func (*LedgerAPI) ConfirmedBlocksInfo

func (l *LedgerAPI) ConfirmedBlocksInfo(ctx context.Context, hashes *pbtypes.Hashes) (*pb.APIBlocks, error)

func (*LedgerAPI) Delegators

func (l *LedgerAPI) Delegators(ctx context.Context, addr *pbtypes.Address) (*pb.APIAccountBalances, error)

func (*LedgerAPI) DelegatorsCount

func (l *LedgerAPI) DelegatorsCount(ctx context.Context, addr *pbtypes.Address) (*pb.Int64, error)

func (*LedgerAPI) GasAddress

func (l *LedgerAPI) GasAddress(context.Context, *empty.Empty) (*pbtypes.Address, error)

func (*LedgerAPI) GasBlock

func (*LedgerAPI) GasBlockHash

func (l *LedgerAPI) GasBlockHash(context.Context, *empty.Empty) (*pbtypes.Hash, error)

func (*LedgerAPI) GasMintageBlock

func (l *LedgerAPI) GasMintageBlock(context.Context, *empty.Empty) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GasToken

func (l *LedgerAPI) GasToken(context.Context, *empty.Empty) (*pbtypes.Hash, error)

func (*LedgerAPI) GenerateChangeBlock

func (l *LedgerAPI) GenerateChangeBlock(ctx context.Context, para *pb.GenerateChangeBlockReq) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenerateReceiveBlock

func (l *LedgerAPI) GenerateReceiveBlock(ctx context.Context, para *pb.GenerateReceiveBlockReq) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenerateReceiveBlockByHash

func (l *LedgerAPI) GenerateReceiveBlockByHash(ctx context.Context, para *pb.GenerateReceiveBlockByHashReq) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenerateSendBlock

func (l *LedgerAPI) GenerateSendBlock(ctx context.Context, para *pb.GenerateSendBlockReq) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenesisAddress

func (l *LedgerAPI) GenesisAddress(context.Context, *empty.Empty) (*pbtypes.Address, error)

func (*LedgerAPI) GenesisBlock

func (l *LedgerAPI) GenesisBlock(context.Context, *empty.Empty) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenesisBlockHash

func (l *LedgerAPI) GenesisBlockHash(context.Context, *empty.Empty) (*pbtypes.Hash, error)

func (*LedgerAPI) GenesisMintageBlock

func (l *LedgerAPI) GenesisMintageBlock(context.Context, *empty.Empty) (*pbtypes.StateBlock, error)

func (*LedgerAPI) GenesisMintageHash

func (l *LedgerAPI) GenesisMintageHash(context.Context, *empty.Empty) (*pbtypes.Hash, error)

func (*LedgerAPI) GetAccountOnlineBlock

func (l *LedgerAPI) GetAccountOnlineBlock(ctx context.Context, addr *pbtypes.Address) (*pbtypes.StateBlocks, error)

func (*LedgerAPI) IsGenesisBlock

func (l *LedgerAPI) IsGenesisBlock(ctx context.Context, block *pbtypes.StateBlock) (*pb.Boolean, error)

func (*LedgerAPI) IsGenesisToken

func (l *LedgerAPI) IsGenesisToken(ctx context.Context, hash *pbtypes.Hash) (*pb.Boolean, error)

func (*LedgerAPI) NewAccountBlock

func (l *LedgerAPI) NewAccountBlock(addr *pbtypes.Address, srv pb.LedgerAPI_NewAccountBlockServer) error

func (*LedgerAPI) NewBlock

func (l *LedgerAPI) NewBlock(tx *empty.Empty, srv pb.LedgerAPI_NewBlockServer) error

func (*LedgerAPI) NewPending

func (l *LedgerAPI) NewPending(addr *pbtypes.Address, srv pb.LedgerAPI_NewPendingServer) error

func (*LedgerAPI) Pendings

func (l *LedgerAPI) Pendings(context.Context, *empty.Empty) (*pb.APIPendings, error)

func (*LedgerAPI) Process

func (l *LedgerAPI) Process(ctx context.Context, block *pbtypes.StateBlock) (*pbtypes.Hash, error)

func (*LedgerAPI) Representatives

func (l *LedgerAPI) Representatives(ctx context.Context, b *pb.Boolean) (*pb.APIRepresentatives, error)

func (*LedgerAPI) TokenInfoById

func (l *LedgerAPI) TokenInfoById(ctx context.Context, id *pbtypes.Hash) (*pbtypes.TokenInfo, error)

func (*LedgerAPI) TokenInfoByName

func (l *LedgerAPI) TokenInfoByName(ctx context.Context, name *pb.String) (*pbtypes.TokenInfo, error)

func (*LedgerAPI) Tokens

func (*LedgerAPI) TransactionsCount

func (l *LedgerAPI) TransactionsCount(context.Context, *empty.Empty) (*pb.BlocksCountRsp, error)

type MetricsAPI

type MetricsAPI struct {
	// contains filtered or unexported fields
}

func NewMetricsAPI

func NewMetricsAPI() *MetricsAPI

func (*MetricsAPI) DiskInfo

func (m *MetricsAPI) DiskInfo(context.Context, *empty.Empty) (*pb.UsageStat, error)

func (*MetricsAPI) GetAllCPUTimeStats

func (m *MetricsAPI) GetAllCPUTimeStats(context.Context, *empty.Empty) (*pb.TimesStats, error)

func (*MetricsAPI) GetCPUInfo

func (m *MetricsAPI) GetCPUInfo(context.Context, *empty.Empty) (*pb.InfoStats, error)

func (*MetricsAPI) GetCPUTimeStats

func (m *MetricsAPI) GetCPUTimeStats(context.Context, *empty.Empty) (*pb.TimesStats, error)

func (*MetricsAPI) GetNetworkInterfaces

func (m *MetricsAPI) GetNetworkInterfaces(context.Context, *empty.Empty) (*pb.IOCountersStats, error)

type MinerAPI

type MinerAPI struct {
	// contains filtered or unexported fields
}

func NewMinerAPI

func NewMinerAPI(cfg *config.Config, ledger ledger.Store) *MinerAPI

func (*MinerAPI) GetAvailRewardInfo

func (m *MinerAPI) GetAvailRewardInfo(ctx context.Context, params *pbtypes.Address) (*pb.MinerAvailRewardInfo, error)

func (*MinerAPI) GetRewardData

func (m *MinerAPI) GetRewardData(ctx context.Context, params *pb.RewardParam) (*pb.Bytes, error)

func (*MinerAPI) GetRewardHistory

func (m *MinerAPI) GetRewardHistory(ctx context.Context, params *pbtypes.Address) (*pb.MinerHistoryRewardInfo, error)

func (*MinerAPI) GetRewardRecvBlock

func (m *MinerAPI) GetRewardRecvBlock(ctx context.Context, params *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*MinerAPI) GetRewardRecvBlockBySendHash

func (m *MinerAPI) GetRewardRecvBlockBySendHash(ctx context.Context, params *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*MinerAPI) GetRewardSendBlock

func (m *MinerAPI) GetRewardSendBlock(ctx context.Context, params *pb.RewardParam) (*pbtypes.StateBlock, error)

func (*MinerAPI) UnpackRewardData

func (m *MinerAPI) UnpackRewardData(ctx context.Context, params *pb.Bytes) (*pb.RewardParam, error)

type MintageAPI

type MintageAPI struct {
	// contains filtered or unexported fields
}

func NewMintageAPI

func NewMintageAPI(cfgFile string, l ledger.Store) *MintageAPI

func (*MintageAPI) GetMintageBlock

func (m *MintageAPI) GetMintageBlock(ctx context.Context, param *pb.MintageParams) (*pbtypes.StateBlock, error)

func (*MintageAPI) GetMintageData

func (m *MintageAPI) GetMintageData(ctx context.Context, param *pb.MintageParams) (*pb.Bytes, error)

func (*MintageAPI) GetRewardBlock

func (m *MintageAPI) GetRewardBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*MintageAPI) GetWithdrawMintageBlock

func (m *MintageAPI) GetWithdrawMintageBlock(ctx context.Context, param *pb.WithdrawParams) (*pbtypes.StateBlock, error)

func (*MintageAPI) GetWithdrawMintageData

func (m *MintageAPI) GetWithdrawMintageData(ctx context.Context, param *pbtypes.Hash) (*pb.Bytes, error)

func (*MintageAPI) GetWithdrawRewardBlock

func (m *MintageAPI) GetWithdrawRewardBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*MintageAPI) ParseTokenInfo

func (m *MintageAPI) ParseTokenInfo(ctx context.Context, param *pb.Bytes) (*pbtypes.TokenInfo, error)

type NEP5PledgeAPI

type NEP5PledgeAPI struct {
	// contains filtered or unexported fields
}

func NewNEP5PledgeAPI

func NewNEP5PledgeAPI(cfgFile string, l ledger.Store) *NEP5PledgeAPI

func (*NEP5PledgeAPI) GetAllPledgeInfo

func (n *NEP5PledgeAPI) GetAllPledgeInfo(context.Context, *empty.Empty) (*pb.NEP5PledgeInfos, error)

func (*NEP5PledgeAPI) GetBeneficialPledgeInfos

func (n *NEP5PledgeAPI) GetBeneficialPledgeInfos(ctx context.Context, param *pb.BeneficialPledgeRequest) (*pb.PledgeInfos, error)

func (*NEP5PledgeAPI) GetBeneficialPledgeInfosByAddress

func (n *NEP5PledgeAPI) GetBeneficialPledgeInfosByAddress(ctx context.Context, param *pbtypes.Address) (*pb.PledgeInfos, error)

func (*NEP5PledgeAPI) GetPledgeBeneficialAmount

func (n *NEP5PledgeAPI) GetPledgeBeneficialAmount(ctx context.Context, param *pb.BeneficialPledgeRequest) (*pb.Int64, error)

func (*NEP5PledgeAPI) GetPledgeBeneficialTotalAmount

func (n *NEP5PledgeAPI) GetPledgeBeneficialTotalAmount(ctx context.Context, param *pbtypes.Address) (*pb.Int64, error)

func (*NEP5PledgeAPI) GetPledgeBlock

func (n *NEP5PledgeAPI) GetPledgeBlock(ctx context.Context, param *pb.PledgeParam) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) GetPledgeData

func (n *NEP5PledgeAPI) GetPledgeData(ctx context.Context, param *pb.PledgeParam) (*pb.Bytes, error)

func (*NEP5PledgeAPI) GetPledgeInfo

func (n *NEP5PledgeAPI) GetPledgeInfo(ctx context.Context, param *pb.WithdrawPledgeParam) (*pb.NEP5PledgeInfos, error)

func (*NEP5PledgeAPI) GetPledgeInfoWithNEP5TxId

func (n *NEP5PledgeAPI) GetPledgeInfoWithNEP5TxId(ctx context.Context, param *pb.WithdrawPledgeParam) (*pb.NEP5PledgeInfo, error)

func (*NEP5PledgeAPI) GetPledgeInfoWithTimeExpired

func (n *NEP5PledgeAPI) GetPledgeInfoWithTimeExpired(ctx context.Context, param *pb.WithdrawPledgeParam) (*pb.NEP5PledgeInfos, error)

func (*NEP5PledgeAPI) GetPledgeInfosByPledgeAddress

func (n *NEP5PledgeAPI) GetPledgeInfosByPledgeAddress(ctx context.Context, param *pbtypes.Address) (*pb.PledgeInfos, error)

func (*NEP5PledgeAPI) GetPledgeRewardBlock

func (n *NEP5PledgeAPI) GetPledgeRewardBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) GetPledgeRewardBlockBySendHash

func (n *NEP5PledgeAPI) GetPledgeRewardBlockBySendHash(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) GetTotalPledgeAmount

func (n *NEP5PledgeAPI) GetTotalPledgeAmount(context.Context, *empty.Empty) (*pb.Int64, error)

func (*NEP5PledgeAPI) GetWithdrawPledgeBlock

func (n *NEP5PledgeAPI) GetWithdrawPledgeBlock(ctx context.Context, param *pb.WithdrawPledgeParam) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) GetWithdrawPledgeData

func (n *NEP5PledgeAPI) GetWithdrawPledgeData(ctx context.Context, param *pb.WithdrawPledgeParam) (*pb.Bytes, error)

func (*NEP5PledgeAPI) GetWithdrawRewardBlock

func (n *NEP5PledgeAPI) GetWithdrawRewardBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) GetWithdrawRewardBlockBySendHash

func (n *NEP5PledgeAPI) GetWithdrawRewardBlockBySendHash(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*NEP5PledgeAPI) ParsePledgeInfo

func (n *NEP5PledgeAPI) ParsePledgeInfo(ctx context.Context, param *pb.Bytes) (*pbtypes.NEP5PledgeInfo, error)

type NetAPI

type NetAPI struct {
	// contains filtered or unexported fields
}

func NewNetApi

func NewNetApi(l ledger.Store, eb event.EventBus, cc *chainctx.ChainContext) *NetAPI

func (*NetAPI) ConnectPeersInfo

func (n *NetAPI) ConnectPeersInfo(ctx context.Context, param *pb.Offset) (*pb.PeerInfos, error)

func (*NetAPI) GetAllPeersInfo

func (n *NetAPI) GetAllPeersInfo(ctx context.Context, param *pb.Offset) (*pb.PeerInfos, error)

func (*NetAPI) GetBandwidthStats

func (n *NetAPI) GetBandwidthStats(context.Context, *empty.Empty) (*pb.EventBandwidthStats, error)

func (*NetAPI) GetOnlinePeersInfo

func (n *NetAPI) GetOnlinePeersInfo(ctx context.Context, param *pb.Offset) (*pb.PeerInfos, error)

func (*NetAPI) GetPeerId

func (n *NetAPI) GetPeerId(context.Context, *empty.Empty) (*pb.String, error)

func (*NetAPI) OnlineRepresentatives

func (n *NetAPI) OnlineRepresentatives(context.Context, *empty.Empty) (*pbtypes.Addresses, error)

func (*NetAPI) OnlineRepsInfo

func (n *NetAPI) OnlineRepsInfo(context.Context, *empty.Empty) (*pb.OnlineRepTotal, error)

func (*NetAPI) PeersCount

func (n *NetAPI) PeersCount(context.Context, *empty.Empty) (*pb.PeersCountResponse, error)

func (*NetAPI) Syncing

func (n *NetAPI) Syncing(context.Context, *empty.Empty) (*pb.Boolean, error)

type PermissionAPI

type PermissionAPI struct {
	// contains filtered or unexported fields
}

func NewPermissionAPI

func NewPermissionAPI(cfgFile string, l ledger.Store) *PermissionAPI

func (*PermissionAPI) GetAdmin

func (p *PermissionAPI) GetAdmin(ctx context.Context, params *empty.Empty) (*pb.AdminUser, error)

func (*PermissionAPI) GetAdminHandoverBlock

func (p *PermissionAPI) GetAdminHandoverBlock(ctx context.Context, params *pb.AdminUpdateParam) (*pbtypes.StateBlock, error)

func (*PermissionAPI) GetNode

func (p *PermissionAPI) GetNode(ctx context.Context, params *pb.String) (*pb.NodeInfo, error)

func (*PermissionAPI) GetNodeUpdateBlock

func (p *PermissionAPI) GetNodeUpdateBlock(ctx context.Context, params *pb.NodeParam) (*pbtypes.StateBlock, error)

func (*PermissionAPI) GetNodes

func (p *PermissionAPI) GetNodes(ctx context.Context, params *pb.Offset) (*pb.NodeInfos, error)

func (*PermissionAPI) GetNodesCount

func (p *PermissionAPI) GetNodesCount(ctx context.Context, params *empty.Empty) (*pb.Int32, error)

type PovAPI

type PovAPI struct {
	// contains filtered or unexported fields
}

func NewPovAPI

func NewPovAPI(ctx context.Context, cfg *config.Config, l ledger.Store, eb event.EventBus, cc *chainctx.ChainContext) *PovAPI

func (*PovAPI) BatchGetHeadersByHeight

func (p *PovAPI) BatchGetHeadersByHeight(ctx context.Context, param *pb.HeadersByHeightRequest) (*pb.PovApiBatchHeader, error)

func (*PovAPI) GetAccountState

func (p *PovAPI) GetAccountState(ctx context.Context, param *pb.AccountStateRequest) (*pb.PovApiState, error)

func (*PovAPI) GetAccountStateByBlockHash

func (p *PovAPI) GetAccountStateByBlockHash(ctx context.Context, param *pb.AccountStateByHashRequest) (*pb.PovApiState, error)

func (*PovAPI) GetAccountStateByBlockHeight

func (p *PovAPI) GetAccountStateByBlockHeight(ctx context.Context, param *pb.AccountStateByHeightRequest) (*pb.PovApiState, error)

func (*PovAPI) GetAllRepStatesByBlockHash

func (p *PovAPI) GetAllRepStatesByBlockHash(ctx context.Context, param *pbtypes.Hash) (*pb.PovApiRepState, error)

func (*PovAPI) GetAllRepStatesByBlockHeight

func (p *PovAPI) GetAllRepStatesByBlockHeight(ctx context.Context, param *pb.UInt64) (*pb.PovApiRepState, error)

func (*PovAPI) GetAllRepStatesByStateHash

func (p *PovAPI) GetAllRepStatesByStateHash(ctx context.Context, param *pbtypes.Hash) (*pb.PovApiRepState, error)

func (*PovAPI) GetBlockByHash

func (p *PovAPI) GetBlockByHash(ctx context.Context, param *pb.BlockByHashRequest) (*pb.PovApiBlock, error)

func (*PovAPI) GetBlockByHeight

func (p *PovAPI) GetBlockByHeight(ctx context.Context, param *pb.BlockByHeightRequest) (*pb.PovApiBlock, error)

func (*PovAPI) GetDiffDayStat

func (p *PovAPI) GetDiffDayStat(ctx context.Context, param *pb.UInt32) (*pbtypes.PovDiffDayStat, error)

func (*PovAPI) GetDiffDayStatByHeight

func (p *PovAPI) GetDiffDayStatByHeight(ctx context.Context, param *pb.UInt64) (*pbtypes.PovDiffDayStat, error)

func (*PovAPI) GetFittestHeader

func (p *PovAPI) GetFittestHeader(ctx context.Context, param *pb.UInt64) (*pb.PovApiHeader, error)

func (*PovAPI) GetHashInfo

func (p *PovAPI) GetHashInfo(ctx context.Context, param *pb.HashInfoRequest) (*pb.PovApiHashInfo, error)

func (*PovAPI) GetHeaderByHash

func (p *PovAPI) GetHeaderByHash(ctx context.Context, param *pbtypes.Hash) (*pb.PovApiHeader, error)

func (*PovAPI) GetHeaderByHeight

func (p *PovAPI) GetHeaderByHeight(ctx context.Context, param *pb.UInt64) (*pb.PovApiHeader, error)

func (*PovAPI) GetLastNHourInfo

func (p *PovAPI) GetLastNHourInfo(ctx context.Context, param *pb.LastNHourInfoRequest) (*pb.PovApiGetLastNHourInfo, error)

func (*PovAPI) GetLatestAccountState

func (p *PovAPI) GetLatestAccountState(ctx context.Context, param *pbtypes.Address) (*pb.PovApiState, error)

func (*PovAPI) GetLatestBlock

func (p *PovAPI) GetLatestBlock(ctx context.Context, param *pb.LatestBlockRequest) (*pb.PovApiBlock, error)

func (*PovAPI) GetLatestHeader

func (p *PovAPI) GetLatestHeader(ctx context.Context, param *empty.Empty) (*pb.PovApiHeader, error)

func (*PovAPI) GetLedgerStats

func (p *PovAPI) GetLedgerStats(ctx context.Context, param *empty.Empty) (*pb.PovLedgerStats, error)

func (*PovAPI) GetMinerDayStat

func (p *PovAPI) GetMinerDayStat(ctx context.Context, param *pb.UInt32) (*pbtypes.PovMinerDayStat, error)

func (*PovAPI) GetMinerDayStatByHeight

func (p *PovAPI) GetMinerDayStatByHeight(ctx context.Context, param *pb.UInt64) (*pbtypes.PovMinerDayStat, error)

func (*PovAPI) GetMinerStats

func (p *PovAPI) GetMinerStats(ctx context.Context, param *pbtypes.Addresses) (*pb.PovMinerStats, error)

func (*PovAPI) GetMiningInfo

func (p *PovAPI) GetMiningInfo(ctx context.Context, param *empty.Empty) (*pb.PovApiGetMiningInfo, error)

func (*PovAPI) GetPovStatus

func (p *PovAPI) GetPovStatus(ctx context.Context, param *empty.Empty) (*pb.PovStatus, error)

func (*PovAPI) GetRepStats

func (p *PovAPI) GetRepStats(ctx context.Context, param *pbtypes.Addresses) (*pb.PovRepStats, error)

func (*PovAPI) GetTransaction

func (p *PovAPI) GetTransaction(ctx context.Context, param *pbtypes.Hash) (*pb.PovApiTxLookup, error)

func (*PovAPI) GetTransactionByBlockHashAndIndex

func (p *PovAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, param *pb.TransactionByBlockHashRequest) (*pb.PovApiTxLookup, error)

func (*PovAPI) GetTransactionByBlockHeightAndIndex

func (p *PovAPI) GetTransactionByBlockHeightAndIndex(ctx context.Context, param *pb.TransactionByBlockHeightRequest) (*pb.PovApiTxLookup, error)

func (*PovAPI) GetWork

func (p *PovAPI) GetWork(ctx context.Context, param *pb.WorkRequest) (*pb.PovApiGetWork, error)

func (*PovAPI) NewBlock

func (p *PovAPI) NewBlock(em *empty.Empty, srv pb.PovAPI_NewBlockServer) error

func (*PovAPI) StartMining

func (p *PovAPI) StartMining(ctx context.Context, param *pb.StartMiningRequest) (*empty.Empty, error)

func (*PovAPI) StopMining

func (p *PovAPI) StopMining(ctx context.Context, param *empty.Empty) (*empty.Empty, error)

type PrivacyAPI

type PrivacyAPI struct {
	// contains filtered or unexported fields
}

func NewPrivacyAPI

func NewPrivacyAPI(cfg *config.Config, l ledger.Store, eb event.EventBus, cc *chainctx.ChainContext) *PrivacyAPI

func (*PrivacyAPI) DistributeRawPayload

func (p *PrivacyAPI) DistributeRawPayload(ctx context.Context, param *pb.PrivacyDistributeParam) (*pb.Bytes, error)

func (*PrivacyAPI) GetBlockPrivatePayload

func (p *PrivacyAPI) GetBlockPrivatePayload(ctx context.Context, param *pbtypes.Hash) (*pb.Bytes, error)

func (*PrivacyAPI) GetDemoKV

func (p *PrivacyAPI) GetDemoKV(ctx context.Context, param *pb.Bytes) (*pb.Bytes, error)

func (*PrivacyAPI) GetRawPayload

func (p *PrivacyAPI) GetRawPayload(ctx context.Context, param *pb.Bytes) (*pb.Bytes, error)

type PtmKeyAPI

type PtmKeyAPI struct {
	// contains filtered or unexported fields
}

func NewPtmKeyAPI

func NewPtmKeyAPI(cfgFile string, l ledger.Store) *PtmKeyAPI

func (*PtmKeyAPI) GetPtmKeyByAccount

func (p *PtmKeyAPI) GetPtmKeyByAccount(ctx context.Context, param *pbtypes.Address) (*pb.PtmKeyUpdateParams, error)

func (*PtmKeyAPI) GetPtmKeyByAccountAndBtype

func (p *PtmKeyAPI) GetPtmKeyByAccountAndBtype(ctx context.Context, param *pb.PtmKeyByAccountAndBtypeParam) (*pb.PtmKeyUpdateParams, error)

func (*PtmKeyAPI) GetPtmKeyDeleteBlock

func (p *PtmKeyAPI) GetPtmKeyDeleteBlock(ctx context.Context, param *pb.PtmKeyByAccountAndBtypeParam) (*pbtypes.StateBlock, error)

func (*PtmKeyAPI) GetPtmKeyUpdateBlock

func (p *PtmKeyAPI) GetPtmKeyUpdateBlock(ctx context.Context, param *pb.PtmKeyUpdateParam) (*pbtypes.StateBlock, error)

type PublicKeyDistributionAPI

type PublicKeyDistributionAPI struct {
	// contains filtered or unexported fields
}

PublicKeyDistributionAPI

func NewPublicKeyDistributionAPI

func NewPublicKeyDistributionAPI(cfgFile string, l ledger.Store) *PublicKeyDistributionAPI

func (*PublicKeyDistributionAPI) GetActiveVerifiers

func (p *PublicKeyDistributionAPI) GetActiveVerifiers(ctx context.Context, param *pb.String) (*pb.VerifierRegParams, error)

func (*PublicKeyDistributionAPI) GetAllVerifierStatesByBlockHeight

func (p *PublicKeyDistributionAPI) GetAllVerifierStatesByBlockHeight(ctx context.Context, param *pb.UInt64) (*pb.PKDVerifierStateList, error)

func (*PublicKeyDistributionAPI) GetAllVerifiers

func (p *PublicKeyDistributionAPI) GetAllVerifiers(ctx context.Context, param *empty.Empty) (*pb.VerifierRegParams, error)

func (*PublicKeyDistributionAPI) GetAvailRewardInfo

func (p *PublicKeyDistributionAPI) GetAvailRewardInfo(ctx context.Context, param *pbtypes.Address) (*pb.PKDAvailRewardInfo, error)

func (*PublicKeyDistributionAPI) GetOracleBlock

func (p *PublicKeyDistributionAPI) GetOracleBlock(ctx context.Context, param *pb.OracleParam) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetOracleInfosByAccountAndType

func (p *PublicKeyDistributionAPI) GetOracleInfosByAccountAndType(ctx context.Context, param *pb.AccountAndTypeParam) (*pb.OracleParams, error)

func (*PublicKeyDistributionAPI) GetOracleInfosByHash

func (p *PublicKeyDistributionAPI) GetOracleInfosByHash(ctx context.Context, param *pbtypes.Hash) (*pb.OracleParams, error)

func (*PublicKeyDistributionAPI) GetOracleInfosByType

func (p *PublicKeyDistributionAPI) GetOracleInfosByType(ctx context.Context, param *pb.String) (*pb.OracleParams, error)

func (*PublicKeyDistributionAPI) GetOracleInfosByTypeAndID

func (p *PublicKeyDistributionAPI) GetOracleInfosByTypeAndID(ctx context.Context, param *pb.TypeAndIDParam) (*pb.OracleParams, error)

func (*PublicKeyDistributionAPI) GetPubKeyByTypeAndID

func (p *PublicKeyDistributionAPI) GetPubKeyByTypeAndID(ctx context.Context, param *pb.TypeAndIDParam) (*pb.PublishInfoStates, error)

func (*PublicKeyDistributionAPI) GetPublishBlock

func (p *PublicKeyDistributionAPI) GetPublishBlock(ctx context.Context, param *pb.PublishParam) (*pb.PublishRet, error)

func (*PublicKeyDistributionAPI) GetPublishInfosByAccountAndType

func (p *PublicKeyDistributionAPI) GetPublishInfosByAccountAndType(ctx context.Context, param *pb.AccountAndTypeParam) (*pb.PublishInfoStates, error)

func (*PublicKeyDistributionAPI) GetPublishInfosByType

func (p *PublicKeyDistributionAPI) GetPublishInfosByType(ctx context.Context, param *pb.String) (*pb.PublishInfoStates, error)

func (*PublicKeyDistributionAPI) GetRecommendPubKey

func (p *PublicKeyDistributionAPI) GetRecommendPubKey(ctx context.Context, param *pb.TypeAndIDParam) (*pb.PublishInfoState, error)

func (*PublicKeyDistributionAPI) GetRewardHistory

func (p *PublicKeyDistributionAPI) GetRewardHistory(ctx context.Context, param *pbtypes.Address) (*pb.PKDHistoryRewardInfo, error)

func (*PublicKeyDistributionAPI) GetRewardRecvBlock

func (p *PublicKeyDistributionAPI) GetRewardRecvBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetRewardRecvBlockBySendHash

func (p *PublicKeyDistributionAPI) GetRewardRecvBlockBySendHash(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetRewardSendBlock

func (p *PublicKeyDistributionAPI) GetRewardSendBlock(ctx context.Context, param *pb.PKDRewardParam) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetUnPublishBlock

func (p *PublicKeyDistributionAPI) GetUnPublishBlock(ctx context.Context, param *pb.UnPublishParam) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetVerifierHeartBlock

func (p *PublicKeyDistributionAPI) GetVerifierHeartBlock(ctx context.Context, param *pb.VerifierHeartBlockRequest) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetVerifierRegisterBlock

func (p *PublicKeyDistributionAPI) GetVerifierRegisterBlock(ctx context.Context, param *pb.VerifierRegParam) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetVerifierStateByBlockHeight

func (*PublicKeyDistributionAPI) GetVerifierUnregisterBlock

func (p *PublicKeyDistributionAPI) GetVerifierUnregisterBlock(ctx context.Context, param *pb.VerifierUnRegParam) (*pbtypes.StateBlock, error)

func (*PublicKeyDistributionAPI) GetVerifiersByAccount

func (p *PublicKeyDistributionAPI) GetVerifiersByAccount(ctx context.Context, param *pbtypes.Address) (*pb.VerifierRegParams, error)

func (*PublicKeyDistributionAPI) GetVerifiersByType

func (p *PublicKeyDistributionAPI) GetVerifiersByType(ctx context.Context, param *pb.String) (*pb.VerifierRegParams, error)

func (*PublicKeyDistributionAPI) PackRewardData

func (p *PublicKeyDistributionAPI) PackRewardData(ctx context.Context, param *pb.PKDRewardParam) (*pb.Bytes, error)

func (*PublicKeyDistributionAPI) UnpackRewardData

func (p *PublicKeyDistributionAPI) UnpackRewardData(ctx context.Context, param *pb.Bytes) (*pb.PKDRewardParam, error)

type RepAPI

type RepAPI struct {
	// contains filtered or unexported fields
}

func NewRepAPI

func NewRepAPI(cfg *config.Config, ledger ledger.Store) *RepAPI

func (*RepAPI) GetAvailRewardInfo

func (p *RepAPI) GetAvailRewardInfo(ctx context.Context, param *pbtypes.Address) (*pb.RepAvailRewardInfo, error)

func (*RepAPI) GetRepStateWithHeight

func (p *RepAPI) GetRepStateWithHeight(ctx context.Context, param *pb.RepStateParams) (*pbtypes.PovRepState, error)

func (*RepAPI) GetRewardData

func (p *RepAPI) GetRewardData(ctx context.Context, param *pb.RepRewardParam) (*pb.Bytes, error)

func (*RepAPI) GetRewardHistory

func (p *RepAPI) GetRewardHistory(ctx context.Context, param *pbtypes.Address) (*pb.RepHistoryRewardInfo, error)

func (*RepAPI) GetRewardRecvBlock

func (p *RepAPI) GetRewardRecvBlock(ctx context.Context, param *pbtypes.StateBlock) (*pbtypes.StateBlock, error)

func (*RepAPI) GetRewardRecvBlockBySendHash

func (p *RepAPI) GetRewardRecvBlockBySendHash(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*RepAPI) GetRewardSendBlock

func (p *RepAPI) GetRewardSendBlock(ctx context.Context, param *pb.RepRewardParam) (*pbtypes.StateBlock, error)

func (*RepAPI) UnpackRewardData

func (p *RepAPI) UnpackRewardData(ctx context.Context, param *pb.Bytes) (*pb.RepRewardParam, error)

type RewardsAPI

type RewardsAPI struct {
	// contains filtered or unexported fields
}

func NewRewardsAPI

func NewRewardsAPI(l ledger.Store, cc *chainctx.ChainContext) *RewardsAPI

func (*RewardsAPI) GetConfidantRewards

func (r *RewardsAPI) GetConfidantRewards(ctx context.Context, param *pbtypes.Address) (*pb.ConfidantRewardsResponse, error)

func (*RewardsAPI) GetConfidantRewordsDetail

func (r *RewardsAPI) GetConfidantRewordsDetail(ctx context.Context, param *pbtypes.Address) (*pb.RewardsInfosByAddress, error)

func (*RewardsAPI) GetReceiveRewardBlock

func (r *RewardsAPI) GetReceiveRewardBlock(ctx context.Context, param *pbtypes.Hash) (*pbtypes.StateBlock, error)

func (*RewardsAPI) GetRewardsDetail

func (r *RewardsAPI) GetRewardsDetail(ctx context.Context, param *pb.String) (*pb.RewardsInfos, error)

func (*RewardsAPI) GetSendConfidantBlock

func (r *RewardsAPI) GetSendConfidantBlock(ctx context.Context, param *pb.RewardsParamWithSign) (*pbtypes.StateBlock, error)

func (*RewardsAPI) GetSendRewardBlock

func (r *RewardsAPI) GetSendRewardBlock(ctx context.Context, param *pb.RewardsParamWithSign) (*pbtypes.StateBlock, error)

func (*RewardsAPI) GetTotalRewards

func (r *RewardsAPI) GetTotalRewards(ctx context.Context, param *pb.String) (*pb.Int64, error)

func (*RewardsAPI) GetUnsignedConfidantData

func (r *RewardsAPI) GetUnsignedConfidantData(ctx context.Context, param *pb.RewardsParam) (*pbtypes.Hash, error)

func (*RewardsAPI) GetUnsignedRewardData

func (r *RewardsAPI) GetUnsignedRewardData(ctx context.Context, param *pb.RewardsParam) (*pbtypes.Hash, error)

func (*RewardsAPI) IsAirdropRewards

func (r *RewardsAPI) IsAirdropRewards(ctx context.Context, param *pb.Bytes) (*pb.Boolean, error)

type UtilApi

type UtilApi struct {
	// contains filtered or unexported fields
}

func NewUtilApi

func NewUtilApi(l ledger.Store) *UtilApi

func (*UtilApi) BalanceToRaw

func (u *UtilApi) BalanceToRaw(ctx context.Context, param *pb.RawBalance) (*pb.Int64, error)

func (*UtilApi) Decrypt

func (u *UtilApi) Decrypt(ctx context.Context, param *pb.DecryptRequest) (*pb.String, error)

func (*UtilApi) Encrypt

func (u *UtilApi) Encrypt(ctx context.Context, param *pb.EncryptRequest) (*pb.String, error)

func (*UtilApi) RawToBalance

func (u *UtilApi) RawToBalance(ctx context.Context, param *pb.RawBalance) (*pb.Float, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL