nodesale

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Version = "v0.0.1-alpha"
)

Variables

View Source
var NODESALE_MAGIC = []byte{0x6e, 0x73, 0x6f, 0x70}

Functions

func New

func New(injector do.Injector) (indexer.IndexerWorker, error)

Types

type NodeSaleEvent

type NodeSaleEvent struct {
	Transaction  *types.Transaction
	EventMessage *protobuf.NodeSaleEvent
	EventJson    []byte
	TxPubkey     *btcec.PublicKey
	RawData      []byte
	InputValue   uint64
}

type Processor

type Processor struct {
	NodeSaleDg datagateway.NodeSaleDataGateway
	BtcClient  *datasources.BitcoinNodeDatasource
	Network    common.Network
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(repository datagateway.NodeSaleDataGateway,
	datasource *datasources.BitcoinNodeDatasource,
	network common.Network,
	cleanupFuncs []func(context.Context) error,
	lastBlockDefault int64,
) *Processor

func (*Processor) CurrentBlock

func (p *Processor) CurrentBlock(ctx context.Context) (types.BlockHeader, error)

CurrentBlock implements indexer.Processor.

func (*Processor) GetIndexedBlock

func (p *Processor) GetIndexedBlock(ctx context.Context, height int64) (types.BlockHeader, error)

GetIndexedBlock implements indexer.Processor.

func (*Processor) Name

func (p *Processor) Name() string

Name implements indexer.Processor.

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, inputs []*types.Block) error

Process implements indexer.Processor.

func (*Processor) ProcessDelegate

func (p *Processor) ProcessDelegate(ctx context.Context, qtx datagateway.NodeSaleDataGatewayWithTx, block *types.Block, event NodeSaleEvent) error

func (*Processor) ProcessDeploy

func (p *Processor) ProcessDeploy(ctx context.Context, qtx datagateway.NodeSaleDataGatewayWithTx, block *types.Block, event NodeSaleEvent) error

func (*Processor) ProcessPurchase

func (p *Processor) ProcessPurchase(ctx context.Context, qtx datagateway.NodeSaleDataGatewayWithTx, block *types.Block, event NodeSaleEvent) error

func (*Processor) PubkeyToPkHashAddress

func (p *Processor) PubkeyToPkHashAddress(pubKey *btcec.PublicKey) btcutil.Address

func (*Processor) RevertData

func (p *Processor) RevertData(ctx context.Context, from int64) error

RevertData implements indexer.Processor.

func (*Processor) Shutdown

func (p *Processor) Shutdown(ctx context.Context) error

func (*Processor) VerifyStates

func (p *Processor) VerifyStates(ctx context.Context) error

VerifyStates implements indexer.Processor.

Directories

Path Synopsis
api
internal
repository

Jump to

Keyboard shortcuts

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