script

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMultisigPubkeyNum     = 20
	MaxP2shMultisigPubkeyNum = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ScriptApi added in v0.3.14

type ScriptApi interface {
	CreateFromAsm(asm string) (script *types.Script, err error)
	CreateFromAsmStrings(asmStrings []string) (script *types.Script, err error)
	Parse(script *types.Script) (asmStrings []string, err error)
	ParseMultisig(script *types.Script) (pubkey []*types.Pubkey, requireSigNum uint32, err error)
	CreateMultisig(pubkeys []*types.Pubkey, requireSigNum uint32) (script *types.Script, err error)
	AnalyzeLockingScript(script *types.Script) (hashType types.HashType, err error)
	IsCheckHashType(hashType types.HashType, script *types.Script) (bool, error)
}

type ScriptApiImpl

type ScriptApiImpl struct {
	cfdErrors.HasInitializeError
	// contains filtered or unexported fields
}

func NewScriptApi added in v0.3.14

func NewScriptApi() *ScriptApiImpl

NewScriptApi returns an object that defines the API for Script

func (*ScriptApiImpl) AnalyzeLockingScript added in v0.3.18

func (s *ScriptApiImpl) AnalyzeLockingScript(script *types.Script) (
	hashType types.HashType, err error,
)

func (*ScriptApiImpl) CreateFromAsm added in v0.3.14

func (s *ScriptApiImpl) CreateFromAsm(asm string) (script *types.Script, err error)

func (*ScriptApiImpl) CreateFromAsmStrings added in v0.3.14

func (s *ScriptApiImpl) CreateFromAsmStrings(asmStrings []string) (script *types.Script, err error)

func (*ScriptApiImpl) CreateMultisig added in v0.3.14

func (s *ScriptApiImpl) CreateMultisig(pubkeys []*types.Pubkey, requireSigNum uint32) (script *types.Script, err error)

func (*ScriptApiImpl) IsCheckHashType added in v0.3.18

func (s *ScriptApiImpl) IsCheckHashType(
	hashType types.HashType,
	script *types.Script,
) (bool, error)

func (*ScriptApiImpl) Parse added in v0.3.14

func (s *ScriptApiImpl) Parse(script *types.Script) (asmStrings []string, err error)

func (*ScriptApiImpl) ParseMultisig added in v0.3.14

func (s *ScriptApiImpl) ParseMultisig(script *types.Script) (pubkeys []*types.Pubkey, requireSigNum uint32, err error)

func (*ScriptApiImpl) WithPubkeyApi added in v0.3.14

func (p *ScriptApiImpl) WithPubkeyApi(pubkeyApi key.PubkeyApi) *ScriptApiImpl

WithPubkeyApi This function set a pubkey api.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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