rpc

package
v0.0.0-...-795c791 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientAllowanceList

func ClientAllowanceList(startBlockTime, endBlockTime int64) (data []*models.ClientAllowance, err error)

func NotaryAllowanceList

func NotaryAllowanceList(startEpoch, endEpoch uint64) (data []*models.NotaryAllowance, err error)

func RpcCall

func RpcCall(rpcMetchod string, rpcParams interface{}) (result []byte, requetRpcId int, err error)

Types

type ClientDataCapDealList

type ClientDataCapDealList struct {
	Total int           `json:"total"`
	List  []*MarketDeal `json:"list"`
}

func GetClientDataCapDealList

func GetClientDataCapDealList(client string, startEpoch int64, start, count int) (data *ClientDataCapDealList, err error)

type ClientDataCapDealNum

type ClientDataCapDealNum struct {
	Total int `json:"total"`
}

func CalcClientDataCapDealNum

func CalcClientDataCapDealNum(client string, startEpoch int64, allowance decimal.Decimal) (data *ClientDataCapDealNum, err error)

type MarketDeal

type MarketDeal struct {
	//tableName            string          `pg:"lotus_market_deal,discard_unknown_columns"`
	Id                   int64           `pg:"id" json:"-"`
	Epoch                int64           `pg:"epoch" json:"epoch"`
	Label                string          `pg:"label" json:"label"`
	Cid                  string          `pg:"cid" json:"cid"`
	DealID               int64           `pg:"dealid" json:"dealid"`
	Client               string          `pg:"client" json:"client"`
	StartEpoch           int64           `pg:"start_epoch" json:"start_epoch"`
	EndEpoch             int64           `pg:"end_epoch" json:"end_epoch"`
	PieceCID             string          `pg:"piece_cid" json:"piece_cid"`
	Provider             string          `pg:"provider" json:"provider"`
	PieceSize            decimal.Decimal `pg:"piece_size" json:"piece_size"`
	VerifiedDeal         bool            `pg:"verified_deal" json:"verified_deal"`
	ClientCollateral     decimal.Decimal `pg:"client_collateral" json:"client_collateral"`
	ProviderCollateral   decimal.Decimal `pg:"provider_collateral" json:"provider_collateral"`
	StoragePricePerEpoch decimal.Decimal `pg:"storage_price_per_epoch" json:"storage_price_per_epoch"`
	BlockTime            int             `pg:"block_time" json:"block_time"`
	ServiceStart         int             `pg:"service_start" json:"service_start_time"`
	ServiceEnd           int             `pg:"service_end" json:"service_end_time"`
}

type NotaryDataCap

type NotaryDataCap struct {
	TxnId          int64           `pg:"txn_id" json:"txn_id"`
	Address        string          `pg:"address" json:"address"`
	Allowance      decimal.Decimal `pg:"allowance" json:"allowance"`
	GrantAllowance decimal.Decimal `pg:"grant_allowance" json:"grant_allowance"`
}

type NotaryDataCapAllocated

type NotaryDataCapAllocated struct {
	Epoch     int64           `pg:"epoch" json:"epoch"`
	BlockTime int64           `pg:"block_time" json:"block_time"`
	Address   string          `pg:"address" json:"address"`
	Client    string          `pg:"client" json:"client"`
	Allowance decimal.Decimal `pg:"allowance" json:"allowance"`
}

type NotaryDataCapAllocatedList

type NotaryDataCapAllocatedList struct {
	Total int                       `json:"total"`
	List  []*NotaryDataCapAllocated `json:"list"`
}

func GetNotaryDataCapAllocatedList

func GetNotaryDataCapAllocatedList(address string, client []string, start, count int) (data *NotaryDataCapAllocatedList, err error)

type NotaryDataCapList

type NotaryDataCapList struct {
	Total int              `json:"total"`
	List  []*NotaryDataCap `json:"list"`
}

func GetNotaryList

func GetNotaryList(start, count int) (data *NotaryDataCapList, err error)

Jump to

Keyboard shortcuts

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