fixed spelling
This commit is contained in:
parent
a09a20b5b7
commit
bba9e27798
|
@ -17,7 +17,7 @@
|
||||||
"@project-serum/anchor": "^0.24.2",
|
"@project-serum/anchor": "^0.24.2",
|
||||||
"@solana/web3.js": "1.33.0",
|
"@solana/web3.js": "1.33.0",
|
||||||
"@switchboard-xyz/switchboard-v2": "^0.0.97",
|
"@switchboard-xyz/switchboard-v2": "^0.0.97",
|
||||||
"@switchboard-xyz/sbv2-utils": "^0.0.10",
|
"@switchboard-xyz/sbv2-utils": "^0.0.13",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"node-pagerduty": "^1.3.6"
|
"node-pagerduty": "^1.3.6"
|
||||||
},
|
},
|
||||||
|
|
|
@ -84,7 +84,7 @@ This schema Oracle nodes respond with when fulfilling a job.
|
||||||
|
|
||||||
### OracleJob
|
### OracleJob
|
||||||
|
|
||||||
Represnts a list of tasks to be performed by a switchboard oracle.
|
Represents a list of tasks to be performed by a switchboard oracle.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | --------------------------------- | -------- | ------------------------------------------------- |
|
| ----- | --------------------------------- | -------- | ------------------------------------------------- |
|
||||||
|
@ -155,7 +155,7 @@ aggregate.
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------- |
|
| ----------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------- |
|
||||||
| scalar | double | optional | Specifies a basic scalar denominator to divide by. |
|
| scalar | double | optional | Specifies a basic scalar denominator to divide by. |
|
||||||
| aggregator_pubkey | string | optional | Specifies another aggregator resut to divide by. |
|
| aggregator_pubkey | string | optional | Specifies another aggregator result to divide by. |
|
||||||
| job | [OracleJob](#OracleJob) | optional | A job whose result is computed before dividing our numerical input by that result. |
|
| job | [OracleJob](#OracleJob) | optional | A job whose result is computed before dividing our numerical input by that result. |
|
||||||
|
|
||||||
<a name=".OracleJob.HttpTask"></a>
|
<a name=".OracleJob.HttpTask"></a>
|
||||||
|
@ -319,7 +319,7 @@ Fetch the current price of a Solana oracle protocol
|
||||||
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
||||||
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
||||||
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
||||||
| pyth_allowed_confidence_interval | double | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this treshold are rejected. |
|
| pyth_allowed_confidence_interval | double | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this threshold are rejected. |
|
||||||
|
|
||||||
<a name=".OracleJob.PerpMarketTask"></a>
|
<a name=".OracleJob.PerpMarketTask"></a>
|
||||||
|
|
||||||
|
@ -400,13 +400,13 @@ aggregate.
|
||||||
|
|
||||||
### OracleJob.SushiswapExchangeRateTask
|
### OracleJob.SushiswapExchangeRateTask
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----------------- | ----------------- | -------- | ----------- |
|
| ----------------- | ------ | -------- | ----------- |
|
||||||
| in_token_address | string | optional | |
|
| in_token_address | string | optional | |
|
||||||
| out_token_address | string | optional | |
|
| out_token_address | string | optional | |
|
||||||
| in_token_amount | uint32 | optional | |
|
| in_token_amount | uint32 | optional | |
|
||||||
| slippage | double | optional | |
|
| slippage | double | optional | |
|
||||||
| provider | string | optional | |
|
| provider | string | optional | |
|
||||||
|
|
||||||
<a name=".OracleJob.Task"></a>
|
<a name=".OracleJob.Task"></a>
|
||||||
|
|
||||||
|
@ -456,25 +456,25 @@ aggregate.
|
||||||
|
|
||||||
Takes a twap over a set period for a certain aggregator.
|
Takes a twap over a set period for a certain aggregator.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| -------------------------- | ----------------- | -------- | -------------------------------------------------------------------- |
|
| -------------------------- | ------------- | -------- | -------------------------------------------------------------------- |
|
||||||
| aggregator_pubkey | string | optional | The target aggregator for the TWAP. |
|
| aggregator_pubkey | string | optional | The target aggregator for the TWAP. |
|
||||||
| period | int32 | optional | Period, in seconds, the twap should account for |
|
| period | int32 | optional | Period, in seconds, the twap should account for |
|
||||||
| weight_by_propagation_time | [bool](#bool) | optional | Weight samples by their propagation time |
|
| weight_by_propagation_time | [bool](#bool) | optional | Weight samples by their propagation time |
|
||||||
| min_samples | uint32 | optional | Minimum number of samples in the history to calculate a valid result |
|
| min_samples | uint32 | optional | Minimum number of samples in the history to calculate a valid result |
|
||||||
| ending_unix_timestamp | int32 | optional | Ending unix timestamp to collect values up to |
|
| ending_unix_timestamp | int32 | optional | Ending unix timestamp to collect values up to |
|
||||||
|
|
||||||
<a name=".OracleJob.UniswapExchangeRateTask"></a>
|
<a name=".OracleJob.UniswapExchangeRateTask"></a>
|
||||||
|
|
||||||
### OracleJob.UniswapExchangeRateTask
|
### OracleJob.UniswapExchangeRateTask
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----------------- | ----------------- | -------- | ----------- |
|
| ----------------- | ------ | -------- | ----------- |
|
||||||
| in_token_address | string | optional | |
|
| in_token_address | string | optional | |
|
||||||
| out_token_address | string | optional | |
|
| out_token_address | string | optional | |
|
||||||
| in_token_amount | uint32 | optional | |
|
| in_token_amount | uint32 | optional | |
|
||||||
| slippage | double | optional | |
|
| slippage | double | optional | |
|
||||||
| provider | string | optional | |
|
| provider | string | optional | |
|
||||||
|
|
||||||
<a name=".OracleJob.ValueTask"></a>
|
<a name=".OracleJob.ValueTask"></a>
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ Returns a specified value.
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----------------- | ------ | -------- | ----------------------------------------------- |
|
| ----------------- | ------ | -------- | ----------------------------------------------- |
|
||||||
| value | double | optional | The value that will be returned from this task. |
|
| value | double | optional | The value that will be returned from this task. |
|
||||||
| aggregator_pubkey | string | optional | Specifies an aggregatorr to pull the value of. |
|
| aggregator_pubkey | string | optional | Specifies an aggregator to pull the value of. |
|
||||||
|
|
||||||
<a name=".OracleJob.WebsocketTask"></a>
|
<a name=".OracleJob.WebsocketTask"></a>
|
||||||
|
|
||||||
|
@ -515,11 +515,11 @@ Opens and maintains a websocket for light speed data retrieval.
|
||||||
|
|
||||||
An enumeration representing the types of HTTP requests available to make.
|
An enumeration representing the types of HTTP requests available to make.
|
||||||
|
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
| ------------- | ------ | -------------------------------------------- |
|
| -------------- | ------ | -------------------------------------------- |
|
||||||
| METHOD_UNKOWN | 0 | Unset HTTP method will default to METHOD_GET |
|
| METHOD_UNKNOWN | 0 | Unset HTTP method will default to METHOD_GET |
|
||||||
| METHOD_GET | 1 | Perform an HTTP 'GET' request. |
|
| METHOD_GET | 1 | Perform an HTTP 'GET' request. |
|
||||||
| METHOD_POST | 2 | Perform an HTTP 'POST' request. |
|
| METHOD_POST | 2 | Perform an HTTP 'POST' request. |
|
||||||
|
|
||||||
<a name=".OracleJob.JsonParseTask.AggregationMethod"></a>
|
<a name=".OracleJob.JsonParseTask.AggregationMethod"></a>
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
|
|
||||||
interact with a switchboard aggregator account
|
interact with a switchboard aggregator account
|
||||||
|
|
||||||
* [`sbv2 aggregator:add:job AGGREGATORKEY`](#sbv2-aggregatoraddjob-aggregatorkey)
|
- [`sbv2 aggregator:add:job AGGREGATORKEY`](#sbv2-aggregatoraddjob-aggregatorkey)
|
||||||
* [`sbv2 aggregator:create:copy AGGREGATORSOURCE`](#sbv2-aggregatorcreatecopy-aggregatorsource)
|
- [`sbv2 aggregator:create:copy AGGREGATORSOURCE`](#sbv2-aggregatorcreatecopy-aggregatorsource)
|
||||||
* [`sbv2 aggregator:create:json DEFINITIONFILE`](#sbv2-aggregatorcreatejson-definitionfile)
|
- [`sbv2 aggregator:create:json DEFINITIONFILE`](#sbv2-aggregatorcreatejson-definitionfile)
|
||||||
* [`sbv2 aggregator:lock AGGREGATORKEY`](#sbv2-aggregatorlock-aggregatorkey)
|
- [`sbv2 aggregator:lock AGGREGATORKEY`](#sbv2-aggregatorlock-aggregatorkey)
|
||||||
* [`sbv2 aggregator:permission:create AGGREGATORKEY`](#sbv2-aggregatorpermissioncreate-aggregatorkey)
|
- [`sbv2 aggregator:permission:create AGGREGATORKEY`](#sbv2-aggregatorpermissioncreate-aggregatorkey)
|
||||||
* [`sbv2 aggregator:remove:job AGGREGATORKEY JOBKEY`](#sbv2-aggregatorremovejob-aggregatorkey-jobkey)
|
- [`sbv2 aggregator:remove:job AGGREGATORKEY JOBKEY`](#sbv2-aggregatoremovejob-aggregatorkey-jobkey)
|
||||||
* [`sbv2 aggregator:set AGGREGATORKEY`](#sbv2-aggregatorset-aggregatorkey)
|
- [`sbv2 aggregator:set AGGREGATORKEY`](#sbv2-aggregatorset-aggregatorkey)
|
||||||
* [`sbv2 aggregator:set:authority AGGREGATORKEY NEWAUTHORITY`](#sbv2-aggregatorsetauthority-aggregatorkey-newauthority)
|
- [`sbv2 aggregator:set:authority AGGREGATORKEY NEWAUTHORITY`](#sbv2-aggregatorsetauthority-aggregatorkey-newauthority)
|
||||||
* [`sbv2 aggregator:set:batchSize AGGREGATORKEY BATCHSIZE`](#sbv2-aggregatorsetbatchsize-aggregatorkey-batchsize)
|
- [`sbv2 aggregator:set:batchSize AGGREGATORKEY BATCHSIZE`](#sbv2-aggregatorsetbatchsize-aggregatorkey-batchsize)
|
||||||
* [`sbv2 aggregator:set:forceReportPeriod AGGREGATORKEY FORCEREPORTPERIOD`](#sbv2-aggregatorsetforcereportperiod-aggregatorkey-forcereportperiod)
|
- [`sbv2 aggregator:set:forceReportPeriod AGGREGATORKEY FORCEREPORTPERIOD`](#sbv2-aggregatorsetforcereportperiod-aggregatorkey-forcereportperiod)
|
||||||
* [`sbv2 aggregator:set:history AGGREGATORKEY SIZE`](#sbv2-aggregatorsethistory-aggregatorkey-size)
|
- [`sbv2 aggregator:set:history AGGREGATORKEY SIZE`](#sbv2-aggregatorsethistory-aggregatorkey-size)
|
||||||
* [`sbv2 aggregator:set:minJobs AGGREGATORKEY MINJOBRESULTS`](#sbv2-aggregatorsetminjobs-aggregatorkey-minjobresults)
|
- [`sbv2 aggregator:set:minJobs AGGREGATORKEY MINJOBRESULTS`](#sbv2-aggregatorsetminjobs-aggregatorkey-minjobresults)
|
||||||
* [`sbv2 aggregator:set:minOracles AGGREGATORKEY MINORACLERESULTS`](#sbv2-aggregatorsetminoracles-aggregatorkey-minoracleresults)
|
- [`sbv2 aggregator:set:minOracles AGGREGATORKEY MINORACLERESULTS`](#sbv2-aggregatorsetminoracles-aggregatorkey-minoracleresults)
|
||||||
* [`sbv2 aggregator:set:queue AGGREGATORKEY QUEUEKEY`](#sbv2-aggregatorsetqueue-aggregatorkey-queuekey)
|
- [`sbv2 aggregator:set:queue AGGREGATORKEY QUEUEKEY`](#sbv2-aggregatorsetqueue-aggregatorkey-queuekey)
|
||||||
* [`sbv2 aggregator:set:updateInterval AGGREGATORKEY UPDATEINTERVAL`](#sbv2-aggregatorsetupdateinterval-aggregatorkey-updateinterval)
|
- [`sbv2 aggregator:set:updateInterval AGGREGATORKEY UPDATEINTERVAL`](#sbv2-aggregatorsetupdateinterval-aggregatorkey-updateinterval)
|
||||||
* [`sbv2 aggregator:set:varianceThreshold AGGREGATORKEY VARIANCETHRESHOLD`](#sbv2-aggregatorsetvariancethreshold-aggregatorkey-variancethreshold)
|
- [`sbv2 aggregator:set:varianceThreshold AGGREGATORKEY VARIANCETHRESHOLD`](#sbv2-aggregatorsetvariancethreshold-aggregatorkey-variancethreshold)
|
||||||
* [`sbv2 aggregator:update AGGREGATORKEY`](#sbv2-aggregatorupdate-aggregatorkey)
|
- [`sbv2 aggregator:update AGGREGATORKEY`](#sbv2-aggregatorupdate-aggregatorkey)
|
||||||
|
|
||||||
## `sbv2 aggregator:add:job AGGREGATORKEY`
|
## `sbv2 aggregator:add:job AGGREGATORKEY`
|
||||||
|
|
||||||
|
@ -108,7 +107,7 @@ OPTIONS
|
||||||
--varianceThreshold=varianceThreshold override source aggregator's varianceThreshold
|
--varianceThreshold=varianceThreshold override source aggregator's varianceThreshold
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
$ sbv2 aggregator:create:copy 8SXvChNYFhRq4EZuZvnhjrB3jJRQCv4k3P4W6hesH3Ee
|
$ sbv2 aggregator:create:copy 8SXvChNYFhRq4EZuZvnhjrB3jJRQCv4k3P4W6hesH3Ee
|
||||||
AY3vpUu6v49shWajeFjHjgikYfaBWNJgax8zoEouUDTs --keypair ../payer-keypair.json
|
AY3vpUu6v49shWajeFjHjgikYfaBWNJgax8zoEouUDTs --keypair ../payer-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -151,7 +150,7 @@ ALIASES
|
||||||
$ sbv2 json:create:aggregator
|
$ sbv2 json:create:aggregator
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
$ sbv2 aggregator:create:json examples/aggregator.json --keypair ../payer-keypair.json --queueKey
|
$ sbv2 aggregator:create:json examples/aggregator.json --keypair ../payer-keypair.json --queueKey
|
||||||
GhYg3R1V6DmJbwuc57qZeoYG6gUuvCotUF1zU3WCj98U --outputFile aggregator.schema.json
|
GhYg3R1V6DmJbwuc57qZeoYG6gUuvCotUF1zU3WCj98U --outputFile aggregator.schema.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -302,7 +301,7 @@ ALIASES
|
||||||
$ sbv2 set:aggregator
|
$ sbv2 set:aggregator
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
$ sbv2 aggregator:set GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR --updateInterval 300 --minOracles 3 --keypair
|
$ sbv2 aggregator:set GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR --updateInterval 300 --minOracles 3 --keypair
|
||||||
../payer-keypair.json
|
../payer-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -407,7 +406,7 @@ ALIASES
|
||||||
$ sbv2 aggregator:set:forceReport
|
$ sbv2 aggregator:set:forceReport
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
$ sbv2 aggregator:set:forceReportPeriod GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR 300 --keypair
|
$ sbv2 aggregator:set:forceReportPeriod GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR 300 --keypair
|
||||||
../payer-keypair.json
|
../payer-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -617,7 +616,7 @@ ALIASES
|
||||||
$ sbv2 aggregator:set:variance
|
$ sbv2 aggregator:set:variance
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
$ sbv2 aggregator:set:varianceThreshold GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR 0.1 --keypair
|
$ sbv2 aggregator:set:varianceThreshold GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR 0.1 --keypair
|
||||||
../payer-keypair.json
|
../payer-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Switchboard tasks can be divided into the following categories:
|
||||||
- [**Web3 Fetch**](#web3-fetch): Retrieve on-chain data
|
- [**Web3 Fetch**](#web3-fetch): Retrieve on-chain data
|
||||||
- [**Parse**](#parse): Extract a value from a response
|
- [**Parse**](#parse): Extract a value from a response
|
||||||
- [**Logic**](#logic): Perform some logical operation like if..else clauses
|
- [**Logic**](#logic): Perform some logical operation like if..else clauses
|
||||||
- [**Math**](#math): Perform a mathmatical operation like taking the maximum value of a list or raising a value to an exponent.
|
- [**Math**](#math): Perform a mathematical operation like taking the maximum value of a list or raising a value to an exponent.
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
|
@ -56,11 +56,11 @@ An object that represents a header to add to an HTTP request.
|
||||||
|
|
||||||
An enumeration representing the types of HTTP requests available to make.
|
An enumeration representing the types of HTTP requests available to make.
|
||||||
|
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
| ------------- | ------ | -------------------------------------------- |
|
| -------------- | ------ | -------------------------------------------- |
|
||||||
| METHOD_UNKOWN | 0 | Unset HTTP method will default to METHOD_GET |
|
| METHOD_UNKNOWN | 0 | Unset HTTP method will default to METHOD_GET |
|
||||||
| METHOD_GET | 1 | Perform an HTTP 'GET' request. |
|
| METHOD_GET | 1 | Perform an HTTP 'GET' request. |
|
||||||
| METHOD_POST | 2 | Perform an HTTP 'POST' request. |
|
| METHOD_POST | 2 | Perform an HTTP 'POST' request. |
|
||||||
|
|
||||||
### 🛠WebsocketTask
|
### 🛠WebsocketTask
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ Fetch the current price of a Solana oracle protocol
|
||||||
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
||||||
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
||||||
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
||||||
| pyth_allowed_confidence_interval | double | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this treshold are rejected. |
|
| pyth_allowed_confidence_interval | double | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this threshold are rejected. |
|
||||||
|
|
||||||
### 🛠JupiterSwapTask
|
### 🛠JupiterSwapTask
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ aggregate.
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------- |
|
| ----------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------- |
|
||||||
| scalar | double | optional | Specifies a basic scalar denominator to divide by. |
|
| scalar | double | optional | Specifies a basic scalar denominator to divide by. |
|
||||||
| aggregator_pubkey | string | optional | Specifies another aggregator resut to divide by. |
|
| aggregator_pubkey | string | optional | Specifies another aggregator result to divide by. |
|
||||||
| job | [OracleJob](#OracleJob) | optional | A job whose result is computed before dividing our numerical input by that result. |
|
| job | [OracleJob](#OracleJob) | optional | A job whose result is computed before dividing our numerical input by that result. |
|
||||||
|
|
||||||
### 🛠PowTask
|
### 🛠PowTask
|
||||||
|
@ -469,7 +469,7 @@ Fetch the current price of a Solana oracle protocol
|
||||||
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
| switchboard_address | string | optional | Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer |
|
||||||
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
| pyth_address | string | optional | Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/ |
|
||||||
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
| chainlink_address | string | optional | Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana |
|
||||||
| pyth_allowed_confidence_interval | [double](#double) | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this treshold are rejected. |
|
| pyth_allowed_confidence_interval | [double](#double) | optional | Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this threshold are rejected. |
|
||||||
|
|
||||||
## 🛠JsonParseTask
|
## 🛠JsonParseTask
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,40 @@
|
||||||
"jobinitparams",
|
"jobinitparams",
|
||||||
"setbatchsize",
|
"setbatchsize",
|
||||||
"aggregatorupdate",
|
"aggregatorupdate",
|
||||||
"openround"
|
"aggregatorcreatejson",
|
||||||
|
"definitionfile",
|
||||||
|
"addjob",
|
||||||
|
"aggregatoraddjob",
|
||||||
|
"removejob",
|
||||||
|
"aggregatoremovejob",
|
||||||
|
"sethistorybuffer",
|
||||||
|
"setminjobs",
|
||||||
|
"setminoracles",
|
||||||
|
"crankinitparams",
|
||||||
|
"openround",
|
||||||
|
"Sysvar",
|
||||||
|
"AAAA",
|
||||||
|
"BADC",
|
||||||
|
"BACD",
|
||||||
|
"ADDA",
|
||||||
|
"CBCB",
|
||||||
|
"ABDC",
|
||||||
|
"DBBD",
|
||||||
|
"CACA",
|
||||||
|
"disincentivize",
|
||||||
|
"repush",
|
||||||
|
"repushed",
|
||||||
|
"Composability",
|
||||||
|
"pyth",
|
||||||
|
"chainlink",
|
||||||
|
"walkthrough",
|
||||||
|
"defi",
|
||||||
|
"sushiswap",
|
||||||
|
"solend",
|
||||||
|
"larix",
|
||||||
|
"mbps",
|
||||||
|
"genesys",
|
||||||
|
"syndica"
|
||||||
],
|
],
|
||||||
"ignoreRegExpList": [
|
"ignoreRegExpList": [
|
||||||
"\\((.*)\\)", // Markdown links
|
"\\((.*)\\)", // Markdown links
|
||||||
|
|
|
@ -9,7 +9,6 @@ import MarkdownImage from "/src/components/MarkdownImage";
|
||||||
import { Box, Typography, Grid } from "@mui/material";
|
import { Box, Typography, Grid } from "@mui/material";
|
||||||
import Link from "@docusaurus/Link";
|
import Link from "@docusaurus/Link";
|
||||||
|
|
||||||
|
|
||||||
<Typography variant="h4">
|
<Typography variant="h4">
|
||||||
<b>Link: </b>
|
<b>Link: </b>
|
||||||
<Link to="https://publish.switchboard.xyz/">publish.switchboard.xyz</Link>
|
<Link to="https://publish.switchboard.xyz/">publish.switchboard.xyz</Link>
|
||||||
|
@ -17,7 +16,7 @@ import Link from "@docusaurus/Link";
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The publisher site is a decentralized marketplace that allows anyone to build a data feed and deploy it on-chain. The site includes a directory of pre-defined feeds from popular sources such as FTX, Coinbase, or any permissionless Serum market. The publisher site streamlines the on-chain workflow and allows a user to configure a data feed from a convienent UI. A Switchboard data feed has the following account structure:
|
The publisher site is a decentralized marketplace that allows anyone to build a data feed and deploy it on-chain. The site includes a directory of pre-defined feeds from popular sources such as FTX, Coinbase, or any permissionless Serum market. The publisher site streamlines the on-chain workflow and allows a user to configure a data feed from a convenient UI. A Switchboard data feed has the following account structure:
|
||||||
|
|
||||||
<Grid container spacing={3}>
|
<Grid container spacing={3}>
|
||||||
<Grid item md={5}>
|
<Grid item md={5}>
|
||||||
|
|
|
@ -11,7 +11,7 @@ Switchboard provides the ability to create your own queue with your own set of o
|
||||||
|
|
||||||
Oracles can be provided a `configs.json` file to store various configurations needed to execute job definitions. If an oracle encounters a job definition with a variable, it will parse the `configs.json` and embed the value in the job definition.
|
Oracles can be provided a `configs.json` file to store various configurations needed to execute job definitions. If an oracle encounters a job definition with a variable, it will parse the `configs.json` and embed the value in the job definition.
|
||||||
|
|
||||||
Oracles can embed API Keys on a per job basis by specifying the jobAccount public key or by using an asterik character to use the variable for multiple job definitions. **_Wildcard variables should use a unique name to prevent incorrect substitution._**
|
Oracles can embed API Keys on a per job basis by specifying the jobAccount public key or by using an asterisk character to use the variable for multiple job definitions. **_Wildcard variables should use a unique name to prevent incorrect substitution._**
|
||||||
|
|
||||||
```json title="configs.json"
|
```json title="configs.json"
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@ Oracles can embed API Keys on a per job basis by specifying the jobAccount publi
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
|
|
||||||
Private queue's should **_ALWAYS_** have `unpermissionedFeedsEnabled` set to false. Allowing unpermitted feeds could result in a malicous actor creating a job definition that leaks your sensitive API keys.
|
Private queue's should **_ALWAYS_** have `unpermissionedFeedsEnabled` set to false. Allowing unpermitted feeds could result in a malicious actor creating a job definition that leaks your sensitive API keys.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import Link from "@docusaurus/Link";
|
||||||
<Link to="https://publish.switchboard.xyz/"># publish.switchboard.xyz</Link>
|
<Link to="https://publish.switchboard.xyz/"># publish.switchboard.xyz</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
The publisher site is a decentralized marketplace that allows anyone to build a data feed and deploy it on-chain. The site includes a directory of pre-defined feeds from popular sources such as FTX, Coinbase, or any permissionless Serum market. The publisher site streamlines the on-chain workflow and allows a user to configure a data feed from a convienent UI.
|
The publisher site is a decentralized marketplace that allows anyone to build a data feed and deploy it on-chain. The site includes a directory of pre-defined feeds from popular sources such as FTX, Coinbase, or any permissionless Serum market. The publisher site streamlines the on-chain workflow and allows a user to configure a data feed from a convenient UI.
|
||||||
|
|
||||||
## Connect
|
## Connect
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ gcloud config set project switchboard-oracle-cluster
|
||||||
|
|
||||||
[Google - gcloud projects create](https://cloud.google.com/sdk/gcloud/reference/projects/create)
|
[Google - gcloud projects create](https://cloud.google.com/sdk/gcloud/reference/projects/create)
|
||||||
|
|
||||||
<b>gCloud Conifg</b>
|
<b>gCloud Config</b>
|
||||||
|
|
||||||
Set the default zone using [list of regions and zones](https://cloud.google.com/compute/docs/regions-zones#available)
|
Set the default zone using [list of regions and zones](https://cloud.google.com/compute/docs/regions-zones#available)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ Currently the Switchboard oracle is a single threaded Node.js application with n
|
||||||
|
|
||||||
A Switchboard oracle should have a reliable RPC endpoint with no rate limiting in order to respond in a timely manner. RPC providers will need to have `--full-rpc-api` enabled in their validator config, along with the ability to support fetching 100 program accounts in a single getProgramAccounts request.
|
A Switchboard oracle should have a reliable RPC endpoint with no rate limiting in order to respond in a timely manner. RPC providers will need to have `--full-rpc-api` enabled in their validator config, along with the ability to support fetching 100 program accounts in a single getProgramAccounts request.
|
||||||
|
|
||||||
Switchboard recommendeds the following RPC providers:
|
Switchboard recommends the following RPC providers:
|
||||||
|
|
||||||
- RPC Pool
|
- RPC Pool
|
||||||
- GenesysGo
|
- GenesysGo
|
||||||
|
|
|
@ -79,7 +79,7 @@ The queue uses `queue.gcIdx` to track its garbage collection index. When an orac
|
||||||
|
|
||||||
Oracle queue resources, such as oracles, aggregators, VRF accounts, or buffer relayer accounts, _MUST_ have an associated [PermissionAccount](/idl/accounts/PermissionAccountData) initialized before interacting with a queue. Permissions are granted by `queue.authority`, which could be a DAO controlled account to allow network participants to vote on new entrants.
|
Oracle queue resources, such as oracles, aggregators, VRF accounts, or buffer relayer accounts, _MUST_ have an associated [PermissionAccount](/idl/accounts/PermissionAccountData) initialized before interacting with a queue. Permissions are granted by `queue.authority`, which could be a DAO controlled account to allow network participants to vote on new entrants.
|
||||||
|
|
||||||
Oracles _MUST_ have **PermitOracleHeartbeat** permissions before heartbeating on a queue. This is to prevent a malicous actor from spinning up a plethora of oracles until it obtains the super majority, at which point it could misreport data feed results and cause honest oracles to be slashed.
|
Oracles _MUST_ have **PermitOracleHeartbeat** permissions before heartbeating on a queue. This is to prevent a malicious actor from spinning up a plethora of oracles until it obtains the super majority, at which point it could misreport data feed results and cause honest oracles to be slashed.
|
||||||
|
|
||||||
See the table below for the minimum required permissions for a resource based on the queues settings:
|
See the table below for the minimum required permissions for a resource based on the queues settings:
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ An oracle queue can be governed by its network participants to control the vario
|
||||||
|
|
||||||
- `queue.minStake` - require a higher up-front cost for oracles to entice honest behavior
|
- `queue.minStake` - require a higher up-front cost for oracles to entice honest behavior
|
||||||
- `queue.reward` - control the oracle reward payout for successfully fulfilling update request
|
- `queue.reward` - control the oracle reward payout for successfully fulfilling update request
|
||||||
- `queue.slashingEnabled` - to disincentivize malcious oracle behavior
|
- `queue.slashingEnabled` - to disincentivize malicious oracle behavior
|
||||||
- Permit new oracles to join the network
|
- Permit new oracles to join the network
|
||||||
|
|
||||||
## More Information
|
## More Information
|
||||||
|
|
|
@ -13,7 +13,7 @@ Switchboard provides the ability to create your own queue with your own set of o
|
||||||
|
|
||||||
Oracles can be provided a `configs.json` file to store various configurations needed to execute job definitions. If an oracle encounters a job definition with a variable, it will parse the `configs.json` and embed the value in the job definition.
|
Oracles can be provided a `configs.json` file to store various configurations needed to execute job definitions. If an oracle encounters a job definition with a variable, it will parse the `configs.json` and embed the value in the job definition.
|
||||||
|
|
||||||
Oracles can embed API Keys on a per job basis by specifying the jobAccount public key or by using an asterik character to use the variable for multiple job definitions. **_Wildcard variables should use a unique name to prevent incorrect substitution._**
|
Oracles can embed API Keys on a per job basis by specifying the jobAccount public key or by using an asterisk character to use the variable for multiple job definitions. **_Wildcard variables should use a unique name to prevent incorrect substitution._**
|
||||||
|
|
||||||
```json title="configs.json"
|
```json title="configs.json"
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ Oracles can embed API Keys on a per job basis by specifying the jobAccount publi
|
||||||
|
|
||||||
:::caution
|
:::caution
|
||||||
|
|
||||||
Private queue's should **_ALWAYS_** have `unpermissionedFeedsEnabled` set to false. Allowing unpermitted feeds could result in a malicous actor creating a job definition that leaks your sensitive API keys.
|
Private queue's should **_ALWAYS_** have `unpermissionedFeedsEnabled` set to false. Allowing unpermitted feeds could result in a malicious actor creating a job definition that leaks your sensitive API keys.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ import { Typography } from "@mui/material";
|
||||||
<br />
|
<br />
|
||||||
<a
|
<a
|
||||||
className="nowrap"
|
className="nowrap"
|
||||||
href="/api/cli/aggregator#sbv2-aggregatorremovejob-aggregatorkey-jobkey"
|
href="/api/cli/aggregator#sbv2-aggregatoremovejob-aggregatorkey-jobkey"
|
||||||
>
|
>
|
||||||
<SiPowershell className="devicons__nowrap" /> CLI
|
<SiPowershell className="devicons__nowrap" /> CLI
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -28,7 +28,7 @@ import { Typography } from "@mui/material";
|
||||||
<SiTypescript className="devicons__nowrap" /> Typescript
|
<SiTypescript className="devicons__nowrap" /> Typescript
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<a className="nowrap" href="/api/py/crank#crankinitparams-objects">
|
<a className="nowrap" href="/api/py/crank#crankInitParams-objects">
|
||||||
<SiPython className="devicons__nowrap" /> Python
|
<SiPython className="devicons__nowrap" /> Python
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
| enableBufferRelayers | bool | Whether oracles are permitted to fulfill buffer relayer update request. |
|
| enableBufferRelayers | bool | Whether oracles are permitted to fulfill buffer relayer update request. |
|
||||||
| ebuf | u8[968] | Reserved. |
|
| ebuf | u8[968] | Reserved. |
|
||||||
| maxSize | u32 | Maximum number of oracles a queue can support. |
|
| maxSize | u32 | Maximum number of oracles a queue can support. |
|
||||||
| dataBuffer | publicKey | The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver succesfully heartbeated before the queues `oracleTimeout`. |
|
| dataBuffer | publicKey | The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver successfully heartbeated before the queues `oracleTimeout`. |
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<b>Size: </b>29058 Bytes<br /><b>Rent Exemption: </b>0.203134560SOL<br /><br />
|
<b>Size: </b>29058 Bytes<br /><b>Rent Exemption: </b>0.203134560SOL<br /><br />
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|--|--|--|
|
| ------------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
||||||
| status | [VrfStatus](/idl/types/VrfStatus) | The current status of the VRF account. |
|
| status | [VrfStatus](/idl/types/VrfStatus) | The current status of the VRF account. |
|
||||||
| counter | u128 | Incremental counter for tracking VRF rounds. |
|
| counter | u128 | Incremental counter for tracking VRF rounds. |
|
||||||
| authority | publicKey | On-chain account delegated for making account changes. |
|
| authority | publicKey | On-chain account delegated for making account changes. |
|
||||||
| oracleQueue | publicKey | The [OracleQueueAccountData](/idl/accounts/OracleQueueAccountData) that is assigned to fulfill VRF update request. |
|
| oracleQueue | publicKey | The [OracleQueueAccountData](/idl/accounts/OracleQueueAccountData) that is assigned to fulfill VRF update request. |
|
||||||
| escrow | publicKey | The token account used to hold funds for VRF update request. |
|
| escrow | publicKey | The token account used to hold funds for VRF update request. |
|
||||||
| callback | [CallbackZC](/idl/types/CallbackZC) | The callback that is invoked when an update request is succesfully verified. |
|
| callback | [CallbackZC](/idl/types/CallbackZC) | The callback that is invoked when an update request is successfully verified. |
|
||||||
| batchSize | u32 | The number of oracles assigned to a VRF update request. |
|
| batchSize | u32 | The number of oracles assigned to a VRF update request. |
|
||||||
| builders | [VrfBuilder](/idl/types/VrfBuilder)[8] | Struct containing the intermediate state between VRF crank actions. |
|
| builders | [VrfBuilder](/idl/types/VrfBuilder)[8] | Struct containing the intermediate state between VRF crank actions. |
|
||||||
| buildersLen | u32 | The number of builders. |
|
| buildersLen | u32 | The number of builders. |
|
||||||
| testMode | bool | |
|
| testMode | bool | |
|
||||||
| currentRound | [VrfRound](/idl/types/VrfRound) | Oracle results from the current round of update request that has not been accepted as valid yet |
|
| currentRound | [VrfRound](/idl/types/VrfRound) | Oracle results from the current round of update request that has not been accepted as valid yet |
|
||||||
| ebuf | u8[1024] | Reserved. |
|
| ebuf | u8[1024] | Reserved. |
|
||||||
|
|
|
@ -430,7 +430,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dataBuffer",
|
"name": "dataBuffer",
|
||||||
"description": "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver succesfully heartbeated before the queues `oracleTimeout`."
|
"description": "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver successfully heartbeated before the queues `oracleTimeout`."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -516,7 +516,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "callback",
|
"name": "callback",
|
||||||
"description": "The callback that is invoked when an update request is succesfully verified."
|
"description": "The callback that is invoked when an update request is successfully verified."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "batchSize",
|
"name": "batchSize",
|
||||||
|
@ -1687,7 +1687,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dataBuffer",
|
"name": "dataBuffer",
|
||||||
"description": "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver succesfully heartbeated before the queues `oracleTimeout`."
|
"description": "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver successfully heartbeated before the queues `oracleTimeout`."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tokenProgram",
|
"name": "tokenProgram",
|
||||||
|
|
File diff suppressed because one or more lines are too long
17
yarn.lock
17
yarn.lock
|
@ -4687,23 +4687,6 @@
|
||||||
"@svgr/plugin-jsx" "^6.2.1"
|
"@svgr/plugin-jsx" "^6.2.1"
|
||||||
"@svgr/plugin-svgo" "^6.2.0"
|
"@svgr/plugin-svgo" "^6.2.0"
|
||||||
|
|
||||||
"@switchboard-xyz/sbv2-utils@^0.0.10":
|
|
||||||
version "0.0.11"
|
|
||||||
resolved "https://registry.npmjs.org/@switchboard-xyz/sbv2-utils/-/sbv2-utils-0.0.10.tgz#a30a7209d7c16e119943e7eaef33cddcf663cdd4"
|
|
||||||
integrity sha512-q9GHnHp+ZUZ642+caVfsuIBXWdvioQtGSk6UTLfpxYFoRMDPGdH5I7T/cjM08xbxK1YaA1fW4bv2K9L1Cu8Ing==
|
|
||||||
dependencies:
|
|
||||||
"@orca-so/sdk" "^1.2.24"
|
|
||||||
"@project-serum/anchor" "^0.24.2"
|
|
||||||
"@saberhq/token-utils" "^1.12.68"
|
|
||||||
"@solana/spl-token" "^0.1.8"
|
|
||||||
"@solana/web3.js" "^1.42.0"
|
|
||||||
"@switchboard-xyz/switchboard-v2" "^0.0.97"
|
|
||||||
big.js "^6.1.1"
|
|
||||||
chalk "4"
|
|
||||||
decimal.js "^10.3.1"
|
|
||||||
dotenv "^16.0.0"
|
|
||||||
toml "^3.0.0"
|
|
||||||
|
|
||||||
"@switchboard-xyz/switchboard-api@^0.2.193":
|
"@switchboard-xyz/switchboard-api@^0.2.193":
|
||||||
version "0.2.200"
|
version "0.2.200"
|
||||||
resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-api/-/switchboard-api-0.2.200.tgz#16c7d95390693e5992a7f96287143361b4d38cc9"
|
resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-api/-/switchboard-api-0.2.200.tgz#16c7d95390693e5992a7f96287143361b4d38cc9"
|
||||||
|
|
Loading…
Reference in New Issue