update lockfile

This commit is contained in:
Conner Gallagher 2023-05-25 13:21:25 -06:00
parent b17c5fc42d
commit 03d754a355
5 changed files with 292 additions and 14 deletions

View File

@ -19,6 +19,12 @@ examples:
to request a new randomness value"
language: "anchor"
path: "programs/anchor-vrf-parser"
- name: "anchor-vrf-lite-parser"
description:
"Read a Switchboard VRF Lite account and make a Cross Program Invocation
(CPI) to request a new randomness value"
language: "anchor"
path: "programs/anchor-vrf-lite-parser"
- name: "anchor-buffer-parser"
description: "Read a Switchboard buffer relayer using Anchor"
language: "anchor"

View File

@ -0,0 +1,40 @@
<div align="center">
<!-- commonheader -->
<!-- commonheaderstop -->
# anchor-vrf-lite-parser
> An example program written in Anchor demonstrating how to deserialize and read
> a Switchboard VRF Lite account on Solana.
[![Anchor Test Status](https://github.com/switchboard-xyz/sbv2-solana/actions/workflows/anchor-test.yml/badge.svg)](https://github.com/switchboard-xyz/sbv2-solana/actions/workflows/anchor-test.yml)
</div>
<!-- install -->
<!-- installstop -->
## Usage
Build the example program
```bash
anchor build
```
Get your program ID and update `Anchor.toml` and `src/lib.rs` with your pubkey
```bash
export ANCHOR_VRF_LITE_PARSER_PUBKEY=$(solana-keygen pubkey target/deploy/anchor_vrf_lite_parser-keypair.json)
sed -i '' s/5Hhm5xKDiThfidbpqjJpKmMJEcKmjj5tEUNFpi2DzSvb/"$ANCHOR_VRF_LITE_PARSER_PUBKEY"/g Anchor.toml
sed -i '' s/5Hhm5xKDiThfidbpqjJpKmMJEcKmjj5tEUNFpi2DzSvb/"$ANCHOR_VRF_LITE_PARSER_PUBKEY"/g src/lib.rs
```
Then run Anchor test
```bash
anchor test
```

View File

@ -66,11 +66,12 @@ The following addresses can be used with the Switchboard deployment on Solana
## Examples
| **Lang** | **Name** | **Description** |
| ---------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| ---------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| Rust | [native-feed-parser](programs/native-feed-parser) | Read a Switchboard feed using Solana's native program library |
| Anchor | [anchor-feed-parser](programs/anchor-feed-parser) | Read a Switchboard feed using Anchor |
| Anchor | [anchor-history-parser](programs/anchor-history-parser) | Read a data feeds history buffer and get the closest historical sample to a given timestamp |
| Anchor | [anchor-vrf-parser](programs/anchor-vrf-parser) | Read a Switchboard VRF account and make a Cross Program Invocation (CPI) to request a new randomness value |
| Anchor | [anchor-vrf-lite-parser](programs/anchor-vrf-lite-parser) | Read a Switchboard VRF Lite account and make a Cross Program Invocation (CPI) to request a new randomness value |
| Anchor | [anchor-buffer-parser](programs/anchor-buffer-parser) | Read a Switchboard buffer relayer using Anchor |
| Javascript | [javascript-feed-walkthrough](javascript/feed-walkthrough) | Create a private Switchboard queue and oracle and fulfill your own oracle updates |

View File

@ -277,6 +277,88 @@ importers:
specifier: ^4.3.5
version: 4.9.3
programs/anchor-vrf-lite-parser:
dependencies:
'@coral-xyz/anchor':
specifier: ^0.27.0
version: 0.27.0
'@coral-xyz/borsh':
specifier: ^0.27.0
version: 0.27.0(@solana/web3.js@1.73.3)
'@project-serum/borsh':
specifier: ^0.2.5
version: 0.2.5(@solana/web3.js@1.73.3)
'@solana/spl-token':
specifier: ^0.3.6
version: 0.3.6(@solana/web3.js@1.73.3)
'@solana/web3.js':
specifier: ^1.73.3
version: 1.73.3
'@switchboard-xyz/common':
specifier: ^2.2.0
version: 2.2.0
'@switchboard-xyz/oracle':
specifier: ^2.1.13
version: 2.1.13
'@switchboard-xyz/solana.js':
specifier: workspace:*
version: link:../../javascript/solana.js
chalk:
specifier: ^4.1.2
version: 4.1.2
dotenv:
specifier: ^16.0.1
version: 16.0.3
yargs:
specifier: ^17.5.1
version: 17.6.2
devDependencies:
'@types/chai':
specifier: ^4.3.0
version: 4.3.4
'@types/mocha':
specifier: ^9.0.0
version: 9.1.1
'@types/node':
specifier: ^17.0.45
version: 17.0.45
'@typescript-eslint/eslint-plugin':
specifier: ^5.44.0
version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.35.0)(typescript@4.9.4)
'@typescript-eslint/parser':
specifier: ^5.44.0
version: 5.44.0(eslint@8.35.0)(typescript@4.9.4)
chai:
specifier: ^4.3.6
version: 4.3.7
eslint:
specifier: ^8.28.0
version: 8.35.0
mocha:
specifier: ^9.0.3
version: 9.2.2
npm-run-all:
specifier: ^4.1.5
version: 4.1.5
prettier:
specifier: ^2.4.1
version: 2.7.1
prettier-plugin-organize-imports:
specifier: ^2.3.4
version: 2.3.4(prettier@2.7.1)(typescript@4.9.4)
shx:
specifier: ^0.3.4
version: 0.3.4
ts-mocha:
specifier: ^9.0.2
version: 9.0.2(mocha@9.2.2)
ts-node:
specifier: ^10.9.1
version: 10.9.1(@types/node@17.0.45)(typescript@4.9.4)
typescript:
specifier: ^4.9.3
version: 4.9.4
programs/anchor-vrf-parser:
dependencies:
'@coral-xyz/anchor':
@ -1221,6 +1303,33 @@ packages:
- supports-color
dev: true
/@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.44.0(eslint@8.35.0)(typescript@4.9.4)
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/type-utils': 5.44.0(eslint@8.35.0)(typescript@4.9.4)
'@typescript-eslint/utils': 5.44.0(eslint@8.35.0)(typescript@4.9.4)
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.35.0
ignore: 5.2.0
natural-compare-lite: 1.4.0
regexpp: 3.2.0
semver: 7.3.8
tsutils: 3.21.0(typescript@4.9.4)
typescript: 4.9.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/eslint-plugin@5.54.1(@typescript-eslint/parser@5.54.1)(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-a2RQAkosH3d3ZIV08s3DcL/mcGc2M/UC528VkPULFxR9VnVPT8pBu0IyBAJJmVsCmhVfwQX1v6q+QGnmSe1bew==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -1307,6 +1416,26 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser@5.44.0(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.4)
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.35.0
typescript: 4.9.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser@5.54.1(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-8zaIXJp/nG9Ff9vQNh7TI+C3nA6q6iIsGJ4B4L6MhZ7mHnTMR4YP5vp2xydmFXIy8rpyIVbNAG44871LMt6ujg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -1371,6 +1500,26 @@ packages:
- supports-color
dev: true
/@typescript-eslint/type-utils@5.44.0(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.4)
'@typescript-eslint/utils': 5.44.0(eslint@8.35.0)(typescript@4.9.4)
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.35.0
tsutils: 3.21.0(typescript@4.9.4)
typescript: 4.9.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/type-utils@5.54.1(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-WREHsTz0GqVYLIbzIZYbmUUr95DKEKIXZNH57W3s+4bVnuF1TKe2jH8ZNH8rO1CeMY3U4j4UQeqPNkHMiGem3g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -1448,6 +1597,27 @@ packages:
- supports-color
dev: true
/@typescript-eslint/typescript-estree@5.44.0(typescript@4.9.4):
resolution: {integrity: sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/visitor-keys': 5.44.0
debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
tsutils: 3.21.0(typescript@4.9.4)
typescript: 4.9.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/typescript-estree@5.54.1(typescript@4.9.4):
resolution: {integrity: sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -1489,6 +1659,26 @@ packages:
- typescript
dev: true
/@typescript-eslint/utils@5.44.0(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@types/semver': 7.3.13
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.4)
eslint: 8.35.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0(eslint@8.35.0)
semver: 7.3.8
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/utils@5.54.1(eslint@8.35.0)(typescript@4.9.4):
resolution: {integrity: sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -4339,6 +4529,16 @@ packages:
fast-diff: 1.2.0
dev: true
/prettier-plugin-organize-imports@2.3.4(prettier@2.7.1)(typescript@4.9.4):
resolution: {integrity: sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==}
peerDependencies:
prettier: '>=2.0'
typescript: '>=2.9'
dependencies:
prettier: 2.7.1
typescript: 4.9.4
dev: true
/prettier-plugin-organize-imports@2.3.4(prettier@2.8.0)(typescript@4.9.3):
resolution: {integrity: sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==}
peerDependencies:
@ -4992,6 +5192,37 @@ packages:
yn: 3.1.1
dev: true
/ts-node@10.9.1(@types/node@17.0.45)(typescript@4.9.4):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
'@types/node': '*'
typescript: '>=2.7'
peerDependenciesMeta:
'@swc/core':
optional: true
'@swc/wasm':
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
'@types/node': 17.0.45
acorn: 8.8.1
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
typescript: 4.9.4
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true
/ts-node@10.9.1(@types/node@18.11.18)(typescript@4.9.4):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
@ -5391,7 +5622,7 @@ packages:
file:javascript/solana.js:
resolution: {directory: javascript/solana.js, type: directory}
name: '@switchboard-xyz/solana.js'
version: 2.1.12
version: 2.1.14
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
dependencies:
'@coral-xyz/anchor': 0.27.0

View File

@ -2,10 +2,10 @@
![Switchboard Logo](https://github.com/switchboard-xyz/sbv2-core/raw/main/website/static/img/icons/switchboard/avatar.png)
# anchor-vrf-parser
# anchor-vrf-lite-parser
> An example program written in Anchor demonstrating how to deserialize and read
> a Switchboard VRF account on Solana.
> a Switchboard VRF Lite account on Solana.
[![Anchor Test Status](https://github.com/switchboard-xyz/sbv2-solana/actions/workflows/anchor-test.yml/badge.svg)](https://github.com/switchboard-xyz/sbv2-solana/actions/workflows/anchor-test.yml)
@ -26,9 +26,9 @@ anchor build
Get your program ID and update `Anchor.toml` and `src/lib.rs` with your pubkey
```bash
export ANCHOR_VRF_PARSER_PUBKEY=$(solana-keygen pubkey target/deploy/anchor_vrf_parser-keypair.json)
sed -i '' s/4wTeTACfwiXqqvy44bNBB3V2rFjmSTXVoEr4ZAYamJEN/"$ANCHOR_VRF_PARSER_PUBKEY"/g Anchor.toml
sed -i '' s/4wTeTACfwiXqqvy44bNBB3V2rFjmSTXVoEr4ZAYamJEN/"$ANCHOR_VRF_PARSER_PUBKEY"/g src/lib.rs
export ANCHOR_VRF_LITE_PARSER_PUBKEY=$(solana-keygen pubkey target/deploy/anchor_vrf_lite_parser-keypair.json)
sed -i '' s/5Hhm5xKDiThfidbpqjJpKmMJEcKmjj5tEUNFpi2DzSvb/"$ANCHOR_VRF_LITE_PARSER_PUBKEY"/g Anchor.toml
sed -i '' s/5Hhm5xKDiThfidbpqjJpKmMJEcKmjj5tEUNFpi2DzSvb/"$ANCHOR_VRF_LITE_PARSER_PUBKEY"/g src/lib.rs
```
Then run Anchor test