handler

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const DaoLockPeriodEpochs = 180

Variables

View Source
var (
	DaoDepositOutputData = []byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
	DaoScript            = &types.Script{
		CodeHash: systemscript.GetCodeHash(types.NetworkMain, systemscript.Dao),
		HashType: types.HashTypeType,
		Args:     []byte{},
	}
)

Functions

func IsDepositCell

func IsDepositCell(output *types.CellOutput, outputData []byte) bool

Types

type ClaimInfo

type ClaimInfo struct {
	DepositBlockHeader  *types.Header
	WithdrawBlockHeader *types.Header
	WithdrawOutpoint    *types.OutPoint
}

func NewClaimInfo

func NewClaimInfo(client rpc.Client, withdrawOutpoint *types.OutPoint) (*ClaimInfo, error)

func (*ClaimInfo) CalculateDaoMinimumSince

func (r *ClaimInfo) CalculateDaoMinimumSince() uint64

type DaoScriptHandler

type DaoScriptHandler struct {
	CellDep  *types.CellDep
	CodeHash types.Hash
}

func NewDaoScriptHandler

func NewDaoScriptHandler(network types.Network) *DaoScriptHandler

func (*DaoScriptHandler) BuildTransaction

func (r *DaoScriptHandler) BuildTransaction(builder collector.TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)

type OmnilockScriptHandler added in v2.0.3

type OmnilockScriptHandler struct {
	SingleSignCellDep *types.CellDep
	MultiSignCellDep  *types.CellDep
	CellDep           *types.CellDep
	CodeHash          types.Hash
}

func NewOmnilockScriptHandler added in v2.0.3

func NewOmnilockScriptHandler(network types.Network) *OmnilockScriptHandler

func (*OmnilockScriptHandler) BuildTransaction added in v2.0.3

func (o *OmnilockScriptHandler) BuildTransaction(builder collector.TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)

type Secp256k1Blake160MultisigAllScriptHandler

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

func NewSecp256k1Blake160MultisigAllScriptHandler

func NewSecp256k1Blake160MultisigAllScriptHandler(network types.Network) *Secp256k1Blake160MultisigAllScriptHandler

func (*Secp256k1Blake160MultisigAllScriptHandler) BuildTransaction

func (r *Secp256k1Blake160MultisigAllScriptHandler) BuildTransaction(builder collector.TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)

type Secp256k1Blake160SighashAllScriptHandler

type Secp256k1Blake160SighashAllScriptHandler struct {
	CellDep  *types.CellDep
	CodeHash types.Hash
}

func NewSecp256k1Blake160SighashAllScriptHandler

func NewSecp256k1Blake160SighashAllScriptHandler(network types.Network) *Secp256k1Blake160SighashAllScriptHandler

func (*Secp256k1Blake160SighashAllScriptHandler) BuildTransaction

func (r *Secp256k1Blake160SighashAllScriptHandler) BuildTransaction(builder collector.TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)

type SudtScriptHandler

type SudtScriptHandler struct {
	CellDep  *types.CellDep
	CodeHash types.Hash
}

func NewSudtScriptHandler

func NewSudtScriptHandler(network types.Network) *SudtScriptHandler

func (*SudtScriptHandler) BuildTransaction

func (r *SudtScriptHandler) BuildTransaction(builder collector.TransactionBuilder, group *transaction.ScriptGroup, context interface{}) (bool, error)

type WithdrawInfo

type WithdrawInfo struct {
	DepositOutPoint    *types.OutPoint
	DepositBlockNumber uint64
	DepositBlockHash   types.Hash
}

func NewWithdrawInfo

func NewWithdrawInfo(client rpc.Client, depositOutPoint *types.OutPoint) (*WithdrawInfo, error)

Jump to

Keyboard shortcuts

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