Documentation ¶
Index ¶
Constants ¶
View Source
const ( SearchOrderAsc SearchOrder = "asc" SearchOrderDesc SearchOrder = "desc" IOTypeIn IoType = "input" IOTypeOut IoType = "output" )
View Source
const SearchLimit uint64 = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capacity ¶
type Capacity struct { Capacity uint64 `json:"capacity"` BlockHash types.Hash `json:"block_hash"` BlockNumber uint64 `json:"block_number"` }
func (*Capacity) UnmarshalJSON ¶
type Cell ¶
func (*Cell) UnmarshalJSON ¶
type Client ¶
type Client interface { // GetCells returns the live cells collection by the lock or type script. GetCells(ctx context.Context, searchKey *SearchKey, order SearchOrder, limit uint64, afterCursor string) (*LiveCells, error) // GetTransactions returns the transactions collection by the lock or type script. GetTransactions(ctx context.Context, searchKey *SearchKey, order SearchOrder, limit uint64, afterCursor string) (*TxsWithCell, error) // GetTransactionsGrouped returns the grouped transactions collection by the lock or type script. GetTransactionsGrouped(ctx context.Context, searchKey *SearchKey, order SearchOrder, limit uint64, afterCursor string) (*TxsWithCells, error) //GetTip returns the latest height processed by indexer GetTip(ctx context.Context) (*TipHeader, error) //GetCellsCapacity returns the live cells capacity by the lock or type script. GetCellsCapacity(ctx context.Context, searchKey *SearchKey) (*Capacity, error) // Close close client Close() }
type Filter ¶
type Filter struct { Script *types.Script `json:"script"` ScriptLenRange *[2]uint64 `json:"script_len_range,omitempty"` OutputDataLenRange *[2]uint64 `json:"output_data_len_range,omitempty"` OutputCapacityRange *[2]uint64 `json:"output_capacity_range,omitempty"` BlockRange *[2]uint64 `json:"block_range,omitempty"` }
func (Filter) MarshalJSON ¶
type LiveCell ¶
type LiveCell struct { BlockNumber uint64 `json:"block_number"` OutPoint *types.OutPoint `json:"out_point"` Output *types.CellOutput `json:"output"` OutputData []byte `json:"output_data"` TxIndex uint `json:"tx_index"` }
func (*LiveCell) UnmarshalJSON ¶
type SearchOrder ¶
type SearchOrder string
type TipHeader ¶
type TipHeader struct { BlockHash types.Hash `json:"block_hash"` BlockNumber uint64 `json:"block_number"` }
func (*TipHeader) UnmarshalJSON ¶
type TxWithCell ¶
type TxWithCell struct { BlockNumber uint64 `json:"block_number"` IoIndex uint `json:"io_index"` IoType IoType `json:"io_type"` TxHash types.Hash `json:"tx_hash"` TxIndex uint `json:"tx_index"` }
func (*TxWithCell) UnmarshalJSON ¶
func (r *TxWithCell) UnmarshalJSON(input []byte) error
type TxWithCells ¶
type TxWithCells struct { TxHash types.Hash `json:"tx_hash"` BlockNumber uint64 `json:"block_number"` TxIndex uint `json:"tx_index"` Cells []*Cell `json:"Cells"` }
func (*TxWithCells) UnmarshalJSON ¶
func (r *TxWithCells) UnmarshalJSON(input []byte) error
type TxsWithCell ¶
type TxsWithCell struct { LastCursor string `json:"last_cursor"` Objects []*TxWithCell `json:"objects"` }
type TxsWithCells ¶
type TxsWithCells struct { LastCursor string `json:"last_cursor"` Objects []*TxWithCells `json:"objects"` }
Click to show internal directories.
Click to hide internal directories.