Blockfrost
Inherits Habitat::SettingsHelpers < Habitat::TempConfig
Constants
DEFAULT_API_COUNT_PER_PAGE = 100
DEFAULT_API_ORDER = Blockfrost::QueryOrder::ASC
HABITAT_SETTINGS = [{decl: cardano_api_key : String | ::Nil, example: nil,
validation: :validate_cardano_api_key}, {decl: cardano_api_version : String = "v0", example: nil,
validation: :validate_api_version}, {decl: ipfs_api_key : String | ::Nil, example: nil,
validation: :validate_ipfs_api_key}, {decl: ipfs_api_version : String = "v0", example: nil,
validation: :validate_api_version}, {decl: default_order : QueryOrder | ::Nil = nil, example: nil, validation: nil}, {decl: default_count_per_page : Int32 | ::Nil = nil, example: nil,
validation: :validate_count_per_page}, {decl: retries_in_concurrent_requests : Int32 = 5, example: nil,
validation: :validate_retries_in_concurrent_requests}, {decl: sleep_between_retries_ms : Int32 = 500, example: nil,
validation: :validate_sleep_between_retries_ms}] of Nil
MAX_COUNT_PER_PAGE = 100
MAX_NUMBER_OF_CONCURRENT_REQUESTS = 200
MAX_PAGINATION_PAGES = 21474836
MAX_RETRIES_IN_CONCURRENT_REQUESTS = 10
VERSION = {{ (`shards version \"/tmp/tmp.cBIeFi/src/src/blockfrost\"`).chomp.stringify }}
Class methods
configure
Sourcesettings
SourceInstance methods
cardano_mainnet?
Sourcecardano_network
Sourcecardano_preprod?
Sourcecardano_preview?
Sourcecardano_testnet?
Sourcesettings
SourceMacros
enum_castable_from_string(name, types, stringify = underscore)
Sourcegets_all_scoped_with_order_and_pagination(method_name, return_type, resource_path, argument_type_declaration, scope_argument_type_declaration)
Sourcegets_all_scoped_with_pagination(method_name, return_type, resource_path, argument_type_declaration, scope_argument_type_declaration)
Sourcegets_all_with_order_and_pagination(method_name, return_type, resource_path, argument_type_declaration = nil)
Sourcegets_all_with_order_and_pagination_and_from_to(method_name, return_type, resource_path, argument_type_declaration = nil)
Sourcegets_all_with_pagination(method_name, return_type, resource_path, argument_type_declaration)
Sourcewithin_page_range(pages, return_type, method_name, method_arguments)
The Blockfrost API imposes a limit of 100 records per page for a single request. This macro allows fetching multiple pages concurrently. It then concatenates all results in the correct order and returns an array of records as if fetched in one go.
It also handles all possible exceptions. If the account is temporarily
rate-limited, it will retry several times, as defined by the
retries_in_concurrent_requests setting. All other exceptions will cause
immediate failure by raising the first encountered exception.
Nested types
- Blockfrost::Account
- Blockfrost::Address
- Blockfrost::Asset
- Blockfrost::Block
- Blockfrost::BodyData
- Blockfrost::CardanoNetworks
- Blockfrost::Client
- Blockfrost::ConcurrencyLimitException
- Blockfrost::Datum
- Blockfrost::Epoch
- Blockfrost::Exception
- Blockfrost::HabitatSettings
- Blockfrost::Health
- Blockfrost::IPFS
- Blockfrost::Int128FromString
- Blockfrost::Int32FromString
- Blockfrost::Ledger
- Blockfrost::Metadata
- Blockfrost::Metric
- Blockfrost::Network
- Blockfrost::Nutlink
- Blockfrost::Pool
- Blockfrost::QueryData
- Blockfrost::QueryOrder
- Blockfrost::QueryString
- Blockfrost::RequestException
- Blockfrost::RequestExceptions
- Blockfrost::Root
- Blockfrost::Script
- Blockfrost::Shared
- Blockfrost::TimeFromInt
- Blockfrost::TimeMsFromInt
- Blockfrost::Token
- Blockfrost::Transaction
- Blockfrost::Utils