Documentation
¶
Index ¶
- Constants
- func AssetStatusNames() []string
- func ContractStatusNames() []string
- func DLRStatusNames() []string
- func SLATypeNames() []string
- func SendingStatusNames() []string
- func SettlementStatusNames() []string
- func SignatureFunc(account *types.Account, hash types.Hash) (types.Signature, error)
- type APIAccount
- type APIAccountBalance
- type APIAccountsBalance
- type APIAsset
- type APIBalance
- type APIBlock
- type APIDestroyInfo
- type APIDestroyParam
- type APIPending
- type APIRepresentative
- type APISendBlockPara
- type APITokenMeta
- type AccountApi
- func (a *AccountApi) Create(seedStr string, index uint32) (map[string]string, error)
- func (a *AccountApi) ForPublicKey(pubStr string) (types.Address, error)
- func (a *AccountApi) NewSeed() (string, error)
- func (a *AccountApi) PublicKey(addr types.Address) string
- func (a *AccountApi) Validate(addr string) bool
- type ApiTokenInfo
- type Asset
- type AssetParam
- type AssetStatus
- type BlockSubscription
- type CDRParam
- type CDRStatus
- type CompareRecord
- type Compensation
- type ContractApi
- type ContractService
- type ContractStatus
- type Contractor
- type CreateContractParam
- type DLRStatus
- type DebugApi
- type DestroyApi
- func (b *DestroyApi) GetDestroyInfoDetail(addr *types.Address) ([]*APIDestroyInfo, error)
- func (b *DestroyApi) GetRewardsBlock(send *types.Hash) (*types.StateBlock, error)
- func (b *DestroyApi) GetSendBlock(param *APIDestroyParam, sign SignatureParam) (*types.StateBlock, error)
- func (b *DestroyApi) GetTotalDestroyInfo(addr *types.Address) (types.Balance, error)
- type InvoiceRecord
- type LedgerApi
- func (l *LedgerApi) AccountBlocksCount(address types.Address) (int64, error)
- func (l *LedgerApi) AccountHistoryTopn(address types.Address, count int, offset int) ([]*APIBlock, error)
- func (l *LedgerApi) AccountInfo(address types.Address) (*APIAccount, error)
- func (l *LedgerApi) AccountRepresentative(address types.Address) (types.Address, error)
- func (l *LedgerApi) AccountVotingWeight(address types.Address) (types.Balance, error)
- func (l *LedgerApi) Accounts(count int, offset int) ([]types.Address, error)
- func (l *LedgerApi) AccountsBalance(addresses []types.Address) (map[types.Address]map[string]*APIAccountsBalance, error)
- func (l *LedgerApi) AccountsCount() (uint64, error)
- func (l *LedgerApi) AccountsFrontiers(addresses []types.Address) (map[types.Address]map[string]types.Hash, error)
- func (l *LedgerApi) AccountsPending(addresses []types.Address, n int) (map[types.Address][]*APIPending, error)
- func (l *LedgerApi) AllGenesisBlocks() ([]*types.StateBlock, error)
- func (l *LedgerApi) BalanceChange(ch chan *types.AccountMeta, address types.Address) (*Subscribe, error)
- func (l *LedgerApi) BlockAccount(hash types.Hash) (types.Address, error)
- func (l *LedgerApi) BlockConfirmedStatus(hash types.Hash) (bool, error)
- func (l *LedgerApi) BlockHash(block types.StateBlock) types.Hash
- func (l *LedgerApi) BlockInfo(hash types.Hash) (*APIBlock, error)
- func (l *LedgerApi) BlockSubscription(address types.Address) (*BlockSubscription, error)
- func (l *LedgerApi) Blocks(count int, offset int) ([]*APIBlock, error)
- func (l *LedgerApi) BlocksCount() (map[string]uint64, error)
- func (l *LedgerApi) BlocksCountByType() (map[string]uint64, error)
- func (l *LedgerApi) BlocksInfo(hash []types.Hash) ([]*APIBlock, error)
- func (l *LedgerApi) Chain(hash types.Hash, n int) ([]types.Hash, error)
- func (l *LedgerApi) ChainToken() (*types.Hash, error)
- func (l *LedgerApi) ConfirmedAccountInfo(address types.Address) (*APIAccount, error)
- func (l *LedgerApi) Delegators(hash types.Address) ([]*APIAccountBalance, error)
- func (l *LedgerApi) DelegatorsCount(hash types.Address) (int64, error)
- func (l *LedgerApi) GasAddress() (*types.Address, error)
- func (l *LedgerApi) GasBlock() (*types.StateBlock, error)
- func (l *LedgerApi) GasBlockHash() (*types.Hash, error)
- func (l *LedgerApi) GasMintageBlock() (*types.StateBlock, error)
- func (l *LedgerApi) GasToken() (*types.Hash, error)
- func (l *LedgerApi) GenerateAndProcessChangeBlock(account, representative types.Address, sign Signature) (types.Hash, error)
- func (l *LedgerApi) GenerateAndProcessReceiveBlock(txBlock *types.StateBlock, sign Signature) (types.Hash, error)
- func (l *LedgerApi) GenerateAndProcessReceiveBlockByHash(txHash types.Hash, sign Signature) (types.Hash, error)
- func (l *LedgerApi) GenerateAndProcessSendBlock(para *APISendBlockPara, sign Signature) (types.Hash, error)
- func (l *LedgerApi) GenerateChangeBlock(account, representative types.Address, sign Signature) (*types.StateBlock, error)
- func (l *LedgerApi) GenerateReceiveBlock(txBlock *types.StateBlock, sign Signature) (*types.StateBlock, error)
- func (l *LedgerApi) GenerateReceiveBlockByHash(txHash types.Hash, sign Signature) (*types.StateBlock, error)
- func (l *LedgerApi) GenerateSendBlock(para *APISendBlockPara, sign Signature) (*types.StateBlock, error)
- func (l *LedgerApi) GenesisAddress() (*types.Address, error)
- func (l *LedgerApi) GenesisBlock() (*types.StateBlock, error)
- func (l *LedgerApi) GenesisBlockHash() (*types.Hash, error)
- func (l *LedgerApi) GenesisMintageBlock() (*types.StateBlock, error)
- func (l *LedgerApi) GenesisMintageHash() (*types.Hash, error)
- func (l *LedgerApi) IsGenesisBlock() (*bool, error)
- func (l *LedgerApi) IsGenesisToken() (*bool, error)
- func (l *LedgerApi) NewAccountBlock(ch chan *types.StateBlock, address types.Address) (*Subscribe, error)
- func (l *LedgerApi) NewBlock(ch chan *types.StateBlock) (*Subscribe, error)
- func (l *LedgerApi) NewPending(ch chan *APIPending, address types.Address) (*Subscribe, error)
- func (l *LedgerApi) Pending(address types.Address, hash types.Hash) (*APIPending, error)
- func (l *LedgerApi) Pendings() ([]*APIPending, error)
- func (l *LedgerApi) Performance() ([]*types.PerformanceTime, error)
- func (l *LedgerApi) Process(block *types.StateBlock) (types.Hash, error)
- func (l *LedgerApi) Representatives(sorting bool) ([]*APIRepresentative, error)
- func (l *LedgerApi) Stop()
- func (l *LedgerApi) TokenInfoById(tokenId types.Hash) (*ApiTokenInfo, error)
- func (l *LedgerApi) TokenInfoByName(tokenName string) (*ApiTokenInfo, error)
- func (l *LedgerApi) TokenMeta(hash types.Hash, address types.Address) (*APITokenMeta, error)
- func (l *LedgerApi) Tokens() ([]*types.TokenInfo, error)
- func (l *LedgerApi) TransactionsCount() (map[string]uint64, error)
- func (l *LedgerApi) Unsubscribe(subscribe *Subscribe) error
- type MatchingRecord
- type MinerApi
- func (m *MinerApi) GetAvailRewardInfo(coinbase types.Address) (*MinerAvailRewardInfo, error)
- func (m *MinerApi) GetRewardHistory(coinbase types.Address) (*MinerHistoryRewardInfo, error)
- func (m *MinerApi) GetRewardRecvBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (m *MinerApi) GetRewardRecvBlockBySendHash(sendHash types.Hash) (*types.StateBlock, error)
- func (m *MinerApi) GetRewardSendBlock(param *RewardParam) (*types.StateBlock, error)
- type MinerAvailRewardInfo
- type MinerHistoryRewardInfo
- type MintageApi
- func (m *MintageApi) GetMintageBlock(param *MintageParams) (*types.StateBlock, error)
- func (m *MintageApi) GetMintageData(param *MintageParams) ([]byte, error)
- func (m *MintageApi) GetRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (m *MintageApi) GetWithdrawMintageBlock(param *WithdrawParams) (*types.StateBlock, error)
- func (m *MintageApi) GetWithdrawMintageData(tokenId types.Hash) ([]byte, error)
- func (m *MintageApi) GetWithdrawRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (m *MintageApi) ParseTokenInfo(data []byte) (*types.TokenInfo, error)
- type MintageParams
- type MultiPartySummaryResult
- type NEP5PledgeInfo
- type NetApi
- type PledgeApi
- func (p *PledgeApi) GetPledgeBlock(param *PledgeParam) (*types.StateBlock, error)
- func (p *PledgeApi) GetPledgeData(param *PledgeParam) ([]byte, error)
- func (p *PledgeApi) GetPledgeInfoWithNEP5TxId(param *WithdrawPledgeParam) (*NEP5PledgeInfo, error)
- func (p *PledgeApi) GetPledgeRewordBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (p *PledgeApi) GetTotalPledgeAmount() (*big.Int, error)
- func (p *PledgeApi) GetWithdrawPledgeBlock(param *WithdrawPledgeParam) (*types.StateBlock, error)
- func (p *PledgeApi) GetWithdrawPledgeData(param *WithdrawPledgeParam) ([]byte, error)
- func (p *PledgeApi) GetWithdrawRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (p *PledgeApi) ParsePledgeInfo(data []byte) (*PledgeInfo, error)
- func (p *PledgeApi) SearchAllPledgeInfo() ([]*NEP5PledgeInfo, error)
- func (p *PledgeApi) SearchPledgeInfo(param *WithdrawPledgeParam) ([]*NEP5PledgeInfo, error)
- type PledgeInfo
- type PledgeParam
- type PovApi
- func (p *PovApi) BatchGetHeadersByHeight(height uint64, count uint64, asc bool) (*PovApiBatchHeader, error)
- func (p *PovApi) GetAccountStateByBlockHash(address types.Address, blockHash types.Hash) (*PovApiState, error)
- func (p *PovApi) GetAccountStateByBlockHeight(address types.Address, height uint64) (*PovApiState, error)
- func (p *PovApi) GetBlockByHash(blockHash types.Hash, txOffset uint32, txLimit uint32) (*PovApiBlock, error)
- func (p *PovApi) GetBlockByHeight(height uint64, txOffset uint32, txLimit uint32) (*PovApiBlock, error)
- func (p *PovApi) GetDiffDayStat(dayIndex int) (*types.PovDiffDayStat, error)
- func (p *PovApi) GetDiffDayStatByHeight(height uint64) (*types.PovDiffDayStat, error)
- func (p *PovApi) GetFittestHeader(gap uint64) (*PovApiHeader, error)
- func (p *PovApi) GetHashInfo(height uint64, lookup uint64) (*PovApiHashInfo, error)
- func (p *PovApi) GetHeaderByHash(blockHash types.Hash) (*PovApiHeader, error)
- func (p *PovApi) GetHeaderByHeight(height uint64) (*PovApiHeader, error)
- func (p *PovApi) GetLastNHourInfo(endHeight uint64, timeSpan uint32) (*PovApiGetLastNHourInfo, error)
- func (p *PovApi) GetLatestAccountState(address types.Address) (*PovApiState, error)
- func (p *PovApi) GetLatestBlock(txOffset uint32, txLimit uint32) (*PovApiBlock, error)
- func (p *PovApi) GetLatestHeader() (*PovApiHeader, error)
- func (p *PovApi) GetMinerDayStat(dayIndex int) (*types.PovMinerDayStat, error)
- func (p *PovApi) GetMinerDayStatByHeight(height uint64) (*types.PovMinerDayStat, error)
- func (p *PovApi) GetMinerStats(addrs []types.Address) (*PovMinerStats, error)
- func (p *PovApi) GetMiningInfo() (*PovApiGetMiningInfo, error)
- func (p *PovApi) GetPovStatus() (*PovApiStatus, error)
- func (p *PovApi) GetRepStats(addrs []types.Address) (*PovRepStats, error)
- func (p *PovApi) GetTransaction(txHash types.Hash) (*PovApiTxLookup, error)
- func (p *PovApi) GetTransactionByBlockHashAndIndex(blockHash types.Hash, index uint32) (*PovApiTxLookup, error)
- func (p *PovApi) GetTransactionByBlockHeightAndIndex(height uint64, index uint32) (*PovApiTxLookup, error)
- func (p *PovApi) GetWork(minerAddr types.Address, algoName string) (*PovApiGetWork, error)
- func (p *PovApi) SubmitWork(work *PovApiSubmitWork) error
- func (p *PovApi) SubscribeNewBlock(ch chan *PovApiHeader) (*Subscribe, error)
- func (p *PovApi) Unsubscribe(subscribe *Subscribe) error
- type PovApiBatchHeader
- type PovApiBlock
- type PovApiGetLastNHourInfo
- type PovApiGetLastNHourItem
- type PovApiGetMiningInfo
- type PovApiGetWork
- type PovApiHashInfo
- type PovApiHeader
- type PovApiState
- type PovApiStatus
- type PovApiSubmitWork
- type PovApiTxLookup
- type PovMinerStatItem
- type PovMinerStats
- type PovRepStatItem
- type PovRepStats
- type QLCClient
- type RegisterAssetParam
- type RepApi
- func (r *RepApi) GetAvailRewardInfo(account types.Address) (*RepAvailRewardInfo, error)
- func (r *RepApi) GetRewardHistory(account types.Address) (*RepHistoryRewardInfo, error)
- func (r *RepApi) GetRewardRecvBlock(input *types.StateBlock) (*types.StateBlock, error)
- func (r *RepApi) GetRewardRecvBlockBySendHash(sendHash types.Hash) (*types.StateBlock, error)
- func (r *RepApi) GetRewardSendBlock(param *RepRewardParam) (*types.StateBlock, error)
- type RepAvailRewardInfo
- type RepHistoryRewardInfo
- type RepRewardParam
- type RewardParam
- type RewardsApi
- func (r *RewardsApi) GetConfidantRewords(confidant types.Address) (map[string]*big.Int, error)
- func (r *RewardsApi) GetReceiveRewardBlock(send *types.Hash) (*types.StateBlock, error)
- func (r *RewardsApi) GetSendConfidantBlock(param *RewardsParam, sign *types.Signature) (*types.StateBlock, error)
- func (r *RewardsApi) GetSendRewardBlock(param *RewardsParam, sign *types.Signature) (*types.StateBlock, error)
- func (r *RewardsApi) GetTotalRewards(txId string) (*big.Int, error)
- func (r *RewardsApi) GetUnsignedConfidantData(param *RewardsParam) (types.Hash, error)
- func (r *RewardsApi) GetUnsignedRewardData(param *RewardsParam) (types.Hash, error)
- type RewardsParam
- type SLA
- type SLAType
- type SendingStatus
- type SettlementAPI
- func (s *SettlementAPI) GenerateInvoices(addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- func (s *SettlementAPI) GenerateInvoicesByContract(addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- func (s *SettlementAPI) GenerateMultiPartyInvoice(firstAddr, secondAddr *types.Address, start, end int64) ([]*InvoiceRecord, error)
- func (s *SettlementAPI) GenerateMultiPartySummaryReport(firstAddr, secondAddr *types.Address, start, end int64) (*MultiPartySummaryResult, error)
- func (s *SettlementAPI) GetAddNextStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetAddPreStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetAllAssets(count int, offset *int) ([]*AssetParam, error)
- func (s *SettlementAPI) GetAllCDRStatus(addr *types.Address, count int, offset *int) ([]*CDRStatus, error)
- func (s *SettlementAPI) GetAllContracts(count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetAsset(address types.Address) (*AssetParam, error)
- func (s *SettlementAPI) GetAssetsByOwner(owner *types.Address, count int, offset *int) ([]*AssetParam, error)
- func (s *SettlementAPI) GetCDRStatus(addr *types.Address, hash types.Hash) (*CDRStatus, error)
- func (s *SettlementAPI) GetCDRStatusByCdrData(addr *types.Address, index uint64, sender, destination string) (*CDRStatus, error)
- func (s *SettlementAPI) GetCDRStatusByDate(addr *types.Address, start, end int64, count int, offset *int) ([]*CDRStatus, error)
- func (s *SettlementAPI) GetContractAddressByPartyANextStop(addr *types.Address, stopName string) (*types.Address, error)
- func (s *SettlementAPI) GetContractAddressByPartyBPreStop(addr *types.Address, stopName string) (*types.Address, error)
- func (s *SettlementAPI) GetContractsAsPartyA(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetContractsAsPartyB(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetContractsByAddress(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetContractsByStatus(addr *types.Address, status string, count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetCreateContractBlock(param *CreateContractParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetExpiredContracts(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
- func (s *SettlementAPI) GetNextStopNames(addr *types.Address) ([]string, error)
- func (s *SettlementAPI) GetPreStopNames(addr *types.Address) ([]string, error)
- func (s *SettlementAPI) GetProcessCDRBlock(addr *types.Address, param *CDRParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetRegisterAssetBlock(param *RegisterAssetParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetRemoveNextStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetRemovePreStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetSettlementRewardsBlock(send *types.Hash, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetSignContractBlock(param *SignContractParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetSummaryReport(addr *types.Address, start, end int64) (*SummaryResult, error)
- func (s *SettlementAPI) GetTerminateContractBlock(param *TerminateParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetUpdateNextStopBlock(param *UpdateStopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) GetUpdatePreStopBlock(param *UpdateStopParam, sign Signature) (*types.StateBlock, error)
- func (s *SettlementAPI) ToAddress(param *CreateContractParam) (types.Address, error)
- type SettlementCDR
- type SettlementContract
- type SettlementStatus
- type SignContractParam
- type Signature
- type SignatureParam
- type StopParam
- type Subscribe
- type SummaryRecord
- type SummaryResult
- type TerminateParam
- type UpdateStopParam
- type UtilApi
- func (u *UtilApi) BalanceToRaw(balance types.Balance, unit string) (types.Balance, error)
- func (u *UtilApi) BalanceToRawForToken(balance types.Balance, tokenName string) (types.Balance, error)
- func (u *UtilApi) Decrypt(cryptograph string, passphrase string) (string, error)
- func (u *UtilApi) Encrypt(raw string, passphrase string) (string, error)
- func (u *UtilApi) RawToBalance(balance types.Balance, unit string) (APIBalance, error)
- func (u *UtilApi) RawToBalanceForToken(balance types.Balance, tokenName string) (APIBalance, error)
- type WithdrawParams
- type WithdrawPledgeParam
Constants ¶
const BUILDTIME = "2019-06-18_19:44:24"
const GITREV = "9436e5b"
const VERSION = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
func AssetStatusNames ¶ added in v1.3.5
func AssetStatusNames() []string
AssetStatusNames returns a list of possible string values of AssetStatus.
func ContractStatusNames ¶ added in v1.3.5
func ContractStatusNames() []string
ContractStatusNames returns a list of possible string values of ContractStatus.
func DLRStatusNames ¶ added in v1.3.5
func DLRStatusNames() []string
DLRStatusNames returns a list of possible string values of DLRStatus.
func SLATypeNames ¶ added in v1.3.5
func SLATypeNames() []string
SLATypeNames returns a list of possible string values of SLAType.
func SendingStatusNames ¶ added in v1.3.5
func SendingStatusNames() []string
SendingStatusNames returns a list of possible string values of SendingStatus.
func SettlementStatusNames ¶ added in v1.3.5
func SettlementStatusNames() []string
SettlementStatusNames returns a list of possible string values of SettlementStatus.
Types ¶
type APIAccount ¶ added in v1.2.4
type APIAccount struct {
Address types.Address `json:"account"`
CoinBalance *types.Balance `json:"coinBalance,omitempty"`
CoinVote *types.Balance `json:"vote,omitempty"`
CoinNetwork *types.Balance `json:"network,omitempty"`
CoinStorage *types.Balance `json:"storage,omitempty"`
CoinOracle *types.Balance `json:"oracle,omitempty"`
Representative *types.Address `json:"representative,omitempty"`
Tokens []*APITokenMeta `json:"tokens"`
}
type APIAccountBalance ¶ added in v1.2.4
type APIAccountsBalance ¶ added in v1.2.4
type APIAccountsBalance struct {
Balance types.Balance `json:"balance"`
Vote *types.Balance `json:"vote,omitempty"`
Network *types.Balance `json:"network,omitempty"`
Storage *types.Balance `json:"storage,omitempty"`
Oracle *types.Balance `json:"oracle,omitempty"`
Pending types.Balance `json:"pending"`
}
type APIBalance ¶ added in v1.2.4
func (*APIBalance) MarshalText ¶ added in v1.2.4
func (b *APIBalance) MarshalText() ([]byte, error)
func (*APIBalance) String ¶ added in v1.2.4
func (b *APIBalance) String() string
type APIDestroyInfo ¶ added in v1.3.0
type APIDestroyParam ¶ added in v1.3.0
type APIDestroyParam struct {
Owner types.Address `json:"owner"`
Previous types.Hash `json:"previous"`
Token types.Hash `json:"token"`
Amount *big.Int `json:"amount"`
Sign types.Signature `json:"signature"`
}
type APIPending ¶ added in v1.2.4
type APIPending struct {
*types.PendingKey
*types.PendingInfo
TokenName string `json:"tokenName"`
Timestamp int64 `json:"timestamp"`
BlockType types.BlockType `json:"blockType"`
}
type APIRepresentative ¶ added in v1.2.4
type APISendBlockPara ¶ added in v1.2.4
type APITokenMeta ¶ added in v1.2.4
type AccountApi ¶ added in v1.2.4
type AccountApi struct {
// contains filtered or unexported fields
}
func NewAccountAPI ¶ added in v1.3.0
func NewAccountAPI(c *rpc.Client) *AccountApi
NewAccountAPI creates account module for client
func (*AccountApi) ForPublicKey ¶ added in v1.2.4
func (a *AccountApi) ForPublicKey(pubStr string) (types.Address, error)
ForPublicKey returns address for public key
func (*AccountApi) NewSeed ¶ added in v1.2.4
func (a *AccountApi) NewSeed() (string, error)
NewSeed generates new seed
func (*AccountApi) PublicKey ¶ added in v1.2.4
func (a *AccountApi) PublicKey(addr types.Address) string
PublicKey returns public key for address
func (*AccountApi) Validate ¶ added in v1.2.4
func (a *AccountApi) Validate(addr string) bool
Validate accepts a address string and checks if it's valid.
type ApiTokenInfo ¶ added in v1.2.4
type AssetParam ¶ added in v1.3.5
type AssetParam struct {
Owner Contractor `json:"owner"`
Assets []*APIAsset `json:"assets"`
SignDate int64 `json:"signDate"`
StartDate int64 `json:"startDate"`
EndDate int64 `json:"endDate"`
Status AssetStatus `json:"status"`
Address types.Address `json:"address"`
}
type AssetStatus ¶ added in v1.3.5
type AssetStatus int
const ( // AssetStatusDeactivated is a AssetStatus of type Deactivated AssetStatusDeactivated AssetStatus = iota // AssetStatusActivated is a AssetStatus of type Activated AssetStatusActivated )
func ParseAssetStatus ¶ added in v1.3.5
func ParseAssetStatus(name string) (AssetStatus, error)
ParseAssetStatus attempts to convert a string to a AssetStatus
func (AssetStatus) MarshalText ¶ added in v1.3.5
func (x AssetStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (AssetStatus) String ¶ added in v1.3.5
func (x AssetStatus) String() string
String implements the Stringer interface.
func (*AssetStatus) UnmarshalText ¶ added in v1.3.5
func (x *AssetStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type BlockSubscription ¶ added in v1.3.1
type BlockSubscription struct {
// contains filtered or unexported fields
}
type CDRParam ¶ added in v1.3.5
type CDRParam struct {
ContractAddress types.Address `json:"contractAddress"`
Index uint64 `json:"index" validate:"min=1"`
SmsDt int64 `json:"smsDt" validate:"min=1"`
Sender string `json:"sender" validate:"nonzero"`
Destination string `json:"destination" validate:"nonzero"`
SendingStatus SendingStatus `json:"sendingStatus" `
DlrStatus DLRStatus `json:"dlrStatus"`
PreStop string `json:"preStop" `
NextStop string `json:"nextStop" `
}
type CDRStatus ¶ added in v1.3.5
type CDRStatus struct {
Params map[string][]CDRParam `json:"params"`
Status SettlementStatus `json:"status"`
}
type CompareRecord ¶ added in v1.3.5
type CompareRecord struct {
PartyA MatchingRecord `json:"partyA"`
PartyB MatchingRecord `json:"partyB"`
}
type Compensation ¶ added in v1.3.5
type ContractApi ¶ added in v1.2.4
type ContractApi struct {
// contains filtered or unexported fields
}
func NewContractAPI ¶ added in v1.3.0
func NewContractAPI(c *rpc.Client) *ContractApi
NewContractAPI creates contract module for client
func (*ContractApi) ContractAddressList ¶ added in v1.3.0
func (c *ContractApi) ContractAddressList() []types.Address
ContractAddressList return all contract addresses
func (*ContractApi) GetAbiByContractAddress ¶ added in v1.3.0
func (c *ContractApi) GetAbiByContractAddress(address types.Address) (string, error)
GetAbiByContractAddress return contract abi by contract address
func (*ContractApi) PackContractData ¶ added in v1.2.4
func (c *ContractApi) PackContractData(abiStr string, methodName string, params []string) ([]byte, error)
PackContractData parse a ABI interface and pack the given method name to conform the ABI.
type ContractService ¶ added in v1.3.5
type ContractStatus ¶ added in v1.3.5
type ContractStatus int
const ( // ContractStatusActiveStage1 is a ContractStatus of type ActiveStage1 ContractStatusActiveStage1 ContractStatus = iota // ContractStatusActivated is a ContractStatus of type Activated ContractStatusActivated // ContractStatusDestroyStage1 is a ContractStatus of type DestroyStage1 ContractStatusDestroyStage1 // ContractStatusDestroyed is a ContractStatus of type Destroyed ContractStatusDestroyed // ContractStatusRejected is a ContractStatus of type Rejected ContractStatusRejected )
func ParseContractStatus ¶ added in v1.3.5
func ParseContractStatus(name string) (ContractStatus, error)
ParseContractStatus attempts to convert a string to a ContractStatus
func (ContractStatus) MarshalText ¶ added in v1.3.5
func (x ContractStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (ContractStatus) String ¶ added in v1.3.5
func (x ContractStatus) String() string
String implements the Stringer interface.
func (*ContractStatus) UnmarshalText ¶ added in v1.3.5
func (x *ContractStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type Contractor ¶ added in v1.3.5
type CreateContractParam ¶ added in v1.3.5
type CreateContractParam struct {
PartyA Contractor `json:"partyA"`
PartyB Contractor `json:"partyB"`
Services []ContractService `json:"services"`
StartDate int64 `json:"startDate"`
EndDate int64 `json:"endDate"`
}
type DLRStatus ¶ added in v1.3.5
type DLRStatus int
const ( // DLRStatusDelivered is a DLRStatus of type Delivered DLRStatusDelivered DLRStatus = iota // DLRStatusRejected is a DLRStatus of type Rejected DLRStatusRejected // DLRStatusUnknown is a DLRStatus of type Unknown DLRStatusUnknown // DLRStatusUndelivered is a DLRStatus of type Undelivered DLRStatusUndelivered // DLRStatusEmpty is a DLRStatus of type Empty DLRStatusEmpty )
func ParseDLRStatus ¶ added in v1.3.5
ParseDLRStatus attempts to convert a string to a DLRStatus
func (DLRStatus) MarshalText ¶ added in v1.3.5
MarshalText implements the text marshaller method
func (*DLRStatus) UnmarshalText ¶ added in v1.3.5
UnmarshalText implements the text unmarshaller method
type DebugApi ¶ added in v1.3.0
type DebugApi struct {
// contains filtered or unexported fields
}
func NewDebugAPI ¶ added in v1.3.0
type DestroyApi ¶ added in v1.3.0
type DestroyApi struct {
// contains filtered or unexported fields
}
func NewDestroyAPI ¶ added in v1.3.0
func NewDestroyAPI(c *rpc.Client) *DestroyApi
NewDestroyAPI creates destroy module for client
func (*DestroyApi) GetDestroyInfoDetail ¶ added in v1.3.0
func (b *DestroyApi) GetDestroyInfoDetail(addr *types.Address) ([]*APIDestroyInfo, error)
GetDestroyInfoDetail returns detail info of qgas destroyed
func (*DestroyApi) GetRewardsBlock ¶ added in v1.3.0
func (b *DestroyApi) GetRewardsBlock(send *types.Hash) (*types.StateBlock, error)
GetRewardBlock returns contract reward block by destory contract send
func (*DestroyApi) GetSendBlock ¶ added in v1.3.0
func (b *DestroyApi) GetSendBlock(param *APIDestroyParam, sign SignatureParam) (*types.StateBlock, error)
GetSendBlock returns destory contract send block by destory parameters
func (*DestroyApi) GetTotalDestroyInfo ¶ added in v1.3.0
GetTotalDestroyInfo returns total amount of qgas destroyed
type InvoiceRecord ¶ added in v1.3.5
type InvoiceRecord struct {
Address types.Address `json:"contractAddress"`
StartDate int64 `json:"startDate"`
EndDate int64 `json:"endDate"`
Customer string `json:"customer"`
CustomerSr string `json:"customerSr"`
Country string `json:"country"`
Operator string `json:"operator"`
ServiceId string `json:"serviceId"`
MCC uint64 `json:"mcc"`
MNC uint64 `json:"mnc"`
Currency string `json:"currency"`
UnitPrice float64 `json:"unitPrice"`
SumOfBillableSMSCustomer uint64 `json:"sumOfBillableSMSCustomer"`
SumOfTOTPrice float64 `json:"sumOfTOTPrice"`
}
type LedgerApi ¶ added in v1.2.4
type LedgerApi struct {
// contains filtered or unexported fields
}
func NewLedgerAPI ¶ added in v1.3.0
NewLedgerAPI creates ledger module for client
func (*LedgerApi) AccountBlocksCount ¶ added in v1.2.4
AccountBlocksCount returns number of blocks for a specific account of chain
func (*LedgerApi) AccountHistoryTopn ¶ added in v1.2.4
func (l *LedgerApi) AccountHistoryTopn(address types.Address, count int, offset int) ([]*APIBlock, error)
AccountHistoryTopn returns blocks list for a specific account of chain count is number of blocks to return, and offset is index of block where to start
func (*LedgerApi) AccountInfo ¶ added in v1.2.4
func (l *LedgerApi) AccountInfo(address types.Address) (*APIAccount, error)
AccountInfo returns account detail info, include each token meta for the account If account not found, will return error
func (*LedgerApi) AccountRepresentative ¶ added in v1.2.4
AccountRepresentative returns the representative address for account If account not found, will return error
func (*LedgerApi) AccountVotingWeight ¶ added in v1.2.4
AccountVotingWeight returns the voting weight for account If account not found, will return error
func (*LedgerApi) Accounts ¶ added in v1.2.4
Accounts returns accounts list of chain count is number of accounts to return, and offset is index of account where to start
func (*LedgerApi) AccountsBalance ¶ added in v1.2.4
func (l *LedgerApi) AccountsBalance(addresses []types.Address) (map[types.Address]map[string]*APIAccountsBalance, error)
AccountsBalance returns balance and pending(amount that has not yet been received) for each account
func (*LedgerApi) AccountsCount ¶ added in v1.2.4
AccountsCount returns total number of accounts of chain
func (*LedgerApi) AccountsFrontiers ¶ added in v1.2.4
func (l *LedgerApi) AccountsFrontiers(addresses []types.Address) (map[types.Address]map[string]types.Hash, error)
AccountsFrontiers returns frontier info for each token of account
func (*LedgerApi) AccountsPending ¶ added in v1.2.4
func (l *LedgerApi) AccountsPending(addresses []types.Address, n int) (map[types.Address][]*APIPending, error)
AccountsPending returns pending info list for each account maximum number of pending for each account return is n, and if n set to -1, will return all pending for each account
func (*LedgerApi) AllGenesisBlocks ¶ added in v1.3.5
func (l *LedgerApi) AllGenesisBlocks() ([]*types.StateBlock, error)
func (*LedgerApi) BalanceChange ¶ added in v1.3.0
func (l *LedgerApi) BalanceChange(ch chan *types.AccountMeta, address types.Address) (*Subscribe, error)
BalanceChange support publish/subscription, ch is AccountMeta channel, once the balance of a account change, set the newest account info to channel
func (*LedgerApi) BlockAccount ¶ added in v1.2.4
BlockAccount accepts a block hash, and returns account of block owner
func (*LedgerApi) BlockConfirmedStatus ¶ added in v1.2.4
Return block confirmed status, if block confirmed,return `true`,otherwise return `false`
func (*LedgerApi) BlockHash ¶ added in v1.2.4
func (l *LedgerApi) BlockHash(block types.StateBlock) types.Hash
BlockHash return hash of block
func (*LedgerApi) BlockInfo ¶ added in v1.2.4
BlockInfo accepts a block hash, and returns block info for the hash
func (*LedgerApi) BlockSubscription ¶ added in v1.3.1
func (l *LedgerApi) BlockSubscription(address types.Address) (*BlockSubscription, error)
func (*LedgerApi) Blocks ¶ added in v1.2.4
Blocks returns blocks list of chain count is number of blocks to return, and offset is index of block where to start
func (*LedgerApi) BlocksCount ¶ added in v1.2.4
BlocksCount returns the number of blocks(include smartcontract block) and unchecked blocks of chain
func (*LedgerApi) BlocksCountByType ¶ added in v1.2.4
BlocksCountByType returns number of blocks by type of chain
func (*LedgerApi) BlocksInfo ¶ added in v1.2.4
BlocksInfo accepts blocks hash list, and returns block info for each hash
func (*LedgerApi) Chain ¶ added in v1.2.4
Chain returns a consecutive block hash list for a specific hash maximum number of blocks hash to return is n, and if n set to -1, will return blocks hash to the open block
func (*LedgerApi) ChainToken ¶ added in v1.3.5
func (*LedgerApi) ConfirmedAccountInfo ¶ added in v1.2.4
func (l *LedgerApi) ConfirmedAccountInfo(address types.Address) (*APIAccount, error)
Return confirmed account detail info , include each token in the account
func (*LedgerApi) Delegators ¶ added in v1.2.4
func (l *LedgerApi) Delegators(hash types.Address) ([]*APIAccountBalance, error)
Delegators accepts a representative account, and returns its delegator and each delegator's balance
func (*LedgerApi) DelegatorsCount ¶ added in v1.2.4
DelegatorsCount gets number of delegators for specific representative account
func (*LedgerApi) GasAddress ¶ added in v1.3.5
func (*LedgerApi) GasBlock ¶ added in v1.3.5
func (l *LedgerApi) GasBlock() (*types.StateBlock, error)
func (*LedgerApi) GasBlockHash ¶ added in v1.3.5
func (*LedgerApi) GasMintageBlock ¶ added in v1.3.5
func (l *LedgerApi) GasMintageBlock() (*types.StateBlock, error)
func (*LedgerApi) GenerateAndProcessChangeBlock ¶ added in v1.3.1
func (*LedgerApi) GenerateAndProcessReceiveBlock ¶ added in v1.3.1
func (*LedgerApi) GenerateAndProcessReceiveBlockByHash ¶ added in v1.3.1
func (*LedgerApi) GenerateAndProcessSendBlock ¶ added in v1.3.1
func (*LedgerApi) GenerateChangeBlock ¶ added in v1.2.4
func (l *LedgerApi) GenerateChangeBlock(account, representative types.Address, sign Signature) (*types.StateBlock, error)
GenerateChangeBlock returns change block by account and new representative address, sign is a function to sign the block
func (*LedgerApi) GenerateReceiveBlock ¶ added in v1.2.4
func (l *LedgerApi) GenerateReceiveBlock(txBlock *types.StateBlock, sign Signature) (*types.StateBlock, error)
GenerateReceiveBlock returns receive block by send block, sign is a function to sign the block
func (*LedgerApi) GenerateReceiveBlockByHash ¶ added in v1.2.4
func (l *LedgerApi) GenerateReceiveBlockByHash(txHash types.Hash, sign Signature) (*types.StateBlock, error)
GenerateReceiveBlockByHash returns receive block by send block hash, sign is a function to sign the block
func (*LedgerApi) GenerateSendBlock ¶ added in v1.2.4
func (l *LedgerApi) GenerateSendBlock(para *APISendBlockPara, sign Signature) (*types.StateBlock, error)
GenerateSendBlock returns send block by transaction parameter, sign is a function to sign the block
func (*LedgerApi) GenesisAddress ¶ added in v1.3.5
func (*LedgerApi) GenesisBlock ¶ added in v1.3.5
func (l *LedgerApi) GenesisBlock() (*types.StateBlock, error)
func (*LedgerApi) GenesisBlockHash ¶ added in v1.3.5
func (*LedgerApi) GenesisMintageBlock ¶ added in v1.3.5
func (l *LedgerApi) GenesisMintageBlock() (*types.StateBlock, error)
func (*LedgerApi) GenesisMintageHash ¶ added in v1.3.5
func (*LedgerApi) IsGenesisBlock ¶ added in v1.3.5
func (*LedgerApi) IsGenesisToken ¶ added in v1.3.5
func (*LedgerApi) NewAccountBlock ¶ added in v1.3.1
func (l *LedgerApi) NewAccountBlock(ch chan *types.StateBlock, address types.Address) (*Subscribe, error)
NewAccountBlock support publish/subscription, ch is StateBlock channel, once there is new account block stored to the chain, set the block to channel
func (*LedgerApi) NewBlock ¶ added in v1.3.0
func (l *LedgerApi) NewBlock(ch chan *types.StateBlock) (*Subscribe, error)
NewBlock support publish/subscription, ch is StateBlock channel, once there is new block stored to the chain, set the block to channel
func (*LedgerApi) NewPending ¶ added in v1.3.0
NewPending support publish/subscription, ch is APIPending channel, once there is a pending transaction of a account, set the pending info to channel
func (*LedgerApi) Pending ¶ added in v1.2.4
Pending return pending info by account and token hash, if pending not found, return error
func (*LedgerApi) Pendings ¶ added in v1.2.4
func (l *LedgerApi) Pendings() ([]*APIPending, error)
Pendings returns pending transaction list on chain
func (*LedgerApi) Performance ¶ added in v1.2.4
func (l *LedgerApi) Performance() ([]*types.PerformanceTime, error)
Performance returns performance time
func (*LedgerApi) Process ¶ added in v1.2.4
Process checks block base info , updates info of chain for the block ,and broadcasts block
func (*LedgerApi) Representatives ¶ added in v1.2.4
func (l *LedgerApi) Representatives(sorting bool) ([]*APIRepresentative, error)
Representatives returns pairs of representative and its voting weight of chain if set sorting false , will return representatives randomly, if set true, will sorting representative balance in descending order
func (*LedgerApi) TokenInfoById ¶ added in v1.2.4
func (l *LedgerApi) TokenInfoById(tokenId types.Hash) (*ApiTokenInfo, error)
TokenInfoById returns token info by token id
func (*LedgerApi) TokenInfoByName ¶ added in v1.2.4
func (l *LedgerApi) TokenInfoByName(tokenName string) (*ApiTokenInfo, error)
TokenInfoById returns token info by token name
func (*LedgerApi) TokenMeta ¶ added in v1.2.4
TokenMeta return tokenmeta info by account and token hash
func (*LedgerApi) TransactionsCount ¶ added in v1.2.4
TransactionsCount returns the number of blocks(not include smartcontract block) and unchecked blocks of chain
func (*LedgerApi) Unsubscribe ¶ added in v1.3.0
Unsubscribe close a pub-sub connection
type MatchingRecord ¶ added in v1.3.5
type MatchingRecord struct {
Orphan SummaryRecord `json:"orphan"`
Matching SummaryRecord `json:"matching"`
}
type MinerApi ¶ added in v1.3.0
type MinerApi struct {
// contains filtered or unexported fields
}
func NewMinerAPI ¶ added in v1.3.0
NewMinerAPI creates miner module for client
func (*MinerApi) GetAvailRewardInfo ¶ added in v1.3.0
func (m *MinerApi) GetAvailRewardInfo(coinbase types.Address) (*MinerAvailRewardInfo, error)
MinerAvailRewardInfo returns miner available reward info
func (*MinerApi) GetRewardHistory ¶ added in v1.3.0
func (m *MinerApi) GetRewardHistory(coinbase types.Address) (*MinerHistoryRewardInfo, error)
GetRewardHistory returns miner history reward info
func (*MinerApi) GetRewardRecvBlock ¶ added in v1.3.0
func (m *MinerApi) GetRewardRecvBlock(input *types.StateBlock) (*types.StateBlock, error)
GetRewardSendBlock returns miner contract reward block
func (*MinerApi) GetRewardRecvBlockBySendHash ¶ added in v1.3.0
GetRewardRecvBlockBySendHash returns miner contract reward block
func (*MinerApi) GetRewardSendBlock ¶ added in v1.3.0
func (m *MinerApi) GetRewardSendBlock(param *RewardParam) (*types.StateBlock, error)
GetRewardSendBlock returns miner contract send block
type MinerAvailRewardInfo ¶ added in v1.3.0
type MinerAvailRewardInfo struct {
LastEndHeight uint64 `json:"lastEndHeight"`
LatestBlockHeight uint64 `json:"latestBlockHeight"`
NodeRewardHeight uint64 `json:"nodeRewardHeight"`
AvailStartHeight uint64 `json:"availStartHeight"`
AvailEndHeight uint64 `json:"availEndHeight"`
AvailRewardBlocks uint64 `json:"availRewardBlocks"`
AvailRewardAmount types.Balance `json:"availRewardAmount"`
NeedCallReward bool `json:"needCallReward"`
}
type MinerHistoryRewardInfo ¶ added in v1.3.0
type MintageApi ¶ added in v1.2.4
type MintageApi struct {
// contains filtered or unexported fields
}
func NewMintageAPI ¶ added in v1.3.0
func NewMintageAPI(c *rpc.Client) *MintageApi
NewMintageAPI creates mintage module for client
func (*MintageApi) GetMintageBlock ¶ added in v1.2.4
func (m *MintageApi) GetMintageBlock(param *MintageParams) (*types.StateBlock, error)
GetMintageBlock returns mintage block by mintage parameters
func (*MintageApi) GetMintageData ¶ added in v1.2.4
func (m *MintageApi) GetMintageData(param *MintageParams) ([]byte, error)
GetMintageData returns mintage data by mintage parameters
func (*MintageApi) GetRewardBlock ¶ added in v1.2.4
func (m *MintageApi) GetRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
GetRewardBlock returns reward block by mintage block
func (*MintageApi) GetWithdrawMintageBlock ¶ added in v1.2.4
func (m *MintageApi) GetWithdrawMintageBlock(param *WithdrawParams) (*types.StateBlock, error)
GetWithdrawMintageBlock returns withdraw mintage block by withdraw parameters
func (*MintageApi) GetWithdrawMintageData ¶ added in v1.2.4
func (m *MintageApi) GetWithdrawMintageData(tokenId types.Hash) ([]byte, error)
GetWithdrawMintageData returns withdraw mintage data by token id
func (*MintageApi) GetWithdrawRewardBlock ¶ added in v1.2.4
func (m *MintageApi) GetWithdrawRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
GetWithdrawRewardBlock returns withdraw mintage block by mintage block
func (*MintageApi) ParseTokenInfo ¶ added in v1.3.2
func (m *MintageApi) ParseTokenInfo(data []byte) (*types.TokenInfo, error)
type MintageParams ¶ added in v1.2.4
type MintageParams struct {
SelfAddr types.Address `json:"selfAddr"`
PrevHash types.Hash `json:"prevHash"`
TokenName string `json:"tokenName"`
TokenSymbol string `json:"tokenSymbol"`
TotalSupply string `json:"totalSupply"`
Decimals uint8 `json:"decimals"`
Beneficial types.Address `json:"beneficial"`
NEP5TxId string `json:"nep5TxId"`
}
type MultiPartySummaryResult ¶ added in v1.3.5
type MultiPartySummaryResult struct {
Contracts []*SettlementContract `json:"contracts"`
Records map[string]*CompareRecord `json:"records"`
Total *CompareRecord `json:"total"`
}
type NEP5PledgeInfo ¶ added in v1.2.4
type NetApi ¶ added in v1.2.4
type NetApi struct {
// contains filtered or unexported fields
}
type PledgeApi ¶ added in v1.2.4
type PledgeApi struct {
// contains filtered or unexported fields
}
func NewPledgeAPI ¶ added in v1.3.0
NewPledgeAPI creates pledge module for client
func (*PledgeApi) GetPledgeBlock ¶ added in v1.2.4
func (p *PledgeApi) GetPledgeBlock(param *PledgeParam) (*types.StateBlock, error)
GetPledgeBlock returns pledge block by pledge parameters
func (*PledgeApi) GetPledgeData ¶ added in v1.2.4
func (p *PledgeApi) GetPledgeData(param *PledgeParam) ([]byte, error)
GetMintageData returns pledge data by pledge parameters
func (*PledgeApi) GetPledgeInfoWithNEP5TxId ¶ added in v1.2.4
func (p *PledgeApi) GetPledgeInfoWithNEP5TxId(param *WithdrawPledgeParam) (*NEP5PledgeInfo, error)
func (*PledgeApi) GetPledgeRewordBlock ¶ added in v1.2.4
func (p *PledgeApi) GetPledgeRewordBlock(input *types.StateBlock) (*types.StateBlock, error)
GetPledgeRewordBlock returns pledge reward block by pledge block
func (*PledgeApi) GetTotalPledgeAmount ¶ added in v1.2.4
func (*PledgeApi) GetWithdrawPledgeBlock ¶ added in v1.2.4
func (p *PledgeApi) GetWithdrawPledgeBlock(param *WithdrawPledgeParam) (*types.StateBlock, error)
GetWithdrawPledgeBlock returns withdraw pledge block by withdraw parameters
func (*PledgeApi) GetWithdrawPledgeData ¶ added in v1.2.4
func (p *PledgeApi) GetWithdrawPledgeData(param *WithdrawPledgeParam) ([]byte, error)
GetWithdrawPledgeData returns withdraw pledge data by withdraw parameters
func (*PledgeApi) GetWithdrawRewardBlock ¶ added in v1.2.4
func (p *PledgeApi) GetWithdrawRewardBlock(input *types.StateBlock) (*types.StateBlock, error)
GetWithdrawRewardBlock returns withdraw reward block by pledge block
func (*PledgeApi) ParsePledgeInfo ¶ added in v1.3.2
func (p *PledgeApi) ParsePledgeInfo(data []byte) (*PledgeInfo, error)
func (*PledgeApi) SearchAllPledgeInfo ¶ added in v1.2.4
func (p *PledgeApi) SearchAllPledgeInfo() ([]*NEP5PledgeInfo, error)
func (*PledgeApi) SearchPledgeInfo ¶ added in v1.2.4
func (p *PledgeApi) SearchPledgeInfo(param *WithdrawPledgeParam) ([]*NEP5PledgeInfo, error)
type PledgeInfo ¶ added in v1.3.2
type PledgeParam ¶ added in v1.2.4
type PovApi ¶ added in v1.3.0
type PovApi struct {
// contains filtered or unexported fields
}
func (*PovApi) BatchGetHeadersByHeight ¶ added in v1.3.0
func (p *PovApi) BatchGetHeadersByHeight(height uint64, count uint64, asc bool) (*PovApiBatchHeader, error)
BatchGetHeadersByHeight returns a lots of pov headers info by range
func (*PovApi) GetAccountStateByBlockHash ¶ added in v1.3.0
func (p *PovApi) GetAccountStateByBlockHash(address types.Address, blockHash types.Hash) (*PovApiState, error)
GetAccountStateByBlockHash returns pov account state by block hash
func (*PovApi) GetAccountStateByBlockHeight ¶ added in v1.3.0
func (p *PovApi) GetAccountStateByBlockHeight(address types.Address, height uint64) (*PovApiState, error)
GetAccountStateByBlockHeight returns pov account state by block height
func (*PovApi) GetBlockByHash ¶ added in v1.3.0
func (p *PovApi) GetBlockByHash(blockHash types.Hash, txOffset uint32, txLimit uint32) (*PovApiBlock, error)
GetBlockByHash returns pov block info by hash
func (*PovApi) GetBlockByHeight ¶ added in v1.3.0
func (p *PovApi) GetBlockByHeight(height uint64, txOffset uint32, txLimit uint32) (*PovApiBlock, error)
GetBlockByHeight returns pov block info by height
func (*PovApi) GetDiffDayStat ¶ added in v1.3.1
func (p *PovApi) GetDiffDayStat(dayIndex int) (*types.PovDiffDayStat, error)
GetDiffDayStat returns pov difficulty day statistic
func (*PovApi) GetDiffDayStatByHeight ¶ added in v1.3.1
func (p *PovApi) GetDiffDayStatByHeight(height uint64) (*types.PovDiffDayStat, error)
GetDiffDayStatByHeight returns pov difficulty day statistic
func (*PovApi) GetFittestHeader ¶ added in v1.3.0
func (p *PovApi) GetFittestHeader(gap uint64) (*PovApiHeader, error)
GetFittestHeader returns fittest pov header info If node is in pov syncing, will return error
func (*PovApi) GetHashInfo ¶ added in v1.3.0
func (p *PovApi) GetHashInfo(height uint64, lookup uint64) (*PovApiHashInfo, error)
GetHashInfo returns pov network hash info
func (*PovApi) GetHeaderByHash ¶ added in v1.3.0
func (p *PovApi) GetHeaderByHash(blockHash types.Hash) (*PovApiHeader, error)
GetHeaderByHash returns pov header info by hash
func (*PovApi) GetHeaderByHeight ¶ added in v1.3.0
func (p *PovApi) GetHeaderByHeight(height uint64) (*PovApiHeader, error)
GetHeaderByHeight returns pov header info by height
func (*PovApi) GetLastNHourInfo ¶ added in v1.3.0
func (p *PovApi) GetLastNHourInfo(endHeight uint64, timeSpan uint32) (*PovApiGetLastNHourInfo, error)
GetLastNHourInfo returns pov last n hour statistic
func (*PovApi) GetLatestAccountState ¶ added in v1.3.0
func (p *PovApi) GetLatestAccountState(address types.Address) (*PovApiState, error)
GetLatestAccountState returns pov account state in latest block
func (*PovApi) GetLatestBlock ¶ added in v1.3.0
func (p *PovApi) GetLatestBlock(txOffset uint32, txLimit uint32) (*PovApiBlock, error)
GetLatestBlock returns latest pov block info
func (*PovApi) GetLatestHeader ¶ added in v1.3.0
func (p *PovApi) GetLatestHeader() (*PovApiHeader, error)
GetLatestHeader returns latest pov header info
func (*PovApi) GetMinerDayStat ¶ added in v1.3.1
func (p *PovApi) GetMinerDayStat(dayIndex int) (*types.PovMinerDayStat, error)
GetMinerDayStat returns pov miner day statistic
func (*PovApi) GetMinerDayStatByHeight ¶ added in v1.3.1
func (p *PovApi) GetMinerDayStatByHeight(height uint64) (*types.PovMinerDayStat, error)
GetMinerDayStatByHeight returns pov miner day statistic
func (*PovApi) GetMinerStats ¶ added in v1.3.0
func (p *PovApi) GetMinerStats(addrs []types.Address) (*PovMinerStats, error)
GetMinerStats returns pov miner statistic
func (*PovApi) GetMiningInfo ¶ added in v1.3.0
func (p *PovApi) GetMiningInfo() (*PovApiGetMiningInfo, error)
GetMiningInfo returns pov mining info
func (*PovApi) GetPovStatus ¶ added in v1.3.2
func (p *PovApi) GetPovStatus() (*PovApiStatus, error)
GetFittestHeader returns fittest pov header info If node is in pov syncing, will return error
func (*PovApi) GetRepStats ¶ added in v1.3.0
func (p *PovApi) GetRepStats(addrs []types.Address) (*PovRepStats, error)
GetRepStats returns pov rep statistic
func (*PovApi) GetTransaction ¶ added in v1.3.0
func (p *PovApi) GetTransaction(txHash types.Hash) (*PovApiTxLookup, error)
GetTransaction returns pov tx lookup info by tx hash
func (*PovApi) GetTransactionByBlockHashAndIndex ¶ added in v1.3.0
func (p *PovApi) GetTransactionByBlockHashAndIndex(blockHash types.Hash, index uint32) (*PovApiTxLookup, error)
GetTransactionByBlockHashAndIndex returns pov tx lookup info by block hash and tx index
func (*PovApi) GetTransactionByBlockHeightAndIndex ¶ added in v1.3.0
func (p *PovApi) GetTransactionByBlockHeightAndIndex(height uint64, index uint32) (*PovApiTxLookup, error)
GetTransactionByBlockHeightAndIndex returns pov tx lookup info by block height and tx index
func (*PovApi) GetWork ¶ added in v1.3.0
GetWork returns pov next block work info If node is in pov syncing, will return error
func (*PovApi) SubmitWork ¶ added in v1.3.0
func (p *PovApi) SubmitWork(work *PovApiSubmitWork) error
SubmitWork sumbits new block work to node If node is in pov syncing, will return error
func (*PovApi) SubscribeNewBlock ¶ added in v1.3.1
func (p *PovApi) SubscribeNewBlock(ch chan *PovApiHeader) (*Subscribe, error)
NewBlock support publish/subscription, ch is PovApiHeader channel, once there is new block stored to the chain, set the block to channel
func (*PovApi) Unsubscribe ¶ added in v1.3.0
Unsubscribe close a pub-sub connection
type PovApiBatchHeader ¶ added in v1.3.0
type PovApiBatchHeader struct {
Count int `json:"count"`
Headers []*PovApiHeader `json:"headers"`
}
type PovApiBlock ¶ added in v1.3.0
type PovApiGetLastNHourInfo ¶ added in v1.3.0
type PovApiGetLastNHourInfo struct {
MaxTxPerBlock uint32
MinTxPerBlock uint32
AvgTxPerBlock uint32
MaxTxPerHour uint32
MinTxPerHour uint32
AvgTxPerHour uint32
MaxBlockPerHour uint32
MinBlockPerHour uint32
AvgBlockPerHour uint32
AllBlockNum uint32
AllTxNum uint32
Sha256dBlockNum uint32
X11BlockNum uint32
ScryptBlockNum uint32
AuxBlockNum uint32
HourItemList []*PovApiGetLastNHourItem
}
type PovApiGetLastNHourItem ¶ added in v1.3.0
type PovApiGetMiningInfo ¶ added in v1.3.0
type PovApiGetMiningInfo struct {
SyncState int `json:"syncState"`
CurrentBlockHeight uint64 `json:"currentBlockHeight"`
CurrentBlockHash types.Hash `json:"currentBlockHash"`
CurrentBlockSize uint32 `json:"currentBlockSize"`
CurrentBlockTx uint32 `json:"currentBlockTx"`
CurrentBlockAlgo types.PovAlgoType `json:"currentBlockAlgo"`
PooledTx uint32 `json:"pooledTx"`
Difficulty float64 `json:"difficulty"`
HashInfo *PovApiHashInfo `json:"hashInfo"`
}
type PovApiGetWork ¶ added in v1.3.0
type PovApiGetWork struct {
WorkHash types.Hash `json:"workHash"`
Version uint32 `json:"version"`
Previous types.Hash `json:"previous"`
Bits uint32 `json:"bits"`
Height uint64 `json:"height"`
MinTime uint32 `json:"minTime"`
MerkleBranch []*types.Hash `json:"merkleBranch"`
CoinBaseData1 types.HexBytes `json:"coinbaseData1"`
CoinBaseData2 types.HexBytes `json:"coinbaseData2"`
}
type PovApiHashInfo ¶ added in v1.3.0
type PovApiHeader ¶ added in v1.3.0
type PovApiState ¶ added in v1.3.0
type PovApiState struct {
AccountState *types.PovAccountState `json:"accountState"`
RepState *types.PovRepState `json:"repState"`
}
type PovApiStatus ¶ added in v1.3.2
type PovApiSubmitWork ¶ added in v1.3.0
type PovApiSubmitWork struct {
WorkHash types.Hash `json:"workHash"`
BlockHash types.Hash `json:"blockHash"`
MerkleRoot types.Hash `json:"merkleRoot"`
Timestamp uint32 `json:"timestamp"`
Nonce uint32 `json:"nonce"`
CoinbaseExtra types.HexBytes `json:"coinbaseExtra"`
CoinbaseHash types.Hash `json:"coinbaseHash"`
AuxPow *types.PovAuxHeader `json:"auxPow"`
}
type PovApiTxLookup ¶ added in v1.3.0
type PovApiTxLookup struct {
TxHash types.Hash `json:"txHash"`
TxLookup *types.PovTxLookup `json:"txLookup"`
CoinbaseTx *types.PovCoinBaseTx `json:"coinbaseTx"`
AccountTx *types.StateBlock `json:"accountTx"`
}
type PovMinerStatItem ¶ added in v1.3.0
type PovMinerStatItem struct {
MainBlockNum uint32 `json:"mainBlockNum"`
MainRewardAmount types.Balance `json:"mainRewardAmount"`
StableBlockNum uint32 `json:"stableBlockNum"`
StableRewardAmount types.Balance `json:"stableRewardAmount"`
FirstBlockTime time.Time `json:"firstBlockTime"`
LastBlockTime time.Time `json:"lastBlockTime"`
FirstBlockHeight uint64 `json:"firstBlockHeight"`
LastBlockHeight uint64 `json:"lastBlockHeight"`
IsHourOnline bool `json:"isHourOnline"`
IsDayOnline bool `json:"isDayOnline"`
}
type PovMinerStats ¶ added in v1.3.0
type PovMinerStats struct {
MinerCount int `json:"minerCount"`
HourOnlineCount int `json:"hourOnlineCount"`
DayOnlineCount int `json:"dayOnlineCount"`
MinerStats map[types.Address]*PovMinerStatItem `json:"minerStats"`
TotalBlockNum uint32 `json:"totalBlockNum"`
LatestBlockHeight uint64 `json:"latestBlockHeight"`
}
type PovRepStatItem ¶ added in v1.3.5
type PovRepStatItem struct {
MainBlockNum uint32 `json:"mainBlockNum"`
MainRewardAmount types.Balance `json:"mainRewardAmount"`
MainOnlinePeriod uint32 `json:"mainOnlinePeriod"`
StableBlockNum uint32 `json:"stableBlockNum"`
StableRewardAmount types.Balance `json:"stableRewardAmount"`
StableOnlinePeriod uint32 `json:"stableOnlinePeriod"`
LastOnlineTime time.Time `json:"lastOnlineTime"`
LastOnlineHeight uint64 `json:"lastOnlineHeight"`
IsOnline bool `json:"isOnline"`
}
type PovRepStats ¶ added in v1.3.0
type PovRepStats struct {
RepCount uint32 `json:"repCount"`
RepStats map[types.Address]*PovRepStatItem `json:"repStats"`
TotalBlockNum uint32 `json:"totalBlockNum"`
TotalPeriod uint32 `json:"totalPeriod"`
TotalRewardAmount types.Balance `json:"totalRewardAmount"`
LatestBlockHeight uint64 `json:"latestBlockHeight"`
}
type QLCClient ¶
type QLCClient struct {
Account *AccountApi
Contract *ContractApi
Ledger *LedgerApi
Mintage *MintageApi
Pledge *PledgeApi
Rewards *RewardsApi
Network *NetApi
Util *UtilApi
Destroy *DestroyApi
Debug *DebugApi
Pov *PovApi
Miner *MinerApi
Rep *RepApi
Settlement *SettlementAPI
// contains filtered or unexported fields
}
func NewQLCClient ¶
NewQLCClient creates a new client
type RegisterAssetParam ¶ added in v1.3.5
type RegisterAssetParam struct {
Owner Contractor `json:"owner"`
Assets []*Asset `json:"assets"`
StartDate int64 `json:"startDate"`
EndDate int64 `json:"endDate"`
Status string `json:"status"`
}
type RepApi ¶ added in v1.3.0
type RepApi struct {
// contains filtered or unexported fields
}
func (*RepApi) GetAvailRewardInfo ¶ added in v1.3.0
func (r *RepApi) GetAvailRewardInfo(account types.Address) (*RepAvailRewardInfo, error)
GetAvailRewardInfo returns representative available reward info
func (*RepApi) GetRewardHistory ¶ added in v1.3.0
func (r *RepApi) GetRewardHistory(account types.Address) (*RepHistoryRewardInfo, error)
GetRewardHistory returns representative history reward info
func (*RepApi) GetRewardRecvBlock ¶ added in v1.3.0
func (r *RepApi) GetRewardRecvBlock(input *types.StateBlock) (*types.StateBlock, error)
GetRewardSendBlock returns representative contract reward block
func (*RepApi) GetRewardRecvBlockBySendHash ¶ added in v1.3.0
GetRewardRecvBlockBySendHash returns representative contract reward block
func (*RepApi) GetRewardSendBlock ¶ added in v1.3.0
func (r *RepApi) GetRewardSendBlock(param *RepRewardParam) (*types.StateBlock, error)
GetRewardSendBlock returns representative contract send block
type RepAvailRewardInfo ¶ added in v1.3.0
type RepAvailRewardInfo struct {
LastEndHeight uint64 `json:"lastEndHeight"`
LatestBlockHeight uint64 `json:"latestBlockHeight"`
NodeRewardHeight uint64 `json:"nodeRewardHeight"`
AvailStartHeight uint64 `json:"availStartHeight"`
AvailEndHeight uint64 `json:"availEndHeight"`
AvailRewardBlocks uint64 `json:"availRewardBlocks"`
AvailRewardAmount types.Balance `json:"availRewardAmount"`
NeedCallReward bool `json:"needCallReward"`
}
type RepHistoryRewardInfo ¶ added in v1.3.0
type RepRewardParam ¶ added in v1.3.0
type RewardParam ¶ added in v1.3.0
type RewardsApi ¶ added in v1.2.4
type RewardsApi struct {
// contains filtered or unexported fields
}
func NewRewardAPI ¶ added in v1.3.0
func NewRewardAPI(c *rpc.Client) *RewardsApi
NewRewardAPI creates reward module for client
func (*RewardsApi) GetConfidantRewords ¶ added in v1.2.4
func (*RewardsApi) GetReceiveRewardBlock ¶ added in v1.2.4
func (r *RewardsApi) GetReceiveRewardBlock(send *types.Hash) (*types.StateBlock, error)
func (*RewardsApi) GetSendConfidantBlock ¶ added in v1.2.4
func (r *RewardsApi) GetSendConfidantBlock(param *RewardsParam, sign *types.Signature) (*types.StateBlock, error)
func (*RewardsApi) GetSendRewardBlock ¶ added in v1.2.4
func (r *RewardsApi) GetSendRewardBlock(param *RewardsParam, sign *types.Signature) (*types.StateBlock, error)
func (*RewardsApi) GetTotalRewards ¶ added in v1.2.4
func (r *RewardsApi) GetTotalRewards(txId string) (*big.Int, error)
func (*RewardsApi) GetUnsignedConfidantData ¶ added in v1.2.4
func (r *RewardsApi) GetUnsignedConfidantData(param *RewardsParam) (types.Hash, error)
func (*RewardsApi) GetUnsignedRewardData ¶ added in v1.2.4
func (r *RewardsApi) GetUnsignedRewardData(param *RewardsParam) (types.Hash, error)
type RewardsParam ¶ added in v1.2.4
type SLA ¶ added in v1.3.5
type SLA struct {
SLAType SLAType `json:"type"`
Priority uint `json:"priority"`
Value float32 `json:"value"`
Compensations []*Compensation `json:"compensations,omitempty"`
}
type SLAType ¶ added in v1.3.5
type SLAType int
func ParseSLAType ¶ added in v1.3.5
ParseSLAType attempts to convert a string to a SLAType
func (SLAType) MarshalText ¶ added in v1.3.5
MarshalText implements the text marshaller method
func (*SLAType) UnmarshalText ¶ added in v1.3.5
UnmarshalText implements the text unmarshaller method
type SendingStatus ¶ added in v1.3.5
type SendingStatus int
const ( // SendingStatusSent is a SendingStatus of type Sent SendingStatusSent SendingStatus = iota // SendingStatusError is a SendingStatus of type Error SendingStatusError // SendingStatusEmpty is a SendingStatus of type Empty SendingStatusEmpty )
func ParseSendingStatus ¶ added in v1.3.5
func ParseSendingStatus(name string) (SendingStatus, error)
ParseSendingStatus attempts to convert a string to a SendingStatus
func (SendingStatus) MarshalText ¶ added in v1.3.5
func (x SendingStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (SendingStatus) String ¶ added in v1.3.5
func (x SendingStatus) String() string
String implements the Stringer interface.
func (*SendingStatus) UnmarshalText ¶ added in v1.3.5
func (x *SendingStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type SettlementAPI ¶ added in v1.3.5
type SettlementAPI struct {
// contains filtered or unexported fields
}
func NewSettlementAPI ¶ added in v1.3.5
func NewSettlementAPI(c *rpc.Client) *SettlementAPI
func (*SettlementAPI) GenerateInvoices ¶ added in v1.3.5
func (s *SettlementAPI) GenerateInvoices(addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
func (*SettlementAPI) GenerateInvoicesByContract ¶ added in v1.3.5
func (s *SettlementAPI) GenerateInvoicesByContract(addr *types.Address, start, end int64) ([]*InvoiceRecord, error)
func (*SettlementAPI) GenerateMultiPartyInvoice ¶ added in v1.3.5
func (s *SettlementAPI) GenerateMultiPartyInvoice(firstAddr, secondAddr *types.Address, start, end int64) ([]*InvoiceRecord, error)
func (*SettlementAPI) GenerateMultiPartySummaryReport ¶ added in v1.3.5
func (s *SettlementAPI) GenerateMultiPartySummaryReport(firstAddr, secondAddr *types.Address, start, end int64) (*MultiPartySummaryResult, error)
func (*SettlementAPI) GetAddNextStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetAddNextStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetAddPreStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetAddPreStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetAllAssets ¶ added in v1.3.5
func (s *SettlementAPI) GetAllAssets(count int, offset *int) ([]*AssetParam, error)
func (*SettlementAPI) GetAllCDRStatus ¶ added in v1.3.5
func (*SettlementAPI) GetAllContracts ¶ added in v1.3.5
func (s *SettlementAPI) GetAllContracts(count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetAsset ¶ added in v1.3.5
func (s *SettlementAPI) GetAsset(address types.Address) (*AssetParam, error)
func (*SettlementAPI) GetAssetsByOwner ¶ added in v1.3.5
func (s *SettlementAPI) GetAssetsByOwner(owner *types.Address, count int, offset *int) ([]*AssetParam, error)
func (*SettlementAPI) GetCDRStatus ¶ added in v1.3.5
func (*SettlementAPI) GetCDRStatusByCdrData ¶ added in v1.3.5
func (*SettlementAPI) GetCDRStatusByDate ¶ added in v1.3.5
func (*SettlementAPI) GetContractAddressByPartyANextStop ¶ added in v1.3.5
func (*SettlementAPI) GetContractAddressByPartyBPreStop ¶ added in v1.3.5
func (*SettlementAPI) GetContractsAsPartyA ¶ added in v1.3.5
func (s *SettlementAPI) GetContractsAsPartyA(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetContractsAsPartyB ¶ added in v1.3.5
func (s *SettlementAPI) GetContractsAsPartyB(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetContractsByAddress ¶ added in v1.3.5
func (s *SettlementAPI) GetContractsByAddress(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetContractsByStatus ¶ added in v1.3.5
func (s *SettlementAPI) GetContractsByStatus(addr *types.Address, status string, count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetCreateContractBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetCreateContractBlock(param *CreateContractParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetExpiredContracts ¶ added in v1.3.5
func (s *SettlementAPI) GetExpiredContracts(addr *types.Address, count int, offset *int) ([]*SettlementContract, error)
func (*SettlementAPI) GetNextStopNames ¶ added in v1.3.5
func (s *SettlementAPI) GetNextStopNames(addr *types.Address) ([]string, error)
func (*SettlementAPI) GetPreStopNames ¶ added in v1.3.5
func (s *SettlementAPI) GetPreStopNames(addr *types.Address) ([]string, error)
func (*SettlementAPI) GetProcessCDRBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetProcessCDRBlock(addr *types.Address, param *CDRParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetRegisterAssetBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetRegisterAssetBlock(param *RegisterAssetParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetRemoveNextStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetRemoveNextStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetRemovePreStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetRemovePreStopBlock(param *StopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetSettlementRewardsBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetSettlementRewardsBlock(send *types.Hash, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetSignContractBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetSignContractBlock(param *SignContractParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetSummaryReport ¶ added in v1.3.5
func (s *SettlementAPI) GetSummaryReport(addr *types.Address, start, end int64) (*SummaryResult, error)
func (*SettlementAPI) GetTerminateContractBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetTerminateContractBlock(param *TerminateParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetUpdateNextStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetUpdateNextStopBlock(param *UpdateStopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) GetUpdatePreStopBlock ¶ added in v1.3.5
func (s *SettlementAPI) GetUpdatePreStopBlock(param *UpdateStopParam, sign Signature) (*types.StateBlock, error)
func (*SettlementAPI) ToAddress ¶ added in v1.3.5
func (s *SettlementAPI) ToAddress(param *CreateContractParam) (types.Address, error)
type SettlementCDR ¶ added in v1.3.5
type SettlementContract ¶ added in v1.3.5
type SettlementContract struct {
CreateContractParam
PreStops []string `json:"preStops"`
NextStops []string `json:"nextStops"`
ConfirmDate int64 `json:"confirmDate"`
Status ContractStatus `json:"status"`
Address types.Address `json:"address"`
Terminator *types.Address `json:"-"`
}
type SettlementStatus ¶ added in v1.3.5
type SettlementStatus int
const ( // SettlementStatusUnknown is a SettlementStatus of type Unknown SettlementStatusUnknown SettlementStatus = iota // SettlementStatusStage1 is a SettlementStatus of type Stage1 SettlementStatusStage1 // SettlementStatusSuccess is a SettlementStatus of type Success SettlementStatusSuccess // SettlementStatusFailure is a SettlementStatus of type Failure SettlementStatusFailure // SettlementStatusMissing is a SettlementStatus of type Missing SettlementStatusMissing // SettlementStatusDuplicate is a SettlementStatus of type Duplicate SettlementStatusDuplicate )
func ParseSettlementStatus ¶ added in v1.3.5
func ParseSettlementStatus(name string) (SettlementStatus, error)
ParseSettlementStatus attempts to convert a string to a SettlementStatus
func (SettlementStatus) MarshalText ¶ added in v1.3.5
func (x SettlementStatus) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (SettlementStatus) String ¶ added in v1.3.5
func (x SettlementStatus) String() string
String implements the Stringer interface.
func (*SettlementStatus) UnmarshalText ¶ added in v1.3.5
func (x *SettlementStatus) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type SignContractParam ¶ added in v1.3.5
type SignatureParam ¶ added in v1.3.0
type Subscribe ¶ added in v1.3.0
type Subscribe struct {
Stopped chan bool
// contains filtered or unexported fields
}
func NewSubscribe ¶ added in v1.3.0
func (*Subscribe) Unsubscribe ¶ added in v1.3.0
type SummaryRecord ¶ added in v1.3.5
type SummaryResult ¶ added in v1.3.5
type SummaryResult struct {
Contract *SettlementContract `json:"contract"`
Records map[string]*CompareRecord `json:"records"`
Total CompareRecord `json:"total"`
}
type TerminateParam ¶ added in v1.3.5
type UpdateStopParam ¶ added in v1.3.5
type UtilApi ¶ added in v1.2.4
type UtilApi struct {
// contains filtered or unexported fields
}
func NewUtilAPI ¶ added in v1.3.0
NewUtilAPI creates unit module for client
func (*UtilApi) BalanceToRaw ¶ added in v1.2.4
RawToBalance transforms QLC amount from unit to raw
func (*UtilApi) BalanceToRawForToken ¶ added in v1.2.4
func (u *UtilApi) BalanceToRawForToken(balance types.Balance, tokenName string) (types.Balance, error)
RawToBalance transforms token (not QLC) amount to raw
func (*UtilApi) RawToBalance ¶ added in v1.2.4
RawToBalance transforms QLC amount from raw to unit
func (*UtilApi) RawToBalanceForToken ¶ added in v1.2.4
RawToBalance transforms token (not QLC) amount from raw
type WithdrawParams ¶ added in v1.2.4
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
pov
command
|
|
|
pubsub
command
|
|
|
settlement
command
|
|
|
pkg
|
|
|
ed25519
Package ed25519 implements the Ed25519 signature algorithm.
|
Package ed25519 implements the Ed25519 signature algorithm. |
|
util
Package common contains various helper functions.
|
Package common contains various helper functions. |
|
util/hexutil
Package hexutil implements hex encoding with 0x prefix.
|
Package hexutil implements hex encoding with 0x prefix. |