Skip to content

Address & Network API Reference

Address

Construction Examples:

Coerces from:

  • String – Base58Check or Bech32(m) encoded address

Underlying type: bitcoin::Address

address()

address(script_pubkey: Script|Descriptor<Definite>|TapInfo|WshInfo|Address, with_network: Network = testnet) -> Address

Create an Address for the given script_pubkey and with_network (defaults to testnet)

address(address_str: String, verify_network: Network = None) -> Address

Parse an address string into an Address instance, optionally verifying that the network matches verify_network

script_pubkey Script

Also see: scriptPubKey()

address_type String

One of p2tr, p2wpkh, p2wsh, p2pkh, p2sh or p2a

witness_program Int:Bytes opt

qr_uri String

Network

Coerces from: (None)

Underlying type: bitcoin::Network

signet Network

regtest Network

testnet Network