deposit

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDepositJob

func PrintDepositJob(d *structs.DepositJob) string

func SortDepositJobs

func SortDepositJobs(input []*structs.DepositJob) []*structs.DepositJob

Types

type DepositCallback

type DepositCallback interface {
	OnDeposit(jobID string, txHash string)
	OnError(jobID string, err string)
}

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

func StartProcessor

func StartProcessor(
	nodeConfig common.GlobalNodeConfig,
	transactor *eth.Transactor,
	dal *storage.DAL,
	monitorService intfs.MonitorService,
	isOSP bool,
	isEventListener bool,
	quit chan bool) (*Processor, error)

func (*Processor) DepositWithCallback

func (p *Processor) DepositWithCallback(amt *big.Int, cid ctype.CidType, cb DepositCallback) (string, error)

func (*Processor) GetDepositState

func (p *Processor) GetDepositState(jobID string) (int, string, error)

func (*Processor) MonitorJobWithCallback

func (p *Processor) MonitorJobWithCallback(jobID string, cb DepositCallback)

func (*Processor) RemoveJob

func (p *Processor) RemoveJob(jobID string) error

Remove the job from database.

func (*Processor) RequestDeposit

func (p *Processor) RequestDeposit(
	cid ctype.CidType, amount *big.Int, toPeer bool, maxWait time.Duration) (string, error)

RequestDeposit inserts a deposit job into the db, and return the deposit job ID

func (*Processor) RequestRefill

func (p *Processor) RequestRefill(
	cid ctype.CidType, amount *big.Int, maxWait time.Duration) (string, error)

RequestRefill inserts a refill deposit job into the db, and return the deposit job ID

func (*Processor) RequestRefillTx

func (p *Processor) RequestRefillTx(
	tx *storage.DALTx, cid ctype.CidType, amount *big.Int, maxWait time.Duration) (string, error)

RequestRefillTx inserts a refill deposit job into the db as part of a transaction, and return the deposit job ID

Jump to

Keyboard shortcuts

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