Documentation ¶
Index ¶
- Constants
- Variables
- 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
- type Edicts
- type Etching
- type InscribeTxs
- type InscriptionData
- type InscriptionRequest
- type OpReturnData
- type Output
- type PrevOutput
- type PrevOutputs
- type RealEdict
- type RealEdicts
- type TxInput
- type TxOutput
Constants ¶
View Source
const ( DefaultTxVersion = 2 DefaultSequenceNum = 0xfffffffd DefaultRevealOutValue = int64(546) DefaultMinChangeValue = int64(546) MaxStandardTxWeight = 4000000 / 10 WitnessScaleFactor = 4 )
View Source
const ErInsufficientBalance = "Insufficient Balance"
View Source
const SellerSignatureIndex = 1
Variables ¶
View Source
var ( TAG_BODY = big.NewInt(0) TAG_Flags = big.NewInt(2) TAG_Rune = big.NewInt(4) TAG_Premine = big.NewInt(6) TAG_Cap = big.NewInt(8) TAG_Amount = big.NewInt(10) TAG_HeightStart = big.NewInt(12) TAG_HeightEnd = big.NewInt(14) TAG_OffsetStart = big.NewInt(16) TAG_OffsetEnd = big.NewInt(118) TAG_Mint = big.NewInt(20) TAG_Pointer = big.NewInt(22) TAG_Cenotaph = big.NewInt(126) TAG_Divisibility = big.NewInt(1) TAG_Spacers = big.NewInt(3) TAG_Symbol = big.NewInt(5) TAG_Nop = big.NewInt(127) )
View Source
var (
ErrInvalidEdict = errors.New("ErrInvalidEdict")
)
Functions ¶
func BuildMintL2Tx ¶
func BuildOpReturnData ¶
func BuildOpReturnDataJson ¶
func CalculateMintTxFee ¶
func EncodeToVec ¶
func Int64ToBytes ¶
func PayToPubKeyHashScript ¶
Types ¶
type Edict ¶
type Edicts ¶
type Edicts []*Edict
func (Edicts) RealEdicts ¶
func (s Edicts) RealEdicts(mint bool) (RealEdicts, error)
type InscribeTxs ¶
type InscriptionData ¶
type InscriptionRequest ¶
type InscriptionRequest struct { CommitTxPrevOutputList []*PrevOutput `json:"commitTxPrevOutputList"` Outputs []*Output `json:"outputs"` CommitFeeRate int64 `json:"commitFeeRate"` RevealFeeRate int64 `json:"revealFeeRate"` InscriptionDataList []InscriptionData `json:"inscriptionDataList"` RevealOutValue int64 `json:"revealOutValue"` ChangeAddress string `json:"changeAddress"` MinChangeValue int64 `json:"minChangeValue"` // contains filtered or unexported fields }
type OpReturnData ¶
type PrevOutput ¶
type PrevOutputs ¶
type PrevOutputs []*PrevOutput
func (PrevOutputs) UtxoViewpoint ¶
func (s PrevOutputs) UtxoViewpoint(net *chaincfg.Params) (bitcoin.UtxoViewpoint, error)
type RealEdicts ¶
type RealEdicts []*RealEdict
func (RealEdicts) Len ¶
func (s RealEdicts) Len() int
func (RealEdicts) Less ¶
func (s RealEdicts) Less(i, j int) bool
func (RealEdicts) Swap ¶
func (s RealEdicts) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.