witness

package
v0.0.0-...-6c424d2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInscriptionWitness

func BuildInscriptionWitness(datas []ord.InscriptionData, privateKey *btcec.PrivateKey, revealOutValue int64) ([]byte, error)

Types

type InscriptionRawTx

type InscriptionRawTx struct {
	TxPrevOutput   *wire.TxOut
	WitnessScript  *RevealWitness
	Size           int64
	Raw            *wire.MsgTx
	RevealOutValue int64
	FeeRate        int64
	PrivateKey     *btcec.PrivateKey
}

func NewInscriptionRawTx

func NewInscriptionRawTx() *InscriptionRawTx

func (*InscriptionRawTx) CalcPrevOutput

func (irt *InscriptionRawTx) CalcPrevOutput(revealOutValue, feeRate int64) int64

func (*InscriptionRawTx) SetSize

func (irt *InscriptionRawTx) SetSize(txSize int64)

func (*InscriptionRawTx) SetTxPrevOutput

func (irt *InscriptionRawTx) SetTxPrevOutput(pkScript []byte, prevOutput int64)

func (*InscriptionRawTx) SetWitnessScript

func (irt *InscriptionRawTx) SetWitnessScript(inscriptionWitnessScript []byte)

type RevealAccount

type RevealAccount struct {
	CommitTxAddress       btcutil.Address
	CommitTxPkScript      []byte
	RecoveryPrivateKeyWIF string
}

type RevealWitness

type RevealWitness struct {
	SignatureWitness    []byte
	InsWitnessScript    []byte
	ControlBlockWitness []byte
}

func NewInscriptionWitness

func NewInscriptionWitness() *RevealWitness

type SignInfo

type SignInfo struct {
	PrivateKey    *btcec.PrivateKey
	RevealWitness *RevealWitness
	RevealAccount *RevealAccount
}

type SignerBuilder

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

func NewSignerBuilder

func NewSignerBuilder(net *chaincfg.Params) *SignerBuilder

func (*SignerBuilder) BuildRevealAccount

func (ins *SignerBuilder) BuildRevealAccount(proof *txscript.TapscriptProof, privatekey *btcec.PrivateKey) (*RevealAccount, error)

func (*SignerBuilder) BuildSignInfo

func (ins *SignerBuilder) BuildSignInfo(insData ord.InscriptionData, privateKey *btcec.PrivateKey) (*SignInfo, error)

func (*SignerBuilder) InitSigner

func (ins *SignerBuilder) InitSigner(dataList []ord.InscriptionData) ([]*SignInfo, error)

Jump to

Keyboard shortcuts

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