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 ¶ added in v2.0.3
func (*Cell) UnmarshalJSON ¶ added in v2.0.3
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 uint32, afterCursor string) (*LiveCells, error) // GetTransactions returns the transactions collection by the lock or type script. GetTransactions(ctx context.Context, searchKey *SearchKey, order SearchOrder, limit uint32, 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 uint32, 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 SearchKey ¶
type SearchKey struct { Script *types.Script `json:"script"` ScriptType types.ScriptType `json:"script_type"` ScriptSearchMode types.ScriptSearchMode `json:"script_search_mode,omitempty"` Filter *Filter `json:"filter,omitempty"` WithData bool `json:"with_data"` }
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 ¶ added in v2.0.3
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 ¶ added in v2.0.3
func (r *TxWithCell) UnmarshalJSON(input []byte) error
type TxWithCells ¶ added in v2.0.3
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 ¶ added in v2.0.3
func (r *TxWithCells) UnmarshalJSON(input []byte) error
type TxsWithCell ¶ added in v2.0.3
type TxsWithCell struct { LastCursor string `json:"last_cursor"` Objects []*TxWithCell `json:"objects"` }
type TxsWithCells ¶ added in v2.0.3
type TxsWithCells struct { LastCursor string `json:"last_cursor"` Objects []*TxWithCells `json:"objects"` }
Click to show internal directories.
Click to hide internal directories.