Skip to content

Commit

Permalink
Updated readmeBlacklist.json (#3151)
Browse files Browse the repository at this point in the history
* update readmeBlacklist

* changeset

---------

Co-authored-by: cl-ea <93770670+cl-ea@users.noreply.github.com>
  • Loading branch information
karen-stepanyan and cl-ea authored Jan 16, 2024
1 parent 9c66de0 commit ac9ebd6
Show file tree
Hide file tree
Showing 18 changed files with 636 additions and 532 deletions.
9 changes: 9 additions & 0 deletions .changeset/lovely-eagles-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@chainlink/renvm-address-set-adapter': patch
'@chainlink/coingecko-adapter': patch
'@chainlink/enzyme-adapter': patch
'@chainlink/fcsapi-adapter': patch
'@chainlink/lcx-adapter': patch
---

Updated Readme file
8 changes: 8 additions & 0 deletions .changeset/stupid-chicken-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@chainlink/cfbenchmarks-adapter': patch
'@chainlink/dns-query-adapter': patch
'@chainlink/gramchain-adapter': patch
'@chainlink/lotus-adapter': patch
---

Added missing information for readme generation
8 changes: 0 additions & 8 deletions packages/scripts/src/generate-readme/readmeBlacklist.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"bitcoin-json-rpc",
"blockchain.com",
"blockchair",
"cfbenchmarks",
"chain-reserve-wallet",
"circuit-breaker",
"coingecko",
Expand All @@ -21,31 +20,25 @@
"defi-dozen",
"defi-pulse",
"dns-record-check",
"dns-query",
"ccip-read",
"dwolla",
"dxdao",
"dydx-rewards",
"dydx-stark",
"enzyme",
"ethwrite",
"fcsapi",
"flightaware",
"geodb",
"google-bigquery",
"google-weather",
"gramchain",
"graphql",
"harmony",
"historical-average",
"ipfs",
"json-rpc",
"layer2-sequencer-health",
"lcx",
"linear-finance",
"linkpool",
"lition",
"lotus",
"market-closure",
"medianizer",
"messari",
Expand All @@ -56,7 +49,6 @@
"proof-of-reserves",
"reduce",
"reference-transform",
"renvm-address-set",
"set-token-index",
"spectral-macro-score",
"sportsdataio",
Expand Down
133 changes: 66 additions & 67 deletions packages/sources/cfbenchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,114 @@
# Chainlink External Adapter for cfbenchmarks
# CFBENCHMARKS

### Environment variables
![2.2.4](https://img.shields.io/github/package-json/v/smartcontractkit/external-adapters-js?filename=packages/sources/cfbenchmarks/package.json) ![v3](https://img.shields.io/badge/framework%20version-v3-blueviolet)

| Required? | Name | Description | Options | Defaults to |
| :-------: | :-------------: | :------------------------------------------: | :----------: | :---------: |
|| `API_USERNAME` | | | |
|| `API_PASSWORD` | | | |
| | `API_SECONDARY` | Use the secondary endpoint from cfbenchmarks | true / false | false |
This document was generated automatically. Please see [README Generator](../../scripts#readme-generator) for more info.

## Environment Variables

| Required? | Name | Description | Type | Options | Default |
| :-------: | :-----------------------: | :----------------------------------------------------------------------: | :-----: | :-----: | :--------------------------------------: |
|| API_USERNAME | Username for the CFBenchmarks API | string | | |
|| API_PASSWORD | Password for the CFBenchmarks API | string | | |
| | API_ENDPOINT | The default REST API base url | string | | `https://www.cfbenchmarks.com/api` |
| | WS_API_ENDPOINT | The default WebSocket API base url | string | | `wss://www.cfbenchmarks.com/ws/v4` |
| | API_SECONDARY | Toggle using the secondary API base URLs | boolean | | `false` |
| | SECONDARY_API_ENDPOINT | The secondary REST API base url that is toggled using API_SECONDARY | string | | `https://unregprod.cfbenchmarks.com/api` |
| | SECONDARY_WS_API_ENDPOINT | The secondary WebSocket API base url that is toggled using API_SECONDARY | string | | `wss://unregprod.cfbenchmarks.com/ws/v4` |

---

### Input Parameters
## Data Provider Rate Limits

| Required? | Name | Description | Options | Defaults to |
| :-------: | :------: | :-----------------: | :------------------------------------------------: | :---------: |
| | endpoint | The endpoint to use | [values](#Values-Endpoint), [BIRC](#birc-endpoint) | `values` |
There are no rate limits for this adapter.

---

## Values Endpoint
## Input Parameters

### Input Params
| Required? | Name | Description | Type | Options | Default |
| :-------: | :------: | :-----------------: | :----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------: |
| | endpoint | The endpoint to use | string | [birc](#birc-endpoint), [crypto-lwba](#crypto-lwba-endpoint), [crypto](#crypto-endpoint), [crypto_lwba](#crypto-lwba-endpoint), [cryptolwba](#crypto-lwba-endpoint), [price](#crypto-endpoint), [values](#crypto-endpoint) | `crypto` |

| Required? | Name | Description | Options | Defaults to |
| :-------: | :-----: | :--------------------------------------------------------------------------------------------: | :-----: | :---------: |
| | `index` | The ID of the index | | |
| | `base` | The base asset to convert from (if index is not present), aliased to `from` and `coin` | | |
| | `quote` | The quote asset to convert to (if index is not present), aliased to `to`, `market`, and `term` | | |
## Crypto Endpoint

### Sample Input
Supported names for this endpoint are: `crypto`, `price`, `values`.

```json
{
"id": "1",
"data": {
"index": "BRR"
}
}
```
### Input Params

### Sample Output
| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With |
| :-------: | :---: | :------------: | :----------------------------------------------------------------: | :----: | :-----: | :-----: | :--------: | :------------: |
| | index | | The ID of the index. Takes priority over base/quote when provided. | string | | | | |
| | base | `coin`, `from` | The symbol of symbols of the currency to query | string | | | | |
| | quote | `market`, `to` | The symbol of the currency to convert to | string | | | | |

```json
{
"jobRunID": "1",
"data": {
"result": 30363.12
},
"result": 30363.12,
"statusCode": 200
}
```
### Example

### Sample Input
Request:

```json
{
"id": "1",
"data": {
"base": "ETH",
"endpoint": "crypto",
"base": "LINK",
"quote": "USD"
}
}
```

### Sample Output
---

```json
{
"jobRunID": "1",
"data": {
"result": 3000.12
},
"result": 3000.12,
"statusCode": 200
}
```
## Birc Endpoint

## BIRC Endpoint
`birc` is the only supported name for this endpoint.

### Input Params

| Required? | Name | Description | Options | Defaults to |
| :-------: | :-----: | :-------------------------------------------: | :----------------------------------------------------: | :---------: |
| | `tenor` | The tenor value to pull from the API response | 'SIRB', '1W', '2W', '3W', '1M', '2M', '3M', '4M', '5M' | |
| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With |
| :-------: | :---: | :-----: | :-------------------------------------------: | :----: | :----------------------------------------------------: | :-----: | :--------: | :------------: |
|| tenor | | The tenor value to pull from the API response | string | `1M`, `1W`, `2M`, `2W`, `3M`, `3W`, `4M`, `5M`, `SIRB` | | | |

### Example

### Sample Input
Request:

```json
{
"id": "1",
"data": {
"endpoint": "birc",
"tenor": "SIRB"
}
}
```

### Sample Output
---

## Crypto-lwba Endpoint

Supported names for this endpoint are: `crypto-lwba`, `crypto_lwba`, `cryptolwba`.

### Input Params

| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With |
| :-------: | :---: | :------------: | :----------------------------------------------------------------: | :----: | :-----: | :-----: | :--------: | :------------: |
| | index | | The ID of the index. Takes priority over base/quote when provided. | string | | | | |
| | base | `coin`, `from` | The symbol of symbols of the currency to query | string | | | | |
| | quote | `market`, `to` | The symbol of the currency to convert to | string | | | | |

### Example

Request:

```json
{
"jobRunID": "1",
"result": 0.0947,
"providerStatusCode": 200,
"statusCode": 200,
"data": {
"result": 0.0947
},
"metricsMeta": {
"feedId": "{\"data\":{\"endpoint\":\"birc\"}}"
"endpoint": "crypto-lwba",
"base": "LINK",
"quote": "USD"
}
}
```

---

MIT License
21 changes: 14 additions & 7 deletions packages/sources/cfbenchmarks/src/endpoint/birc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ export type BaseEndpointTypes = {
Response: SingleNumberResultResponse
Settings: typeof config.settings
}
export const inputParameters = new InputParameters({
tenor: {
description: 'The tenor value to pull from the API response',
type: 'string',
options: Object.values(VALID_TENORS),
required: true,
export const inputParameters = new InputParameters(
{
tenor: {
description: 'The tenor value to pull from the API response',
type: 'string',
options: Object.values(VALID_TENORS),
required: true,
},
},
})
[
{
tenor: VALID_TENORS.SIRB,
},
],
)
export const endpoint = new AdapterEndpoint({
name: 'birc',
transport,
Expand Down
44 changes: 26 additions & 18 deletions packages/sources/cfbenchmarks/src/endpoint/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,33 @@ import { makeWsTransport } from '../transport/crypto-ws'
export type Params = { index?: string; base?: string; quote?: string }
export type RequestParams = { Params: Params }

export const inputParameters = new InputParameters({
index: {
description: 'The ID of the index. Takes priority over base/quote when provided.',
type: 'string',
required: false,
export const inputParameters = new InputParameters(
{
index: {
description: 'The ID of the index. Takes priority over base/quote when provided.',
type: 'string',
required: false,
},
base: {
aliases: ['from', 'coin'],
type: 'string',
description: 'The symbol of symbols of the currency to query',
required: false,
},
quote: {
aliases: ['to', 'market'],
type: 'string',
description: 'The symbol of the currency to convert to',
required: false,
},
},
base: {
aliases: ['from', 'coin'],
type: 'string',
description: 'The symbol of symbols of the currency to query',
required: false,
},
quote: {
aliases: ['to', 'market'],
type: 'string',
description: 'The symbol of the currency to convert to',
required: false,
},
})
[
{
base: 'LINK',
quote: 'USD',
},
],
)

export type BaseEndpointTypes = {
Parameters: typeof inputParameters.definition
Expand Down
Loading

0 comments on commit ac9ebd6

Please sign in to comment.