Versions in this module Expand all Collapse all v0 v0.0.3 Jun 11, 2024 Changes in this version + const DefaultMinChangeValue + const DefaultRevealOutValue + const DefaultSequenceNum + const DefaultTxVersion + const ErInsufficientBalance + const MaxStandardTxWeight + const SellerSignatureIndex + const WitnessScaleFactor + var ErrInvalidEdict = errors.New("ErrInvalidEdict") + var TAG_Amount = big.NewInt(10) + var TAG_BODY = big.NewInt(0) + var TAG_Cap = big.NewInt(8) + var TAG_Cenotaph = big.NewInt(126) + var TAG_Divisibility = big.NewInt(1) + var TAG_Flags = big.NewInt(2) + var TAG_HeightEnd = big.NewInt(14) + var TAG_HeightStart = big.NewInt(12) + var TAG_Mint = big.NewInt(20) + var TAG_Nop = big.NewInt(127) + var TAG_OffsetEnd = big.NewInt(118) + var TAG_OffsetStart = big.NewInt(16) + var TAG_Pointer = big.NewInt(22) + var TAG_Premine = big.NewInt(6) + var TAG_Rune = big.NewInt(4) + var TAG_Spacers = big.NewInt(3) + var TAG_Symbol = big.NewInt(5) + func AddrToPkScript(addr string, network *chaincfg.Params) ([]byte, error) + func BuildMintL2Tx(txid string, vout uint32, amount int64, receiver, addr string, ...) (*wire.MsgTx, error) + func BuildOpReturnData(edicts Edicts, isDefaultOutput, mint bool, defaultOutput int64) ([]byte, error) + func BuildOpReturnDataJson(a []byte) ([]byte, error) + func BuildOpReturnScriptForEdict(edicts []*Edict, isMainnet bool) ([]byte, error) + func BuildOpReturnScriptForRuneMainEdict(edicts []*Edict, isMainnet bool, isDefaultOutput bool, defaultOutput int64) ([]byte, error) + func CalculateMintTxFee(receiver string, addr string, mintScript string, privateKey string, ...) (int64, int64, error) + func CheckOpReturnData(data *OpReturnData) bool + func EncodeToVec(n *big.Int) []int64 + func EncodeToVecV2(n *big.Int, buf *bytes.Buffer) + func GenerateRunesSignedBuyingTx(ins []*TxInput, outs []*TxOutput, dustSize, feePerB int64, sellerPsbt []string, ...) (int64, string, error) + func GenerateRunesSignedListingPSBTBase64(in *TxInput, out *TxOutput, network *chaincfg.Params) (string, error) + func Int64ToBytes(i int64) []byte + func PayToPubKeyHashScript(pubKeyHash []byte) ([]byte, error) + func PayToWitnessPubKeyHashScript(pubKeyHash []byte) ([]byte, error) + func Sign(tx *wire.MsgTx, privateKeys []*btcec.PrivateKey, ...) error + type Edict struct + Amount string + Block string + Id string + Output uint + func (v *Edict) Fix() + func (v *Edict) RealEdict(mint bool) (*RealEdict, error) + type Edicts []*Edict + func (s Edicts) RealEdicts(mint bool) (RealEdicts, error) + func (v Edicts) Fix() + type Etching struct + Divisibility int64 + Limit string + Rune string + Symbol string + Term int64 + type InscribeTxs struct + CommitAddrs []string + CommitTx string + CommitTxFee int64 + RevealTxFees []int64 + RevealTxs []string + type InscriptionData struct + Body []byte + ContentType string + RevealAddr string + Vout uint + type InscriptionRequest struct + ChangeAddress string + CommitFeeRate int64 + CommitTxPrevOutputList []*PrevOutput + InscriptionDataList []InscriptionData + MinChangeValue int64 + Outputs []*Output + RevealFeeRate int64 + RevealOutValue int64 + type OpReturnData struct + Burn bool + DefaultOutput int64 + Edicts Edicts + Etching *Etching + IsDefaultOutput bool + Mint bool + MintNum uint + type Output struct + Address string + Amount int64 + type PrevOutput struct + Address string + Amount int64 + PrivateKey string + TxId string + VOut uint32 + type PrevOutputs []*PrevOutput + func (s PrevOutputs) UtxoViewpoint(net *chaincfg.Params) (bitcoin.UtxoViewpoint, error) + type RealEdict struct + Amount *big.Int + Block *big.Int + Id *big.Int + Output uint + type RealEdicts []*RealEdict + func (s RealEdicts) Len() int + func (s RealEdicts) Less(i, j int) bool + func (s RealEdicts) Swap(i, j int) + type TxInput struct + Address string + Amount int64 + DerivationPath string + MasterFingerprint uint32 + NonWitnessUtxo string + PrivateKey string + PublicKey string + Sequence uint32 + TxId string + VOut uint32 + type TxOutput struct + Address string + Amount int64 + DerivationPath string + IsChange bool + MasterFingerprint uint32 + PkScript string + PublicKey string