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: 4

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 added in v2.0.3

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

func NewLiveCellIteratorByLightClientFromAddress added in v2.0.3

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 added in v2.0.3

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

func (*CkbLiveCellGetter) GetCells added in v2.0.3

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

type LightClientLiveCellGetter added in v2.0.3

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

func (*LightClientLiveCellGetter) GetCells added in v2.0.3

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 added in v2.0.3

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

type OffChainInputCollector added in v2.0.3

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

func NewOffChainInputCollector added in v2.0.3

func NewOffChainInputCollector(Client rpc.Client) *OffChainInputCollector

func (*OffChainInputCollector) ApplyOffChainTransaction added in v2.0.3

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

type OffChainInputIterator added in v2.0.3

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

func NewOffChainInputIterator added in v2.0.3

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

func NewOffChainInputIteratorFromAddress added in v2.0.3

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

func (*OffChainInputIterator) GetLiveCells added in v2.0.3

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

func (*OffChainInputIterator) HasNext added in v2.0.3

func (r *OffChainInputIterator) HasNext() bool

func (*OffChainInputIterator) Next added in v2.0.3

type OutPointWithBlockNumber added in v2.0.3

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 added in v2.0.3

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