Documentation ¶
Index ¶
- Constants
- func CreateEmptyTx() *wire.MsgTx
- func GetRevealOutValue(revealOutValue int64) int64
- func GetServiceFee(inscAmount int64) int64
- type Info
- type InscriptionRawTx
- type MintTxBuilder
- type PrevInfo
- type StandardInscriber
- func (ins *StandardInscriber) AddInOutToTx(tx *wire.MsgTx, index int, destination string, revealOutValue int64, ...) error
- func (ins *StandardInscriber) CompleteMiddleTx(commitTxHash string, actualMiddlePrevOutputFee int64) error
- func (b *StandardInscriber) CompleteRevealTxs(revealTxs []*WrapTx, pkAndScripts []*WalletInfo, middleTxHash chainhash.Hash) error
- func (ins *StandardInscriber) Init(req ord.InscriptionRequest) error
- func (ins *StandardInscriber) InitAllRevealTx(ords []ord.InscriptionData, revealOutValue int64) ([]*InscriptionRawTx, error)
- func (ins *StandardInscriber) InitEmptyMiddleTx(txs []*InscriptionRawTx, totalRevealPrevOutput int64, ...) (totalPrevOutput, serviceFee, minerFee int64, err error)
- func (ins *StandardInscriber) InitPrevOutputFetcher()
Constants ¶
View Source
const EnableRbfNoLockTime = wire.MaxTxInSequenceNum - 2
View Source
const MaxStandardTxWeight = blockchain.MaxBlockWeight / 10
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyTx ¶
func GetRevealOutValue ¶
func GetServiceFee ¶
Types ¶
type InscriptionRawTx ¶
type InscriptionRawTx struct { TxPrevOutput *wire.TxOut WitnessScript *witness.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 MintTxBuilder ¶
type MintTxBuilder struct {
// contains filtered or unexported fields
}
func NewMintTxBuilder ¶
func NewMintTxBuilder(private *btcec.PrivateKey, net *chaincfg.Params) *MintTxBuilder
func (*MintTxBuilder) BuildMintTx ¶
func (mtb *MintTxBuilder) BuildMintTx(prev PrevInfo, req runes.EtchRequest) (*wire.MsgTx, error)
type PrevInfo ¶
func BuilderPrevInfo ¶
type StandardInscriber ¶
type StandardInscriber struct { RawTxs []*InscriptionRawTx // contains filtered or unexported fields }
func NewInscribeTool ¶
func (*StandardInscriber) AddInOutToTx ¶
func (*StandardInscriber) CompleteMiddleTx ¶
func (ins *StandardInscriber) CompleteMiddleTx(commitTxHash string, actualMiddlePrevOutputFee int64) error
1. fill commit tx value 2. sign transaction
func (*StandardInscriber) CompleteRevealTxs ¶
func (b *StandardInscriber) CompleteRevealTxs(revealTxs []*WrapTx, pkAndScripts []*WalletInfo, middleTxHash chainhash.Hash) error
func (*StandardInscriber) Init ¶
func (ins *StandardInscriber) Init(req ord.InscriptionRequest) error
func (*StandardInscriber) InitAllRevealTx ¶
func (ins *StandardInscriber) InitAllRevealTx(ords []ord.InscriptionData, revealOutValue int64) ([]*InscriptionRawTx, error)
InitAllRevealTx middle tx is a special reveal tx
func (*StandardInscriber) InitEmptyMiddleTx ¶
func (ins *StandardInscriber) InitEmptyMiddleTx(txs []*InscriptionRawTx, totalRevealPrevOutput int64, revealOutValue, feeRate, inscAmount int64) (totalPrevOutput, serviceFee, minerFee int64, err error)
InitEmptyMiddleTx : 构造middleTx: 连接commit tx和(除了第一笔)reveal tx的中间tx: 包含reveal tx1 + commit tx2... + 手续费 + 找零
func (*StandardInscriber) InitPrevOutputFetcher ¶
func (ins *StandardInscriber) InitPrevOutputFetcher()
Click to show internal directories.
Click to hide internal directories.