golos.storage

golos.storage contains various configuration options which are used throughout the library.

Some options in here are user configurable from a golos.api.Api instance, however some options are global and can only be overridden from this module.

You can override default configuration options like so:

>>> from golos import storage
>>> storage.prefix = 'GLX'
>>> storage.expiration = 30
golos.storage.api_list = {'account_by_key': ['get_key_references'], 'account_history': ['get_account_history'], 'database_api': ['get_account_bandwidth', 'get_account_count', 'get_accounts', 'get_block', 'get_block_header', 'get_chain_properties', 'get_config', 'get_conversion_requests', 'get_database_info', 'get_dynamic_global_properties', 'get_escrow', 'get_expiring_vesting_delegations', 'get_hardfork_version', 'get_next_scheduled_hardfork', 'get_owner_history', 'get_potential_signatures', 'get_proposed_transaction', 'get_recovery_request', 'get_required_signatures', 'get_savings_withdraw_from', 'get_savings_withdraw_to', 'get_transaction_hex', 'get_vesting_delegations', 'get_withdraw_routes', 'lookup_account_names', 'lookup_accounts', 'verify_account_authority', 'verify_authority'], 'follow': ['get_account_reputations', 'get_blog', 'get_blog_authors', 'get_blog_entries', 'get_feed', 'get_feed_entries', 'get_follow_count', 'get_followers', 'get_following', 'get_reblogged_by'], 'market_history': ['get_market_history', 'get_market_history_buckets', 'get_open_orders', 'get_order_book', 'get_order_book_extended', 'get_recent_trades', 'get_ticker', 'get_trade_history', 'get_volume'], 'network_broadcast_api': ['broadcast_block', 'broadcast_transaction', 'broadcast_transaction_synchronous', 'broadcast_transaction_with_callback'], 'operation_history': ['get_ops_in_block', 'get_transaction'], 'social_network': ['get_account_votes', 'get_active_votes', 'get_all_content_replies', 'get_content', 'get_content_replies', 'get_replies_by_last_update'], 'tags': ['get_discussions_by_active', 'get_discussions_by_author_before_date', 'get_discussions_by_blog', 'get_discussions_by_cashout', 'get_discussions_by_children', 'get_discussions_by_comments', 'get_discussions_by_created', 'get_discussions_by_feed', 'get_discussions_by_hot', 'get_discussions_by_payout', 'get_discussions_by_promoted', 'get_discussions_by_trending', 'get_discussions_by_votes', 'get_languages', 'get_tags_used_by_author', 'get_trending_tags'], 'witness_api': ['get_active_witnesses', 'get_current_median_history_price', 'get_feed_history', 'get_miner_queue', 'get_witness_by_account', 'get_witness_count', 'get_witness_schedule', 'get_witnesses', 'get_witnesses_by_vote', 'lookup_witness_accounts']}

This dictionary maps each API (such as database_api) to a list of known methods under that API.

golos.storage.asset_precision = {'GBG': 3, 'GESTS': 6, 'GOLOS': 3}

Decimal places used for each known asset symbol

golos.storage.chain_id = '782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12'

The chain ID for the current network

golos.storage.expiration = 60

The integer expiration time (in seconds) to place inside of newly built transactions

golos.storage.nodes = ['wss://api.golos.blckchnd.com/ws', 'wss://golosd.privex.io/', 'wss://golos.solox.world/ws', 'wss://golos.lexa.host/ws']

This is a list of GOLOS nodes which are used by default by golos.api.Api if no nodes are specified by the user.

golos.storage.op_names = ['vote', 'comment', 'transfer', 'transfer_to_vesting', 'withdraw_vesting', 'limit_order_create', 'limit_order_cancel', 'feed_publish', 'convert', 'account_create', 'account_update', 'witness_update', 'account_witness_vote', 'account_witness_proxy', 'pow', 'custom', 'report_over_production', 'delete_comment', 'custom_json', 'comment_options', 'set_withdraw_vesting_route', 'limit_order_create2', 'challenge_authority', 'prove_authority', 'request_account_recovery', 'recover_account', 'change_recovery_account', 'escrow_transfer', 'escrow_dispute', 'escrow_release', 'pow2', 'escrow_approve', 'transfer_to_savings', 'transfer_from_savings', 'cancel_transfer_from_savings', 'custom_binary', 'decline_voting_rights', 'reset_account', 'set_reset_account', 'delegate_vesting_shares', 'account_create_with_delegation', 'account_metadata', 'proposal_create', 'proposal_update', 'proposal_delete', 'chain_properties_update', 'break_free_referral', 'delegate_vesting_shares_with_interest', 'reject_vesting_shares_delegation', 'fill_convert_request', 'author_reward', 'curation_reward', 'comment_reward', 'liquidity_reward', 'interest', 'fill_vesting_withdraw', 'fill_order', 'shutdown_witness', 'fill_transfer_from_savings', 'hardfork', 'comment_payout_update', 'comment_benefactor_reward', 'return_vesting_delegation', 'producer_reward', 'delegation_reward', 'auction_window_reward']

A list of known transaction operation names

golos.storage.operations = {'account_create': 9, 'account_create_with_delegation': 40, 'account_metadata': 41, 'account_update': 10, 'account_witness_proxy': 13, 'account_witness_vote': 12, 'auction_window_reward': 65, 'author_reward': 50, 'break_free_referral': 46, 'cancel_transfer_from_savings': 34, 'chain_properties_update': 45, 'challenge_authority': 22, 'change_recovery_account': 26, 'comment': 1, 'comment_benefactor_reward': 61, 'comment_options': 19, 'comment_payout_update': 60, 'comment_reward': 52, 'convert': 8, 'curation_reward': 51, 'custom': 15, 'custom_binary': 35, 'custom_json': 18, 'decline_voting_rights': 36, 'delegate_vesting_shares': 39, 'delegate_vesting_shares_with_interest': 47, 'delegation_reward': 64, 'delete_comment': 17, 'escrow_approve': 31, 'escrow_dispute': 28, 'escrow_release': 29, 'escrow_transfer': 27, 'feed_publish': 7, 'fill_convert_request': 49, 'fill_order': 56, 'fill_transfer_from_savings': 58, 'fill_vesting_withdraw': 55, 'hardfork': 59, 'interest': 54, 'limit_order_cancel': 6, 'limit_order_create': 5, 'limit_order_create2': 21, 'liquidity_reward': 53, 'pow': 14, 'pow2': 30, 'producer_reward': 63, 'proposal_create': 42, 'proposal_delete': 44, 'proposal_update': 43, 'prove_authority': 23, 'recover_account': 25, 'reject_vesting_shares_delegation': 48, 'report_over_production': 16, 'request_account_recovery': 24, 'reset_account': 37, 'return_vesting_delegation': 62, 'set_reset_account': 38, 'set_withdraw_vesting_route': 20, 'shutdown_witness': 57, 'transfer': 2, 'transfer_from_savings': 33, 'transfer_to_savings': 32, 'transfer_to_vesting': 3, 'vote': 0, 'withdraw_vesting': 4, 'witness_update': 11}

Map operations names from op_names to their operation ID

golos.storage.prefix = 'GLS'

The default prefix to use when generating public keys