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
-
balance(height: int = - 1) → int¶ Calculates the balance held by this address at the height (Defaults to the full chain)
-
equiv(equiv_script: bool = True) → blocksci.EquivAddress¶ Returns a list of all addresses equivalent to this address
-
property
first_tx¶ Get the first transaction that was sent to a type equivalent address
- Type
-
property
in_txes¶ Returns an iterator over all transactions where this address appeared an input
- Type
-
property
input_txes¶ Returns an iterator over all transactions where this address appeared an input
- Type
-
property
inputs¶ Returns an iterator over all inputs spent from this address
-
property
ins¶ Returns an iterator over all inputs spent from this address
-
property
out_txes¶ Returns an iterator over all transactions where this address appeared in an output
- Type
-
property
output_txes¶ Returns an iterator over all transactions where this address appeared in an output
- Type
-
output_txes_count() → int¶ Return the number of transactions where this address appeared in an output
-
property
outputs¶ Returns a iterator over all outputs sent to this address
-
property
outs¶ Returns a iterator over all outputs sent to this address
-
property
revealed_tx¶ The transaction where a type equivalent address was first revealed
- Type
Optional[blocksci.Tx]
-
property
txes¶ Returns an iterator over all transactions involving this address
- Type
-
property
type¶ The type of address
-
Pay to pubkey Address¶
-
class
blocksci.PubkeyAddress¶ Bases:
blocksci.AddressExtra data about pay to pubkey address
-
find_multisigs() → blocksci.MultisigAddressIterator¶ List of multisigs which include this public key
-
property
pubkey¶ Public key for this address
- Type
Optional[bytes]
-
property
pubkeyhash¶ 160 bit address hash
- Type
blocksci.uint160
-
Pay to pubkey hash Address¶
-
class
blocksci.PubkeyHashAddress¶ Bases:
blocksci.AddressExtra data about pay to pubkey address
-
find_multisigs() → blocksci.MultisigAddressIterator¶ List of multisigs which include this public key
-
property
pubkey¶ Public key for this address
- Type
Optional[bytes]
-
property
pubkeyhash¶ 160 bit address hash
- Type
blocksci.uint160
-
Pay to witness pubkey hash Address¶
-
class
blocksci.WitnessPubkeyHashAddress¶ Bases:
blocksci.AddressExtra data about pay to pubkey address
-
find_multisigs() → blocksci.MultisigAddressIterator¶ List of multisigs which include this public key
-
property
pubkey¶ Public key for this address
- Type
Optional[bytes]
-
property
pubkeyhash¶ 160 bit address hash
- Type
blocksci.uint160
-
Multisignature Address¶
-
class
blocksci.MultisigAddress¶ Bases:
blocksci.AddressExtra data about multi-signature address
-
property
addresses¶ The list of the keys that can sign for this address
-
property
Pay to script hash Address¶
-
class
blocksci.ScriptHashAddress¶ Bases:
blocksci.AddressExtra data about pay to script hash address
-
property
raw_address¶ The 160 bit P2SH address hash
- Type
blocksci.uint160
-
property
wrapped_address¶ The address inside this P2SH address
- Type
Optional[blocksci.Address]
-
property
Pay to witness script hash Address¶
-
class
blocksci.WitnessScriptHashAddress¶ Bases:
blocksci.AddressExtra data about pay to script hash address
-
property
raw_address¶ The 160 bit P2SH address hash
- Type
blocksci.uint256
-
property
wrapped_address¶ The address inside this P2SH address
- Type
Optional[blocksci.Address]
-
property
Non-standard Address¶
Op Return¶
-
class
blocksci.OpReturn¶ Bases:
blocksci.AddressExtra data about op_return address