signService

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllRoundWorker

type AllRoundWorker struct {
	BscClient *ethclient.Client
	// contains filtered or unexported fields
}

func NewAllRoundWorker

func NewAllRoundWorker(workers config.SignWorker) (*AllRoundWorker, error)

func (*AllRoundWorker) AddTaskNum

func (w *AllRoundWorker) AddTaskNum()

func (*AllRoundWorker) BatchMint

func (w *AllRoundWorker) BatchMint(reqs []model.BatchMintReq) ([]string, string, error)

func (*AllRoundWorker) GetCNonce

func (w *AllRoundWorker) GetCNonce() (uint64, error)

func (*AllRoundWorker) GetInfo

func (w *AllRoundWorker) GetInfo() *WorkerInfo

func (*AllRoundWorker) GetRNonce

func (w *AllRoundWorker) GetRNonce() (uint64, error)

func (*AllRoundWorker) IncrNonce

func (w *AllRoundWorker) IncrNonce()

func (*AllRoundWorker) Lock

func (w *AllRoundWorker) Lock() bool

func (*AllRoundWorker) SignatureTransaction

func (w *AllRoundWorker) SignatureTransaction(unSignTX *types.Transaction) (*types.Transaction, error)

func (*AllRoundWorker) UnLock

func (w *AllRoundWorker) UnLock()

func (*AllRoundWorker) WithdrawNFT

func (w *AllRoundWorker) WithdrawNFT(reqs []model.WithdrawNFTReq) ([]string, string, error)

func (*AllRoundWorker) WithdrawToken

func (w *AllRoundWorker) WithdrawToken(reqs []model.WithdrawTokenReq) ([]string, string, error)

type HotWalletManager

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

func NewHWManager

func NewHWManager() (*HotWalletManager, error)

func (*HotWalletManager) AddWorker

func (w *HotWalletManager) AddWorker(worker Worker)

func (*HotWalletManager) BatchMint

func (w *HotWalletManager) BatchMint(service request.BatchMintNFTService) error

func (*HotWalletManager) WithdrawNFT

func (w *HotWalletManager) WithdrawNFT(service request.BatchWithdrawalNFTService) error

func (*HotWalletManager) WithdrawToken

func (w *HotWalletManager) WithdrawToken(service request.BatchWithdrawalTokenService) error

type Worker

type Worker interface {
	WorkerCalls
	GetInfo() *WorkerInfo
	Lock() bool
	UnLock()
	SignatureTransaction(*types.Transaction) (*types.Transaction, error)
	AddTaskNum()
}

type WorkerCalls

type WorkerCalls interface {
	BatchMint(reqs []model.BatchMintReq) ([]string, string, error)
	WithdrawToken(reqs []model.WithdrawTokenReq) ([]string, string, error)
	WithdrawNFT(reqs []model.WithdrawNFTReq) ([]string, string, error)
}

type WorkerID

type WorkerID uuid.UUID // worker session UUID

func (WorkerID) String

func (w WorkerID) String() string

type WorkerInfo

type WorkerInfo struct {
	TaskNum uint32
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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