Class: CcipDirectoryAndConfigurationRestApiV1::ChainsApi
- Defined in:
- lib/ccip_directory_and_configuration_rest_api_v1/apis/chains_api.rb
Overview
ChainsApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#get_chains(environment, chain_id: nil, selector: nil, internal_id: nil, output_key: OutputKey::CHAINID, enrich_fee_tokens: EnrichFeeTokens::ENUM_FALSE, search: nil, family: nil) ⇒ ApiResponse
Returns information about Cross-Chain Interoperability Protocol (CCIP) chains across different blockchain families (EVM, Solana, Aptos) environment to query for Ethereum, “56” for BSC, or a Solana pubkey) selector.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from CcipDirectoryAndConfigurationRestApiV1::BaseApi
Instance Method Details
#get_chains(environment, chain_id: nil, selector: nil, internal_id: nil, output_key: OutputKey::CHAINID, enrich_fee_tokens: EnrichFeeTokens::ENUM_FALSE, search: nil, family: nil) ⇒ ApiResponse
Returns information about Cross-Chain Interoperability Protocol (CCIP) chains across different blockchain families (EVM, Solana, Aptos) environment to query for Ethereum, “56” for BSC, or a Solana pubkey) selector. Multiple selectors can be specified using comma-separated values identifier. Multiple IDs can be specified using comma-separated values (e.g., “ethereum-mainnet,bsc-mainnet”) organizing the response data ‘true’, returns detailed fee token information including addresses, names, and decimals instead of just symbol strings Automatically detects query type: selector (>17 digits), chainId (≤17 digits or Solana base58 hash), internalId (kebab-case), or displayName (fuzzy text search). Cannot be combined with chainId, selector, or internalId filters. Only effective when using the search parameter.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/apis/chains_api.rb', line 34 def get_chains(environment, chain_id: nil, selector: nil, internal_id: nil, output_key: OutputKey::CHAINID, enrich_fee_tokens: EnrichFeeTokens::ENUM_FALSE, search: nil, family: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/chains', Server::DEFAULT) .query_param(new_parameter(environment, key: 'environment') .is_required(true)) .query_param(new_parameter(chain_id, key: 'chainId')) .query_param(new_parameter(selector, key: 'selector')) .query_param(new_parameter(internal_id, key: 'internalId')) .query_param(new_parameter(output_key, key: 'outputKey')) .query_param(new_parameter(enrich_fee_tokens, key: 'enrichFeeTokens')) .query_param(new_parameter(search, key: 'search')) .query_param(new_parameter(family, key: 'family')) .header_param(new_parameter('application/json', key: 'accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ChainApiResponse.method(:from_hash)) .is_api_response(true) .local_error('400', 'Invalid request parameters', ErrorResponseException) .local_error('500', 'Internal server error', ErrorResponseException)) .execute end |