Documentation

Documentation

  • Overview
  • Contact us

›NaaS

LinkPool

    General

    • Overview
    • Chainlink Guide

    Public RPCs

    • Overview
    • Nodes

NaaS

    Chainlink Nodes

    • Overview

    Adapters

    • Overview
    • Installation
    • Generic Adapters
    • Examples

Market

    Metrics API

    • Overview
    • Example Queries
    • Connect your Grafana

    Adding Adapters

    • Overview
    • Your Own Adapter
    • An Open Adapter
  • Keybase Verification
  • Managing API Keys

NaaS Adapter Installation

NaaS External Adapters installation requires the specification of environment variables.

You may specify environment variables accordingly to the documentation per the Official Chainlink External Adapter Monorepo (NodeJS).

In addition, you may specify environment variables specific to the external adapter itself, as follows:

  • Open Adapters: Please see the Adapter specific README in the Official Chainlink External Adapter Monorepo (NodeJS).
  • Generic Adapters: See below

I. Defaults

Note: Defaults are applicable for both open and generic adapters

By default, External Adapters will present the following environment variables and values. You may add, edit or remove environment variables according to your External Adapter needs:

NameDefault Value
RATE_LIMIT_ENABLEDtrue
RATE_LIMIT_API_TIERfree
CACHE_ENABLEDtrue
CACHE_MIN_AGE60000
WARMUP_ENABLEDtrue

II. Generic Adapter - Environment Variables

Environment Variables are the method in which Generic Adapters are configured and installed. At minimum, adapters require a GENERIC_BASE_URL. Additionally, if the API being connected to requires authentication, Adapters support a variety of authentication mechanisms via configuration of environment variables, starting with GENERIC_AUTH_TYPE.

Required?NameDescriptionOptionsDefaults to
GENERIC_PREFIXBy default, environment variables are prefixed with GENERIC_. Setting GENERIC_PREFIX overrides the default prefix. For example, GENERIC_PREFIX = 'CUSTOM' will set the default prefix to CUSTOM_GENERIC_
✅GENERIC_BASE_URLBase URL of the api (i.e., https://api.example.com)
GENERIC_AUTH_TYPEThe authorization type of the API. Additional environment variables may involved/required depending on its value See Environment Variables Per Authorization TypeSee Supported Authorization Typesno_auth

A. Supported Authorization Types

NameValueDescription
API Keyapi_keyEither sets the authorization header: <Key> <Value>, or the query parameter <key>=<value>
Basic Authbasic_authSets the authorization header: Basic <Base64 encoded username and password>
Bearer Tokenbearer_tokenSets the authorization header: Bearer <Your API key>
CustomcustomAllows to set any request header, query parameter, and body
No authorizationno_authDoes not set any request header, query parameter or body

B. Environment Variables Per Authorization Type

If authorization is required, additional environment variables will be required contextual to the authorization type, as follows:

1. API Key

Required?NameDescriptionOptionsDefaults to
✅GENERIC_AUTH_CREDENTIALS_KEYThe API key name
✅GENERIC_AUTH_CREDENTIALS_VALUEThe API key value
✅GENERIC_AUTH_CREDENTIALS_LOCATIONThe location of the key-value pair. headers sets it in the request headers, whilst params sets it in the request query parametersheaders or params

2. Basic Auth

Required?NameDescriptionOptionsDefaults to
✅GENERIC_AUTH_CREDENTIALS_USERNAMEThe API username value
✅GENERIC_AUTH_CREDENTIALS_PASSWORDThe API password value

3. Bearer Token

Required?NameDescriptionOptionsDefaults to
✅GENERIC_AUTH_CREDENTIALS_TOKENThe API authentication token

4. Custom

Required?NameDescriptionOptionsDefaults to
GENERIC_AUTH_HEADERSThe API authentication headers in a JSON object as string. Expected format is { "header1": "value1", "header2": "value2" }{}
GENERIC_AUTH_PARAMSThe API authentication query parameters in a JSON object as string. Expected format is { "param1": "value1", "param2": "value2" }{}
GENERIC_AUTH_DATAThe API authentication body in a JSON object as string. Expected format is { "data1": <value1>, "data2": <value2> }{}

5. No Authorization

N/A

← NaaS Adapters OverviewNaaS Adapters Generic Adapters →
  • I. Defaults
  • II. Generic Adapter - Environment Variables
    • A. Supported Authorization Types
    • B. Environment Variables Per Authorization Type
Documentation
Docs
ChainlinksPublic Ethereum RPCs
Community
TelegramTwitter
More
Contact usWebsiteApp
Facebook Open Source
Copyright © 2022 LinkPool