Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(addr string, defaultNetwork NetworkType) bool
Types ¶
type AddressInfo ¶
type AddressInfo struct { IsBench32 bool `json:"is_bench32" mapstructure:"is_bench32"` Address string `json:"address" mapstructure:"address"` Network NetworkType `json:"network" mapstructure:"network"` Type AddressType `json:"type" mapstructure:"type"` }
func GetAddressInfo ¶
func GetAddressInfo(addr string) AddressInfo
type AddressType ¶
type AddressType string
const ( P2PKH AddressType = "P2PKH" // legacy P2SH_P2WPKH AddressType = "P2SH-P2WPKH" // nested segwit P2WPKH AddressType = "P2WPKH" // native segwit P2TR AddressType = "P2TR" // taproot P2SH AddressType = "P2SH" // unlock by script hash P2WSH AddressType = "P2WSH" // multisig UNKNOWN_ADDRESS_TYPE AddressType = "Unknown" )
type NetworkType ¶
type NetworkType string
const ( MainNet NetworkType = "mainnet" TestNet NetworkType = "testnet" Signet NetworkType = "signet" Regtest NetworkType = "regtest" UNKNOWN_NETWORK_TYPE NetworkType = "Unknown" )
func GetNetworkType ¶
func GetNetworkType(addr string) (btcutil.Address, NetworkType)
Click to show internal directories.
Click to hide internal directories.