Class: CcipDirectoryAndConfigurationRestApiV1::LanesApi

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/ccip_directory_and_configuration_rest_api_v1/apis/lanes_api.rb

Overview

LanesApi

Constant Summary

Constants inherited from BaseApi

BaseApi::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseApi

#config, #http_call_back

Instance Method Summary collapse

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_lanes(environment, source_chain_id: nil, destination_chain_id: nil, source_selector: nil, destination_selector: nil, source_internal_id: nil, destination_internal_id: nil, version: nil, output_key: OutputKey::CHAINID) ⇒ ApiResponse

Returns information about Cross-Chain Interoperability Protocol (CCIP) lanes between supported chains. Each lane represents a unidirectional connection from a source chain to a destination chain, with associated onRamp and offRamp contracts and supported tokens. environment to query ID. Multiple chain IDs can be specified using comma-separated values destination chain ID. Multiple chain IDs can be specified using comma-separated values CCIP selector. Multiple selectors can be specified using comma-separated values destination chain CCIP selector. Multiple selectors can be specified using comma-separated values chain internal identifier. Multiple IDs can be specified using comma-separated values destination chain internal identifier. Multiple IDs can be specified using comma-separated values lanes where both onRamp and offRamp match the specified version will be returned organizing the lane keys in the response

Parameters:

  • environment (Environment3)

    Required parameter: The network

  • source_chain_id (String) (defaults to: nil)

    Optional parameter: Filter by source chain

  • destination_chain_id (String) (defaults to: nil)

    Optional parameter: Filter by

  • source_selector (String) (defaults to: nil)

    Optional parameter: Filter by source chain

  • destination_selector (String) (defaults to: nil)

    Optional parameter: Filter by

  • source_internal_id (String) (defaults to: nil)

    Optional parameter: Filter by source

  • destination_internal_id (String) (defaults to: nil)

    Optional parameter: Filter by

  • version (String) (defaults to: nil)

    Optional parameter: Filter by lane version. Only

  • output_key (OutputKey) (defaults to: OutputKey::CHAINID)

    Optional parameter: Key format to use for

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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
68
69
70
71
72
73
# File 'lib/ccip_directory_and_configuration_rest_api_v1/apis/lanes_api.rb', line 38

def get_lanes(environment,
              source_chain_id: nil,
              destination_chain_id: nil,
              source_selector: nil,
              destination_selector: nil,
              source_internal_id: nil,
              destination_internal_id: nil,
              version: nil,
              output_key: OutputKey::CHAINID)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/lanes',
                                 Server::DEFAULT)
               .query_param(new_parameter(environment, key: 'environment')
                             .is_required(true))
               .query_param(new_parameter(source_chain_id, key: 'sourceChainId'))
               .query_param(new_parameter(destination_chain_id, key: 'destinationChainId'))
               .query_param(new_parameter(source_selector, key: 'sourceSelector'))
               .query_param(new_parameter(destination_selector, key: 'destinationSelector'))
               .query_param(new_parameter(source_internal_id, key: 'sourceInternalId'))
               .query_param(new_parameter(destination_internal_id, key: 'destinationInternalId'))
               .query_param(new_parameter(version, key: 'version'))
               .query_param(new_parameter(output_key, key: 'outputKey'))
               .header_param(new_parameter('application/json', key: 'accept')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(LaneApiResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Bad request - invalid parameters',
                             ErrorResponseException)
                .local_error('500',
                             'Internal server error',
                             ErrorResponseException))
    .execute
end