Documentation ¶
Index ¶
- func GetParams(net Network) *chaincfg.Params
- func NewOldAddr(version []byte, data []byte) string
- func NewZECAddr(pubBytes []byte) string
- func ParseScriptType(script []byte) txscript.ScriptClass
- func PubKeyToAddr(publicKey []byte, addrType AddrType, net Network) (address btcutil.Address, err error)
- func ScriptToAddr(script []byte, addrType AddrType, net Network) (address btcutil.Address, err error)
- type AddrType
- type Block
- type BlockStatus
- type FeeEstimate
- type Network
- type Transaction
- type TransactionType
- type Utxo
- type Vin
- type Vout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOldAddr ¶
func NewZECAddr ¶
func ParseScriptType ¶
func ParseScriptType(script []byte) txscript.ScriptClass
func PubKeyToAddr ¶
Types ¶
type AddrType ¶
type AddrType string
const ( P2PKH AddrType = "p2pkh" // non segwit P2WPKH AddrType = "p2wpkh" // native segwit P2WPKH_NESTED AddrType = "p2wpkh-nested" // nested segwit P2SH AddrType = "p2sh" // non segwit P2WSH AddrType = "p2wsh" // native segwit P2WSH_NESTED AddrType = "p2wsh-nested" // nested segwit TAPROOT AddrType = "taproot" // taproot )
type Block ¶
type Block struct { ID string `json:"id"` Height uint64 `json:"height"` Version int `json:"version"` Timestamp int `json:"timestamp"` TxCount int `json:"tx_count"` Size int `json:"size"` Weight int `json:"weight"` MerkleRoot string `json:"merkle_root"` Previousblockhash string `json:"previousblockhash"` Mediantime int `json:"mediantime"` Nonce int `json:"nonce"` Bits int `json:"bits"` Difficulty float64 `json:"difficulty"` }
type BlockStatus ¶
type FeeEstimate ¶
type Network ¶
type Network string
const ( BTC Network = "btc" BTC_Testnet3 Network = "btc-testnet3" BTC_Regressionnet Network = "btc-regtest" BTC_Signet Network = "btc-signet" DGB Network = "dgb" // digibyte QTUM Network = "qtum" // qtum RVN Network = "rvn" // raven BTG Network = "btg" // bitcoin gold BCH Network = "bch" // bitcoin cash DOGE Network = "doge" // dogecoin )
type Transaction ¶
type TransactionType ¶
type TransactionType string
const ( Transfer TransactionType = "transfer" Multisig TransactionType = "multisig" Timelock TransactionType = "timelock" Ordinals TransactionType = "ordinals" )
type Utxo ¶
type Utxo struct { Txid string `json:"txid"` Vout uint32 `json:"vout"` Status BlockStatus `json:"status"` Value int64 `json:"value"` }
type Vin ¶
type Vin struct { Txid string `json:"txid"` Vout uint32 `json:"vout"` Prevout any `json:"prevout"` Scriptsig string `json:"scriptsig"` ScriptsigAsm string `json:"scriptsig_asm"` Witness []string `json:"witness"` IsCoinbase bool `json:"is_coinbase"` Sequence int64 `json:"sequence"` // calculated fields Amount btcutil.Amount `json:"-"` Address string `json:"-"` }
type Vout ¶
type Vout struct { Scriptpubkey string `json:"scriptpubkey"` ScriptpubkeyAsm string `json:"scriptpubkey_asm"` ScriptpubkeyType string `json:"scriptpubkey_type"` ScriptpubkeyAddress string `json:"scriptpubkey_address,omitempty"` Value int64 `json:"value"` // calculated fields Amount btcutil.Amount `json:"-"` Address string `json:"-"` PublicKey string `json:"-"` }
Click to show internal directories.
Click to hide internal directories.