brc20

package
v0.0.0-...-f6beff1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToBigInt

func ConvertToBigInt(v string) *big.Int

func ConvertToUint32

func ConvertToUint32(v string) uint32

func CreateControlBlock

func CreateControlBlock(privateKey *btcec.PrivateKey, inscriptionScript []byte) ([]byte, error)

func CreateControlBlockWithPubKey

func CreateControlBlockWithPubKey(publicKey []byte, inscriptionScript []byte) ([]byte, error)

func CreateInscriptionScript

func CreateInscriptionScript(privateKey *btcec.PrivateKey, contentType string, body []byte) ([]byte, error)

func CreateInscriptionScriptWithPubKey

func CreateInscriptionScriptWithPubKey(publicKey []byte, contentType string, body []byte) ([]byte, error)

func IsTaprootAddress

func IsTaprootAddress(address string, params *chaincfg.Params) (bool, error)

func NewTapRootAddress

func NewTapRootAddress(privateKey *btcec.PrivateKey, params *chaincfg.Params) (string, error)

func NewTapRootAddressWithScript

func NewTapRootAddressWithScript(privateKey *btcec.PrivateKey, script []byte, params *chaincfg.Params) (string, error)

func NewTapRootAddressWithScriptWithPubKey

func NewTapRootAddressWithScriptWithPubKey(serializedPubKey []byte, script []byte, params *chaincfg.Params) string

Types

type Input

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

type Inscription

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

func NewInscription

func NewInscription(contentType string, body []byte) *Inscription

type Output

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

type TransactionBuilder

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

func NewTxBuild

func NewTxBuild(version int32, params *chaincfg.Params) *TransactionBuilder

func NewTxBuildV1

func NewTxBuildV1(params *chaincfg.Params) *TransactionBuilder

func (*TransactionBuilder) AddInput

func (build *TransactionBuilder) AddInput(txId string, vOut uint32, privateKeyHex string, address string, value string, inscription *Inscription)

func (*TransactionBuilder) AddOutput

func (build *TransactionBuilder) AddOutput(address string, amount string)

func (*TransactionBuilder) Build

func (build *TransactionBuilder) Build() (string, error)

func (*TransactionBuilder) BuildWithSig

func (build *TransactionBuilder) BuildWithSig(signatureHex, pubKeyHex string) (string, error)

func (*TransactionBuilder) CalculateHash

func (build *TransactionBuilder) CalculateHash(pubKeyHex string) (string, error)

Jump to

Keyboard shortcuts

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