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)
Return type: int
-
equiv
(equiv_script: bool=True) → blocksci.EquivAddress¶ Returns a list of all addresses equivalent to this address
Return type: blocksci.EquivAddress
-
first_tx
¶ Get the first transaction that was sent to a type equivalent address
Type: blocksci.Tx
-
in_txes
() → List[blocksci.Tx]¶ Returns a list of all transaction where this address was an input
-
in_txes_count
() → int¶ Return the number of transactions where this address was an input
Return type: int
-
ins
() → List[blocksci.Input]¶ Returns a list of all inputs spent from this address
-
out_txes
() → List[blocksci.Tx]¶ Returns a list of all transaction where this address was an output
-
out_txes_count
() → int¶ Return the number of transactions where this address was an output
Return type: int
-
outs
¶ Returns a range of all outputs sent to this address
Type: blocksci.OutputIterator
-
revealed_tx
¶ The transaction where a type equivalent address was first revealed
Type: Optional[blocksci.Tx]
-
txes
() → List[blocksci.Tx]¶ Returns a list of all transactions involving this address
-
type
¶ The type of address
Type: blocksci.address_type
-
Pay to pubkey Address¶
-
class
blocksci.
PubkeyAddress
¶ Bases:
blocksci.Address
Extra data about pay to pubkey address
-
find_multisigs
() → blocksci.AddressIterator¶ List of multisigs which include this public key
Return type: blocksci.AddressIterator
-
pubkey
¶ Public key for this address
Type: Optional[bytes]
-
pubkeyhash
¶ 160 bit address hash
Type: blocksci.uint160
-
Pay to pubkey hash Address¶
-
class
blocksci.
PubkeyHashAddress
¶ Bases:
blocksci.Address
Extra data about pay to pubkey address
-
find_multisigs
() → blocksci.AddressIterator¶ List of multisigs which include this public key
Return type: blocksci.AddressIterator
-
pubkey
¶ Public key for this address
Type: Optional[bytes]
-
pubkeyhash
¶ 160 bit address hash
Type: blocksci.uint160
-
Pay to witness pubkey hash Address¶
-
class
blocksci.
WitnessPubkeyHashAddress
¶ Bases:
blocksci.Address
Extra data about pay to pubkey address
-
find_multisigs
() → blocksci.AddressIterator¶ List of multisigs which include this public key
Return type: blocksci.AddressIterator
-
pubkey
¶ Public key for this address
Type: Optional[bytes]
-
pubkeyhash
¶ 160 bit address hash
Type: blocksci.uint160
-
Multisignature Address¶
-
class
blocksci.
MultisigAddress
¶ Bases:
blocksci.Address
Extra data about multi-signature address
Pay to script hash Address¶
Pay to witness script hash Address¶
Non-standard Address¶
Op Return¶
-
class
blocksci.
OpReturn
¶ Bases:
blocksci.Address
Extra data about op_return address