inscribe

package
v0.0.0-...-d62eb6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxStandardTxWeight = blockchain.MaxBlockWeight / 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InscriptionData

type InscriptionData struct {
	Body        []byte // The body of the inscription
	Destination string // The destination of the inscription
}

InscriptionData is the data of an inscription

type InscriptionRequest

type InscriptionRequest struct {
	CommitTxOutPointList   []*wire.OutPoint
	CommitTxPrivateKeyList []*btcec.PrivateKey // If used without RPC,
	// a local signature is required for committing the commit tx.
	// Currently, CommitTxPrivateKeyList[i] sign CommitTxOutPointList[i]
	CommitFeeRate      int64
	FeeRate            int64
	DataList           []InscriptionData
	SingleRevealTxOnly bool // Currently, the official Ordinal parser can only parse a single NFT per transaction.
	// When the official Ordinal parser supports parsing multiple NFTs in the future, we can consider using a single reveal transaction.
	RevealOutValue int64
}

InscriptionRequest is the request of an inscription

func NewInscriptionRequest

func NewInscriptionRequest(btcAPIClient btcapi.Client, address btcutil.Address, privateKey *btcec.PrivateKey, dataList []InscriptionData) (*InscriptionRequest, error)

NewInscriptionRequest creates a new InscriptionRequest

type InscriptionTool

type InscriptionTool struct {
	// contains filtered or unexported fields
}

InscriptionTool is the tool of an inscription

func NewInscriptionToolWithBtcAPIClient

func NewInscriptionToolWithBtcAPIClient(net *chaincfg.Params, btcAPIClient btcapi.Client, request *InscriptionRequest) (*InscriptionTool, error)

func (*InscriptionTool) Inscribe

func (tool *InscriptionTool) Inscribe() (commitTxHash *chainhash.Hash, revealTxHashList []*chainhash.Hash, inscriptions []string, fees int64, err error)

Inscribe inscribes the data

type Result

type Result struct {
	CommitTxHash     *chainhash.Hash
	RevealTxHashList []*chainhash.Hash
	Inscriptions     []string
	Fees             int64
}

func Inscribe

func Inscribe(privateKeyHex string, stateRootHash string, proofRootHash string, destination string, net *chaincfg.Params) (*Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL