Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type AtomicalDatas
- type AtomicalRequest
- type AtomicalTransferTool
- type Err
- type ErrAtomicalIdAmt
- type Output
- type PrevOutput
- type TxInput
- type TxOutput
Constants ¶
View Source
const ( ErrCodeLessAtomicalAmt = 2011400 ErrCodeAtomicalChangeFail = 2011401 ErrCodeVoutDust = 2011402 ErrCodeCommon = 2011403 ErrCodeUnknownAsset = 2011404 ErrInsufficientBalance = 1000001 ErrCodeMul = 2011420 )
View Source
const SellerSignatureIndex = 1
Variables ¶
View Source
var ( NFT = "NFT" FT = "FT" )
View Source
var (
ErInsufficientBalance = "Insufficient Balance"
)
Functions ¶
func NewAtomicalTransferTool ¶
func NewAtomicalTransferTool(network *chaincfg.Params, request *AtomicalRequest) (*AtomicalTransferTool, *Err)
func PayToPubKeyHashScript ¶
Types ¶
type AtomicalData ¶
type AtomicalDatas ¶
type AtomicalDatas []*AtomicalData
func (AtomicalDatas) Len ¶
func (s AtomicalDatas) Len() int
func (AtomicalDatas) Less ¶
func (x AtomicalDatas) Less(i, j int) bool
func (AtomicalDatas) Sort ¶
func (s AtomicalDatas) Sort()
func (AtomicalDatas) Swap ¶
func (x AtomicalDatas) Swap(i, j int)
type AtomicalRequest ¶
type AtomicalRequest struct { Inputs []*PrevOutput `json:"inputs"` Outputs []*Output `json:"outputs"` FeePerB int64 `json:"feePerB"` Address string `json:"address"` DustSize int64 `json:"dustSize"` }
type AtomicalTransferTool ¶
type AtomicalTransferTool struct { CommitTxPrevOutputFetcher *txscript.MultiPrevOutFetcher CommitTxPrivateKeyList []*btcec.PrivateKey RevealTxPrevOutputFetcher *txscript.MultiPrevOutFetcher CommitTxPrevOutputList []*PrevOutput CommitTx *wire.MsgTx MustCommitTxFee int64 CommitAddrs []string }
func (*AtomicalTransferTool) CalculateFee ¶
func (tool *AtomicalTransferTool) CalculateFee() (int64, []int64)
func (*AtomicalTransferTool) GetCommitTxHex ¶
func (tool *AtomicalTransferTool) GetCommitTxHex() (string, error)
type Err ¶
type Err struct { ErrCode int `json:"errCode"` Data interface{} `json:"data"` }
func AtomicalTransfer ¶
func AtomicalTransfer(network *chaincfg.Params, request *AtomicalRequest) (*bitcoin.InscribeTxs, *Err)
type ErrAtomicalIdAmt ¶
type Output ¶
type Output struct { Amount int64 `json:"amount"` Address string `json:"address"` Data AtomicalDatas `json:"data"` }
type PrevOutput ¶
Click to show internal directories.
Click to hide internal directories.