When you want to perform custom computation or custom logic to bring data via specialized API's, then External Adapter is the way to go. It helps Plugin to enable easy way of integrating the custom logic.
It is a service which Plugin node communicates via its API with a simple JSON specification.
Information on external adapters is broken up into three main categories: contract creators, developers, and node operators.
  • Contract Creators will need to know how to specify an external adapter in their request for external data.
  • Developers will need to know how to implement an external adapter for an API.
  • Node Operators will need to know how to add an external adapter to their node so that they can provide specialized services to smart contracts.
is External Adapter Neccesary to implement?
  • Yes, it is when you want to perform complex logic before the data gets written onto smart contract.
  • For ex - Let's say, you are pulling the data from "External world" using API and the data from API result need to be formatted
External Initiator defines, when a job will run
External Adapter defines, how a job will run
To setup an external adapter, node operator need to perfom 3 steps
  • Setup Bridge in the Plugin Node
  • Update jobspec to have Bridge
  • Setup External-Adapter server program in same node
    • Basically, this step decides what kind of services a job provides to end users. For instance, "Index Pair(BTC/USDT), (ETH/USDT), (ETC/XDC)" etc.,