Services

__init__ Module

pycoin.services.__init__.spendables_for_address(address, netcode, format=None)[source]

Return a list of Spendable objects for the given bitcoin address.

Set format to “text” or “dict” to transform return value from an object to a string or dict.

This is intended to be a convenience function. There is no way to know that the list returned is a complete list of spendables for the address in question.

You can verify that they really do come from the existing transaction by calling tx_utils.validate_unspents.

pycoin.services.__init__.get_tx_db(netcode=None)[source]
pycoin.services.__init__.get_default_providers_for_netcode(netcode=None)[source]
pycoin.services.__init__.set_default_providers_for_netcode(netcode, provider_list)[source]

agent Module

pycoin.services.agent.urlopen(url, data=None)[source]

bitcoind Module

class pycoin.services.bitcoind.BitcoindProvider(bitcoind_url)[source]

Bases: object

bitcoind_agrees_on_transaction_validity(tx)[source]
tx_for_tx_hash(tx_hash)[source]
pycoin.services.bitcoind.bitcoind_agrees_on_transaction_validity(bitcoind_url, tx)[source]
pycoin.services.bitcoind.unspent_to_bitcoind_dict(tx_in, tx_out)[source]

blockchain_info Module

class pycoin.services.blockchain_info.BlockchainInfoProvider(netcode)[source]

Bases: object

broadcast_tx(tx)[source]
payments_for_address(address)[source]

return an array of (TX ids, net_payment)

spendables_for_address(address)[source]

Return a list of Spendable objects for the given bitcoin address.

tx_for_tx_hash(tx_hash)[source]

Get a Tx by its hash.

pycoin.services.blockchain_info.send_tx(self, tx)[source]

blockcypher Module

class pycoin.services.blockcypher.BlockcypherProvider(api_key='', netcode=None)[source]

Bases: object

base_url(args)[source]
broadcast_tx(tx)[source]

broadcast a transaction to the network

get_balance(address)[source]

returns the balance object from blockcypher for address

spendables_for_address(address)[source]

Return a list of Spendable objects for the given bitcoin address.

tx_for_tx_hash(tx_hash)[source]

returns the pycoin.tx object for tx_hash

chain_so Module

class pycoin.services.chain_so.ChainSoProvider(netcode=None)[source]

Bases: object

base_url(method, args)[source]
spendables_for_address(address)[source]

Return a list of Spendable objects for the given bitcoin address.

tx_for_tx_hash(tx_hash)[source]

Get a Tx by its hash.

env Module

pycoin.services.env.config_string_for_netcode_from_env(netcode)[source]
pycoin.services.env.main_cache_dir()[source]
pycoin.services.env.tx_read_cache_dirs()[source]
pycoin.services.env.tx_writable_cache_dir()[source]

insight Module

class pycoin.services.insight.InsightProvider(base_url='https://insight.bitpay.com', netcode=None)[source]

Bases: object

get_block_height(block_hash)[source]
get_blockchain_tip()[source]
get_blockheader(block_hash)[source]
get_blockheader_with_transaction_hashes(block_hash)[source]
get_tx_confirmation_block(tx_hash)[source]
send_tx(tx)[source]
spendables_for_address(address)[source]

Return a list of Spendable objects for the given bitcoin address.

spendables_for_addresses(addresses)[source]
tx_for_tx_hash(tx_hash)[source]
pycoin.services.insight.tx_from_json_dict(r)[source]

providers Module

pycoin.services.providers.all_providers_message(method, netcode)[source]
pycoin.services.providers.bitcoin_rpc_init(match, netcode)[source]
pycoin.services.providers.get_default_providers_for_netcode(netcode=None)[source]
pycoin.services.providers.get_tx_db(netcode=None)[source]
pycoin.services.providers.insight_init(match, netcode)[source]
pycoin.services.providers.message_about_spendables_for_address_env(netcode)[source]
pycoin.services.providers.message_about_tx_cache_env()[source]
pycoin.services.providers.message_about_tx_for_tx_hash_env(netcode)[source]
pycoin.services.providers.provider_for_descriptor_and_netcode(descriptor, netcode=None)[source]
pycoin.services.providers.providers_for_config_string(config_string, netcode)[source]
pycoin.services.providers.providers_for_netcode_from_env(netcode)[source]
pycoin.services.providers.service_provider_methods(method_name, service_providers)[source]
pycoin.services.providers.set_default_providers_for_netcode(netcode, provider_list)[source]
pycoin.services.providers.spendables_for_address(address, netcode, format=None)[source]

Return a list of Spendable objects for the given bitcoin address.

Set format to “text” or “dict” to transform return value from an object to a string or dict.

This is intended to be a convenience function. There is no way to know that the list returned is a complete list of spendables for the address in question.

You can verify that they really do come from the existing transaction by calling tx_utils.validate_unspents.

tx_db Module

class pycoin.services.tx_db.TxDb(lookup_methods=[], read_only_paths=[], writable_cache_path=None)[source]

Bases: object

This object can be used in many places that expect a dict.

get(key)[source]
paths_for_hash(hash)[source]
put(tx)[source]