collector

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CellCollectionIterator

type CellCollectionIterator interface {
	HasNext() bool
	Next() error
	CurrentItem() (*indexer.LiveCell, error)
	Iterator() (CellCollectionIterator, error)
}

type CellIterator

type CellIterator interface {
	HasNext() bool
	Next() *types.TransactionInput
}

func NewLiveCellIterator

func NewLiveCellIterator(client rpc.Client, key *indexer.SearchKey) CellIterator

func NewLiveCellIteratorByLightClient

func NewLiveCellIteratorByLightClient(client lightclient.Client, key *indexer.SearchKey) CellIterator

func NewLiveCellIteratorByLightClientFromAddress

func NewLiveCellIteratorByLightClientFromAddress(client lightclient.Client, addr string) (CellIterator, error)

func NewLiveCellIteratorFromAddress

func NewLiveCellIteratorFromAddress(client rpc.Client, addr string) (CellIterator, error)

type ChangeOutputIndex

type ChangeOutputIndex struct {
	Value int
}

type CkbLiveCellGetter

type CkbLiveCellGetter struct {
	Client  rpc.Client
	Context context.Context
}

func (*CkbLiveCellGetter) GetCells

func (c *CkbLiveCellGetter) GetCells(searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.LiveCells, error)

type LightClientLiveCellGetter

type LightClientLiveCellGetter struct {
	Client  lightclient.Client
	Context context.Context
}

func (*LightClientLiveCellGetter) GetCells

func (c *LightClientLiveCellGetter) GetCells(searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.LiveCells, error)

type LiveCellCollectResult

type LiveCellCollectResult struct {
	LiveCells []*indexer.LiveCell
	Capacity  uint64
	Options   map[string]interface{}
}

type LiveCellCollector

type LiveCellCollector struct {
	Client      rpc.Client
	SearchKey   *indexer.SearchKey
	SearchOrder indexer.SearchOrder
	Limit       uint64
	LastCursor  string
	EmptyData   bool
	TypeScript  *types.Script
	// contains filtered or unexported fields
}

func NewLiveCellCollector

func NewLiveCellCollector(client rpc.Client, searchKey *indexer.SearchKey, searchOrder indexer.SearchOrder, limit uint64, afterCursor string) *LiveCellCollector

func (*LiveCellCollector) CurrentItem

func (c *LiveCellCollector) CurrentItem() (*indexer.LiveCell, error)

func (*LiveCellCollector) HasNext

func (c *LiveCellCollector) HasNext() bool

func (*LiveCellCollector) Iterator

func (*LiveCellCollector) Next

func (c *LiveCellCollector) Next() error

type LiveCellIterator

type LiveCellIterator struct {
	LiveCellGetter LiveCellsGetter
	SearchKey      *indexer.SearchKey
	SearchOrder    indexer.SearchOrder
	Limit          uint64
	// contains filtered or unexported fields
}

func (*LiveCellIterator) HasNext

func (r *LiveCellIterator) HasNext() bool

func (*LiveCellIterator) Next

type LiveCellsGetter

type LiveCellsGetter interface {
	GetCells(searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.LiveCells, error)
}

type OffChainInputCollector

type OffChainInputCollector struct {
	Client rpc.Client
	// contains filtered or unexported fields
}

func NewOffChainInputCollector

func NewOffChainInputCollector(Client rpc.Client) *OffChainInputCollector

func (*OffChainInputCollector) ApplyOffChainTransaction

func (c *OffChainInputCollector) ApplyOffChainTransaction(tipBlockNumber uint64, transaction types.Transaction)

type OffChainInputIterator

type OffChainInputIterator struct {
	Iterator                    *LiveCellIterator
	Collector                   *OffChainInputCollector
	ConsumeOffChainCellsFirstly bool
	// contains filtered or unexported fields
}

func NewOffChainInputIterator

func NewOffChainInputIterator(iterator CellIterator, collector *OffChainInputCollector, consumeOffChainCellsFirstly bool) *OffChainInputIterator

func NewOffChainInputIteratorFromAddress

func NewOffChainInputIteratorFromAddress(client rpc.Client, addr string, collector *OffChainInputCollector, consumeOffChainCellsFirstly bool) (*OffChainInputIterator, error)

func (*OffChainInputIterator) GetLiveCells

func (r *OffChainInputIterator) GetLiveCells(searchKey *indexer.SearchKey, order indexer.SearchOrder, limit uint64, afterCursor string) (*indexer.LiveCells, error)

func (*OffChainInputIterator) HasNext

func (r *OffChainInputIterator) HasNext() bool

func (*OffChainInputIterator) Next

type OutPointWithBlockNumber

type OutPointWithBlockNumber struct {
	*types.OutPoint
	// contains filtered or unexported fields
}

type ScriptHandler

type ScriptHandler interface {
	BuildTransaction(builder TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)
}

type TransactionBuilder

type TransactionBuilder interface {
	SetVersion(version uint32)
	AddHeaderDep(headerDep types.Hash) int
	AddCellDep(cellDep *types.CellDep) int
	AddInput(input *types.CellInput) int
	SetSince(index uint, since uint64) error
	AddOutput(output *types.CellOutput, data []byte) int
	SetOutputData(index uint, data []byte) error
	SetWitness(index uint, witnessType types.WitnessType, data []byte) error
	AddScriptGroup(group *transaction.ScriptGroup) int
	Build(contexts ...interface{}) (*transaction.TransactionWithScriptGroups, error)
}

type TransactionInputWithBlockNumber

type TransactionInputWithBlockNumber struct {
	types.TransactionInput
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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