Addresses¶
Addresses in BlockSci represent a unique identifier for a particular target of a transaction output. All outputs with the same address use the exact same output script. BlockSci supports 7 styles of addreses that originate in the Bitcoin blockchain and which are also used in other blockchains that use Bitcoin’s scripting language. An eight address type, nonstandard, operates as a catch-all for addresses that do not fit any other category.
Address¶
-
class
blocksci.Address¶ Represents an abstract address object which uniquely identifies a given address
-
address_num¶ The internal identifier of the address
-
balance(self: blocksci.blocksci_interface.Address, height: int=-1) → int¶ Calculates the balance held by this address at the height (Defaults to the full chain)
-
equiv(self: blocksci.blocksci_interface.Address, equiv_script: bool=True) → blocksci::EquivAddress¶ Returns a list of all addresses equivalent to this address
-
in_txes(self: blocksci.blocksci_interface.Address) → List[blocksci::Transaction]¶ Returns a list of all transaction where this address was an input
-
in_txes_count(self: blocksci.blocksci_interface.Address) → int¶ Return the number of transactions where this address was an input
-
ins(self: blocksci.blocksci_interface.Address) → List[blocksci::Input]¶ Returns a list of all inputs spent from this address
-
out_txes(self: blocksci.blocksci_interface.Address) → List[blocksci::Transaction]¶ Returns a list of all transaction where this address was an output
-
out_txes_count(self: blocksci.blocksci_interface.Address) → int¶ Return the number of transactions where this address was an output
-
outs(self: blocksci.blocksci_interface.Address) → List[blocksci::Output]¶ Returns a list of all outputs sent to this address
-
txes(self: blocksci.blocksci_interface.Address) → List[blocksci::Transaction]¶ Returns a list of all transactions involving this address
-
type¶ The type of address
-
Pay to pubkey Address¶
-
class
blocksci.PubkeyAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about pay to pubkey address
-
address_string¶ Bitcoin address string
-
find_multisigs(self: blocksci.blocksci_interface.PubkeyAddress) → list¶
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
pubkey¶ Public key for this address
-
pubkeyhash¶ 160 bit address hash
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
Pay to pubkey hash Address¶
-
class
blocksci.PubkeyHashAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about pay to pubkey address
-
address_string¶ Bitcoin address string
-
find_multisigs(self: blocksci.blocksci_interface.PubkeyHashAddress) → list¶
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
pubkey¶ Public key for this address
-
pubkeyhash¶ 160 bit address hash
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
Pay to witness pubkey hash Address¶
-
class
blocksci.WitnessPubkeyHashAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about pay to pubkey address
-
address_string¶ Bitcoin address string
-
find_multisigs(self: blocksci.blocksci_interface.WitnessPubkeyHashAddress) → list¶
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
pubkey¶ Public key for this address
-
pubkeyhash¶ 160 bit address hash
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
Multisignature Address¶
-
class
blocksci.MultisigAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about multi-signature address
-
addresses¶ The list of the keys that can sign for this address
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
required¶ The number of signatures required for this address
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
total¶ The total number of keys that can sign for this address
-
Pay to script hash Address¶
-
class
blocksci.PayToScriptHashAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about pay to script hash address
-
address_string¶ Bitcoin address string
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
raw_address¶ The 160 bit P2SH address hash
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
wrapped_address¶ The address inside this P2SH address
-
Pay to witness script hash Address¶
-
class
blocksci.PayToWitnessScriptHashAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about pay to script hash address
-
address_string¶ Bitcoin address string
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
raw_address¶ The 256 bit Witness P2SH address hash
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
wrapped_address¶ The address inside this witness script hash address
-
Non-standard Address¶
-
class
blocksci.NonStandardAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about non-standard address
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
in_script¶ Nonstandard input script
-
out_script¶ Nonstandard output script
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-
Op Return Address¶
-
class
blocksci.OpReturnAddress¶ Bases:
blocksci.blocksci_interface.AddressExtra data about op_return address
-
data¶ Data contained inside this address
-
first_tx¶ Get the first transaction that was sent to a type equivalent address
-
has_been_spent¶ Check if a type equivalent address has ever been spent
-
revealed_tx¶ The transaction where this type equivalent address was first revealed
-