utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeInscriptionFromBin

func DecodeInscriptionFromBin(script []byte) (id string)

func DecodeTokensFromSwapPair

func DecodeTokensFromSwapPair(tickPair string) (token0, token1 string, err error)

func GetAddressFromScript

func GetAddressFromScript(script []byte, params *chaincfg.Params) (string, error)

GetAddressFromScript Use btcsuite to get address

func GetHash256

func GetHash256(data []byte) (hash []byte)

func GetModuleFromScript

func GetModuleFromScript(script []byte) (module string, ok bool)

func GetPkScriptByAddress

func GetPkScriptByAddress(addr string, netParams *chaincfg.Params) (pk []byte, err error)

func GetSha256

func GetSha256(data []byte) (hash []byte)

single sha256 hash

func GetValidUniqueLowerTickerTicker

func GetValidUniqueLowerTickerTicker(ticker string) (lowerTicker string, err error)

func HashString

func HashString(data []byte) (res string)

func PayToTaprootScript

func PayToTaprootScript(taprootKey *btcec.PublicKey) ([]byte, error)

PayToTaprootScript creates a pk script for a pay-to-taproot output key.

func PayToWitnessScript

func PayToWitnessScript(pubkey *btcec.PublicKey) ([]byte, error)

PayToWitnessScript creates a pk script for a pay-to-wpkh output key.

func ReverseBytes

func ReverseBytes(data []byte) (result []byte)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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