Versions in this module Expand all Collapse all v0 v0.0.3 Jun 11, 2024 Changes in this version + const ErrCodeAtomicalChangeFail + const ErrCodeCommon + const ErrCodeLessAtomicalAmt + const ErrCodeMul + const ErrCodeUnknownAsset + const ErrCodeVoutDust + const ErrInsufficientBalance + const SellerSignatureIndex + var ErInsufficientBalance = "Insufficient Balance" + var FT = "FT" + var NFT = "NFT" + func AddrToPkScript(addr string, network *chaincfg.Params) ([]byte, error) + func GenerateAtomicalSignedBuyingTx(ins []*TxInput, outs []*TxOutput, dustSize, feePerB int64, sellerPsbt string, ...) (int64, string, error) + func GenerateAtomicalSignedListingPSBTBase64(in *TxInput, out *TxOutput, network *chaincfg.Params) (string, error) + func NewAtomicalTransferTool(network *chaincfg.Params, request *AtomicalRequest) (*AtomicalTransferTool, *Err) + func PayToPubKeyHashScript(pubKeyHash []byte) ([]byte, error) + func PayToWitnessPubKeyHashScript(pubKeyHash []byte) ([]byte, error) + type AtomicalData struct + AtomicalId string + Type string + type AtomicalDatas []*AtomicalData + func (s AtomicalDatas) Len() int + func (s AtomicalDatas) Sort() + func (x AtomicalDatas) Less(i, j int) bool + func (x AtomicalDatas) Swap(i, j int) + type AtomicalRequest struct + Address string + DustSize int64 + FeePerB int64 + Inputs PrevOutputs + Outputs []*Output + func (a *AtomicalRequest) Check(network *chaincfg.Params, minChangeValue int64) *Err + type AtomicalTransferTool struct + CommitAddrs []string + CommitTx *wire.MsgTx + CommitTxPrevOutputFetcher *txscript.MultiPrevOutFetcher + CommitTxPrevOutputList []*PrevOutput + CommitTxPrivateKeyList []*btcec.PrivateKey + MustCommitTxFee int64 + RevealTxPrevOutputFetcher *txscript.MultiPrevOutFetcher + func (tool *AtomicalTransferTool) CalculateFee() (int64, []int64) + func (tool *AtomicalTransferTool) GetCommitTxHex() (string, error) + type Err struct + Data interface{} + ErrCode int + func AtomicalTransfer(network *chaincfg.Params, request *AtomicalRequest) (*bitcoin.InscribeTxs, *Err) + type ErrAtomicalIdAmt struct + Amount int64 + AtomicalId string + type Output struct + Address string + Amount int64 + Data AtomicalDatas + type PrevOutput struct + Address string + Amount int64 + Data AtomicalDatas + PrivateKey string + TxId string + VOut uint32 + type PrevOutputs []*PrevOutput + func (s PrevOutputs) UtxoViewpoint(net *chaincfg.Params) (bitcoin.UtxoViewpoint, error) + 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