diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 1ecc67d..0000000 --- a/examples/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Switchboard x Solana Examples - - - - - - - - - - - - - - - - - - - - - - -
ProductExamples
Feeds -
    -
  1. Data Feed Client: An example showing how to read a Switchboard data feed and history buffer
  2. -
-
VRF -
    -
  1. VRF Client: An example program showing how to request and consume randomness
  2. -
  3. VRF Flip: A full example for simulating a heads or tails coin flip with a sample web application
  4. -
-
Functions -
    -
  1. Basic Function Example: An example program for executing a custom function
  2. -
  3. VRF Function: An example showing how to use a custom SGX function to publish randomness on-chain
  4. -
-
Workers -
    -
  1. Basic Worker: An example for building a custom worker with Switchboard
  2. -
-
diff --git a/examples/functions/01_basic_oracle/Anchor.toml b/examples/functions/01_basic_oracle/Anchor.toml index 59ab08a..eb83ba2 100644 --- a/examples/functions/01_basic_oracle/Anchor.toml +++ b/examples/functions/01_basic_oracle/Anchor.toml @@ -12,9 +12,9 @@ basic_oracle = "BkTMjFhosJ1xKtLMV2xchGtnTDBABLJ45aXzs7x9FdeX" basic_oracle = "BkTMjFhosJ1xKtLMV2xchGtnTDBABLJ45aXzs7x9FdeX" [provider] -# cluster = "https://api.devnet.solana.com" +cluster = "https://api.devnet.solana.com" # wallet = "~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json" -cluster = "Localnet" +# cluster = "Localnet" wallet = "~/.config/solana/id.json" # cluster = "devnet" diff --git a/examples/functions/01_basic_oracle/Cargo.lock b/examples/functions/01_basic_oracle/Cargo.lock index 22246c0..0c5639f 100644 --- a/examples/functions/01_basic_oracle/Cargo.lock +++ b/examples/functions/01_basic_oracle/Cargo.lock @@ -4230,9 +4230,9 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.9.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b04503c979165d8ad5efe21bb63b9978cb70103f208fab1339aae7c38e94c62" +checksum = "3f5bea97fd6f8e8ce6872148000df6aaba5a45597f4342b95b1fef498aaf2566" dependencies = [ "anchor-client", "anchor-lang", diff --git a/examples/functions/01_basic_oracle/Cargo.toml b/examples/functions/01_basic_oracle/Cargo.toml index aaaeb7e..9f329c7 100644 --- a/examples/functions/01_basic_oracle/Cargo.toml +++ b/examples/functions/01_basic_oracle/Cargo.toml @@ -17,10 +17,7 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -switchboard-solana = { version = "=0.9.1" } -# switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" } +switchboard-solana = { version = "=0.9.5" } +# switchboard-solana = { version = "0.9.4", path = "../../../rust/switchboard-solana" } bytemuck = "^1" -anchor-lang = { version = "0.28.0", features = [ - "init-if-needed", - "allow-missing-optionals" -] } \ No newline at end of file +anchor-lang = { version = "0.28.0" } diff --git a/examples/functions/01_basic_oracle/sgx-function/.gitignore b/examples/functions/01_basic_oracle/sgx-function/.gitignore index 65925b5..a6fcb1d 100644 --- a/examples/functions/01_basic_oracle/sgx-function/.gitignore +++ b/examples/functions/01_basic_oracle/sgx-function/.gitignore @@ -3,10 +3,6 @@ debug/ target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -# Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/examples/functions/01_basic_oracle/sgx-function/Cargo.toml b/examples/functions/01_basic_oracle/sgx-function/Cargo.toml index b349696..68bf0a4 100644 --- a/examples/functions/01_basic_oracle/sgx-function/Cargo.toml +++ b/examples/functions/01_basic_oracle/sgx-function/Cargo.toml @@ -14,4 +14,5 @@ futures = "0.3" serde = "^1" serde_json = "^1" switchboard-utils = { version = "0.8.0" } -switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" } +# switchboard-solana = { version = "0.9.4", path = "../../../rust/switchboard-solana" } +switchboard-solana = "0.9.5" diff --git a/examples/functions/01_basic_oracle/sgx-function/Dockerfile b/examples/functions/01_basic_oracle/sgx-function/Dockerfile index 679fd68..a8e0261 100644 --- a/examples/functions/01_basic_oracle/sgx-function/Dockerfile +++ b/examples/functions/01_basic_oracle/sgx-function/Dockerfile @@ -26,6 +26,6 @@ WORKDIR /sgx COPY --from=builder /sgx/app /sgx # Get the measurement from the enclave -RUN /get_measurement.sh +RUN /get_measurement.sh && cat /measurement.txt ENTRYPOINT ["bash", "/boot.sh"] diff --git a/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs b/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs index 4202e84..22ee824 100644 --- a/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs +++ b/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs @@ -15,10 +15,6 @@ pub struct RefreshPrices<'info> { function.load()?.validate( &enclave_signer.to_account_info() )? @ BasicOracleError::FunctionValidationFailed - // FunctionAccountData::validate( - // &function.to_account_info(), - // &enclave_signer.to_account_info() - // )? @ BasicOracleError::FunctionValidationFailed )] pub function: AccountLoader<'info, FunctionAccountData>, pub enclave_signer: Signer<'info>, diff --git a/examples/functions/02_liquidity_oracle/sgx-function/src/main.rs b/examples/functions/02_liquidity_oracle/sgx-function/src/main.rs index 12f1de8..6bb271f 100644 --- a/examples/functions/02_liquidity_oracle/sgx-function/src/main.rs +++ b/examples/functions/02_liquidity_oracle/sgx-function/src/main.rs @@ -76,4 +76,4 @@ async fn main() { // // Finally, emit the signed quote and partially signed transaction to the functionRunner oracle // // The functionRunner oracle will use the last outputted word to stdout as the serialized result. This is what gets executed on-chain. // runner.emit(ixs).await.unwrap(); -} +} \ No newline at end of file diff --git a/examples/functions/04_randomness_callback/Anchor.toml b/examples/functions/04_randomness_callback/Anchor.toml index 612b6a7..e513cbf 100644 --- a/examples/functions/04_randomness_callback/Anchor.toml +++ b/examples/functions/04_randomness_callback/Anchor.toml @@ -14,7 +14,7 @@ url = "https://api.apr.dev" [provider] # cluster = "Localnet" cluster = "https://api.devnet.solana.com" -wallet = "~/.config/solana/id.json" +wallet = "~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json" [scripts] test = "pnpm exec ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" @@ -44,4 +44,4 @@ address = "sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx" address = "5ExuoQR69trmKQfB95fDsUGsUrrChbGq9PFgt8qouncz" [[test.validator.clone]] # sb devnet programState -address = "5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS" +address = "5MFs7RGTjLi1wtKNBFRtuLipCkkjs4YQwRRU9sjnbQbS" \ No newline at end of file diff --git a/examples/functions/04_randomness_callback/sgx-function/Cargo.lock b/examples/functions/04_randomness_callback/sgx-function/Cargo.lock index 7078ca0..76f133c 100644 --- a/examples/functions/04_randomness_callback/sgx-function/Cargo.lock +++ b/examples/functions/04_randomness_callback/sgx-function/Cargo.lock @@ -267,7 +267,7 @@ checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" dependencies = [ "anyhow", "bs58 0.5.0", - "heck", + "heck 0.3.3", "proc-macro2 1.0.64", "quote 1.0.29", "serde", @@ -856,6 +856,15 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +[[package]] +name = "bytestring" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae" +dependencies = [ + "bytes", +] + [[package]] name = "caps" version = "0.5.5" @@ -1152,9 +1161,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -1162,9 +1171,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", @@ -1176,9 +1185,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote 1.0.29", @@ -1440,6 +1449,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.26" @@ -1456,6 +1471,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1688,6 +1718,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1825,6 +1861,19 @@ dependencies = [ "tokio-rustls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.57" @@ -1972,6 +2021,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonpath-rust" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7ea2fa3ba7d1404aa6b094aceec1d49106ec0110b40c40b76cedae148837a3b" +dependencies = [ + "pest", + "pest_derive", + "regex", + "serde_json", +] + [[package]] name = "jsonrpc-core" version = "18.0.0" @@ -2179,6 +2240,30 @@ dependencies = [ "winapi", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "nix" version = "0.26.2" @@ -2401,12 +2486,50 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "openssl" +version = "0.10.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2 1.0.64", + "quote 1.0.29", + "syn 2.0.25", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "os_str_bytes" version = "6.5.1" @@ -2509,6 +2632,60 @@ dependencies = [ "num", ] +[[package]] +name = "pest" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2 1.0.64", + "quote 1.0.29", + "syn 2.0.25", +] + +[[package]] +name = "pest_meta" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.7", +] + +[[package]] +name = "petgraph" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap 1.9.3", +] + [[package]] name = "pin-project-lite" version = "0.2.10" @@ -2558,9 +2735,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.3.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +checksum = "d220334a184db82b31b83f5ff093e3315280fb2b6bbc032022b2304a509aab7a" [[package]] name = "ppv-lite86" @@ -2568,6 +2745,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2 1.0.64", + "syn 1.0.109", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -2605,6 +2792,62 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.64", + "quote 1.0.29", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + [[package]] name = "ptr_meta" version = "0.1.4" @@ -2625,6 +2868,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pulldown-cmark" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "10.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0194e6e1966c23cc5fd988714f85b18d548d773e81965413555d96569931833d" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "qstring" version = "0.7.2" @@ -2794,6 +3057,7 @@ version = "0.1.0" dependencies = [ "futures", "switchboard-solana", + "switchboard-utils", "tokio", ] @@ -2863,9 +3127,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -2904,10 +3168,12 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -2917,6 +3183,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "tokio", + "tokio-native-tls", "tokio-rustls", "tokio-util", "tower-service", @@ -3210,9 +3477,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" dependencies = [ "itoa", "ryu", @@ -4236,6 +4503,18 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" +[[package]] +name = "switchboard-common" +version = "0.8.5" +dependencies = [ + "getrandom 0.2.10", + "hex", + "serde", + "serde_json", + "sgx-quote", + "sha2 0.10.7", +] + [[package]] name = "switchboard-common" version = "0.8.5" @@ -4252,9 +4531,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de2a369288d08e418ef86a6328f8d8f32e461c025d736f03ba163a7b822749" +version = "0.9.2" dependencies = [ "anchor-client", "anchor-lang", @@ -4270,10 +4547,32 @@ dependencies = [ "solana-client", "solana-program", "superslice", - "switchboard-common", + "switchboard-common 0.8.5", "tokio", ] +[[package]] +name = "switchboard-utils" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e18a6e7377b936fbd485fa641e6c2c7ad37e03336da90ef554c81df25369ecac" +dependencies = [ + "bytes", + "bytestring", + "futures-channel", + "futures-util", + "jsonpath-rust", + "prost", + "prost-build", + "reqwest", + "serde", + "serde_derive", + "serde_json", + "switchboard-common 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio", + "url", +] + [[package]] name = "syn" version = "0.15.44" @@ -4486,6 +4785,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.23.4" @@ -4555,9 +4864,9 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" dependencies = [ "indexmap 2.0.0", "toml_datetime", @@ -4637,6 +4946,21 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -4740,6 +5064,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "vec_map" version = "0.8.2" @@ -4880,6 +5210,17 @@ dependencies = [ "webpki", ] +[[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + [[package]] name = "winapi" version = "0.3.9" @@ -5069,9 +5410,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.9" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] diff --git a/javascript/sbv2-lite/.gitignore b/javascript/sbv2-lite/.gitignore new file mode 100644 index 0000000..9b26ed0 --- /dev/null +++ b/javascript/sbv2-lite/.gitignore @@ -0,0 +1,2 @@ +node_modules +lib \ No newline at end of file diff --git a/javascript/sbv2-lite/.npmignore b/javascript/sbv2-lite/.npmignore new file mode 100644 index 0000000..1a82a71 --- /dev/null +++ b/javascript/sbv2-lite/.npmignore @@ -0,0 +1 @@ +*.tsbuildinfo \ No newline at end of file diff --git a/javascript/sbv2-lite/LICENSE b/javascript/sbv2-lite/LICENSE new file mode 100644 index 0000000..8e9663d --- /dev/null +++ b/javascript/sbv2-lite/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Switchboard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/javascript/sbv2-lite/README.md b/javascript/sbv2-lite/README.md new file mode 100644 index 0000000..d5ac856 --- /dev/null +++ b/javascript/sbv2-lite/README.md @@ -0,0 +1,42 @@ +# Switchboard V2 Lite + +A lightweight library to decode and parse aggregator accounts + +[![npm](https://img.shields.io/npm/v/@switchboard-xyz/sbv2-lite)](https://www.npmjs.com/package/@switchboard-xyz/sbv2-lite)   +[![twitter](https://badgen.net/twitter/follow/switchboardxyz)](https://twitter.com/switchboardxyz)   + +## Install + +``` +npm i @switchboard-xyz/sbv2-lite +``` + +## Example + +```ts +import SwitchboardProgram from "@switchboard-xyz/sbv2-lite"; + +// + +const sbv2 = await SwitchboardProgram.loadDevnet(); + +// SOL_USD Aggregator https://switchboard.xyz/explorer +const solAggregator = new anchor.web3.PublicKey( + "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR" +); + +const accountInfo = await sbv2.program.provider.connection.getAccountInfo( + solAggregator +); +if (!accountInfo) { + throw new Error(`failed to fetch account info`); +} + +// Get latest value if its been updated in the last 300 seconds +const latestResult = sbv2.decodeLatestAggregatorValue(accountInfo, 300); +if (latestResult === null) { + throw new Error(`failed to fetch latest result for aggregator`); +} +console.log(`latestResult: ${latestResult}`); +// latestResult: 105.673205 +``` diff --git a/javascript/sbv2-lite/package.json b/javascript/sbv2-lite/package.json new file mode 100644 index 0000000..a4f58c4 --- /dev/null +++ b/javascript/sbv2-lite/package.json @@ -0,0 +1,58 @@ +{ + "name": "@switchboard-xyz/sbv2-lite", + "version": "0.2.1", + "description": "", + "private": false, + "repository": { + "type": "git", + "url": "https://github.com/switchboard-xyz/sbv2-solana", + "directory": "javascript/sbv2-lite" + }, + "homepage": "https://docs.switchboard.xyz", + "files": [ + "lib", + "src" + ], + "exports": { + ".": { + "import": "./lib/esm/index.js", + "require": "./lib/cjs/index.js" + } + }, + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/cjs/index.d.ts", + "scripts": { + "docgen": "typedoc --entryPoints src/index.ts --out ../../website/static/api/ts-lite", + "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'tests/**/*.ts'", + "build": "shx rm -rf lib && tsc && tsc -p tsconfig.cjs.json", + "watch": "tsc -p tsconfig.cjs.json --watch", + "prepublishOnly": "pnpm build && pnpm test" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@coral-xyz/anchor": "^0.28.0", + "big.js": "^6.1.1" + }, + "devDependencies": { + "@types/big.js": "^6.1.3", + "@types/chai": "^4.3.1", + "@types/mocha": "^9.1.0", + "@types/node": "^18.7.18", + "assert": "^2.0.0", + "chai": "^4.3.6", + "mocha": "^9.2.2", + "shx": "^0.3.4", + "ts-node": "^10.9.1", + "typedoc": "^0.23.8", + "typescript": "^5.1.6" + }, + "pre-commit": [ + "build" + ], + "engines": { + "npm": ">=7.0.0", + "node": ">=16.0.0" + } +} diff --git a/javascript/sbv2-lite/src/index.ts b/javascript/sbv2-lite/src/index.ts new file mode 100644 index 0000000..078a2ab --- /dev/null +++ b/javascript/sbv2-lite/src/index.ts @@ -0,0 +1,243 @@ +import type { SwitchboardV2 } from "./switchboard_v2"; + +import * as anchor from "@coral-xyz/anchor"; +import Big from "big.js"; + +export * from "./switchboard_v2"; + +// import idl from "./idl.json"; + +// export const IDL: anchor.Idl = idl; + +// export const IDL: anchor.Idl = await import("./idl.json", { +// assert: { type: "json" }, +// }); + +/** + * Check if a transaction object is a VersionedTransaction or not + * + * @param tx + * @returns bool + */ +export const isVersionedTransaction = ( + tx +): tx is anchor.web3.VersionedTransaction => { + return "version" in tx; +}; + +export class AnchorWallet implements anchor.Wallet { + constructor(readonly payer: anchor.web3.Keypair) {} + + get publicKey(): anchor.web3.PublicKey { + return this.payer.publicKey; + } + + async signTransaction< + T extends anchor.web3.Transaction | anchor.web3.VersionedTransaction + >(tx: T): Promise { + if (isVersionedTransaction(tx)) { + tx.sign([this.payer]); + } else { + tx.partialSign(this.payer); + } + + return tx; + } + + async signAllTransactions< + T extends anchor.web3.Transaction | anchor.web3.VersionedTransaction + >(txs: T[]): Promise { + return txs.map((t) => { + if (isVersionedTransaction(t)) { + t.sign([this.payer]); + } else { + t.partialSign(this.payer); + } + return t; + }); + } +} + +/** A Switchboard V2 wrapper to assist in decoding onchain accounts */ +export default class SwitchboardProgram { + /** + * Switchboard Mainnet Program ID + * SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f + */ + public static oracleProgramId = new anchor.web3.PublicKey( + "SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f" + ); + + /** + * Default confirmation options for fetching Solana data + */ + public static defaultConfirmOptions: anchor.web3.ConfirmOptions = { + commitment: "confirmed", + }; + + /** + * Switchboard Anchor program object + */ + public program: anchor.Program; + + /** + * Selected Solana cluster + */ + public cluster: "devnet" | "mainnet-beta"; + + constructor( + program: anchor.Program, + cluster: "devnet" | "mainnet-beta" + ) { + this.program = program; + this.cluster = cluster; + } + + /** + * Return the Switchboard program + * @param connection optional connection object if not using the default endpoints + * @param confirmOptions optional confirmation options. defaults to commitment level 'confirmed' + */ + public static async load( + connection = new anchor.web3.Connection( + anchor.web3.clusterApiUrl("devnet") + ), + confirmOptions = SwitchboardProgram.defaultConfirmOptions + ): Promise { + const provider = new anchor.AnchorProvider( + connection, + new AnchorWallet( + anchor.web3.Keypair.fromSeed(new Uint8Array(32).fill(1)) + ), + confirmOptions + ); + + const anchorIdl = await anchor.Program.fetchIdl( + SwitchboardProgram.oracleProgramId, + provider + ); + if (!anchorIdl) { + throw new Error( + `failed to read devnet idl for ${SwitchboardProgram.oracleProgramId}` + ); + } + + const program = new anchor.Program( + anchorIdl, + SwitchboardProgram.oracleProgramId, + provider + ); + + return new SwitchboardProgram( + program as unknown as anchor.Program, + "devnet" + ); + } + + /** + * Return the Switchboard mainnet-beta program + * @param connection optional connection object if not using the default endpoints + * @param confirmOptions optional confirmation options. defaults to commitment level 'confirmed' + */ + public static async loadMainnet( + connection = new anchor.web3.Connection( + anchor.web3.clusterApiUrl("mainnet-beta") + ), + confirmOptions = SwitchboardProgram.defaultConfirmOptions + ): Promise { + return SwitchboardProgram.load(connection, confirmOptions); + } + + /** Parse an aggregators account data and return the latest confirmed result if valid + * @param aggregator an aggregators deserialized account data + * @param maxStaleness the maximum duration in seconds before a result is considered invalid. Defaults to 0 which ignores any checks + * @returns latest confirmed result as a big.js or null if the latest confirmed round has insufficient oracle responses or data is too stale + */ + private getLatestAggregatorValue( + aggregator: any, + maxStaleness = 0 + ): Big | null { + if ((aggregator.latestConfirmedRound?.numSuccess ?? 0) === 0) { + return null; + } + if (maxStaleness !== 0) { + const now = new anchor.BN(Date.now() / 1000); + const latestRoundTimestamp: anchor.BN = + aggregator.latestConfirmedRound.roundOpenTimestamp; + const staleness = now.sub(latestRoundTimestamp); + if (staleness.gt(new anchor.BN(maxStaleness))) { + return null; + } + } + + const mantissa = new Big( + aggregator.latestConfirmedRound.result.mantissa.toString() + ); + const scale = aggregator.latestConfirmedRound.result.scale; + const oldDp = Big.DP; + Big.DP = 20; + const result: Big = mantissa.div(new Big(10).pow(scale)); + Big.DP = oldDp; + return result; + } + + /** Fetch and decode an aggregator account + * @param aggregatorPubkey the aggregator's public key + * @param commitment optional connection commitment level + * @returns deserialized aggregator account, as specified by the Switchboard IDL + */ + public async fetchAggregator( + aggregatorPubkey: anchor.web3.PublicKey, + commitment?: anchor.web3.Commitment + ): Promise { + const aggregator: any = + await this.program.account.aggregatorAccountData?.fetch( + aggregatorPubkey, + commitment + ); + aggregator.ebuf = undefined; + return aggregator; + } + + /** Fetch and decode an aggregator's latest confirmed value if valid + * @param aggregatorPubkey the aggregator's public key + * @param commitment optional connection commitment level + * @param maxStaleness the maximum duration in seconds before a result is considered invalid. Defaults to 0 which ignores any checks + * @returns latest confirmed result as a big.js or null if the latest confirmed round has insufficient oracle responses or data is too stale + */ + public async fetchAggregatorLatestValue( + aggregatorPubkey: anchor.web3.PublicKey, + commitment?: anchor.web3.Commitment, + maxStaleness = 0 + ): Promise { + const aggregator = await this.fetchAggregator(aggregatorPubkey, commitment); + return this.getLatestAggregatorValue(aggregator, maxStaleness); + } + + /** Decode an aggregator's account info + * @param accountInfo the aggregatror's account info + * @returns deserialized aggregator account, as specified by the Switchboard IDL + */ + public decodeAggregator(accountInfo: anchor.web3.AccountInfo): any { + const coder = new anchor.BorshAccountsCoder(this.program.idl); + const aggregator: any = coder.decode( + "AggregatorAccountData", + accountInfo?.data + ); + aggregator.ebuf = undefined; + return aggregator; + } + + /** Decode an aggregator and get the latest confirmed round + * @param accountInfo the aggregator's account info + * @param maxStaleness the maximum duration in seconds before a result is considered invalid. Defaults to 0 which ignores any checks + * @returns latest confirmed result as a big.js or null if the latest confirmed round has insufficient oracle responses or data is too stale + */ + public decodeLatestAggregatorValue( + accountInfo: anchor.web3.AccountInfo, + maxStaleness = 0 + ): Big | null { + const aggregator = this.decodeAggregator(accountInfo); + return this.getLatestAggregatorValue(aggregator, maxStaleness); + } +} diff --git a/javascript/sbv2-lite/src/switchboard_v2.ts b/javascript/sbv2-lite/src/switchboard_v2.ts new file mode 100644 index 0000000..a275aaa --- /dev/null +++ b/javascript/sbv2-lite/src/switchboard_v2.ts @@ -0,0 +1,15609 @@ +export type SwitchboardV2 = { + version: "0.1.0"; + name: "switchboard_v2"; + instructions: [ + { + name: "aggregatorClose"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "solDest"; + isMut: false; + isSigner: false; + }, + { + name: "escrowDest"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "crank"; + isMut: true; + isSigner: false; + isOptional: true; + docs: ["Optional accounts"]; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + isOptional: true; + }, + { + name: "slidingWindow"; + isMut: true; + isSigner: false; + isOptional: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorCloseParams"; + }; + } + ]; + }, + { + name: "setBumps"; + accounts: [ + { + name: "state"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "SetBumpsParams"; + }; + } + ]; + }, + { + name: "aggregatorAddJob"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "job"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorAddJobParams"; + }; + } + ]; + }, + { + name: "aggregatorInit"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorInitParams"; + }; + } + ]; + }, + { + name: "aggregatorLock"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorLockParams"; + }; + } + ]; + }, + { + name: "aggregatorOpenRound"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payoutWallet"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorOpenRoundParams"; + }; + } + ]; + }, + { + name: "aggregatorRemoveJob"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "job"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorRemoveJobParams"; + }; + } + ]; + }, + { + name: "aggregatorSaveResult"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "feedPermission"; + isMut: true; + isSigner: false; + }, + { + name: "oraclePermission"; + isMut: false; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "historyBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSaveResultParams"; + }; + } + ]; + }, + { + name: "aggregatorSaveResultV2"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "feedPermission"; + isMut: true; + isSigner: false; + }, + { + name: "oraclePermission"; + isMut: false; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "historyBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSaveResultParams"; + }; + } + ]; + }, + { + name: "aggregatorTeeSaveResult"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "feedPermission"; + isMut: true; + isSigner: false; + }, + { + name: "oraclePermission"; + isMut: false; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "historyBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "slider"; + isMut: true; + isSigner: false; + }, + { + name: "quote"; + isMut: false; + isSigner: true; + }, + { + name: "rewardWallet"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorTeeSaveResultParams"; + }; + } + ]; + }, + { + name: "aggregatorSetAuthority"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "newAuthority"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSetAuthorityParams"; + }; + } + ]; + }, + { + name: "aggregatorSetConfig"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSetConfigParams"; + }; + } + ]; + }, + { + name: "aggregatorSetResolutionMode"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "slidingWindow"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSetResolutionModeParams"; + }; + } + ]; + }, + { + name: "aggregatorSetHistoryBuffer"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "buffer"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSetHistoryBufferParams"; + }; + } + ]; + }, + { + name: "aggregatorSetQueue"; + accounts: [ + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "AggregatorSetQueueParams"; + }; + } + ]; + }, + { + name: "bufferRelayerInit"; + accounts: [ + { + name: "bufferRelayer"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "job"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "associatedTokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "BufferRelayerInitParams"; + }; + } + ]; + }, + { + name: "bufferRelayerOpenRound"; + accounts: [ + { + name: "bufferRelayer"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "BufferRelayerOpenRoundParams"; + }; + } + ]; + }, + { + name: "bufferRelayerSaveResult"; + accounts: [ + { + name: "bufferRelayer"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracle"; + isMut: false; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "oracleWallet"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "BufferRelayerSaveResultParams"; + }; + } + ]; + }, + { + name: "crankInit"; + accounts: [ + { + name: "crank"; + isMut: true; + isSigner: true; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "buffer"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "CrankInitParams"; + }; + } + ]; + }, + { + name: "crankPop"; + accounts: [ + { + name: "crank"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payoutWallet"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "crankDataBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "queueDataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "CrankPopParams"; + }; + } + ]; + }, + { + name: "crankPopV2"; + accounts: [ + { + name: "crank"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payoutWallet"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "crankDataBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "queueDataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "CrankPopParamsV2"; + }; + } + ]; + }, + { + name: "crankPush"; + accounts: [ + { + name: "crank"; + isMut: true; + isSigner: false; + }, + { + name: "aggregator"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: false; + isSigner: false; + }, + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "CrankPushParams"; + }; + } + ]; + }, + { + name: "jobInit"; + accounts: [ + { + name: "job"; + isMut: true; + isSigner: true; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "JobInitParams"; + }; + } + ]; + }, + { + name: "jobSetData"; + accounts: [ + { + name: "job"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "JobSetDataParams"; + }; + } + ]; + }, + { + name: "leaseExtend"; + accounts: [ + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "aggregator"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "funder"; + isMut: true; + isSigner: false; + }, + { + name: "owner"; + isMut: true; + isSigner: true; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "LeaseExtendParams"; + }; + } + ]; + }, + { + name: "leaseInit"; + accounts: [ + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: true; + isSigner: false; + }, + { + name: "aggregator"; + isMut: false; + isSigner: false; + }, + { + name: "funder"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "owner"; + isMut: true; + isSigner: true; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "LeaseInitParams"; + }; + } + ]; + }, + { + name: "leaseSetAuthority"; + accounts: [ + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "withdrawAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "newAuthority"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "LeaseSetAuthorityParams"; + }; + } + ]; + }, + { + name: "leaseWithdraw"; + accounts: [ + { + name: "lease"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "aggregator"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "withdrawAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "withdrawAccount"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "LeaseWithdrawParams"; + }; + } + ]; + }, + { + name: "oracleHeartbeat"; + accounts: [ + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "tokenAccount"; + isMut: false; + isSigner: false; + }, + { + name: "gcOracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleHeartbeatParams"; + }; + } + ]; + }, + { + name: "oracleTeeHeartbeat"; + accounts: [ + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "tokenAccount"; + isMut: false; + isSigner: false; + }, + { + name: "gcOracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: true; + isSigner: false; + }, + { + name: "quote"; + isMut: false; + isSigner: true; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleTeeHeartbeatParams"; + }; + } + ]; + }, + { + name: "oracleInit"; + accounts: [ + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "wallet"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleInitParams"; + }; + } + ]; + }, + { + name: "oracleQueueInit"; + accounts: [ + { + name: "oracleQueue"; + isMut: true; + isSigner: true; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "buffer"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleQueueInitParams"; + }; + } + ]; + }, + { + name: "oracleQueueSetConfig"; + accounts: [ + { + name: "queue"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleQueueSetConfigParams"; + }; + } + ]; + }, + { + name: "oracleWithdraw"; + accounts: [ + { + name: "oracle"; + isMut: true; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "tokenAccount"; + isMut: true; + isSigner: false; + }, + { + name: "withdrawAccount"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "OracleWithdrawParams"; + }; + } + ]; + }, + { + name: "permissionInit"; + accounts: [ + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "granter"; + isMut: false; + isSigner: false; + }, + { + name: "grantee"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "PermissionInitParams"; + }; + } + ]; + }, + { + name: "permissionSet"; + accounts: [ + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "PermissionSetParams"; + }; + } + ]; + }, + { + name: "programConfig"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "programState"; + isMut: true; + isSigner: false; + }, + { + name: "daoMint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "ProgramConfigParams"; + }; + } + ]; + }, + { + name: "programInit"; + accounts: [ + { + name: "state"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "tokenMint"; + isMut: true; + isSigner: false; + }, + { + name: "vault"; + isMut: true; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "daoMint"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "ProgramInitParams"; + }; + } + ]; + }, + { + name: "vaultTransfer"; + accounts: [ + { + name: "state"; + isMut: false; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "to"; + isMut: true; + isSigner: false; + }, + { + name: "vault"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VaultTransferParams"; + }; + } + ]; + }, + { + name: "vrfInit"; + accounts: [ + { + name: "vrf"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfInitParams"; + }; + } + ]; + }, + { + name: "vrfCloseAction"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrf"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "solDest"; + isMut: false; + isSigner: false; + }, + { + name: "escrowDest"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfCloseParams"; + }; + } + ]; + }, + { + name: "vrfLiteCloseAction"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrfLite"; + isMut: true; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "solDest"; + isMut: false; + isSigner: false; + }, + { + name: "escrowDest"; + isMut: true; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfLiteCloseParams"; + }; + } + ]; + }, + { + name: "vrfLiteInit"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "vrf"; + isMut: true; + isSigner: true; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "associatedTokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfLiteInitParams"; + }; + } + ]; + }, + { + name: "vrfLiteProveAndVerify"; + accounts: [ + { + name: "vrfLite"; + isMut: true; + isSigner: false; + }, + { + name: "callbackPid"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "oracle"; + isMut: false; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracleWallet"; + isMut: true; + isSigner: false; + }, + { + name: "instructionsSysvar"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfLiteProveAndVerifyParams"; + }; + } + ]; + }, + { + name: "vrfLiteRequestRandomness"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrfLite"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "recentBlockhashes"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfLiteRequestRandomnessParams"; + }; + } + ]; + }, + { + name: "vrfPoolInit"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "vrfPool"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "associatedTokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + }, + { + name: "rent"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfPoolInitParams"; + }; + } + ]; + }, + { + name: "vrfPoolRemove"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrfPool"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfPoolRemoveParams"; + }; + } + ]; + }, + { + name: "vrfPoolAdd"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "vrfPool"; + isMut: true; + isSigner: false; + }, + { + name: "vrfLite"; + isMut: true; + isSigner: false; + }, + { + name: "queue"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfPoolAddParams"; + }; + } + ]; + }, + { + name: "vrfPoolRequest"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrfPool"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "mint"; + isMut: false; + isSigner: false; + }, + { + name: "queue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "recentBlockhashes"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfPoolRequestParams"; + }; + } + ]; + }, + { + name: "vrfProveAndVerify"; + accounts: [ + { + name: "vrf"; + isMut: true; + isSigner: false; + }, + { + name: "callbackPid"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "oracle"; + isMut: false; + isSigner: false; + }, + { + name: "oracleAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "oracleWallet"; + isMut: true; + isSigner: false; + }, + { + name: "instructionsSysvar"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfProveAndVerifyParams"; + }; + } + ]; + }, + { + name: "vrfRequestRandomness"; + accounts: [ + { + name: "authority"; + isMut: false; + isSigner: true; + }, + { + name: "vrf"; + isMut: true; + isSigner: false; + }, + { + name: "oracleQueue"; + isMut: true; + isSigner: false; + }, + { + name: "queueAuthority"; + isMut: false; + isSigner: false; + }, + { + name: "dataBuffer"; + isMut: false; + isSigner: false; + }, + { + name: "permission"; + isMut: true; + isSigner: false; + }, + { + name: "escrow"; + isMut: true; + isSigner: false; + }, + { + name: "payerWallet"; + isMut: true; + isSigner: false; + }, + { + name: "payerAuthority"; + isMut: false; + isSigner: true; + }, + { + name: "recentBlockhashes"; + isMut: false; + isSigner: false; + }, + { + name: "programState"; + isMut: false; + isSigner: false; + }, + { + name: "tokenProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfRequestRandomnessParams"; + }; + } + ]; + }, + { + name: "vrfSetCallback"; + accounts: [ + { + name: "vrf"; + isMut: true; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: true; + } + ]; + args: [ + { + name: "params"; + type: { + defined: "VrfSetCallbackParams"; + }; + } + ]; + } + ]; + accounts: [ + { + name: "sbState"; + type: { + kind: "struct"; + fields: [ + { + name: "authority"; + docs: ["The account authority permitted to make account changes."]; + type: "publicKey"; + }, + { + name: "tokenMint"; + docs: [ + "The token mint used for oracle rewards, aggregator leases, and other reward incentives." + ]; + type: "publicKey"; + }, + { + name: "tokenVault"; + docs: ["Token vault used by the program to receive kickbacks."]; + type: "publicKey"; + }, + { + name: "daoMint"; + docs: ["The token mint used by the DAO."]; + type: "publicKey"; + }, + { + name: "bump"; + docs: ["The PDA bump to derive the pubkey."]; + type: "u8"; + }, + { + name: "mrEnclaves"; + docs: ["Permitted enclave measurements"]; + type: { + array: [ + { + array: ["u8", 32]; + }, + 6 + ]; + }; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 799]; + }; + } + ]; + }; + }, + { + name: "taskSpecRecord"; + type: { + kind: "struct"; + fields: [ + { + name: "hash"; + type: { + defined: "Hash"; + }; + } + ]; + }; + }, + { + name: "aggregatorAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the aggregator to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + docs: ["Metadata of the aggregator to store on-chain."]; + type: { + array: ["u8", 128]; + }; + }, + { + name: "reserved1"; + docs: ["Reserved."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "queuePubkey"; + docs: ["Pubkey of the queue the aggregator belongs to."]; + type: "publicKey"; + }, + { + name: "oracleRequestBatchSize"; + docs: [ + "CONFIGS", + "Number of oracles assigned to an update request." + ]; + type: "u32"; + }, + { + name: "minOracleResults"; + docs: [ + "Minimum number of oracle responses required before a round is validated." + ]; + type: "u32"; + }, + { + name: "minJobResults"; + docs: [ + "Minimum number of job results before an oracle accepts a result." + ]; + type: "u32"; + }, + { + name: "minUpdateDelaySeconds"; + docs: [ + "Minimum number of seconds required between aggregator rounds." + ]; + type: "u32"; + }, + { + name: "startAfter"; + docs: [ + "Unix timestamp for which no feed update will occur before." + ]; + type: "i64"; + }, + { + name: "varianceThreshold"; + docs: [ + "Change percentage required between a previous round and the current round. If variance percentage is not met, reject new oracle responses." + ]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "forceReportPeriod"; + docs: [ + "Number of seconds for which, even if the variance threshold is not passed, accept new responses from oracles." + ]; + type: "i64"; + }, + { + name: "expiration"; + docs: ["Timestamp when the feed is no longer needed."]; + type: "i64"; + }, + { + name: "consecutiveFailureCount"; + docs: [ + "Counter for the number of consecutive failures before a feed is removed from a queue. If set to 0, failed feeds will remain on the queue." + ]; + type: "u64"; + }, + { + name: "nextAllowedUpdateTime"; + docs: ["Timestamp when the next update request will be available."]; + type: "i64"; + }, + { + name: "isLocked"; + docs: [ + "Flag for whether an aggregators configuration is locked for editing." + ]; + type: "bool"; + }, + { + name: "crankPubkey"; + docs: [ + "Optional, public key of the crank the aggregator is currently using. Event based feeds do not need a crank." + ]; + type: "publicKey"; + }, + { + name: "latestConfirmedRound"; + docs: [ + "Latest confirmed update request result that has been accepted as valid." + ]; + type: { + defined: "AggregatorRound"; + }; + }, + { + name: "currentRound"; + docs: [ + "Oracle results from the current round of update request that has not been accepted as valid yet." + ]; + type: { + defined: "AggregatorRound"; + }; + }, + { + name: "jobPubkeysData"; + docs: [ + "List of public keys containing the job definitions for how data is sourced off-chain by oracles." + ]; + type: { + array: ["publicKey", 16]; + }; + }, + { + name: "jobHashes"; + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment." + ]; + type: { + array: [ + { + defined: "Hash"; + }, + 16 + ]; + }; + }, + { + name: "jobPubkeysSize"; + docs: ["Number of jobs assigned to an oracle."]; + type: "u32"; + }, + { + name: "jobsChecksum"; + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment." + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "authority"; + docs: [ + "The account delegated as the authority for making account changes." + ]; + type: "publicKey"; + }, + { + name: "historyBuffer"; + docs: [ + "Optional, public key of a history buffer account storing the last N accepted results and their timestamps." + ]; + type: "publicKey"; + }, + { + name: "previousConfirmedRoundResult"; + docs: ["The previous confirmed round result."]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "previousConfirmedRoundSlot"; + docs: ["The slot when the previous confirmed round was opened."]; + type: "u64"; + }, + { + name: "disableCrank"; + docs: ["Whether an aggregator is permitted to join a crank."]; + type: "bool"; + }, + { + name: "jobWeights"; + docs: [ + "Job weights used for the weighted median of the aggregator's assigned job accounts." + ]; + type: { + array: ["u8", 16]; + }; + }, + { + name: "creationTimestamp"; + docs: ["Unix timestamp when the feed was created."]; + type: "i64"; + }, + { + name: "resolutionMode"; + docs: [ + "Use sliding window or round based resolution", + "NOTE: This changes result propogation in latest_round_result" + ]; + type: { + defined: "AggregatorResolutionMode"; + }; + }, + { + name: "basePriorityFee"; + type: "u32"; + }, + { + name: "priorityFeeBump"; + type: "u32"; + }, + { + name: "priorityFeeBumpPeriod"; + type: "u32"; + }, + { + name: "maxPriorityFeeMultiplier"; + type: "u32"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 122]; + }; + } + ]; + }; + }, + { + name: "slidingResultAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "data"; + type: { + array: [ + { + defined: "SlidingWindowElement"; + }, + 16 + ]; + }; + }, + { + name: "bump"; + type: "u8"; + }, + { + name: "ebuf"; + type: { + array: ["u8", 512]; + }; + } + ]; + }; + }, + { + name: "permissionAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "authority"; + docs: [ + "The authority that is allowed to set permissions for this account." + ]; + type: "publicKey"; + }, + { + name: "permissions"; + docs: [ + "The SwitchboardPermission enumeration assigned by the granter to the grantee." + ]; + type: "u32"; + }, + { + name: "granter"; + docs: [ + "Public key of account that is granting permissions to use its resources." + ]; + type: "publicKey"; + }, + { + name: "grantee"; + docs: [ + "Public key of account that is being assigned permissions to use a granters resources." + ]; + type: "publicKey"; + }, + { + name: "expiration"; + docs: [ + "unused currently. may want permission PDA per permission for", + "unique expiration periods, BUT currently only one permission", + "per account makes sense for the infra. Dont over engineer." + ]; + type: "i64"; + }, + { + name: "bump"; + docs: ["The PDA bump to derive the pubkey."]; + type: "u8"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 255]; + }; + } + ]; + }; + }, + { + name: "realmSpawnRecordAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "ebuf"; + type: { + array: ["u8", 256]; + }; + } + ]; + }; + }, + { + name: "leaseAccountData"; + docs: ["This should be any ccount that links a permission to an escrow"]; + type: { + kind: "struct"; + fields: [ + { + name: "escrow"; + docs: [ + "Public key of the token account holding the lease contract funds until rewarded to oracles for successfully processing updates" + ]; + type: "publicKey"; + }, + { + name: "queue"; + docs: [ + "Public key of the oracle queue that the lease contract is applicable for." + ]; + type: "publicKey"; + }, + { + name: "aggregator"; + docs: [ + "Public key of the aggregator that the lease contract is applicable for" + ]; + type: "publicKey"; + }, + { + name: "tokenProgram"; + docs: ["Public key of the Solana token program ID."]; + type: "publicKey"; + }, + { + name: "isActive"; + docs: ["Whether the lease contract is still active."]; + type: "bool"; + }, + { + name: "crankRowCount"; + docs: ["Index of an aggregators position on a crank."]; + type: "u32"; + }, + { + name: "createdAt"; + docs: ["Timestamp when the lease contract was created."]; + type: "i64"; + }, + { + name: "updateCount"; + docs: [ + "Counter keeping track of the number of updates for the given aggregator." + ]; + type: "u128"; + }, + { + name: "withdrawAuthority"; + docs: [ + "Public key of keypair that may withdraw funds from the lease at any time" + ]; + type: "publicKey"; + }, + { + name: "bump"; + docs: ["The PDA bump to derive the pubkey."]; + type: "u8"; + }, + { + name: "ebuf"; + type: { + array: ["u8", 255]; + }; + } + ]; + }; + }, + { + name: "oracleQueueAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the queue to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + docs: ["Metadata of the queue to store on-chain."]; + type: { + array: ["u8", 64]; + }; + }, + { + name: "authority"; + docs: [ + "The account delegated as the authority for making account changes or assigning permissions targeted at the queue." + ]; + type: "publicKey"; + }, + { + name: "oracleTimeout"; + docs: [ + "Interval when stale oracles will be removed if they fail to heartbeat." + ]; + type: "u32"; + }, + { + name: "reward"; + docs: [ + "Rewards to provide oracles and round openers on this queue." + ]; + type: "u64"; + }, + { + name: "minStake"; + docs: [ + "The minimum amount of stake oracles must present to remain on the queue." + ]; + type: "u64"; + }, + { + name: "slashingEnabled"; + docs: ["Whether slashing is enabled on this queue."]; + type: "bool"; + }, + { + name: "varianceToleranceMultiplier"; + docs: [ + "The tolerated variance amount oracle results can have from the accepted round result before being slashed.", + "slashBound = varianceToleranceMultiplier * stdDeviation Default: 2" + ]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "feedProbationPeriod"; + docs: [ + "Number of update rounds new feeds are on probation for.", + "If a feed returns 429s within probation period, auto disable permissions." + ]; + type: "u32"; + }, + { + name: "currIdx"; + docs: ["Current index of the oracle rotation."]; + type: "u32"; + }, + { + name: "size"; + docs: ["Current number of oracles on a queue."]; + type: "u32"; + }, + { + name: "gcIdx"; + docs: ["Garbage collection index."]; + type: "u32"; + }, + { + name: "consecutiveFeedFailureLimit"; + docs: [ + "Consecutive failure limit for a feed before feed permission is revoked." + ]; + type: "u64"; + }, + { + name: "consecutiveOracleFailureLimit"; + docs: [ + "Consecutive failure limit for an oracle before oracle permission is revoked." + ]; + type: "u64"; + }, + { + name: "unpermissionedFeedsEnabled"; + docs: [ + "Enabling this setting means data feeds do not need explicit permission to join the queue and request new values from its oracles." + ]; + type: "bool"; + }, + { + name: "unpermissionedVrfEnabled"; + docs: [ + "Enabling this setting means VRF accounts do not need explicit permission to join the queue and request new values from its oracles." + ]; + type: "bool"; + }, + { + name: "curatorRewardCut"; + docs: [ + "TODO: Revenue percentage rewarded to job curators overall." + ]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "lockLeaseFunding"; + docs: [ + "Prevent new leases from being funded n this queue.", + "Useful to turn down a queue for migrations, since authority is always immutable." + ]; + type: "bool"; + }, + { + name: "mint"; + docs: [ + "Token mint used for the oracle queue rewards and slashing." + ]; + type: "publicKey"; + }, + { + name: "enableBufferRelayers"; + docs: [ + "Whether oracles are permitted to fulfill buffer relayer update request." + ]; + type: "bool"; + }, + { + name: "enableTeeOnly"; + type: "bool"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 967]; + }; + }, + { + name: "maxSize"; + docs: ["Maximum number of oracles a queue can support."]; + type: "u32"; + }, + { + name: "dataBuffer"; + docs: [ + "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver successfully heartbeated before the queues `oracleTimeout`." + ]; + type: "publicKey"; + } + ]; + }; + }, + { + name: "crankAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the crank to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + docs: ["Metadata of the crank to store on-chain."]; + type: { + array: ["u8", 64]; + }; + }, + { + name: "queuePubkey"; + docs: ["Public key of the oracle queue who owns the crank."]; + type: "publicKey"; + }, + { + name: "pqSize"; + docs: ["Number of aggregators added to the crank."]; + type: "u32"; + }, + { + name: "maxRows"; + docs: [ + "Maximum number of aggregators allowed to be added to a crank." + ]; + type: "u32"; + }, + { + name: "jitterModifier"; + docs: ["Pseudorandom value added to next aggregator update time."]; + type: "u8"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 255]; + }; + }, + { + name: "dataBuffer"; + docs: [ + "The public key of the CrankBuffer account holding a collection of Aggregator pubkeys and their next allowed update time." + ]; + type: "publicKey"; + } + ]; + }; + }, + { + name: "oracleAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the oracle to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + docs: ["Metadata of the oracle to store on-chain."]; + type: { + array: ["u8", 128]; + }; + }, + { + name: "oracleAuthority"; + docs: [ + "The account delegated as the authority for making account changes or withdrawing funds from a staking wallet." + ]; + type: "publicKey"; + }, + { + name: "lastHeartbeat"; + docs: ["Unix timestamp when the oracle last heartbeated"]; + type: "i64"; + }, + { + name: "numInUse"; + docs: [ + "Flag dictating if an oracle is active and has heartbeated before the queue's oracle timeout parameter." + ]; + type: "u32"; + }, + { + name: "tokenAccount"; + docs: ["Stake account and reward/slashing wallet."]; + type: "publicKey"; + }, + { + name: "queuePubkey"; + docs: [ + "Public key of the oracle queue who has granted it permission to use its resources." + ]; + type: "publicKey"; + }, + { + name: "metrics"; + docs: ["Oracle track record."]; + type: { + defined: "OracleMetrics"; + }; + }, + { + name: "bump"; + docs: ["The PDA bump to derive the pubkey."]; + type: "u8"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 255]; + }; + } + ]; + }; + }, + { + name: "jobAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the job to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + docs: ["Metadata of the job to store on-chain."]; + type: { + array: ["u8", 64]; + }; + }, + { + name: "authority"; + docs: [ + "The account delegated as the authority for making account changes." + ]; + type: "publicKey"; + }, + { + name: "expiration"; + docs: ["Unix timestamp when the job is considered invalid"]; + type: "i64"; + }, + { + name: "hash"; + docs: ["Hash of the serialized data to prevent tampering."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "data"; + docs: [ + "Serialized protobuf containing the collection of task to retrieve data off-chain." + ]; + type: "bytes"; + }, + { + name: "referenceCount"; + docs: ["The number of data feeds referencing the job account.."]; + type: "u32"; + }, + { + name: "totalSpent"; + docs: [ + "The token amount funded into a feed that contains this job account." + ]; + type: "u64"; + }, + { + name: "createdAt"; + docs: ["Unix timestamp when the job was created on-chain."]; + type: "i64"; + }, + { + name: "isInitializing"; + type: "u8"; + } + ]; + }; + }, + { + name: "vrfAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "status"; + docs: ["The current status of the VRF account."]; + type: { + defined: "VrfStatus"; + }; + }, + { + name: "counter"; + docs: ["Incremental counter for tracking VRF rounds."]; + type: "u128"; + }, + { + name: "authority"; + docs: ["On-chain account delegated for making account changes."]; + type: "publicKey"; + }, + { + name: "oracleQueue"; + docs: [ + "The OracleQueueAccountData that is assigned to fulfill VRF update request." + ]; + type: "publicKey"; + }, + { + name: "escrow"; + docs: [ + "The token account used to hold funds for VRF update request." + ]; + type: "publicKey"; + }, + { + name: "callback"; + docs: [ + "The callback that is invoked when an update request is successfully verified." + ]; + type: { + defined: "CallbackZC"; + }; + }, + { + name: "batchSize"; + docs: ["The number of oracles assigned to a VRF update request."]; + type: "u32"; + }, + { + name: "builders"; + docs: [ + "Struct containing the intermediate state between VRF crank actions." + ]; + type: { + array: [ + { + defined: "VrfBuilder"; + }, + 8 + ]; + }; + }, + { + name: "buildersLen"; + docs: ["The number of builders."]; + type: "u32"; + }, + { + name: "testMode"; + type: "bool"; + }, + { + name: "currentRound"; + docs: [ + "Oracle results from the current round of update request that has not been accepted as valid yet" + ]; + type: { + defined: "VrfRound"; + }; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 1024]; + }; + } + ]; + }; + }, + { + name: "vrfLiteAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + docs: ["The bump used to derive the SbState account."]; + type: "u8"; + }, + { + name: "permissionBump"; + docs: ["The bump used to derive the permission account."]; + type: "u8"; + }, + { + name: "vrfPool"; + docs: ["The VrfPool the account belongs to."]; + type: "publicKey"; + }, + { + name: "status"; + docs: ["The current status of the VRF account."]; + type: { + defined: "VrfStatus"; + }; + }, + { + name: "result"; + docs: [ + "The VRF round result. Will be zeroized if still awaiting fulfillment." + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "counter"; + docs: ["Incremental counter for tracking VRF rounds."]; + type: "u128"; + }, + { + name: "alpha"; + docs: ["The alpha bytes used to calculate the VRF proof."]; + type: { + array: ["u8", 256]; + }; + }, + { + name: "alphaLen"; + docs: ["The number of bytes in the alpha buffer."]; + type: "u32"; + }, + { + name: "requestSlot"; + docs: ["The Slot when the VRF round was opened."]; + type: "u64"; + }, + { + name: "requestTimestamp"; + docs: ["The unix timestamp when the VRF round was opened."]; + type: "i64"; + }, + { + name: "authority"; + docs: ["On-chain account delegated for making account changes."]; + type: "publicKey"; + }, + { + name: "queue"; + docs: [ + "The OracleQueueAccountData that is assigned to fulfill VRF update request." + ]; + type: "publicKey"; + }, + { + name: "escrow"; + docs: [ + "The token account used to hold funds for VRF update request." + ]; + type: "publicKey"; + }, + { + name: "callback"; + docs: [ + "The callback that is invoked when an update request is successfully verified." + ]; + type: { + defined: "CallbackZC"; + }; + }, + { + name: "builder"; + docs: ["The incremental VRF proof calculation."]; + type: { + defined: "VrfBuilder"; + }; + }, + { + name: "expiration"; + type: "i64"; + }, + { + name: "ebuf"; + type: { + array: ["u8", 1024]; + }; + } + ]; + }; + }, + { + name: "vrfPoolAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "authority"; + docs: ["ACCOUNTS"]; + type: "publicKey"; + }, + { + name: "queue"; + type: "publicKey"; + }, + { + name: "escrow"; + type: "publicKey"; + }, + { + name: "minInterval"; + type: "u32"; + }, + { + name: "maxRows"; + type: "u32"; + }, + { + name: "size"; + type: "u32"; + }, + { + name: "idx"; + type: "u32"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "ebuf"; + type: { + array: ["u8", 135]; + }; + } + ]; + }; + }, + { + name: "bufferRelayerAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + docs: ["Name of the buffer account to store on-chain."]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "queuePubkey"; + docs: [ + "Public key of the OracleQueueAccountData that is currently assigned to fulfill buffer relayer update request." + ]; + type: "publicKey"; + }, + { + name: "escrow"; + docs: [ + "Token account to reward oracles for completing update request." + ]; + type: "publicKey"; + }, + { + name: "authority"; + docs: [ + "The account delegated as the authority for making account changes." + ]; + type: "publicKey"; + }, + { + name: "jobPubkey"; + docs: [ + "Public key of the JobAccountData that defines how the buffer relayer is updated." + ]; + type: "publicKey"; + }, + { + name: "jobHash"; + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment" + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "minUpdateDelaySeconds"; + docs: ["Minimum delay between update request."]; + type: "u32"; + }, + { + name: "isLocked"; + docs: [ + "Whether buffer relayer config is locked for further changes." + ]; + type: "bool"; + }, + { + name: "currentRound"; + docs: [ + "The current buffer relayer update round that is yet to be confirmed." + ]; + type: { + defined: "BufferRelayerRound"; + }; + }, + { + name: "latestConfirmedRound"; + docs: ["The latest confirmed buffer relayer update round."]; + type: { + defined: "BufferRelayerRound"; + }; + }, + { + name: "result"; + docs: ["The buffer holding the latest confirmed result."]; + type: "bytes"; + } + ]; + }; + } + ]; + types: [ + { + name: "AggregatorAddJobParams"; + type: { + kind: "struct"; + fields: [ + { + name: "weight"; + type: { + option: "u8"; + }; + } + ]; + }; + }, + { + name: "AggregatorCloseParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "AggregatorInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + type: { + array: ["u8", 128]; + }; + }, + { + name: "batchSize"; + type: "u32"; + }, + { + name: "minOracleResults"; + type: "u32"; + }, + { + name: "minJobResults"; + type: "u32"; + }, + { + name: "minUpdateDelaySeconds"; + type: "u32"; + }, + { + name: "startAfter"; + type: "i64"; + }, + { + name: "varianceThreshold"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "forceReportPeriod"; + type: "i64"; + }, + { + name: "expiration"; + type: "i64"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "disableCrank"; + type: "bool"; + } + ]; + }; + }, + { + name: "AggregatorLockParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "AggregatorOpenRoundParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "jitter"; + type: "u8"; + } + ]; + }; + }, + { + name: "AggregatorRemoveJobParams"; + type: { + kind: "struct"; + fields: [ + { + name: "jobIdx"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSaveResultParams"; + type: { + kind: "struct"; + fields: [ + { + name: "oracleIdx"; + type: "u32"; + }, + { + name: "error"; + type: "bool"; + }, + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "jobsChecksum"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "minResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "maxResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "feedPermissionBump"; + type: "u8"; + }, + { + name: "oraclePermissionBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "AggregatorSaveResultParamsV2"; + type: { + kind: "struct"; + fields: [ + { + name: "oracleIdx"; + type: "u32"; + }, + { + name: "error"; + type: "bool"; + }, + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "jobsChecksum"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "minResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "maxResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "feedPermissionBump"; + type: "u8"; + }, + { + name: "oraclePermissionBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "jobValues"; + type: { + vec: { + option: { + defined: "BorshDecimal"; + }; + }; + }; + } + ]; + }; + }, + { + name: "AggregatorSetAuthorityParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "AggregatorSetBatchSizeParams"; + type: { + kind: "struct"; + fields: [ + { + name: "batchSize"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSetConfigParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + option: { + array: ["u8", 32]; + }; + }; + }, + { + name: "metadata"; + type: { + option: { + array: ["u8", 128]; + }; + }; + }, + { + name: "minUpdateDelaySeconds"; + type: { + option: "u32"; + }; + }, + { + name: "minJobResults"; + type: { + option: "u32"; + }; + }, + { + name: "batchSize"; + type: { + option: "u32"; + }; + }, + { + name: "minOracleResults"; + type: { + option: "u32"; + }; + }, + { + name: "forceReportPeriod"; + type: { + option: "u32"; + }; + }, + { + name: "varianceThreshold"; + type: { + option: { + defined: "BorshDecimal"; + }; + }; + }, + { + name: "basePriorityFee"; + type: { + option: "u32"; + }; + }, + { + name: "priorityFeeBump"; + type: { + option: "u32"; + }; + }, + { + name: "priorityFeeBumpPeriod"; + type: { + option: "u32"; + }; + }, + { + name: "maxPriorityFeeMultiplier"; + type: { + option: "u32"; + }; + }, + { + name: "disableCrank"; + type: { + option: "bool"; + }; + } + ]; + }; + }, + { + name: "AggregatorSetForceReportPeriodParams"; + type: { + kind: "struct"; + fields: [ + { + name: "forceReportPeriod"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSetHistoryBufferParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "AggregatorSetMinJobsParams"; + type: { + kind: "struct"; + fields: [ + { + name: "minJobResults"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSetMinOraclesParams"; + type: { + kind: "struct"; + fields: [ + { + name: "minOracleResults"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSetQueueParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "AggregatorSetResolutionModeParams"; + type: { + kind: "struct"; + fields: [ + { + name: "mode"; + type: "u8"; + } + ]; + }; + }, + { + name: "AggregatorSetUpdateIntervalParams"; + type: { + kind: "struct"; + fields: [ + { + name: "newInterval"; + type: "u32"; + } + ]; + }; + }, + { + name: "AggregatorSetVarianceThresholdParams"; + type: { + kind: "struct"; + fields: [ + { + name: "varianceThreshold"; + type: { + defined: "BorshDecimal"; + }; + } + ]; + }; + }, + { + name: "AggregatorTeeSaveResultParams"; + type: { + kind: "struct"; + fields: [ + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "jobsChecksum"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "minResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "maxResponse"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "feedPermissionBump"; + type: "u8"; + }, + { + name: "oraclePermissionBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "BufferRelayerInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "minUpdateDelaySeconds"; + type: "u32"; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "BufferRelayerOpenRoundParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "BufferRelayerSaveResultParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "result"; + type: "bytes"; + }, + { + name: "success"; + type: "bool"; + } + ]; + }; + }, + { + name: "CrankInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: "bytes"; + }, + { + name: "metadata"; + type: "bytes"; + }, + { + name: "crankSize"; + type: "u32"; + } + ]; + }; + }, + { + name: "CrankPopParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "leaseBumps"; + type: "bytes"; + }, + { + name: "permissionBumps"; + type: "bytes"; + }, + { + name: "nonce"; + type: { + option: "u32"; + }; + }, + { + name: "failOpenOnAccountMismatch"; + type: { + option: "bool"; + }; + } + ]; + }; + }, + { + name: "CrankPopParamsV2"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "leaseBumps"; + type: "bytes"; + }, + { + name: "permissionBumps"; + type: "bytes"; + }, + { + name: "nonce"; + type: { + option: "u32"; + }; + }, + { + name: "failOpenOnAccountMismatch"; + type: { + option: "bool"; + }; + }, + { + name: "popIdx"; + type: { + option: "u32"; + }; + } + ]; + }; + }, + { + name: "CrankPushParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "notifiRef"; + type: { + option: { + array: ["u8", 64]; + }; + }; + } + ]; + }; + }, + { + name: "JobInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "expiration"; + type: "i64"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "data"; + type: "bytes"; + }, + { + name: "size"; + type: { + option: "u32"; + }; + } + ]; + }; + }, + { + name: "JobSetDataParams"; + type: { + kind: "struct"; + fields: [ + { + name: "data"; + type: "bytes"; + }, + { + name: "chunkIdx"; + type: "u8"; + } + ]; + }; + }, + { + name: "LeaseExtendParams"; + type: { + kind: "struct"; + fields: [ + { + name: "loadAmount"; + type: "u64"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "walletBumps"; + type: "bytes"; + } + ]; + }; + }, + { + name: "LeaseInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "loadAmount"; + type: "u64"; + }, + { + name: "withdrawAuthority"; + type: "publicKey"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "walletBumps"; + type: "bytes"; + } + ]; + }; + }, + { + name: "LeaseSetAuthorityParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "LeaseWithdrawParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "leaseBump"; + type: "u8"; + }, + { + name: "amount"; + type: "u64"; + } + ]; + }; + }, + { + name: "OracleHeartbeatParams"; + type: { + kind: "struct"; + fields: [ + { + name: "permissionBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "OracleInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: "bytes"; + }, + { + name: "metadata"; + type: "bytes"; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "oracleBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "OracleQueueInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "metadata"; + type: { + array: ["u8", 64]; + }; + }, + { + name: "reward"; + type: "u64"; + }, + { + name: "minStake"; + type: "u64"; + }, + { + name: "feedProbationPeriod"; + type: "u32"; + }, + { + name: "oracleTimeout"; + type: "u32"; + }, + { + name: "slashingEnabled"; + type: "bool"; + }, + { + name: "varianceToleranceMultiplier"; + type: { + defined: "BorshDecimal"; + }; + }, + { + name: "consecutiveFeedFailureLimit"; + type: "u64"; + }, + { + name: "consecutiveOracleFailureLimit"; + type: "u64"; + }, + { + name: "queueSize"; + type: "u32"; + }, + { + name: "unpermissionedFeeds"; + type: "bool"; + }, + { + name: "unpermissionedVrf"; + type: "bool"; + }, + { + name: "enableBufferRelayers"; + type: "bool"; + }, + { + name: "enableTeeOnly"; + type: "bool"; + } + ]; + }; + }, + { + name: "OracleQueueSetConfigParams"; + type: { + kind: "struct"; + fields: [ + { + name: "name"; + type: { + option: { + array: ["u8", 32]; + }; + }; + }, + { + name: "metadata"; + type: { + option: { + array: ["u8", 64]; + }; + }; + }, + { + name: "unpermissionedFeedsEnabled"; + type: { + option: "bool"; + }; + }, + { + name: "unpermissionedVrfEnabled"; + type: { + option: "bool"; + }; + }, + { + name: "enableBufferRelayers"; + type: { + option: "bool"; + }; + }, + { + name: "varianceToleranceMultiplier"; + type: { + option: { + defined: "BorshDecimal"; + }; + }; + }, + { + name: "slashingEnabled"; + type: { + option: "bool"; + }; + }, + { + name: "reward"; + type: { + option: "u64"; + }; + }, + { + name: "minStake"; + type: { + option: "u64"; + }; + }, + { + name: "oracleTimeout"; + type: { + option: "u32"; + }; + }, + { + name: "consecutiveFeedFailureLimit"; + type: { + option: "u64"; + }; + }, + { + name: "consecutiveOracleFailureLimit"; + type: { + option: "u64"; + }; + }, + { + name: "enableTeeOnly"; + type: { + option: "bool"; + }; + } + ]; + }; + }, + { + name: "OracleQueueSetRewardsParams"; + type: { + kind: "struct"; + fields: [ + { + name: "rewards"; + type: "u64"; + } + ]; + }; + }, + { + name: "OracleTeeHeartbeatParams"; + type: { + kind: "struct"; + fields: [ + { + name: "permissionBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "OracleWithdrawParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "amount"; + type: "u64"; + } + ]; + }; + }, + { + name: "PermissionInitParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "PermissionSetParams"; + type: { + kind: "struct"; + fields: [ + { + name: "permission"; + type: { + defined: "SwitchboardPermission"; + }; + }, + { + name: "enable"; + type: "bool"; + } + ]; + }; + }, + { + name: "ProgramConfigParams"; + type: { + kind: "struct"; + fields: [ + { + name: "token"; + type: "publicKey"; + }, + { + name: "bump"; + type: "u8"; + }, + { + name: "daoMint"; + type: "publicKey"; + }, + { + name: "addEnclaves"; + type: { + vec: { + array: ["u8", 32]; + }; + }; + }, + { + name: "rmEnclaves"; + type: { + vec: { + array: ["u8", 32]; + }; + }; + } + ]; + }; + }, + { + name: "ProgramInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "SetBumpsParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "VaultTransferParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "amount"; + type: "u64"; + } + ]; + }; + }, + { + name: "VrfCloseParams"; + type: { + kind: "struct"; + fields: [ + { + name: "stateBump"; + type: "u8"; + }, + { + name: "permissionBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "VrfInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "callback"; + type: { + defined: "Callback"; + }; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "VrfLiteCloseParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "VrfLiteInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "callback"; + type: { + option: { + defined: "Callback"; + }; + }; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "expiration"; + type: { + option: "i64"; + }; + } + ]; + }; + }, + { + name: "VrfLiteProveAndVerifyParams"; + type: { + kind: "struct"; + fields: [ + { + name: "nonce"; + type: { + option: "u32"; + }; + }, + { + name: "proof"; + type: "bytes"; + }, + { + name: "proofEncoded"; + type: "string"; + }, + { + name: "counter"; + type: "u128"; + } + ]; + }; + }, + { + name: "VrfLiteRequestRandomnessParams"; + type: { + kind: "struct"; + fields: [ + { + name: "callback"; + type: { + option: { + defined: "Callback"; + }; + }; + } + ]; + }; + }, + { + name: "VrfPoolAddParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "VrfPoolInitParams"; + type: { + kind: "struct"; + fields: [ + { + name: "maxRows"; + type: "u32"; + }, + { + name: "minInterval"; + type: "u32"; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "VrfPoolRemoveParams"; + type: { + kind: "struct"; + fields: []; + }; + }, + { + name: "VrfPoolRequestParams"; + type: { + kind: "struct"; + fields: [ + { + name: "callback"; + type: { + option: { + defined: "Callback"; + }; + }; + } + ]; + }; + }, + { + name: "VrfProveParams"; + type: { + kind: "struct"; + fields: [ + { + name: "proof"; + type: "bytes"; + }, + { + name: "idx"; + type: "u32"; + } + ]; + }; + }, + { + name: "VrfProveAndVerifyParams"; + type: { + kind: "struct"; + fields: [ + { + name: "nonce"; + type: { + option: "u32"; + }; + }, + { + name: "stateBump"; + type: "u8"; + }, + { + name: "idx"; + type: "u32"; + }, + { + name: "proof"; + type: "bytes"; + }, + { + name: "proofEncoded"; + type: "string"; + }, + { + name: "counter"; + type: "u128"; + } + ]; + }; + }, + { + name: "VrfRequestRandomnessParams"; + type: { + kind: "struct"; + fields: [ + { + name: "permissionBump"; + type: "u8"; + }, + { + name: "stateBump"; + type: "u8"; + } + ]; + }; + }, + { + name: "VrfSetCallbackParams"; + type: { + kind: "struct"; + fields: [ + { + name: "callback"; + type: { + defined: "Callback"; + }; + } + ]; + }; + }, + { + name: "Callback"; + type: { + kind: "struct"; + fields: [ + { + name: "programId"; + type: "publicKey"; + }, + { + name: "accounts"; + type: { + vec: { + defined: "AccountMetaBorsh"; + }; + }; + }, + { + name: "ixData"; + type: "bytes"; + } + ]; + }; + }, + { + name: "EcvrfProofZC"; + type: { + kind: "struct"; + fields: [ + { + name: "gamma"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "c"; + type: { + defined: "Scalar"; + }; + }, + { + name: "s"; + type: { + defined: "Scalar"; + }; + } + ]; + }; + }, + { + name: "Scalar"; + docs: [ + "The `Scalar` struct holds an integer \\\\(s < 2\\^{255} \\\\) which", + "represents an element of \\\\(\\mathbb Z / \\ell\\\\)." + ]; + type: { + kind: "struct"; + fields: [ + { + name: "bytes"; + docs: [ + "`bytes` is a little-endian byte encoding of an integer representing a scalar modulo the", + "group order.", + "", + "# Invariant", + "", + "The integer representing this scalar must be bounded above by \\\\(2\\^{255}\\\\), or", + "equivalently the high bit of `bytes[31]` must be zero.", + "", + "This ensures that there is room for a carry bit when computing a NAF representation." + ]; + type: { + array: ["u8", 32]; + }; + } + ]; + }; + }, + { + name: "FieldElementZC"; + type: { + kind: "struct"; + fields: [ + { + name: "bytes"; + type: { + array: ["u64", 5]; + }; + } + ]; + }; + }, + { + name: "CompletedPointZC"; + type: { + kind: "struct"; + fields: [ + { + name: "x"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "y"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "z"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "t"; + type: { + defined: "FieldElementZC"; + }; + } + ]; + }; + }, + { + name: "EdwardsPointZC"; + type: { + kind: "struct"; + fields: [ + { + name: "x"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "y"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "z"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "t"; + type: { + defined: "FieldElementZC"; + }; + } + ]; + }; + }, + { + name: "ProjectivePointZC"; + type: { + kind: "struct"; + fields: [ + { + name: "x"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "y"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "z"; + type: { + defined: "FieldElementZC"; + }; + } + ]; + }; + }, + { + name: "EcvrfIntermediate"; + type: { + kind: "struct"; + fields: [ + { + name: "r"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "nS"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "d"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "t13"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "t15"; + type: { + defined: "FieldElementZC"; + }; + } + ]; + }; + }, + { + name: "BorshDecimal"; + type: { + kind: "struct"; + fields: [ + { + name: "mantissa"; + type: "i128"; + }, + { + name: "scale"; + type: "u32"; + } + ]; + }; + }, + { + name: "Quote"; + type: { + kind: "struct"; + fields: [ + { + name: "enclaveSigner"; + docs: ["The address of the signer generated within an enclave."]; + type: "publicKey"; + }, + { + name: "mrEnclave"; + docs: [ + "The quotes MRENCLAVE measurement dictating the contents of the secure enclave." + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "verificationStatus"; + docs: ["The VerificationStatus of the quote."]; + type: "u8"; + }, + { + name: "verificationTimestamp"; + docs: ["The unix timestamp when the quote was last verified."]; + type: "i64"; + }, + { + name: "validUntil"; + docs: [ + "The unix timestamp when the quotes verification status expires." + ]; + type: "i64"; + }, + { + name: "quoteRegistry"; + docs: [ + "The off-chain registry where the verifiers quote can be located." + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "registryKey"; + docs: [ + "Key to lookup the buffer data on IPFS or an alternative decentralized storage solution." + ]; + type: { + array: ["u8", 64]; + }; + }, + { + name: "ebuf"; + docs: ["Reserved."]; + type: { + array: ["u8", 256]; + }; + } + ]; + }; + }, + { + name: "VerifierAccountData"; + type: { + kind: "struct"; + fields: [ + { + name: "enclave"; + docs: ["Represents the state of the quote verifiers enclave."]; + type: { + defined: "Quote"; + }; + }, + { + name: "authority"; + docs: [ + "The authority of the EnclaveAccount which is permitted to make account changes." + ]; + type: "publicKey"; + }, + { + name: "attestationQueue"; + docs: [ + "Queue used for attestation to verify a MRENCLAVE measurement." + ]; + type: "publicKey"; + }, + { + name: "createdAt"; + docs: ["The unix timestamp when the quote was created."]; + type: "i64"; + }, + { + name: "isOnQueue"; + docs: [ + "Whether the quote is located on the AttestationQueues buffer." + ]; + type: "bool"; + }, + { + name: "lastHeartbeat"; + docs: ["The last time the quote heartbeated on-chain."]; + type: "i64"; + }, + { + name: "rewardEscrow"; + docs: [ + "The SwitchboardWallet account containing the reward escrow for verifying quotes on-chain.", + "We should set this whenever the operator changes so we dont need to pass another account and can verify with has_one." + ]; + type: "publicKey"; + }, + { + name: "stakeWallet"; + docs: [ + "The SwitchboardWallet account containing the queues required min_stake.", + "Needs to be separate from the reward_escrow. Allows easier 3rd party management of stake from rewards." + ]; + type: "publicKey"; + }, + { + name: "ebuf"; + docs: ["Reserved."]; + type: { + array: ["u8", 1024]; + }; + } + ]; + }; + }, + { + name: "Hash"; + type: { + kind: "struct"; + fields: [ + { + name: "data"; + docs: ["The bytes used to derive the hash."]; + type: { + array: ["u8", 32]; + }; + } + ]; + }; + }, + { + name: "SlidingWindowElement"; + type: { + kind: "struct"; + fields: [ + { + name: "oracleKey"; + type: "publicKey"; + }, + { + name: "value"; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "slot"; + type: "u64"; + }, + { + name: "timestamp"; + type: "i64"; + } + ]; + }; + }, + { + name: "AggregatorRound"; + type: { + kind: "struct"; + fields: [ + { + name: "numSuccess"; + docs: [ + "Maintains the number of successful responses received from nodes.", + "Nodes can submit one successful response per round." + ]; + type: "u32"; + }, + { + name: "numError"; + docs: ["Number of error responses."]; + type: "u32"; + }, + { + name: "isClosed"; + docs: ["Whether an update request round has ended."]; + type: "bool"; + }, + { + name: "roundOpenSlot"; + docs: [ + "Maintains the `solana_program::clock::Slot` that the round was opened at." + ]; + type: "u64"; + }, + { + name: "roundOpenTimestamp"; + docs: [ + "Maintains the `solana_program::clock::UnixTimestamp;` the round was opened at." + ]; + type: "i64"; + }, + { + name: "result"; + docs: [ + "Maintains the current median of all successful round responses." + ]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "stdDeviation"; + docs: ["Standard deviation of the accepted results in the round."]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "minResponse"; + docs: ["Maintains the minimum node response this round."]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "maxResponse"; + docs: ["Maintains the maximum node response this round."]; + type: { + defined: "SwitchboardDecimal"; + }; + }, + { + name: "oraclePubkeysData"; + docs: ["Pubkeys of the oracles fulfilling this round."]; + type: { + array: ["publicKey", 16]; + }; + }, + { + name: "mediansData"; + docs: [ + "Represents all successful node responses this round. `NaN` if empty." + ]; + type: { + array: [ + { + defined: "SwitchboardDecimal"; + }, + 16 + ]; + }; + }, + { + name: "currentPayout"; + docs: ["Current rewards/slashes oracles have received this round."]; + type: { + array: ["i64", 16]; + }; + }, + { + name: "mediansFulfilled"; + docs: ["Keep track of which responses are fulfilled here."]; + type: { + array: ["bool", 16]; + }; + }, + { + name: "errorsFulfilled"; + docs: ["Keeps track of which errors are fulfilled here."]; + type: { + array: ["bool", 16]; + }; + } + ]; + }; + }, + { + name: "AggregatorHistoryRow"; + type: { + kind: "struct"; + fields: [ + { + name: "timestamp"; + docs: ["The timestamp of the sample."]; + type: "i64"; + }, + { + name: "value"; + docs: ["The value of the sample."]; + type: { + defined: "SwitchboardDecimal"; + }; + } + ]; + }; + }, + { + name: "SwitchboardDecimal"; + type: { + kind: "struct"; + fields: [ + { + name: "mantissa"; + docs: [ + "The part of a floating-point number that represents the significant digits of that number,", + "and that is multiplied by the base, 10, raised to the power of scale to give the actual value of the number." + ]; + type: "i128"; + }, + { + name: "scale"; + docs: [ + "The number of decimal places to move to the left to yield the actual value." + ]; + type: "u32"; + } + ]; + }; + }, + { + name: "CrankRow"; + type: { + kind: "struct"; + fields: [ + { + name: "pubkey"; + docs: ["The PublicKey of the AggregatorAccountData."]; + type: "publicKey"; + }, + { + name: "nextTimestamp"; + docs: ["The aggregator's next available update time."]; + type: "i64"; + } + ]; + }; + }, + { + name: "OracleMetrics"; + type: { + kind: "struct"; + fields: [ + { + name: "consecutiveSuccess"; + docs: ["Number of consecutive successful update request."]; + type: "u64"; + }, + { + name: "consecutiveError"; + docs: [ + "Number of consecutive update request that resulted in an error." + ]; + type: "u64"; + }, + { + name: "consecutiveDisagreement"; + docs: [ + "Number of consecutive update request that resulted in a disagreement with the accepted median result." + ]; + type: "u64"; + }, + { + name: "consecutiveLateResponse"; + docs: [ + "Number of consecutive update request that were posted on-chain late and not included in an accepted result." + ]; + type: "u64"; + }, + { + name: "consecutiveFailure"; + docs: [ + "Number of consecutive update request that resulted in a failure." + ]; + type: "u64"; + }, + { + name: "totalSuccess"; + docs: ["Total number of successful update request."]; + type: "u128"; + }, + { + name: "totalError"; + docs: ["Total number of update request that resulted in an error."]; + type: "u128"; + }, + { + name: "totalDisagreement"; + docs: [ + "Total number of update request that resulted in a disagreement with the accepted median result." + ]; + type: "u128"; + }, + { + name: "totalLateResponse"; + docs: [ + "Total number of update request that were posted on-chain late and not included in an accepted result." + ]; + type: "u128"; + } + ]; + }; + }, + { + name: "VrfBuilder"; + type: { + kind: "struct"; + fields: [ + { + name: "producer"; + docs: ["The OracleAccountData that is producing the randomness."]; + type: "publicKey"; + }, + { + name: "status"; + docs: ["The current status of the VRF verification."]; + type: { + defined: "VrfStatus"; + }; + }, + { + name: "reprProof"; + docs: ["The VRF proof sourced from the producer."]; + type: { + array: ["u8", 80]; + }; + }, + { + name: "proof"; + type: { + defined: "EcvrfProofZC"; + }; + }, + { + name: "yPoint"; + type: "publicKey"; + }, + { + name: "stage"; + type: "u32"; + }, + { + name: "stage1Out"; + type: { + defined: "EcvrfIntermediate"; + }; + }, + { + name: "r1"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "r2"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "stage3Out"; + type: { + defined: "EcvrfIntermediate"; + }; + }, + { + name: "hPoint"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "sReduced"; + type: { + defined: "Scalar"; + }; + }, + { + name: "yPointBuilder"; + type: { + array: [ + { + defined: "FieldElementZC"; + }, + 3 + ]; + }; + }, + { + name: "yRistrettoPoint"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "mulRound"; + type: "u8"; + }, + { + name: "hashPointsRound"; + type: "u8"; + }, + { + name: "mulTmp1"; + type: { + defined: "CompletedPointZC"; + }; + }, + { + name: "uPoint1"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "uPoint2"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "vPoint1"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "vPoint2"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "uPoint"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "vPoint"; + type: { + defined: "EdwardsPointZC"; + }; + }, + { + name: "u1"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "u2"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "invertee"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "y"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "z"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "p1Bytes"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "p2Bytes"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "p3Bytes"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "p4Bytes"; + type: { + array: ["u8", 32]; + }; + }, + { + name: "cPrimeHashbuf"; + type: { + array: ["u8", 16]; + }; + }, + { + name: "m1"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "m2"; + type: { + defined: "FieldElementZC"; + }; + }, + { + name: "txRemaining"; + docs: [ + "The number of transactions remaining to verify the VRF proof." + ]; + type: "u32"; + }, + { + name: "verified"; + docs: ["Whether the VRF proof has been verified on-chain."]; + type: "bool"; + }, + { + name: "result"; + docs: [ + "The VRF proof verification result. Will be zeroized if still awaiting fulfillment." + ]; + type: { + array: ["u8", 32]; + }; + } + ]; + }; + }, + { + name: "AccountMetaZC"; + type: { + kind: "struct"; + fields: [ + { + name: "pubkey"; + type: "publicKey"; + }, + { + name: "isSigner"; + type: "bool"; + }, + { + name: "isWritable"; + type: "bool"; + } + ]; + }; + }, + { + name: "AccountMetaBorsh"; + type: { + kind: "struct"; + fields: [ + { + name: "pubkey"; + type: "publicKey"; + }, + { + name: "isSigner"; + type: "bool"; + }, + { + name: "isWritable"; + type: "bool"; + } + ]; + }; + }, + { + name: "CallbackZC"; + type: { + kind: "struct"; + fields: [ + { + name: "programId"; + docs: ["The program ID of the callback program being invoked."]; + type: "publicKey"; + }, + { + name: "accounts"; + docs: ["The accounts being used in the callback instruction."]; + type: { + array: [ + { + defined: "AccountMetaZC"; + }, + 32 + ]; + }; + }, + { + name: "accountsLen"; + docs: ["The number of accounts used in the callback"]; + type: "u32"; + }, + { + name: "ixData"; + docs: ["The serialized instruction data."]; + type: { + array: ["u8", 1024]; + }; + }, + { + name: "ixDataLen"; + docs: ["The number of serialized bytes in the instruction data."]; + type: "u32"; + } + ]; + }; + }, + { + name: "VrfRound"; + type: { + kind: "struct"; + fields: [ + { + name: "alpha"; + docs: ["The alpha bytes used to calculate the VRF proof."]; + type: { + array: ["u8", 256]; + }; + }, + { + name: "alphaLen"; + docs: ["The number of bytes in the alpha buffer."]; + type: "u32"; + }, + { + name: "requestSlot"; + docs: ["The Slot when the VRF round was opened."]; + type: "u64"; + }, + { + name: "requestTimestamp"; + docs: ["The unix timestamp when the VRF round was opened."]; + type: "i64"; + }, + { + name: "result"; + docs: [ + "The VRF round result. Will be zeroized if still awaiting fulfillment." + ]; + type: { + array: ["u8", 32]; + }; + }, + { + name: "numVerified"; + docs: ["The number of builders who verified the VRF proof."]; + type: "u32"; + }, + { + name: "ebuf"; + docs: ["Reserved for future info."]; + type: { + array: ["u8", 256]; + }; + } + ]; + }; + }, + { + name: "VrfPoolRow"; + type: { + kind: "struct"; + fields: [ + { + name: "timestamp"; + type: "i64"; + }, + { + name: "pubkey"; + type: "publicKey"; + } + ]; + }; + }, + { + name: "BufferRelayerRound"; + type: { + kind: "struct"; + fields: [ + { + name: "numSuccess"; + docs: ["Number of successful responses."]; + type: "u32"; + }, + { + name: "numError"; + docs: ["Number of error responses."]; + type: "u32"; + }, + { + name: "roundOpenSlot"; + docs: ["Slot when the buffer relayer round was opened."]; + type: "u64"; + }, + { + name: "roundOpenTimestamp"; + docs: ["Timestamp when the buffer relayer round was opened."]; + type: "i64"; + }, + { + name: "oraclePubkey"; + docs: [ + "The public key of the oracle fulfilling the buffer relayer update request." + ]; + type: "publicKey"; + } + ]; + }; + }, + { + name: "Lanes"; + docs: [ + "The `Lanes` enum represents a subset of the lanes `A,B,C,D` of a", + "`FieldElement2625x4`.", + "", + "It's used to specify blend operations without", + "having to know details about the data layout of the", + "`FieldElement2625x4`." + ]; + type: { + kind: "enum"; + variants: [ + { + name: "C"; + }, + { + name: "D"; + }, + { + name: "AB"; + }, + { + name: "AC"; + }, + { + name: "CD"; + }, + { + name: "AD"; + }, + { + name: "BC"; + }, + { + name: "ABCD"; + } + ]; + }; + }, + { + name: "Shuffle"; + docs: [ + "The `Shuffle` enum represents a shuffle of a `FieldElement2625x4`.", + "", + "The enum variants are named by what they do to a vector \\\\(", + "(A,B,C,D) \\\\); for instance, `Shuffle::BADC` turns \\\\( (A, B, C,", + "D) \\\\) into \\\\( (B, A, D, C) \\\\)." + ]; + type: { + kind: "enum"; + variants: [ + { + name: "AAAA"; + }, + { + name: "BBBB"; + }, + { + name: "CACA"; + }, + { + name: "DBBD"; + }, + { + name: "ADDA"; + }, + { + name: "CBCB"; + }, + { + name: "ABAB"; + }, + { + name: "BADC"; + }, + { + name: "BACD"; + }, + { + name: "ABDC"; + } + ]; + }; + }, + { + name: "Shuffle"; + type: { + kind: "enum"; + variants: [ + { + name: "AAAA"; + }, + { + name: "BBBB"; + }, + { + name: "BADC"; + }, + { + name: "BACD"; + }, + { + name: "ADDA"; + }, + { + name: "CBCB"; + }, + { + name: "ABDC"; + }, + { + name: "ABAB"; + }, + { + name: "DBBD"; + }, + { + name: "CACA"; + } + ]; + }; + }, + { + name: "Lanes"; + type: { + kind: "enum"; + variants: [ + { + name: "D"; + }, + { + name: "C"; + }, + { + name: "AB"; + }, + { + name: "AC"; + }, + { + name: "AD"; + }, + { + name: "BCD"; + } + ]; + }; + }, + { + name: "Error"; + type: { + kind: "enum"; + variants: [ + { + name: "InvalidPublicKey"; + }, + { + name: "SerializationError"; + }, + { + name: "DeserializationError"; + }, + { + name: "InvalidDataError"; + } + ]; + }; + }, + { + name: "VerificationStatus"; + type: { + kind: "enum"; + variants: [ + { + name: "None"; + }, + { + name: "VerificationPending"; + }, + { + name: "VerificationFailure"; + }, + { + name: "VerificationSuccess"; + }, + { + name: "VerificationOverride"; + } + ]; + }; + }, + { + name: "AggregatorResolutionMode"; + type: { + kind: "enum"; + variants: [ + { + name: "ModeRoundResolution"; + }, + { + name: "ModeSlidingResolution"; + } + ]; + }; + }, + { + name: "SwitchboardPermission"; + type: { + kind: "enum"; + variants: [ + { + name: "PermitOracleHeartbeat"; + }, + { + name: "PermitOracleQueueUsage"; + }, + { + name: "PermitVrfRequests"; + } + ]; + }; + }, + { + name: "OracleResponseType"; + type: { + kind: "enum"; + variants: [ + { + name: "TypeSuccess"; + }, + { + name: "TypeError"; + }, + { + name: "TypeDisagreement"; + }, + { + name: "TypeNoResponse"; + } + ]; + }; + }, + { + name: "VrfStatus"; + type: { + kind: "enum"; + variants: [ + { + name: "StatusNone"; + }, + { + name: "StatusRequesting"; + }, + { + name: "StatusVerifying"; + }, + { + name: "StatusVerified"; + }, + { + name: "StatusCallbackSuccess"; + }, + { + name: "StatusVerifyFailure"; + } + ]; + }; + } + ]; + events: [ + { + name: "VrfRequestRandomnessEvent"; + fields: [ + { + name: "vrfPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "oraclePubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + }, + { + name: "loadAmount"; + type: "u64"; + index: false; + }, + { + name: "existingAmount"; + type: "u64"; + index: false; + }, + { + name: "alpha"; + type: "bytes"; + index: false; + }, + { + name: "counter"; + type: "u128"; + index: false; + } + ]; + }, + { + name: "VrfRequestEvent"; + fields: [ + { + name: "vrfPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "oraclePubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + } + ]; + }, + { + name: "VrfProveEvent"; + fields: [ + { + name: "vrfPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: true; + }, + { + name: "authorityPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "VrfVerifyEvent"; + fields: [ + { + name: "vrfPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: true; + }, + { + name: "authorityPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "amount"; + type: "u64"; + index: false; + } + ]; + }, + { + name: "VrfCallbackPerformedEvent"; + fields: [ + { + name: "vrfPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: true; + }, + { + name: "amount"; + type: "u64"; + index: false; + } + ]; + }, + { + name: "AggregatorOpenRoundEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + }, + { + name: "jobPubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + }, + { + name: "remainingFunds"; + type: "u64"; + index: false; + }, + { + name: "queueAuthority"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorSaveResultEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + index: false; + }, + { + name: "slot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "jobValues"; + type: { + vec: { + option: { + defined: "BorshDecimal"; + }; + }; + }; + index: false; + } + ]; + }, + { + name: "AggregatorTeeSaveResultEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + index: false; + }, + { + name: "slot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorValueUpdateEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "value"; + type: { + defined: "BorshDecimal"; + }; + index: false; + }, + { + name: "slot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + }, + { + name: "oraclePubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + }, + { + name: "oracleValues"; + type: { + vec: { + defined: "BorshDecimal"; + }; + }; + index: false; + } + ]; + }, + { + name: "OracleRewardEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "walletPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "amount"; + type: "u64"; + index: false; + }, + { + name: "roundSlot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "OracleWithdrawEvent"; + fields: [ + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "walletPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "destinationWallet"; + type: "publicKey"; + index: false; + }, + { + name: "previousAmount"; + type: "u64"; + index: false; + }, + { + name: "newAmount"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "LeaseWithdrawEvent"; + fields: [ + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "walletPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "previousAmount"; + type: "u64"; + index: false; + }, + { + name: "newAmount"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "OracleSlashEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "walletPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "amount"; + type: "u64"; + index: false; + }, + { + name: "roundSlot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "LeaseFundEvent"; + fields: [ + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "funder"; + type: "publicKey"; + index: false; + }, + { + name: "amount"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "ProbationBrokenEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "queuePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "FeedPermissionRevokedEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "GarbageCollectFailureEvent"; + fields: [ + { + name: "queuePubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "OracleBootedEvent"; + fields: [ + { + name: "queuePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorCrankEvictionEvent"; + fields: [ + { + name: "crankPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "aggregatorPubkey"; + type: "publicKey"; + index: true; + }, + { + name: "reason"; + type: { + option: "u32"; + }; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "CrankLeaseInsufficientFundsEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "CrankPopExpectedFailureEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "leasePubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "BufferRelayerOpenRoundEvent"; + fields: [ + { + name: "relayerPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "jobPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkeys"; + type: { + vec: "publicKey"; + }; + index: false; + }, + { + name: "remainingFunds"; + type: "u64"; + index: false; + }, + { + name: "queue"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "PriorityFeeReimburseEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "slot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + }, + { + name: "fee"; + type: "u64"; + index: false; + } + ]; + }, + { + name: "AggregatorAddJobEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "jobPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorRemoveJobEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "jobPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorLockEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorInitEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorSetAuthorityEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oldAuthority"; + type: "publicKey"; + index: false; + }, + { + name: "newAuthority"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "AggregatorSetConfigsEvent"; + fields: [ + { + name: "feedPubkey"; + type: "publicKey"; + index: false; + } + ]; + }, + { + name: "PermissionSetEvent"; + fields: [ + { + name: "permissionKey"; + type: "publicKey"; + index: false; + }, + { + name: "permission"; + type: { + defined: "SwitchboardPermission"; + }; + index: false; + }, + { + name: "enable"; + type: "bool"; + index: false; + } + ]; + }, + { + name: "VrfPoolUpdateEvent"; + fields: [ + { + name: "queuePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "vrfPoolPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "vrfPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "newSize"; + type: "u32"; + index: false; + }, + { + name: "minInterval"; + type: "u32"; + index: false; + } + ]; + }, + { + name: "VrfPoolRequestEvent"; + fields: [ + { + name: "queuePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "vrfPoolPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "vrfPubkey"; + type: "publicKey"; + index: false; + }, + { + name: "oraclePubkey"; + type: "publicKey"; + index: false; + }, + { + name: "slot"; + type: "u64"; + index: false; + }, + { + name: "timestamp"; + type: "i64"; + index: false; + } + ]; + }, + { + name: "QuoteVerifyRequestEvent"; + fields: [ + { + name: "quotePubkey"; + type: "publicKey"; + index: false; + } + ]; + } + ]; + errors: [ + { + code: 6000; + name: "ArrayOperationError"; + msg: "Illegal operation on a Switchboard array."; + }, + { + code: 6001; + name: "QueueOperationError"; + msg: "Illegal operation on a Switchboard queue."; + }, + { + code: 6002; + name: "IncorrectProgramOwnerError"; + msg: "An account required to be owned by the program has a different owner."; + }, + { + code: 6003; + name: "InvalidAggregatorRound"; + msg: "Aggregator is not currently populated with a valid round."; + }, + { + code: 6004; + name: "TooManyAggregatorJobs"; + msg: "Aggregator cannot fit any more jobs."; + }, + { + code: 6005; + name: "AggregatorCurrentRoundClosed"; + msg: "Aggregator's current round is closed. No results are being accepted."; + }, + { + code: 6006; + name: "AggregatorInvalidSaveResult"; + msg: "Aggregator received an invalid save result instruction."; + }, + { + code: 6007; + name: "InvalidStrDecimalConversion"; + msg: "Failed to convert string to decimal format."; + }, + { + code: 6008; + name: "AccountLoaderMissingSignature"; + msg: "AccountLoader account is missing a required signature."; + }, + { + code: 6009; + name: "MissingRequiredSignature"; + msg: "Account is missing a required signature."; + }, + { + code: 6010; + name: "ArrayOverflowError"; + msg: "The attempted action will overflow a zero-copy account array."; + }, + { + code: 6011; + name: "ArrayUnderflowError"; + msg: "The attempted action will underflow a zero-copy account array."; + }, + { + code: 6012; + name: "PubkeyNotFoundError"; + msg: "The queried public key was not found."; + }, + { + code: 6013; + name: "AggregatorIllegalRoundOpenCall"; + msg: "Aggregator round open called too early."; + }, + { + code: 6014; + name: "AggregatorIllegalRoundCloseCall"; + msg: "Aggregator round close called too early."; + }, + { + code: 6015; + name: "AggregatorClosedError"; + msg: "Aggregator is closed. Illegal action."; + }, + { + code: 6016; + name: "IllegalOracleIdxError"; + msg: "Illegal oracle index."; + }, + { + code: 6017; + name: "OracleAlreadyRespondedError"; + msg: "The provided oracle has already responded this round."; + }, + { + code: 6018; + name: "ProtoDeserializeError"; + msg: "Failed to deserialize protocol buffer."; + }, + { + code: 6019; + name: "UnauthorizedStateUpdateError"; + msg: "Unauthorized program state modification attempted."; + }, + { + code: 6020; + name: "MissingOracleAccountsError"; + msg: "Not enough oracle accounts provided to closeRounds."; + }, + { + code: 6021; + name: "OracleMismatchError"; + msg: "An unexpected oracle account was provided for the transaction."; + }, + { + code: 6022; + name: "CrankMaxCapacityError"; + msg: "Attempted to push to a Crank that's at capacity"; + }, + { + code: 6023; + name: "AggregatorLeaseInsufficientFunds"; + msg: "Aggregator update call attempted but attached lease has insufficient funds."; + }, + { + code: 6024; + name: "IncorrectTokenAccountMint"; + msg: "The provided token account does not point to the Switchboard token mint."; + }, + { + code: 6025; + name: "InvalidEscrowAccount"; + msg: "An invalid escrow account was provided."; + }, + { + code: 6026; + name: "CrankEmptyError"; + msg: "Crank empty. Pop failed."; + }, + { + code: 6027; + name: "PdaDeriveError"; + msg: "Failed to derive a PDA from the provided seed."; + }, + { + code: 6028; + name: "AggregatorAccountNotFound"; + msg: "Aggregator account missing from provided account list."; + }, + { + code: 6029; + name: "PermissionAccountNotFound"; + msg: "Permission account missing from provided account list."; + }, + { + code: 6030; + name: "LeaseAccountDeriveFailure"; + msg: "Failed to derive a lease account."; + }, + { + code: 6031; + name: "PermissionAccountDeriveFailure"; + msg: "Failed to derive a permission account."; + }, + { + code: 6032; + name: "EscrowAccountNotFound"; + msg: "Escrow account missing from provided account list."; + }, + { + code: 6033; + name: "LeaseAccountNotFound"; + msg: "Lease account missing from provided account list."; + }, + { + code: 6034; + name: "DecimalConversionError"; + msg: "Decimal conversion method failed."; + }, + { + code: 6035; + name: "PermissionDenied"; + msg: "Permission account is missing required flags for the given action."; + }, + { + code: 6036; + name: "QueueAtCapacity"; + msg: "Oracle queue is at lease capacity."; + }, + { + code: 6037; + name: "ExcessiveCrankRowsError"; + msg: "Data feed is already pushed on a crank."; + }, + { + code: 6038; + name: "AggregatorLockedError"; + msg: "Aggregator is locked, no setting modifications or job additions allowed."; + }, + { + code: 6039; + name: "AggregatorInvalidBatchSizeError"; + msg: "Aggregator invalid batch size."; + }, + { + code: 6040; + name: "AggregatorJobChecksumMismatch"; + msg: "Oracle provided an incorrect aggregator job checksum."; + }, + { + code: 6041; + name: "IntegerOverflowError"; + msg: "An integer overflow occurred."; + }, + { + code: 6042; + name: "InvalidUpdatePeriodError"; + msg: "Minimum update period is 5 seconds."; + }, + { + code: 6043; + name: "NoResultsError"; + msg: "Aggregator round evaluation attempted with no results."; + }, + { + code: 6044; + name: "InvalidExpirationError"; + msg: "An expiration constraint was broken."; + }, + { + code: 6045; + name: "InsufficientStakeError"; + msg: "An account provided insufficient stake for action."; + }, + { + code: 6046; + name: "LeaseInactiveError"; + msg: "The provided lease account is not active."; + }, + { + code: 6047; + name: "NoAggregatorJobsFound"; + msg: "No jobs are currently included in the aggregator."; + }, + { + code: 6048; + name: "IntegerUnderflowError"; + msg: "An integer underflow occurred."; + }, + { + code: 6049; + name: "OracleQueueMismatch"; + msg: "An invalid oracle queue account was provided."; + }, + { + code: 6050; + name: "OracleWalletMismatchError"; + msg: "An unexpected oracle wallet account was provided for the transaction."; + }, + { + code: 6051; + name: "InvalidBufferAccountError"; + msg: "An invalid buffer account was provided."; + }, + { + code: 6052; + name: "InsufficientOracleQueueError"; + msg: "Insufficient oracle queue size."; + }, + { + code: 6053; + name: "InvalidAuthorityError"; + msg: "Invalid authority account provided."; + }, + { + code: 6054; + name: "InvalidTokenAccountMintError"; + msg: "A provided token wallet is associated with an incorrect mint."; + }, + { + code: 6055; + name: "ExcessiveLeaseWithdrawlError"; + msg: "You must leave enough funds to perform at least 1 update in the lease."; + }, + { + code: 6056; + name: "InvalideHistoryAccountError"; + msg: "Invalid history account provided."; + }, + { + code: 6057; + name: "InvalidLeaseAccountEscrowError"; + msg: "Invalid lease account escrow."; + }, + { + code: 6058; + name: "InvalidCrankAccountError"; + msg: "Invalid crank provided."; + }, + { + code: 6059; + name: "CrankNoElementsReadyError"; + msg: "No elements ready to be popped."; + }, + { + code: 6060; + name: "IndexOutOfBoundsError"; + msg: "Index out of bounds"; + }, + { + code: 6061; + name: "VrfInvalidRequestError"; + msg: "Invalid vrf request params"; + }, + { + code: 6062; + name: "VrfInvalidProofSubmissionError"; + msg: "Vrf proof failed to verify"; + }, + { + code: 6063; + name: "VrfVerifyError"; + msg: "Error in verifying vrf proof."; + }, + { + code: 6064; + name: "VrfCallbackError"; + msg: "Vrf callback function failed."; + }, + { + code: 6065; + name: "VrfCallbackParamsError"; + msg: "Invalid vrf callback params provided."; + }, + { + code: 6066; + name: "VrfCallbackAlreadyCalledError"; + msg: "Vrf callback has already been triggered."; + }, + { + code: 6067; + name: "VrfInvalidPubkeyError"; + msg: "The provided pubkey is invalid to use in ecvrf proofs"; + }, + { + code: 6068; + name: "VrfTooManyVerifyCallsError"; + msg: "Number of required verify calls exceeded"; + }, + { + code: 6069; + name: "VrfRequestAlreadyLaunchedError"; + msg: "Vrf request is already pending"; + }, + { + code: 6070; + name: "VrfInsufficientVerificationError"; + msg: "Insufficient amount of proofs collected for VRF callback"; + }, + { + code: 6071; + name: "InvalidVrfProducerError"; + msg: "An incorrect oracle attempted to submit a proof"; + }, + { + code: 6072; + name: "InvalidGovernancePidError"; + msg: "Invalid SPLGovernance Account Supplied"; + }, + { + code: 6073; + name: "InvalidGovernanceAccountError"; + msg: "An Invalid Governance Account was supplied"; + }, + { + code: 6074; + name: "MissingOptionalAccount"; + msg: "Expected an optional account"; + }, + { + code: 6075; + name: "InvalidSpawnRecordOwner"; + msg: "Invalid Owner for Spawn Record"; + }, + { + code: 6076; + name: "NoopError"; + msg: "Noop error"; + }, + { + code: 6077; + name: "MissingRequiredAccountsError"; + msg: "A required instruction account was not included"; + }, + { + code: 6078; + name: "InvalidMintError"; + msg: "Invalid mint account passed for instruction"; + }, + { + code: 6079; + name: "InvalidTokenAccountKeyError"; + msg: "An invalid token account was passed into the instruction"; + }, + { + code: 6080; + name: "InvalidJobAccountError"; + msg: ""; + }, + { + code: 6081; + name: "VoterStakeRegistryError"; + msg: ""; + }, + { + code: 6082; + name: "AccountDiscriminatorMismatch"; + msg: "Account discriminator did not match."; + }, + { + code: 6083; + name: "FuckingImpossibleError"; + msg: "This error is fucking impossible."; + }, + { + code: 6084; + name: "InvalidVrfRound"; + msg: "Responding to the wrong VRF round"; + }, + { + code: 6085; + name: "JobSizeExceeded"; + msg: "Job size has exceeded the max of 6400 bytes"; + }, + { + code: 6086; + name: "JobChunksExceeded"; + msg: "Job loading can only support a maximum of 8 chunks"; + }, + { + code: 6087; + name: "JobDataLocked"; + msg: "Job has finished initializing and is immutable"; + }, + { + code: 6088; + name: "JobNotInitialized"; + msg: "Job account has not finished initializing"; + }, + { + code: 6089; + name: "BufferRelayerIllegalRoundOpenCall"; + msg: "BufferRelayer round open called too early."; + }, + { + code: 6090; + name: "InvalidSliderAccount"; + msg: "Invalid slider account."; + }, + { + code: 6091; + name: "VrfLiteHasExistingPool"; + msg: "VRF lite account belongs to an existing pool."; + }, + { + code: 6092; + name: "VrfPoolFull"; + msg: "VRF pool is at max capacity."; + }, + { + code: 6093; + name: "VrfPoolEmpty"; + msg: "VRF pool is empty."; + }, + { + code: 6094; + name: "VrfAccountNotFound"; + msg: "Failed to find VRF account in remaining accounts array."; + }, + { + code: 6095; + name: "AccountCloseNotReady"; + msg: "Account is not ready to be closed."; + }, + { + code: 6096; + name: "VrfPoolRequestTooSoon"; + msg: "VRF requested too soon."; + }, + { + code: 6097; + name: "VrfPoolMiss"; + msg: "VRF pool miss."; + }, + { + code: 6098; + name: "VrfLiteOwnedByPool"; + msg: "VRF lite belongs to a pool."; + }, + { + code: 6099; + name: "InsufficientTokenBalance"; + msg: "Escrow has insufficient funds to perform this action."; + }, + { + code: 6100; + name: "InvalidQuoteError"; + msg: "Invalid SAS quote account"; + }, + { + code: 6101; + name: "InvalidHistoryAccountError"; + msg: ""; + }, + { + code: 6102; + name: "GenericError"; + msg: ""; + }, + { + code: 6103; + name: "InvalidAuthorityState"; + msg: ""; + } + ]; +}; + +export const IDL: SwitchboardV2 = { + version: "0.1.0", + name: "switchboard_v2", + instructions: [ + { + name: "aggregatorClose", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "solDest", + isMut: false, + isSigner: false, + }, + { + name: "escrowDest", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "crank", + isMut: true, + isSigner: false, + isOptional: true, + docs: ["Optional accounts"], + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + isOptional: true, + }, + { + name: "slidingWindow", + isMut: true, + isSigner: false, + isOptional: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorCloseParams", + }, + }, + ], + }, + { + name: "setBumps", + accounts: [ + { + name: "state", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "SetBumpsParams", + }, + }, + ], + }, + { + name: "aggregatorAddJob", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "job", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorAddJobParams", + }, + }, + ], + }, + { + name: "aggregatorInit", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorInitParams", + }, + }, + ], + }, + { + name: "aggregatorLock", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorLockParams", + }, + }, + ], + }, + { + name: "aggregatorOpenRound", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payoutWallet", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorOpenRoundParams", + }, + }, + ], + }, + { + name: "aggregatorRemoveJob", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "job", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorRemoveJobParams", + }, + }, + ], + }, + { + name: "aggregatorSaveResult", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "feedPermission", + isMut: true, + isSigner: false, + }, + { + name: "oraclePermission", + isMut: false, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "historyBuffer", + isMut: true, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSaveResultParams", + }, + }, + ], + }, + { + name: "aggregatorSaveResultV2", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "feedPermission", + isMut: true, + isSigner: false, + }, + { + name: "oraclePermission", + isMut: false, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "historyBuffer", + isMut: true, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSaveResultParams", + }, + }, + ], + }, + { + name: "aggregatorTeeSaveResult", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "feedPermission", + isMut: true, + isSigner: false, + }, + { + name: "oraclePermission", + isMut: false, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "historyBuffer", + isMut: true, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "slider", + isMut: true, + isSigner: false, + }, + { + name: "quote", + isMut: false, + isSigner: true, + }, + { + name: "rewardWallet", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorTeeSaveResultParams", + }, + }, + ], + }, + { + name: "aggregatorSetAuthority", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "newAuthority", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSetAuthorityParams", + }, + }, + ], + }, + { + name: "aggregatorSetConfig", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSetConfigParams", + }, + }, + ], + }, + { + name: "aggregatorSetResolutionMode", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "slidingWindow", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSetResolutionModeParams", + }, + }, + ], + }, + { + name: "aggregatorSetHistoryBuffer", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "buffer", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSetHistoryBufferParams", + }, + }, + ], + }, + { + name: "aggregatorSetQueue", + accounts: [ + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "AggregatorSetQueueParams", + }, + }, + ], + }, + { + name: "bufferRelayerInit", + accounts: [ + { + name: "bufferRelayer", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "job", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "associatedTokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "BufferRelayerInitParams", + }, + }, + ], + }, + { + name: "bufferRelayerOpenRound", + accounts: [ + { + name: "bufferRelayer", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "BufferRelayerOpenRoundParams", + }, + }, + ], + }, + { + name: "bufferRelayerSaveResult", + accounts: [ + { + name: "bufferRelayer", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracle", + isMut: false, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "oracleWallet", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "BufferRelayerSaveResultParams", + }, + }, + ], + }, + { + name: "crankInit", + accounts: [ + { + name: "crank", + isMut: true, + isSigner: true, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "buffer", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "CrankInitParams", + }, + }, + ], + }, + { + name: "crankPop", + accounts: [ + { + name: "crank", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payoutWallet", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "crankDataBuffer", + isMut: true, + isSigner: false, + }, + { + name: "queueDataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "CrankPopParams", + }, + }, + ], + }, + { + name: "crankPopV2", + accounts: [ + { + name: "crank", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payoutWallet", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "crankDataBuffer", + isMut: true, + isSigner: false, + }, + { + name: "queueDataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "CrankPopParamsV2", + }, + }, + ], + }, + { + name: "crankPush", + accounts: [ + { + name: "crank", + isMut: true, + isSigner: false, + }, + { + name: "aggregator", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: false, + isSigner: false, + }, + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "CrankPushParams", + }, + }, + ], + }, + { + name: "jobInit", + accounts: [ + { + name: "job", + isMut: true, + isSigner: true, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "JobInitParams", + }, + }, + ], + }, + { + name: "jobSetData", + accounts: [ + { + name: "job", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "JobSetDataParams", + }, + }, + ], + }, + { + name: "leaseExtend", + accounts: [ + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "aggregator", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "funder", + isMut: true, + isSigner: false, + }, + { + name: "owner", + isMut: true, + isSigner: true, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "LeaseExtendParams", + }, + }, + ], + }, + { + name: "leaseInit", + accounts: [ + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: true, + isSigner: false, + }, + { + name: "aggregator", + isMut: false, + isSigner: false, + }, + { + name: "funder", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "owner", + isMut: true, + isSigner: true, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "LeaseInitParams", + }, + }, + ], + }, + { + name: "leaseSetAuthority", + accounts: [ + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "withdrawAuthority", + isMut: false, + isSigner: true, + }, + { + name: "newAuthority", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "LeaseSetAuthorityParams", + }, + }, + ], + }, + { + name: "leaseWithdraw", + accounts: [ + { + name: "lease", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "aggregator", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "withdrawAuthority", + isMut: false, + isSigner: true, + }, + { + name: "withdrawAccount", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "LeaseWithdrawParams", + }, + }, + ], + }, + { + name: "oracleHeartbeat", + accounts: [ + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "tokenAccount", + isMut: false, + isSigner: false, + }, + { + name: "gcOracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleHeartbeatParams", + }, + }, + ], + }, + { + name: "oracleTeeHeartbeat", + accounts: [ + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "tokenAccount", + isMut: false, + isSigner: false, + }, + { + name: "gcOracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: true, + isSigner: false, + }, + { + name: "quote", + isMut: false, + isSigner: true, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleTeeHeartbeatParams", + }, + }, + ], + }, + { + name: "oracleInit", + accounts: [ + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: false, + }, + { + name: "wallet", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleInitParams", + }, + }, + ], + }, + { + name: "oracleQueueInit", + accounts: [ + { + name: "oracleQueue", + isMut: true, + isSigner: true, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "buffer", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleQueueInitParams", + }, + }, + ], + }, + { + name: "oracleQueueSetConfig", + accounts: [ + { + name: "queue", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleQueueSetConfigParams", + }, + }, + ], + }, + { + name: "oracleWithdraw", + accounts: [ + { + name: "oracle", + isMut: true, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "tokenAccount", + isMut: true, + isSigner: false, + }, + { + name: "withdrawAccount", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "OracleWithdrawParams", + }, + }, + ], + }, + { + name: "permissionInit", + accounts: [ + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "granter", + isMut: false, + isSigner: false, + }, + { + name: "grantee", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "PermissionInitParams", + }, + }, + ], + }, + { + name: "permissionSet", + accounts: [ + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "PermissionSetParams", + }, + }, + ], + }, + { + name: "programConfig", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "programState", + isMut: true, + isSigner: false, + }, + { + name: "daoMint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "ProgramConfigParams", + }, + }, + ], + }, + { + name: "programInit", + accounts: [ + { + name: "state", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "tokenMint", + isMut: true, + isSigner: false, + }, + { + name: "vault", + isMut: true, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "daoMint", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "ProgramInitParams", + }, + }, + ], + }, + { + name: "vaultTransfer", + accounts: [ + { + name: "state", + isMut: false, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "to", + isMut: true, + isSigner: false, + }, + { + name: "vault", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VaultTransferParams", + }, + }, + ], + }, + { + name: "vrfInit", + accounts: [ + { + name: "vrf", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfInitParams", + }, + }, + ], + }, + { + name: "vrfCloseAction", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrf", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "solDest", + isMut: false, + isSigner: false, + }, + { + name: "escrowDest", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfCloseParams", + }, + }, + ], + }, + { + name: "vrfLiteCloseAction", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrfLite", + isMut: true, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "solDest", + isMut: false, + isSigner: false, + }, + { + name: "escrowDest", + isMut: true, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfLiteCloseParams", + }, + }, + ], + }, + { + name: "vrfLiteInit", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "vrf", + isMut: true, + isSigner: true, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "associatedTokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfLiteInitParams", + }, + }, + ], + }, + { + name: "vrfLiteProveAndVerify", + accounts: [ + { + name: "vrfLite", + isMut: true, + isSigner: false, + }, + { + name: "callbackPid", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "oracle", + isMut: false, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracleWallet", + isMut: true, + isSigner: false, + }, + { + name: "instructionsSysvar", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfLiteProveAndVerifyParams", + }, + }, + ], + }, + { + name: "vrfLiteRequestRandomness", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrfLite", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "recentBlockhashes", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfLiteRequestRandomnessParams", + }, + }, + ], + }, + { + name: "vrfPoolInit", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "vrfPool", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "associatedTokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + { + name: "rent", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfPoolInitParams", + }, + }, + ], + }, + { + name: "vrfPoolRemove", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrfPool", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfPoolRemoveParams", + }, + }, + ], + }, + { + name: "vrfPoolAdd", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "vrfPool", + isMut: true, + isSigner: false, + }, + { + name: "vrfLite", + isMut: true, + isSigner: false, + }, + { + name: "queue", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfPoolAddParams", + }, + }, + ], + }, + { + name: "vrfPoolRequest", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrfPool", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "mint", + isMut: false, + isSigner: false, + }, + { + name: "queue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "recentBlockhashes", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfPoolRequestParams", + }, + }, + ], + }, + { + name: "vrfProveAndVerify", + accounts: [ + { + name: "vrf", + isMut: true, + isSigner: false, + }, + { + name: "callbackPid", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "oracle", + isMut: false, + isSigner: false, + }, + { + name: "oracleAuthority", + isMut: false, + isSigner: true, + }, + { + name: "oracleWallet", + isMut: true, + isSigner: false, + }, + { + name: "instructionsSysvar", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfProveAndVerifyParams", + }, + }, + ], + }, + { + name: "vrfRequestRandomness", + accounts: [ + { + name: "authority", + isMut: false, + isSigner: true, + }, + { + name: "vrf", + isMut: true, + isSigner: false, + }, + { + name: "oracleQueue", + isMut: true, + isSigner: false, + }, + { + name: "queueAuthority", + isMut: false, + isSigner: false, + }, + { + name: "dataBuffer", + isMut: false, + isSigner: false, + }, + { + name: "permission", + isMut: true, + isSigner: false, + }, + { + name: "escrow", + isMut: true, + isSigner: false, + }, + { + name: "payerWallet", + isMut: true, + isSigner: false, + }, + { + name: "payerAuthority", + isMut: false, + isSigner: true, + }, + { + name: "recentBlockhashes", + isMut: false, + isSigner: false, + }, + { + name: "programState", + isMut: false, + isSigner: false, + }, + { + name: "tokenProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfRequestRandomnessParams", + }, + }, + ], + }, + { + name: "vrfSetCallback", + accounts: [ + { + name: "vrf", + isMut: true, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: true, + }, + ], + args: [ + { + name: "params", + type: { + defined: "VrfSetCallbackParams", + }, + }, + ], + }, + ], + accounts: [ + { + name: "sbState", + type: { + kind: "struct", + fields: [ + { + name: "authority", + docs: ["The account authority permitted to make account changes."], + type: "publicKey", + }, + { + name: "tokenMint", + docs: [ + "The token mint used for oracle rewards, aggregator leases, and other reward incentives.", + ], + type: "publicKey", + }, + { + name: "tokenVault", + docs: ["Token vault used by the program to receive kickbacks."], + type: "publicKey", + }, + { + name: "daoMint", + docs: ["The token mint used by the DAO."], + type: "publicKey", + }, + { + name: "bump", + docs: ["The PDA bump to derive the pubkey."], + type: "u8", + }, + { + name: "mrEnclaves", + docs: ["Permitted enclave measurements"], + type: { + array: [ + { + array: ["u8", 32], + }, + 6, + ], + }, + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 799], + }, + }, + ], + }, + }, + { + name: "taskSpecRecord", + type: { + kind: "struct", + fields: [ + { + name: "hash", + type: { + defined: "Hash", + }, + }, + ], + }, + }, + { + name: "aggregatorAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the aggregator to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + docs: ["Metadata of the aggregator to store on-chain."], + type: { + array: ["u8", 128], + }, + }, + { + name: "reserved1", + docs: ["Reserved."], + type: { + array: ["u8", 32], + }, + }, + { + name: "queuePubkey", + docs: ["Pubkey of the queue the aggregator belongs to."], + type: "publicKey", + }, + { + name: "oracleRequestBatchSize", + docs: [ + "CONFIGS", + "Number of oracles assigned to an update request.", + ], + type: "u32", + }, + { + name: "minOracleResults", + docs: [ + "Minimum number of oracle responses required before a round is validated.", + ], + type: "u32", + }, + { + name: "minJobResults", + docs: [ + "Minimum number of job results before an oracle accepts a result.", + ], + type: "u32", + }, + { + name: "minUpdateDelaySeconds", + docs: [ + "Minimum number of seconds required between aggregator rounds.", + ], + type: "u32", + }, + { + name: "startAfter", + docs: [ + "Unix timestamp for which no feed update will occur before.", + ], + type: "i64", + }, + { + name: "varianceThreshold", + docs: [ + "Change percentage required between a previous round and the current round. If variance percentage is not met, reject new oracle responses.", + ], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "forceReportPeriod", + docs: [ + "Number of seconds for which, even if the variance threshold is not passed, accept new responses from oracles.", + ], + type: "i64", + }, + { + name: "expiration", + docs: ["Timestamp when the feed is no longer needed."], + type: "i64", + }, + { + name: "consecutiveFailureCount", + docs: [ + "Counter for the number of consecutive failures before a feed is removed from a queue. If set to 0, failed feeds will remain on the queue.", + ], + type: "u64", + }, + { + name: "nextAllowedUpdateTime", + docs: ["Timestamp when the next update request will be available."], + type: "i64", + }, + { + name: "isLocked", + docs: [ + "Flag for whether an aggregators configuration is locked for editing.", + ], + type: "bool", + }, + { + name: "crankPubkey", + docs: [ + "Optional, public key of the crank the aggregator is currently using. Event based feeds do not need a crank.", + ], + type: "publicKey", + }, + { + name: "latestConfirmedRound", + docs: [ + "Latest confirmed update request result that has been accepted as valid.", + ], + type: { + defined: "AggregatorRound", + }, + }, + { + name: "currentRound", + docs: [ + "Oracle results from the current round of update request that has not been accepted as valid yet.", + ], + type: { + defined: "AggregatorRound", + }, + }, + { + name: "jobPubkeysData", + docs: [ + "List of public keys containing the job definitions for how data is sourced off-chain by oracles.", + ], + type: { + array: ["publicKey", 16], + }, + }, + { + name: "jobHashes", + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment.", + ], + type: { + array: [ + { + defined: "Hash", + }, + 16, + ], + }, + }, + { + name: "jobPubkeysSize", + docs: ["Number of jobs assigned to an oracle."], + type: "u32", + }, + { + name: "jobsChecksum", + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment.", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "authority", + docs: [ + "The account delegated as the authority for making account changes.", + ], + type: "publicKey", + }, + { + name: "historyBuffer", + docs: [ + "Optional, public key of a history buffer account storing the last N accepted results and their timestamps.", + ], + type: "publicKey", + }, + { + name: "previousConfirmedRoundResult", + docs: ["The previous confirmed round result."], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "previousConfirmedRoundSlot", + docs: ["The slot when the previous confirmed round was opened."], + type: "u64", + }, + { + name: "disableCrank", + docs: ["Whether an aggregator is permitted to join a crank."], + type: "bool", + }, + { + name: "jobWeights", + docs: [ + "Job weights used for the weighted median of the aggregator's assigned job accounts.", + ], + type: { + array: ["u8", 16], + }, + }, + { + name: "creationTimestamp", + docs: ["Unix timestamp when the feed was created."], + type: "i64", + }, + { + name: "resolutionMode", + docs: [ + "Use sliding window or round based resolution", + "NOTE: This changes result propogation in latest_round_result", + ], + type: { + defined: "AggregatorResolutionMode", + }, + }, + { + name: "basePriorityFee", + type: "u32", + }, + { + name: "priorityFeeBump", + type: "u32", + }, + { + name: "priorityFeeBumpPeriod", + type: "u32", + }, + { + name: "maxPriorityFeeMultiplier", + type: "u32", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 122], + }, + }, + ], + }, + }, + { + name: "slidingResultAccountData", + type: { + kind: "struct", + fields: [ + { + name: "data", + type: { + array: [ + { + defined: "SlidingWindowElement", + }, + 16, + ], + }, + }, + { + name: "bump", + type: "u8", + }, + { + name: "ebuf", + type: { + array: ["u8", 512], + }, + }, + ], + }, + }, + { + name: "permissionAccountData", + type: { + kind: "struct", + fields: [ + { + name: "authority", + docs: [ + "The authority that is allowed to set permissions for this account.", + ], + type: "publicKey", + }, + { + name: "permissions", + docs: [ + "The SwitchboardPermission enumeration assigned by the granter to the grantee.", + ], + type: "u32", + }, + { + name: "granter", + docs: [ + "Public key of account that is granting permissions to use its resources.", + ], + type: "publicKey", + }, + { + name: "grantee", + docs: [ + "Public key of account that is being assigned permissions to use a granters resources.", + ], + type: "publicKey", + }, + { + name: "expiration", + docs: [ + "unused currently. may want permission PDA per permission for", + "unique expiration periods, BUT currently only one permission", + "per account makes sense for the infra. Dont over engineer.", + ], + type: "i64", + }, + { + name: "bump", + docs: ["The PDA bump to derive the pubkey."], + type: "u8", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 255], + }, + }, + ], + }, + }, + { + name: "realmSpawnRecordAccountData", + type: { + kind: "struct", + fields: [ + { + name: "ebuf", + type: { + array: ["u8", 256], + }, + }, + ], + }, + }, + { + name: "leaseAccountData", + docs: ["This should be any ccount that links a permission to an escrow"], + type: { + kind: "struct", + fields: [ + { + name: "escrow", + docs: [ + "Public key of the token account holding the lease contract funds until rewarded to oracles for successfully processing updates", + ], + type: "publicKey", + }, + { + name: "queue", + docs: [ + "Public key of the oracle queue that the lease contract is applicable for.", + ], + type: "publicKey", + }, + { + name: "aggregator", + docs: [ + "Public key of the aggregator that the lease contract is applicable for", + ], + type: "publicKey", + }, + { + name: "tokenProgram", + docs: ["Public key of the Solana token program ID."], + type: "publicKey", + }, + { + name: "isActive", + docs: ["Whether the lease contract is still active."], + type: "bool", + }, + { + name: "crankRowCount", + docs: ["Index of an aggregators position on a crank."], + type: "u32", + }, + { + name: "createdAt", + docs: ["Timestamp when the lease contract was created."], + type: "i64", + }, + { + name: "updateCount", + docs: [ + "Counter keeping track of the number of updates for the given aggregator.", + ], + type: "u128", + }, + { + name: "withdrawAuthority", + docs: [ + "Public key of keypair that may withdraw funds from the lease at any time", + ], + type: "publicKey", + }, + { + name: "bump", + docs: ["The PDA bump to derive the pubkey."], + type: "u8", + }, + { + name: "ebuf", + type: { + array: ["u8", 255], + }, + }, + ], + }, + }, + { + name: "oracleQueueAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the queue to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + docs: ["Metadata of the queue to store on-chain."], + type: { + array: ["u8", 64], + }, + }, + { + name: "authority", + docs: [ + "The account delegated as the authority for making account changes or assigning permissions targeted at the queue.", + ], + type: "publicKey", + }, + { + name: "oracleTimeout", + docs: [ + "Interval when stale oracles will be removed if they fail to heartbeat.", + ], + type: "u32", + }, + { + name: "reward", + docs: [ + "Rewards to provide oracles and round openers on this queue.", + ], + type: "u64", + }, + { + name: "minStake", + docs: [ + "The minimum amount of stake oracles must present to remain on the queue.", + ], + type: "u64", + }, + { + name: "slashingEnabled", + docs: ["Whether slashing is enabled on this queue."], + type: "bool", + }, + { + name: "varianceToleranceMultiplier", + docs: [ + "The tolerated variance amount oracle results can have from the accepted round result before being slashed.", + "slashBound = varianceToleranceMultiplier * stdDeviation Default: 2", + ], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "feedProbationPeriod", + docs: [ + "Number of update rounds new feeds are on probation for.", + "If a feed returns 429s within probation period, auto disable permissions.", + ], + type: "u32", + }, + { + name: "currIdx", + docs: ["Current index of the oracle rotation."], + type: "u32", + }, + { + name: "size", + docs: ["Current number of oracles on a queue."], + type: "u32", + }, + { + name: "gcIdx", + docs: ["Garbage collection index."], + type: "u32", + }, + { + name: "consecutiveFeedFailureLimit", + docs: [ + "Consecutive failure limit for a feed before feed permission is revoked.", + ], + type: "u64", + }, + { + name: "consecutiveOracleFailureLimit", + docs: [ + "Consecutive failure limit for an oracle before oracle permission is revoked.", + ], + type: "u64", + }, + { + name: "unpermissionedFeedsEnabled", + docs: [ + "Enabling this setting means data feeds do not need explicit permission to join the queue and request new values from its oracles.", + ], + type: "bool", + }, + { + name: "unpermissionedVrfEnabled", + docs: [ + "Enabling this setting means VRF accounts do not need explicit permission to join the queue and request new values from its oracles.", + ], + type: "bool", + }, + { + name: "curatorRewardCut", + docs: [ + "TODO: Revenue percentage rewarded to job curators overall.", + ], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "lockLeaseFunding", + docs: [ + "Prevent new leases from being funded n this queue.", + "Useful to turn down a queue for migrations, since authority is always immutable.", + ], + type: "bool", + }, + { + name: "mint", + docs: [ + "Token mint used for the oracle queue rewards and slashing.", + ], + type: "publicKey", + }, + { + name: "enableBufferRelayers", + docs: [ + "Whether oracles are permitted to fulfill buffer relayer update request.", + ], + type: "bool", + }, + { + name: "enableTeeOnly", + type: "bool", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 967], + }, + }, + { + name: "maxSize", + docs: ["Maximum number of oracles a queue can support."], + type: "u32", + }, + { + name: "dataBuffer", + docs: [ + "The public key of the OracleQueueBuffer account holding a collection of Oracle pubkeys that haver successfully heartbeated before the queues `oracleTimeout`.", + ], + type: "publicKey", + }, + ], + }, + }, + { + name: "crankAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the crank to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + docs: ["Metadata of the crank to store on-chain."], + type: { + array: ["u8", 64], + }, + }, + { + name: "queuePubkey", + docs: ["Public key of the oracle queue who owns the crank."], + type: "publicKey", + }, + { + name: "pqSize", + docs: ["Number of aggregators added to the crank."], + type: "u32", + }, + { + name: "maxRows", + docs: [ + "Maximum number of aggregators allowed to be added to a crank.", + ], + type: "u32", + }, + { + name: "jitterModifier", + docs: ["Pseudorandom value added to next aggregator update time."], + type: "u8", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 255], + }, + }, + { + name: "dataBuffer", + docs: [ + "The public key of the CrankBuffer account holding a collection of Aggregator pubkeys and their next allowed update time.", + ], + type: "publicKey", + }, + ], + }, + }, + { + name: "oracleAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the oracle to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + docs: ["Metadata of the oracle to store on-chain."], + type: { + array: ["u8", 128], + }, + }, + { + name: "oracleAuthority", + docs: [ + "The account delegated as the authority for making account changes or withdrawing funds from a staking wallet.", + ], + type: "publicKey", + }, + { + name: "lastHeartbeat", + docs: ["Unix timestamp when the oracle last heartbeated"], + type: "i64", + }, + { + name: "numInUse", + docs: [ + "Flag dictating if an oracle is active and has heartbeated before the queue's oracle timeout parameter.", + ], + type: "u32", + }, + { + name: "tokenAccount", + docs: ["Stake account and reward/slashing wallet."], + type: "publicKey", + }, + { + name: "queuePubkey", + docs: [ + "Public key of the oracle queue who has granted it permission to use its resources.", + ], + type: "publicKey", + }, + { + name: "metrics", + docs: ["Oracle track record."], + type: { + defined: "OracleMetrics", + }, + }, + { + name: "bump", + docs: ["The PDA bump to derive the pubkey."], + type: "u8", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 255], + }, + }, + ], + }, + }, + { + name: "jobAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the job to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + docs: ["Metadata of the job to store on-chain."], + type: { + array: ["u8", 64], + }, + }, + { + name: "authority", + docs: [ + "The account delegated as the authority for making account changes.", + ], + type: "publicKey", + }, + { + name: "expiration", + docs: ["Unix timestamp when the job is considered invalid"], + type: "i64", + }, + { + name: "hash", + docs: ["Hash of the serialized data to prevent tampering."], + type: { + array: ["u8", 32], + }, + }, + { + name: "data", + docs: [ + "Serialized protobuf containing the collection of task to retrieve data off-chain.", + ], + type: "bytes", + }, + { + name: "referenceCount", + docs: ["The number of data feeds referencing the job account.."], + type: "u32", + }, + { + name: "totalSpent", + docs: [ + "The token amount funded into a feed that contains this job account.", + ], + type: "u64", + }, + { + name: "createdAt", + docs: ["Unix timestamp when the job was created on-chain."], + type: "i64", + }, + { + name: "isInitializing", + type: "u8", + }, + ], + }, + }, + { + name: "vrfAccountData", + type: { + kind: "struct", + fields: [ + { + name: "status", + docs: ["The current status of the VRF account."], + type: { + defined: "VrfStatus", + }, + }, + { + name: "counter", + docs: ["Incremental counter for tracking VRF rounds."], + type: "u128", + }, + { + name: "authority", + docs: ["On-chain account delegated for making account changes."], + type: "publicKey", + }, + { + name: "oracleQueue", + docs: [ + "The OracleQueueAccountData that is assigned to fulfill VRF update request.", + ], + type: "publicKey", + }, + { + name: "escrow", + docs: [ + "The token account used to hold funds for VRF update request.", + ], + type: "publicKey", + }, + { + name: "callback", + docs: [ + "The callback that is invoked when an update request is successfully verified.", + ], + type: { + defined: "CallbackZC", + }, + }, + { + name: "batchSize", + docs: ["The number of oracles assigned to a VRF update request."], + type: "u32", + }, + { + name: "builders", + docs: [ + "Struct containing the intermediate state between VRF crank actions.", + ], + type: { + array: [ + { + defined: "VrfBuilder", + }, + 8, + ], + }, + }, + { + name: "buildersLen", + docs: ["The number of builders."], + type: "u32", + }, + { + name: "testMode", + type: "bool", + }, + { + name: "currentRound", + docs: [ + "Oracle results from the current round of update request that has not been accepted as valid yet", + ], + type: { + defined: "VrfRound", + }, + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 1024], + }, + }, + ], + }, + }, + { + name: "vrfLiteAccountData", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + docs: ["The bump used to derive the SbState account."], + type: "u8", + }, + { + name: "permissionBump", + docs: ["The bump used to derive the permission account."], + type: "u8", + }, + { + name: "vrfPool", + docs: ["The VrfPool the account belongs to."], + type: "publicKey", + }, + { + name: "status", + docs: ["The current status of the VRF account."], + type: { + defined: "VrfStatus", + }, + }, + { + name: "result", + docs: [ + "The VRF round result. Will be zeroized if still awaiting fulfillment.", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "counter", + docs: ["Incremental counter for tracking VRF rounds."], + type: "u128", + }, + { + name: "alpha", + docs: ["The alpha bytes used to calculate the VRF proof."], + type: { + array: ["u8", 256], + }, + }, + { + name: "alphaLen", + docs: ["The number of bytes in the alpha buffer."], + type: "u32", + }, + { + name: "requestSlot", + docs: ["The Slot when the VRF round was opened."], + type: "u64", + }, + { + name: "requestTimestamp", + docs: ["The unix timestamp when the VRF round was opened."], + type: "i64", + }, + { + name: "authority", + docs: ["On-chain account delegated for making account changes."], + type: "publicKey", + }, + { + name: "queue", + docs: [ + "The OracleQueueAccountData that is assigned to fulfill VRF update request.", + ], + type: "publicKey", + }, + { + name: "escrow", + docs: [ + "The token account used to hold funds for VRF update request.", + ], + type: "publicKey", + }, + { + name: "callback", + docs: [ + "The callback that is invoked when an update request is successfully verified.", + ], + type: { + defined: "CallbackZC", + }, + }, + { + name: "builder", + docs: ["The incremental VRF proof calculation."], + type: { + defined: "VrfBuilder", + }, + }, + { + name: "expiration", + type: "i64", + }, + { + name: "ebuf", + type: { + array: ["u8", 1024], + }, + }, + ], + }, + }, + { + name: "vrfPoolAccountData", + type: { + kind: "struct", + fields: [ + { + name: "authority", + docs: ["ACCOUNTS"], + type: "publicKey", + }, + { + name: "queue", + type: "publicKey", + }, + { + name: "escrow", + type: "publicKey", + }, + { + name: "minInterval", + type: "u32", + }, + { + name: "maxRows", + type: "u32", + }, + { + name: "size", + type: "u32", + }, + { + name: "idx", + type: "u32", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "ebuf", + type: { + array: ["u8", 135], + }, + }, + ], + }, + }, + { + name: "bufferRelayerAccountData", + type: { + kind: "struct", + fields: [ + { + name: "name", + docs: ["Name of the buffer account to store on-chain."], + type: { + array: ["u8", 32], + }, + }, + { + name: "queuePubkey", + docs: [ + "Public key of the OracleQueueAccountData that is currently assigned to fulfill buffer relayer update request.", + ], + type: "publicKey", + }, + { + name: "escrow", + docs: [ + "Token account to reward oracles for completing update request.", + ], + type: "publicKey", + }, + { + name: "authority", + docs: [ + "The account delegated as the authority for making account changes.", + ], + type: "publicKey", + }, + { + name: "jobPubkey", + docs: [ + "Public key of the JobAccountData that defines how the buffer relayer is updated.", + ], + type: "publicKey", + }, + { + name: "jobHash", + docs: [ + "Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "minUpdateDelaySeconds", + docs: ["Minimum delay between update request."], + type: "u32", + }, + { + name: "isLocked", + docs: [ + "Whether buffer relayer config is locked for further changes.", + ], + type: "bool", + }, + { + name: "currentRound", + docs: [ + "The current buffer relayer update round that is yet to be confirmed.", + ], + type: { + defined: "BufferRelayerRound", + }, + }, + { + name: "latestConfirmedRound", + docs: ["The latest confirmed buffer relayer update round."], + type: { + defined: "BufferRelayerRound", + }, + }, + { + name: "result", + docs: ["The buffer holding the latest confirmed result."], + type: "bytes", + }, + ], + }, + }, + ], + types: [ + { + name: "AggregatorAddJobParams", + type: { + kind: "struct", + fields: [ + { + name: "weight", + type: { + option: "u8", + }, + }, + ], + }, + }, + { + name: "AggregatorCloseParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + ], + }, + }, + { + name: "AggregatorInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + type: { + array: ["u8", 128], + }, + }, + { + name: "batchSize", + type: "u32", + }, + { + name: "minOracleResults", + type: "u32", + }, + { + name: "minJobResults", + type: "u32", + }, + { + name: "minUpdateDelaySeconds", + type: "u32", + }, + { + name: "startAfter", + type: "i64", + }, + { + name: "varianceThreshold", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "forceReportPeriod", + type: "i64", + }, + { + name: "expiration", + type: "i64", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "disableCrank", + type: "bool", + }, + ], + }, + }, + { + name: "AggregatorLockParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "AggregatorOpenRoundParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + { + name: "jitter", + type: "u8", + }, + ], + }, + }, + { + name: "AggregatorRemoveJobParams", + type: { + kind: "struct", + fields: [ + { + name: "jobIdx", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSaveResultParams", + type: { + kind: "struct", + fields: [ + { + name: "oracleIdx", + type: "u32", + }, + { + name: "error", + type: "bool", + }, + { + name: "value", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "jobsChecksum", + type: { + array: ["u8", 32], + }, + }, + { + name: "minResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "maxResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "feedPermissionBump", + type: "u8", + }, + { + name: "oraclePermissionBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "AggregatorSaveResultParamsV2", + type: { + kind: "struct", + fields: [ + { + name: "oracleIdx", + type: "u32", + }, + { + name: "error", + type: "bool", + }, + { + name: "value", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "jobsChecksum", + type: { + array: ["u8", 32], + }, + }, + { + name: "minResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "maxResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "feedPermissionBump", + type: "u8", + }, + { + name: "oraclePermissionBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "jobValues", + type: { + vec: { + option: { + defined: "BorshDecimal", + }, + }, + }, + }, + ], + }, + }, + { + name: "AggregatorSetAuthorityParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "AggregatorSetBatchSizeParams", + type: { + kind: "struct", + fields: [ + { + name: "batchSize", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSetConfigParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + option: { + array: ["u8", 32], + }, + }, + }, + { + name: "metadata", + type: { + option: { + array: ["u8", 128], + }, + }, + }, + { + name: "minUpdateDelaySeconds", + type: { + option: "u32", + }, + }, + { + name: "minJobResults", + type: { + option: "u32", + }, + }, + { + name: "batchSize", + type: { + option: "u32", + }, + }, + { + name: "minOracleResults", + type: { + option: "u32", + }, + }, + { + name: "forceReportPeriod", + type: { + option: "u32", + }, + }, + { + name: "varianceThreshold", + type: { + option: { + defined: "BorshDecimal", + }, + }, + }, + { + name: "basePriorityFee", + type: { + option: "u32", + }, + }, + { + name: "priorityFeeBump", + type: { + option: "u32", + }, + }, + { + name: "priorityFeeBumpPeriod", + type: { + option: "u32", + }, + }, + { + name: "maxPriorityFeeMultiplier", + type: { + option: "u32", + }, + }, + { + name: "disableCrank", + type: { + option: "bool", + }, + }, + ], + }, + }, + { + name: "AggregatorSetForceReportPeriodParams", + type: { + kind: "struct", + fields: [ + { + name: "forceReportPeriod", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSetHistoryBufferParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "AggregatorSetMinJobsParams", + type: { + kind: "struct", + fields: [ + { + name: "minJobResults", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSetMinOraclesParams", + type: { + kind: "struct", + fields: [ + { + name: "minOracleResults", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSetQueueParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "AggregatorSetResolutionModeParams", + type: { + kind: "struct", + fields: [ + { + name: "mode", + type: "u8", + }, + ], + }, + }, + { + name: "AggregatorSetUpdateIntervalParams", + type: { + kind: "struct", + fields: [ + { + name: "newInterval", + type: "u32", + }, + ], + }, + }, + { + name: "AggregatorSetVarianceThresholdParams", + type: { + kind: "struct", + fields: [ + { + name: "varianceThreshold", + type: { + defined: "BorshDecimal", + }, + }, + ], + }, + }, + { + name: "AggregatorTeeSaveResultParams", + type: { + kind: "struct", + fields: [ + { + name: "value", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "jobsChecksum", + type: { + array: ["u8", 32], + }, + }, + { + name: "minResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "maxResponse", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "feedPermissionBump", + type: "u8", + }, + { + name: "oraclePermissionBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "BufferRelayerInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + array: ["u8", 32], + }, + }, + { + name: "minUpdateDelaySeconds", + type: "u32", + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "BufferRelayerOpenRoundParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + ], + }, + }, + { + name: "BufferRelayerSaveResultParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + { + name: "result", + type: "bytes", + }, + { + name: "success", + type: "bool", + }, + ], + }, + }, + { + name: "CrankInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: "bytes", + }, + { + name: "metadata", + type: "bytes", + }, + { + name: "crankSize", + type: "u32", + }, + ], + }, + }, + { + name: "CrankPopParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "leaseBumps", + type: "bytes", + }, + { + name: "permissionBumps", + type: "bytes", + }, + { + name: "nonce", + type: { + option: "u32", + }, + }, + { + name: "failOpenOnAccountMismatch", + type: { + option: "bool", + }, + }, + ], + }, + }, + { + name: "CrankPopParamsV2", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "leaseBumps", + type: "bytes", + }, + { + name: "permissionBumps", + type: "bytes", + }, + { + name: "nonce", + type: { + option: "u32", + }, + }, + { + name: "failOpenOnAccountMismatch", + type: { + option: "bool", + }, + }, + { + name: "popIdx", + type: { + option: "u32", + }, + }, + ], + }, + }, + { + name: "CrankPushParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + { + name: "notifiRef", + type: { + option: { + array: ["u8", 64], + }, + }, + }, + ], + }, + }, + { + name: "JobInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + array: ["u8", 32], + }, + }, + { + name: "expiration", + type: "i64", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "data", + type: "bytes", + }, + { + name: "size", + type: { + option: "u32", + }, + }, + ], + }, + }, + { + name: "JobSetDataParams", + type: { + kind: "struct", + fields: [ + { + name: "data", + type: "bytes", + }, + { + name: "chunkIdx", + type: "u8", + }, + ], + }, + }, + { + name: "LeaseExtendParams", + type: { + kind: "struct", + fields: [ + { + name: "loadAmount", + type: "u64", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "walletBumps", + type: "bytes", + }, + ], + }, + }, + { + name: "LeaseInitParams", + type: { + kind: "struct", + fields: [ + { + name: "loadAmount", + type: "u64", + }, + { + name: "withdrawAuthority", + type: "publicKey", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "walletBumps", + type: "bytes", + }, + ], + }, + }, + { + name: "LeaseSetAuthorityParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "LeaseWithdrawParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "leaseBump", + type: "u8", + }, + { + name: "amount", + type: "u64", + }, + ], + }, + }, + { + name: "OracleHeartbeatParams", + type: { + kind: "struct", + fields: [ + { + name: "permissionBump", + type: "u8", + }, + ], + }, + }, + { + name: "OracleInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: "bytes", + }, + { + name: "metadata", + type: "bytes", + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "oracleBump", + type: "u8", + }, + ], + }, + }, + { + name: "OracleQueueInitParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + array: ["u8", 32], + }, + }, + { + name: "metadata", + type: { + array: ["u8", 64], + }, + }, + { + name: "reward", + type: "u64", + }, + { + name: "minStake", + type: "u64", + }, + { + name: "feedProbationPeriod", + type: "u32", + }, + { + name: "oracleTimeout", + type: "u32", + }, + { + name: "slashingEnabled", + type: "bool", + }, + { + name: "varianceToleranceMultiplier", + type: { + defined: "BorshDecimal", + }, + }, + { + name: "consecutiveFeedFailureLimit", + type: "u64", + }, + { + name: "consecutiveOracleFailureLimit", + type: "u64", + }, + { + name: "queueSize", + type: "u32", + }, + { + name: "unpermissionedFeeds", + type: "bool", + }, + { + name: "unpermissionedVrf", + type: "bool", + }, + { + name: "enableBufferRelayers", + type: "bool", + }, + { + name: "enableTeeOnly", + type: "bool", + }, + ], + }, + }, + { + name: "OracleQueueSetConfigParams", + type: { + kind: "struct", + fields: [ + { + name: "name", + type: { + option: { + array: ["u8", 32], + }, + }, + }, + { + name: "metadata", + type: { + option: { + array: ["u8", 64], + }, + }, + }, + { + name: "unpermissionedFeedsEnabled", + type: { + option: "bool", + }, + }, + { + name: "unpermissionedVrfEnabled", + type: { + option: "bool", + }, + }, + { + name: "enableBufferRelayers", + type: { + option: "bool", + }, + }, + { + name: "varianceToleranceMultiplier", + type: { + option: { + defined: "BorshDecimal", + }, + }, + }, + { + name: "slashingEnabled", + type: { + option: "bool", + }, + }, + { + name: "reward", + type: { + option: "u64", + }, + }, + { + name: "minStake", + type: { + option: "u64", + }, + }, + { + name: "oracleTimeout", + type: { + option: "u32", + }, + }, + { + name: "consecutiveFeedFailureLimit", + type: { + option: "u64", + }, + }, + { + name: "consecutiveOracleFailureLimit", + type: { + option: "u64", + }, + }, + { + name: "enableTeeOnly", + type: { + option: "bool", + }, + }, + ], + }, + }, + { + name: "OracleQueueSetRewardsParams", + type: { + kind: "struct", + fields: [ + { + name: "rewards", + type: "u64", + }, + ], + }, + }, + { + name: "OracleTeeHeartbeatParams", + type: { + kind: "struct", + fields: [ + { + name: "permissionBump", + type: "u8", + }, + ], + }, + }, + { + name: "OracleWithdrawParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + { + name: "amount", + type: "u64", + }, + ], + }, + }, + { + name: "PermissionInitParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "PermissionSetParams", + type: { + kind: "struct", + fields: [ + { + name: "permission", + type: { + defined: "SwitchboardPermission", + }, + }, + { + name: "enable", + type: "bool", + }, + ], + }, + }, + { + name: "ProgramConfigParams", + type: { + kind: "struct", + fields: [ + { + name: "token", + type: "publicKey", + }, + { + name: "bump", + type: "u8", + }, + { + name: "daoMint", + type: "publicKey", + }, + { + name: "addEnclaves", + type: { + vec: { + array: ["u8", 32], + }, + }, + }, + { + name: "rmEnclaves", + type: { + vec: { + array: ["u8", 32], + }, + }, + }, + ], + }, + }, + { + name: "ProgramInitParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "SetBumpsParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "VaultTransferParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "amount", + type: "u64", + }, + ], + }, + }, + { + name: "VrfCloseParams", + type: { + kind: "struct", + fields: [ + { + name: "stateBump", + type: "u8", + }, + { + name: "permissionBump", + type: "u8", + }, + ], + }, + }, + { + name: "VrfInitParams", + type: { + kind: "struct", + fields: [ + { + name: "callback", + type: { + defined: "Callback", + }, + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "VrfLiteCloseParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "VrfLiteInitParams", + type: { + kind: "struct", + fields: [ + { + name: "callback", + type: { + option: { + defined: "Callback", + }, + }, + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "expiration", + type: { + option: "i64", + }, + }, + ], + }, + }, + { + name: "VrfLiteProveAndVerifyParams", + type: { + kind: "struct", + fields: [ + { + name: "nonce", + type: { + option: "u32", + }, + }, + { + name: "proof", + type: "bytes", + }, + { + name: "proofEncoded", + type: "string", + }, + { + name: "counter", + type: "u128", + }, + ], + }, + }, + { + name: "VrfLiteRequestRandomnessParams", + type: { + kind: "struct", + fields: [ + { + name: "callback", + type: { + option: { + defined: "Callback", + }, + }, + }, + ], + }, + }, + { + name: "VrfPoolAddParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "VrfPoolInitParams", + type: { + kind: "struct", + fields: [ + { + name: "maxRows", + type: "u32", + }, + { + name: "minInterval", + type: "u32", + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "VrfPoolRemoveParams", + type: { + kind: "struct", + fields: [], + }, + }, + { + name: "VrfPoolRequestParams", + type: { + kind: "struct", + fields: [ + { + name: "callback", + type: { + option: { + defined: "Callback", + }, + }, + }, + ], + }, + }, + { + name: "VrfProveParams", + type: { + kind: "struct", + fields: [ + { + name: "proof", + type: "bytes", + }, + { + name: "idx", + type: "u32", + }, + ], + }, + }, + { + name: "VrfProveAndVerifyParams", + type: { + kind: "struct", + fields: [ + { + name: "nonce", + type: { + option: "u32", + }, + }, + { + name: "stateBump", + type: "u8", + }, + { + name: "idx", + type: "u32", + }, + { + name: "proof", + type: "bytes", + }, + { + name: "proofEncoded", + type: "string", + }, + { + name: "counter", + type: "u128", + }, + ], + }, + }, + { + name: "VrfRequestRandomnessParams", + type: { + kind: "struct", + fields: [ + { + name: "permissionBump", + type: "u8", + }, + { + name: "stateBump", + type: "u8", + }, + ], + }, + }, + { + name: "VrfSetCallbackParams", + type: { + kind: "struct", + fields: [ + { + name: "callback", + type: { + defined: "Callback", + }, + }, + ], + }, + }, + { + name: "Callback", + type: { + kind: "struct", + fields: [ + { + name: "programId", + type: "publicKey", + }, + { + name: "accounts", + type: { + vec: { + defined: "AccountMetaBorsh", + }, + }, + }, + { + name: "ixData", + type: "bytes", + }, + ], + }, + }, + { + name: "EcvrfProofZC", + type: { + kind: "struct", + fields: [ + { + name: "gamma", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "c", + type: { + defined: "Scalar", + }, + }, + { + name: "s", + type: { + defined: "Scalar", + }, + }, + ], + }, + }, + { + name: "Scalar", + docs: [ + "The `Scalar` struct holds an integer \\\\(s < 2\\^{255} \\\\) which", + "represents an element of \\\\(\\mathbb Z / \\ell\\\\).", + ], + type: { + kind: "struct", + fields: [ + { + name: "bytes", + docs: [ + "`bytes` is a little-endian byte encoding of an integer representing a scalar modulo the", + "group order.", + "", + "# Invariant", + "", + "The integer representing this scalar must be bounded above by \\\\(2\\^{255}\\\\), or", + "equivalently the high bit of `bytes[31]` must be zero.", + "", + "This ensures that there is room for a carry bit when computing a NAF representation.", + ], + type: { + array: ["u8", 32], + }, + }, + ], + }, + }, + { + name: "FieldElementZC", + type: { + kind: "struct", + fields: [ + { + name: "bytes", + type: { + array: ["u64", 5], + }, + }, + ], + }, + }, + { + name: "CompletedPointZC", + type: { + kind: "struct", + fields: [ + { + name: "x", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "y", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "z", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "t", + type: { + defined: "FieldElementZC", + }, + }, + ], + }, + }, + { + name: "EdwardsPointZC", + type: { + kind: "struct", + fields: [ + { + name: "x", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "y", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "z", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "t", + type: { + defined: "FieldElementZC", + }, + }, + ], + }, + }, + { + name: "ProjectivePointZC", + type: { + kind: "struct", + fields: [ + { + name: "x", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "y", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "z", + type: { + defined: "FieldElementZC", + }, + }, + ], + }, + }, + { + name: "EcvrfIntermediate", + type: { + kind: "struct", + fields: [ + { + name: "r", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "nS", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "d", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "t13", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "t15", + type: { + defined: "FieldElementZC", + }, + }, + ], + }, + }, + { + name: "BorshDecimal", + type: { + kind: "struct", + fields: [ + { + name: "mantissa", + type: "i128", + }, + { + name: "scale", + type: "u32", + }, + ], + }, + }, + { + name: "Quote", + type: { + kind: "struct", + fields: [ + { + name: "enclaveSigner", + docs: ["The address of the signer generated within an enclave."], + type: "publicKey", + }, + { + name: "mrEnclave", + docs: [ + "The quotes MRENCLAVE measurement dictating the contents of the secure enclave.", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "verificationStatus", + docs: ["The VerificationStatus of the quote."], + type: "u8", + }, + { + name: "verificationTimestamp", + docs: ["The unix timestamp when the quote was last verified."], + type: "i64", + }, + { + name: "validUntil", + docs: [ + "The unix timestamp when the quotes verification status expires.", + ], + type: "i64", + }, + { + name: "quoteRegistry", + docs: [ + "The off-chain registry where the verifiers quote can be located.", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "registryKey", + docs: [ + "Key to lookup the buffer data on IPFS or an alternative decentralized storage solution.", + ], + type: { + array: ["u8", 64], + }, + }, + { + name: "ebuf", + docs: ["Reserved."], + type: { + array: ["u8", 256], + }, + }, + ], + }, + }, + { + name: "VerifierAccountData", + type: { + kind: "struct", + fields: [ + { + name: "enclave", + docs: ["Represents the state of the quote verifiers enclave."], + type: { + defined: "Quote", + }, + }, + { + name: "authority", + docs: [ + "The authority of the EnclaveAccount which is permitted to make account changes.", + ], + type: "publicKey", + }, + { + name: "attestationQueue", + docs: [ + "Queue used for attestation to verify a MRENCLAVE measurement.", + ], + type: "publicKey", + }, + { + name: "createdAt", + docs: ["The unix timestamp when the quote was created."], + type: "i64", + }, + { + name: "isOnQueue", + docs: [ + "Whether the quote is located on the AttestationQueues buffer.", + ], + type: "bool", + }, + { + name: "lastHeartbeat", + docs: ["The last time the quote heartbeated on-chain."], + type: "i64", + }, + { + name: "rewardEscrow", + docs: [ + "The SwitchboardWallet account containing the reward escrow for verifying quotes on-chain.", + "We should set this whenever the operator changes so we dont need to pass another account and can verify with has_one.", + ], + type: "publicKey", + }, + { + name: "stakeWallet", + docs: [ + "The SwitchboardWallet account containing the queues required min_stake.", + "Needs to be separate from the reward_escrow. Allows easier 3rd party management of stake from rewards.", + ], + type: "publicKey", + }, + { + name: "ebuf", + docs: ["Reserved."], + type: { + array: ["u8", 1024], + }, + }, + ], + }, + }, + { + name: "Hash", + type: { + kind: "struct", + fields: [ + { + name: "data", + docs: ["The bytes used to derive the hash."], + type: { + array: ["u8", 32], + }, + }, + ], + }, + }, + { + name: "SlidingWindowElement", + type: { + kind: "struct", + fields: [ + { + name: "oracleKey", + type: "publicKey", + }, + { + name: "value", + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "slot", + type: "u64", + }, + { + name: "timestamp", + type: "i64", + }, + ], + }, + }, + { + name: "AggregatorRound", + type: { + kind: "struct", + fields: [ + { + name: "numSuccess", + docs: [ + "Maintains the number of successful responses received from nodes.", + "Nodes can submit one successful response per round.", + ], + type: "u32", + }, + { + name: "numError", + docs: ["Number of error responses."], + type: "u32", + }, + { + name: "isClosed", + docs: ["Whether an update request round has ended."], + type: "bool", + }, + { + name: "roundOpenSlot", + docs: [ + "Maintains the `solana_program::clock::Slot` that the round was opened at.", + ], + type: "u64", + }, + { + name: "roundOpenTimestamp", + docs: [ + "Maintains the `solana_program::clock::UnixTimestamp;` the round was opened at.", + ], + type: "i64", + }, + { + name: "result", + docs: [ + "Maintains the current median of all successful round responses.", + ], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "stdDeviation", + docs: ["Standard deviation of the accepted results in the round."], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "minResponse", + docs: ["Maintains the minimum node response this round."], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "maxResponse", + docs: ["Maintains the maximum node response this round."], + type: { + defined: "SwitchboardDecimal", + }, + }, + { + name: "oraclePubkeysData", + docs: ["Pubkeys of the oracles fulfilling this round."], + type: { + array: ["publicKey", 16], + }, + }, + { + name: "mediansData", + docs: [ + "Represents all successful node responses this round. `NaN` if empty.", + ], + type: { + array: [ + { + defined: "SwitchboardDecimal", + }, + 16, + ], + }, + }, + { + name: "currentPayout", + docs: ["Current rewards/slashes oracles have received this round."], + type: { + array: ["i64", 16], + }, + }, + { + name: "mediansFulfilled", + docs: ["Keep track of which responses are fulfilled here."], + type: { + array: ["bool", 16], + }, + }, + { + name: "errorsFulfilled", + docs: ["Keeps track of which errors are fulfilled here."], + type: { + array: ["bool", 16], + }, + }, + ], + }, + }, + { + name: "AggregatorHistoryRow", + type: { + kind: "struct", + fields: [ + { + name: "timestamp", + docs: ["The timestamp of the sample."], + type: "i64", + }, + { + name: "value", + docs: ["The value of the sample."], + type: { + defined: "SwitchboardDecimal", + }, + }, + ], + }, + }, + { + name: "SwitchboardDecimal", + type: { + kind: "struct", + fields: [ + { + name: "mantissa", + docs: [ + "The part of a floating-point number that represents the significant digits of that number,", + "and that is multiplied by the base, 10, raised to the power of scale to give the actual value of the number.", + ], + type: "i128", + }, + { + name: "scale", + docs: [ + "The number of decimal places to move to the left to yield the actual value.", + ], + type: "u32", + }, + ], + }, + }, + { + name: "CrankRow", + type: { + kind: "struct", + fields: [ + { + name: "pubkey", + docs: ["The PublicKey of the AggregatorAccountData."], + type: "publicKey", + }, + { + name: "nextTimestamp", + docs: ["The aggregator's next available update time."], + type: "i64", + }, + ], + }, + }, + { + name: "OracleMetrics", + type: { + kind: "struct", + fields: [ + { + name: "consecutiveSuccess", + docs: ["Number of consecutive successful update request."], + type: "u64", + }, + { + name: "consecutiveError", + docs: [ + "Number of consecutive update request that resulted in an error.", + ], + type: "u64", + }, + { + name: "consecutiveDisagreement", + docs: [ + "Number of consecutive update request that resulted in a disagreement with the accepted median result.", + ], + type: "u64", + }, + { + name: "consecutiveLateResponse", + docs: [ + "Number of consecutive update request that were posted on-chain late and not included in an accepted result.", + ], + type: "u64", + }, + { + name: "consecutiveFailure", + docs: [ + "Number of consecutive update request that resulted in a failure.", + ], + type: "u64", + }, + { + name: "totalSuccess", + docs: ["Total number of successful update request."], + type: "u128", + }, + { + name: "totalError", + docs: ["Total number of update request that resulted in an error."], + type: "u128", + }, + { + name: "totalDisagreement", + docs: [ + "Total number of update request that resulted in a disagreement with the accepted median result.", + ], + type: "u128", + }, + { + name: "totalLateResponse", + docs: [ + "Total number of update request that were posted on-chain late and not included in an accepted result.", + ], + type: "u128", + }, + ], + }, + }, + { + name: "VrfBuilder", + type: { + kind: "struct", + fields: [ + { + name: "producer", + docs: ["The OracleAccountData that is producing the randomness."], + type: "publicKey", + }, + { + name: "status", + docs: ["The current status of the VRF verification."], + type: { + defined: "VrfStatus", + }, + }, + { + name: "reprProof", + docs: ["The VRF proof sourced from the producer."], + type: { + array: ["u8", 80], + }, + }, + { + name: "proof", + type: { + defined: "EcvrfProofZC", + }, + }, + { + name: "yPoint", + type: "publicKey", + }, + { + name: "stage", + type: "u32", + }, + { + name: "stage1Out", + type: { + defined: "EcvrfIntermediate", + }, + }, + { + name: "r1", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "r2", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "stage3Out", + type: { + defined: "EcvrfIntermediate", + }, + }, + { + name: "hPoint", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "sReduced", + type: { + defined: "Scalar", + }, + }, + { + name: "yPointBuilder", + type: { + array: [ + { + defined: "FieldElementZC", + }, + 3, + ], + }, + }, + { + name: "yRistrettoPoint", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "mulRound", + type: "u8", + }, + { + name: "hashPointsRound", + type: "u8", + }, + { + name: "mulTmp1", + type: { + defined: "CompletedPointZC", + }, + }, + { + name: "uPoint1", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "uPoint2", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "vPoint1", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "vPoint2", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "uPoint", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "vPoint", + type: { + defined: "EdwardsPointZC", + }, + }, + { + name: "u1", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "u2", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "invertee", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "y", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "z", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "p1Bytes", + type: { + array: ["u8", 32], + }, + }, + { + name: "p2Bytes", + type: { + array: ["u8", 32], + }, + }, + { + name: "p3Bytes", + type: { + array: ["u8", 32], + }, + }, + { + name: "p4Bytes", + type: { + array: ["u8", 32], + }, + }, + { + name: "cPrimeHashbuf", + type: { + array: ["u8", 16], + }, + }, + { + name: "m1", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "m2", + type: { + defined: "FieldElementZC", + }, + }, + { + name: "txRemaining", + docs: [ + "The number of transactions remaining to verify the VRF proof.", + ], + type: "u32", + }, + { + name: "verified", + docs: ["Whether the VRF proof has been verified on-chain."], + type: "bool", + }, + { + name: "result", + docs: [ + "The VRF proof verification result. Will be zeroized if still awaiting fulfillment.", + ], + type: { + array: ["u8", 32], + }, + }, + ], + }, + }, + { + name: "AccountMetaZC", + type: { + kind: "struct", + fields: [ + { + name: "pubkey", + type: "publicKey", + }, + { + name: "isSigner", + type: "bool", + }, + { + name: "isWritable", + type: "bool", + }, + ], + }, + }, + { + name: "AccountMetaBorsh", + type: { + kind: "struct", + fields: [ + { + name: "pubkey", + type: "publicKey", + }, + { + name: "isSigner", + type: "bool", + }, + { + name: "isWritable", + type: "bool", + }, + ], + }, + }, + { + name: "CallbackZC", + type: { + kind: "struct", + fields: [ + { + name: "programId", + docs: ["The program ID of the callback program being invoked."], + type: "publicKey", + }, + { + name: "accounts", + docs: ["The accounts being used in the callback instruction."], + type: { + array: [ + { + defined: "AccountMetaZC", + }, + 32, + ], + }, + }, + { + name: "accountsLen", + docs: ["The number of accounts used in the callback"], + type: "u32", + }, + { + name: "ixData", + docs: ["The serialized instruction data."], + type: { + array: ["u8", 1024], + }, + }, + { + name: "ixDataLen", + docs: ["The number of serialized bytes in the instruction data."], + type: "u32", + }, + ], + }, + }, + { + name: "VrfRound", + type: { + kind: "struct", + fields: [ + { + name: "alpha", + docs: ["The alpha bytes used to calculate the VRF proof."], + type: { + array: ["u8", 256], + }, + }, + { + name: "alphaLen", + docs: ["The number of bytes in the alpha buffer."], + type: "u32", + }, + { + name: "requestSlot", + docs: ["The Slot when the VRF round was opened."], + type: "u64", + }, + { + name: "requestTimestamp", + docs: ["The unix timestamp when the VRF round was opened."], + type: "i64", + }, + { + name: "result", + docs: [ + "The VRF round result. Will be zeroized if still awaiting fulfillment.", + ], + type: { + array: ["u8", 32], + }, + }, + { + name: "numVerified", + docs: ["The number of builders who verified the VRF proof."], + type: "u32", + }, + { + name: "ebuf", + docs: ["Reserved for future info."], + type: { + array: ["u8", 256], + }, + }, + ], + }, + }, + { + name: "VrfPoolRow", + type: { + kind: "struct", + fields: [ + { + name: "timestamp", + type: "i64", + }, + { + name: "pubkey", + type: "publicKey", + }, + ], + }, + }, + { + name: "BufferRelayerRound", + type: { + kind: "struct", + fields: [ + { + name: "numSuccess", + docs: ["Number of successful responses."], + type: "u32", + }, + { + name: "numError", + docs: ["Number of error responses."], + type: "u32", + }, + { + name: "roundOpenSlot", + docs: ["Slot when the buffer relayer round was opened."], + type: "u64", + }, + { + name: "roundOpenTimestamp", + docs: ["Timestamp when the buffer relayer round was opened."], + type: "i64", + }, + { + name: "oraclePubkey", + docs: [ + "The public key of the oracle fulfilling the buffer relayer update request.", + ], + type: "publicKey", + }, + ], + }, + }, + { + name: "Lanes", + docs: [ + "The `Lanes` enum represents a subset of the lanes `A,B,C,D` of a", + "`FieldElement2625x4`.", + "", + "It's used to specify blend operations without", + "having to know details about the data layout of the", + "`FieldElement2625x4`.", + ], + type: { + kind: "enum", + variants: [ + { + name: "C", + }, + { + name: "D", + }, + { + name: "AB", + }, + { + name: "AC", + }, + { + name: "CD", + }, + { + name: "AD", + }, + { + name: "BC", + }, + { + name: "ABCD", + }, + ], + }, + }, + { + name: "Shuffle", + docs: [ + "The `Shuffle` enum represents a shuffle of a `FieldElement2625x4`.", + "", + "The enum variants are named by what they do to a vector \\\\(", + "(A,B,C,D) \\\\); for instance, `Shuffle::BADC` turns \\\\( (A, B, C,", + "D) \\\\) into \\\\( (B, A, D, C) \\\\).", + ], + type: { + kind: "enum", + variants: [ + { + name: "AAAA", + }, + { + name: "BBBB", + }, + { + name: "CACA", + }, + { + name: "DBBD", + }, + { + name: "ADDA", + }, + { + name: "CBCB", + }, + { + name: "ABAB", + }, + { + name: "BADC", + }, + { + name: "BACD", + }, + { + name: "ABDC", + }, + ], + }, + }, + { + name: "Shuffle", + type: { + kind: "enum", + variants: [ + { + name: "AAAA", + }, + { + name: "BBBB", + }, + { + name: "BADC", + }, + { + name: "BACD", + }, + { + name: "ADDA", + }, + { + name: "CBCB", + }, + { + name: "ABDC", + }, + { + name: "ABAB", + }, + { + name: "DBBD", + }, + { + name: "CACA", + }, + ], + }, + }, + { + name: "Lanes", + type: { + kind: "enum", + variants: [ + { + name: "D", + }, + { + name: "C", + }, + { + name: "AB", + }, + { + name: "AC", + }, + { + name: "AD", + }, + { + name: "BCD", + }, + ], + }, + }, + { + name: "Error", + type: { + kind: "enum", + variants: [ + { + name: "InvalidPublicKey", + }, + { + name: "SerializationError", + }, + { + name: "DeserializationError", + }, + { + name: "InvalidDataError", + }, + ], + }, + }, + { + name: "VerificationStatus", + type: { + kind: "enum", + variants: [ + { + name: "None", + }, + { + name: "VerificationPending", + }, + { + name: "VerificationFailure", + }, + { + name: "VerificationSuccess", + }, + { + name: "VerificationOverride", + }, + ], + }, + }, + { + name: "AggregatorResolutionMode", + type: { + kind: "enum", + variants: [ + { + name: "ModeRoundResolution", + }, + { + name: "ModeSlidingResolution", + }, + ], + }, + }, + { + name: "SwitchboardPermission", + type: { + kind: "enum", + variants: [ + { + name: "PermitOracleHeartbeat", + }, + { + name: "PermitOracleQueueUsage", + }, + { + name: "PermitVrfRequests", + }, + ], + }, + }, + { + name: "OracleResponseType", + type: { + kind: "enum", + variants: [ + { + name: "TypeSuccess", + }, + { + name: "TypeError", + }, + { + name: "TypeDisagreement", + }, + { + name: "TypeNoResponse", + }, + ], + }, + }, + { + name: "VrfStatus", + type: { + kind: "enum", + variants: [ + { + name: "StatusNone", + }, + { + name: "StatusRequesting", + }, + { + name: "StatusVerifying", + }, + { + name: "StatusVerified", + }, + { + name: "StatusCallbackSuccess", + }, + { + name: "StatusVerifyFailure", + }, + ], + }, + }, + ], + events: [ + { + name: "VrfRequestRandomnessEvent", + fields: [ + { + name: "vrfPubkey", + type: "publicKey", + index: true, + }, + { + name: "oraclePubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + { + name: "loadAmount", + type: "u64", + index: false, + }, + { + name: "existingAmount", + type: "u64", + index: false, + }, + { + name: "alpha", + type: "bytes", + index: false, + }, + { + name: "counter", + type: "u128", + index: false, + }, + ], + }, + { + name: "VrfRequestEvent", + fields: [ + { + name: "vrfPubkey", + type: "publicKey", + index: true, + }, + { + name: "oraclePubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + ], + }, + { + name: "VrfProveEvent", + fields: [ + { + name: "vrfPubkey", + type: "publicKey", + index: true, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: true, + }, + { + name: "authorityPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "VrfVerifyEvent", + fields: [ + { + name: "vrfPubkey", + type: "publicKey", + index: true, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: true, + }, + { + name: "authorityPubkey", + type: "publicKey", + index: false, + }, + { + name: "amount", + type: "u64", + index: false, + }, + ], + }, + { + name: "VrfCallbackPerformedEvent", + fields: [ + { + name: "vrfPubkey", + type: "publicKey", + index: true, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: true, + }, + { + name: "amount", + type: "u64", + index: false, + }, + ], + }, + { + name: "AggregatorOpenRoundEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + { + name: "jobPubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + { + name: "remainingFunds", + type: "u64", + index: false, + }, + { + name: "queueAuthority", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorSaveResultEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "value", + type: { + defined: "BorshDecimal", + }, + index: false, + }, + { + name: "slot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + { + name: "jobValues", + type: { + vec: { + option: { + defined: "BorshDecimal", + }, + }, + }, + index: false, + }, + ], + }, + { + name: "AggregatorTeeSaveResultEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "value", + type: { + defined: "BorshDecimal", + }, + index: false, + }, + { + name: "slot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorValueUpdateEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "value", + type: { + defined: "BorshDecimal", + }, + index: false, + }, + { + name: "slot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + { + name: "oraclePubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + { + name: "oracleValues", + type: { + vec: { + defined: "BorshDecimal", + }, + }, + index: false, + }, + ], + }, + { + name: "OracleRewardEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + { + name: "walletPubkey", + type: "publicKey", + index: false, + }, + { + name: "amount", + type: "u64", + index: false, + }, + { + name: "roundSlot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "OracleWithdrawEvent", + fields: [ + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + { + name: "walletPubkey", + type: "publicKey", + index: false, + }, + { + name: "destinationWallet", + type: "publicKey", + index: false, + }, + { + name: "previousAmount", + type: "u64", + index: false, + }, + { + name: "newAmount", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "LeaseWithdrawEvent", + fields: [ + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + { + name: "walletPubkey", + type: "publicKey", + index: false, + }, + { + name: "previousAmount", + type: "u64", + index: false, + }, + { + name: "newAmount", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "OracleSlashEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + { + name: "walletPubkey", + type: "publicKey", + index: false, + }, + { + name: "amount", + type: "u64", + index: false, + }, + { + name: "roundSlot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "LeaseFundEvent", + fields: [ + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + { + name: "funder", + type: "publicKey", + index: false, + }, + { + name: "amount", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "ProbationBrokenEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "queuePubkey", + type: "publicKey", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "FeedPermissionRevokedEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "GarbageCollectFailureEvent", + fields: [ + { + name: "queuePubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "OracleBootedEvent", + fields: [ + { + name: "queuePubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorCrankEvictionEvent", + fields: [ + { + name: "crankPubkey", + type: "publicKey", + index: false, + }, + { + name: "aggregatorPubkey", + type: "publicKey", + index: true, + }, + { + name: "reason", + type: { + option: "u32", + }, + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "CrankLeaseInsufficientFundsEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "CrankPopExpectedFailureEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "leasePubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "BufferRelayerOpenRoundEvent", + fields: [ + { + name: "relayerPubkey", + type: "publicKey", + index: false, + }, + { + name: "jobPubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkeys", + type: { + vec: "publicKey", + }, + index: false, + }, + { + name: "remainingFunds", + type: "u64", + index: false, + }, + { + name: "queue", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "PriorityFeeReimburseEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "slot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + { + name: "fee", + type: "u64", + index: false, + }, + ], + }, + { + name: "AggregatorAddJobEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "jobPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorRemoveJobEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "jobPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorLockEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorInitEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorSetAuthorityEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + { + name: "oldAuthority", + type: "publicKey", + index: false, + }, + { + name: "newAuthority", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "AggregatorSetConfigsEvent", + fields: [ + { + name: "feedPubkey", + type: "publicKey", + index: false, + }, + ], + }, + { + name: "PermissionSetEvent", + fields: [ + { + name: "permissionKey", + type: "publicKey", + index: false, + }, + { + name: "permission", + type: { + defined: "SwitchboardPermission", + }, + index: false, + }, + { + name: "enable", + type: "bool", + index: false, + }, + ], + }, + { + name: "VrfPoolUpdateEvent", + fields: [ + { + name: "queuePubkey", + type: "publicKey", + index: false, + }, + { + name: "vrfPoolPubkey", + type: "publicKey", + index: false, + }, + { + name: "vrfPubkey", + type: "publicKey", + index: false, + }, + { + name: "newSize", + type: "u32", + index: false, + }, + { + name: "minInterval", + type: "u32", + index: false, + }, + ], + }, + { + name: "VrfPoolRequestEvent", + fields: [ + { + name: "queuePubkey", + type: "publicKey", + index: false, + }, + { + name: "vrfPoolPubkey", + type: "publicKey", + index: false, + }, + { + name: "vrfPubkey", + type: "publicKey", + index: false, + }, + { + name: "oraclePubkey", + type: "publicKey", + index: false, + }, + { + name: "slot", + type: "u64", + index: false, + }, + { + name: "timestamp", + type: "i64", + index: false, + }, + ], + }, + { + name: "QuoteVerifyRequestEvent", + fields: [ + { + name: "quotePubkey", + type: "publicKey", + index: false, + }, + ], + }, + ], + errors: [ + { + code: 6000, + name: "ArrayOperationError", + msg: "Illegal operation on a Switchboard array.", + }, + { + code: 6001, + name: "QueueOperationError", + msg: "Illegal operation on a Switchboard queue.", + }, + { + code: 6002, + name: "IncorrectProgramOwnerError", + msg: "An account required to be owned by the program has a different owner.", + }, + { + code: 6003, + name: "InvalidAggregatorRound", + msg: "Aggregator is not currently populated with a valid round.", + }, + { + code: 6004, + name: "TooManyAggregatorJobs", + msg: "Aggregator cannot fit any more jobs.", + }, + { + code: 6005, + name: "AggregatorCurrentRoundClosed", + msg: "Aggregator's current round is closed. No results are being accepted.", + }, + { + code: 6006, + name: "AggregatorInvalidSaveResult", + msg: "Aggregator received an invalid save result instruction.", + }, + { + code: 6007, + name: "InvalidStrDecimalConversion", + msg: "Failed to convert string to decimal format.", + }, + { + code: 6008, + name: "AccountLoaderMissingSignature", + msg: "AccountLoader account is missing a required signature.", + }, + { + code: 6009, + name: "MissingRequiredSignature", + msg: "Account is missing a required signature.", + }, + { + code: 6010, + name: "ArrayOverflowError", + msg: "The attempted action will overflow a zero-copy account array.", + }, + { + code: 6011, + name: "ArrayUnderflowError", + msg: "The attempted action will underflow a zero-copy account array.", + }, + { + code: 6012, + name: "PubkeyNotFoundError", + msg: "The queried public key was not found.", + }, + { + code: 6013, + name: "AggregatorIllegalRoundOpenCall", + msg: "Aggregator round open called too early.", + }, + { + code: 6014, + name: "AggregatorIllegalRoundCloseCall", + msg: "Aggregator round close called too early.", + }, + { + code: 6015, + name: "AggregatorClosedError", + msg: "Aggregator is closed. Illegal action.", + }, + { + code: 6016, + name: "IllegalOracleIdxError", + msg: "Illegal oracle index.", + }, + { + code: 6017, + name: "OracleAlreadyRespondedError", + msg: "The provided oracle has already responded this round.", + }, + { + code: 6018, + name: "ProtoDeserializeError", + msg: "Failed to deserialize protocol buffer.", + }, + { + code: 6019, + name: "UnauthorizedStateUpdateError", + msg: "Unauthorized program state modification attempted.", + }, + { + code: 6020, + name: "MissingOracleAccountsError", + msg: "Not enough oracle accounts provided to closeRounds.", + }, + { + code: 6021, + name: "OracleMismatchError", + msg: "An unexpected oracle account was provided for the transaction.", + }, + { + code: 6022, + name: "CrankMaxCapacityError", + msg: "Attempted to push to a Crank that's at capacity", + }, + { + code: 6023, + name: "AggregatorLeaseInsufficientFunds", + msg: "Aggregator update call attempted but attached lease has insufficient funds.", + }, + { + code: 6024, + name: "IncorrectTokenAccountMint", + msg: "The provided token account does not point to the Switchboard token mint.", + }, + { + code: 6025, + name: "InvalidEscrowAccount", + msg: "An invalid escrow account was provided.", + }, + { + code: 6026, + name: "CrankEmptyError", + msg: "Crank empty. Pop failed.", + }, + { + code: 6027, + name: "PdaDeriveError", + msg: "Failed to derive a PDA from the provided seed.", + }, + { + code: 6028, + name: "AggregatorAccountNotFound", + msg: "Aggregator account missing from provided account list.", + }, + { + code: 6029, + name: "PermissionAccountNotFound", + msg: "Permission account missing from provided account list.", + }, + { + code: 6030, + name: "LeaseAccountDeriveFailure", + msg: "Failed to derive a lease account.", + }, + { + code: 6031, + name: "PermissionAccountDeriveFailure", + msg: "Failed to derive a permission account.", + }, + { + code: 6032, + name: "EscrowAccountNotFound", + msg: "Escrow account missing from provided account list.", + }, + { + code: 6033, + name: "LeaseAccountNotFound", + msg: "Lease account missing from provided account list.", + }, + { + code: 6034, + name: "DecimalConversionError", + msg: "Decimal conversion method failed.", + }, + { + code: 6035, + name: "PermissionDenied", + msg: "Permission account is missing required flags for the given action.", + }, + { + code: 6036, + name: "QueueAtCapacity", + msg: "Oracle queue is at lease capacity.", + }, + { + code: 6037, + name: "ExcessiveCrankRowsError", + msg: "Data feed is already pushed on a crank.", + }, + { + code: 6038, + name: "AggregatorLockedError", + msg: "Aggregator is locked, no setting modifications or job additions allowed.", + }, + { + code: 6039, + name: "AggregatorInvalidBatchSizeError", + msg: "Aggregator invalid batch size.", + }, + { + code: 6040, + name: "AggregatorJobChecksumMismatch", + msg: "Oracle provided an incorrect aggregator job checksum.", + }, + { + code: 6041, + name: "IntegerOverflowError", + msg: "An integer overflow occurred.", + }, + { + code: 6042, + name: "InvalidUpdatePeriodError", + msg: "Minimum update period is 5 seconds.", + }, + { + code: 6043, + name: "NoResultsError", + msg: "Aggregator round evaluation attempted with no results.", + }, + { + code: 6044, + name: "InvalidExpirationError", + msg: "An expiration constraint was broken.", + }, + { + code: 6045, + name: "InsufficientStakeError", + msg: "An account provided insufficient stake for action.", + }, + { + code: 6046, + name: "LeaseInactiveError", + msg: "The provided lease account is not active.", + }, + { + code: 6047, + name: "NoAggregatorJobsFound", + msg: "No jobs are currently included in the aggregator.", + }, + { + code: 6048, + name: "IntegerUnderflowError", + msg: "An integer underflow occurred.", + }, + { + code: 6049, + name: "OracleQueueMismatch", + msg: "An invalid oracle queue account was provided.", + }, + { + code: 6050, + name: "OracleWalletMismatchError", + msg: "An unexpected oracle wallet account was provided for the transaction.", + }, + { + code: 6051, + name: "InvalidBufferAccountError", + msg: "An invalid buffer account was provided.", + }, + { + code: 6052, + name: "InsufficientOracleQueueError", + msg: "Insufficient oracle queue size.", + }, + { + code: 6053, + name: "InvalidAuthorityError", + msg: "Invalid authority account provided.", + }, + { + code: 6054, + name: "InvalidTokenAccountMintError", + msg: "A provided token wallet is associated with an incorrect mint.", + }, + { + code: 6055, + name: "ExcessiveLeaseWithdrawlError", + msg: "You must leave enough funds to perform at least 1 update in the lease.", + }, + { + code: 6056, + name: "InvalideHistoryAccountError", + msg: "Invalid history account provided.", + }, + { + code: 6057, + name: "InvalidLeaseAccountEscrowError", + msg: "Invalid lease account escrow.", + }, + { + code: 6058, + name: "InvalidCrankAccountError", + msg: "Invalid crank provided.", + }, + { + code: 6059, + name: "CrankNoElementsReadyError", + msg: "No elements ready to be popped.", + }, + { + code: 6060, + name: "IndexOutOfBoundsError", + msg: "Index out of bounds", + }, + { + code: 6061, + name: "VrfInvalidRequestError", + msg: "Invalid vrf request params", + }, + { + code: 6062, + name: "VrfInvalidProofSubmissionError", + msg: "Vrf proof failed to verify", + }, + { + code: 6063, + name: "VrfVerifyError", + msg: "Error in verifying vrf proof.", + }, + { + code: 6064, + name: "VrfCallbackError", + msg: "Vrf callback function failed.", + }, + { + code: 6065, + name: "VrfCallbackParamsError", + msg: "Invalid vrf callback params provided.", + }, + { + code: 6066, + name: "VrfCallbackAlreadyCalledError", + msg: "Vrf callback has already been triggered.", + }, + { + code: 6067, + name: "VrfInvalidPubkeyError", + msg: "The provided pubkey is invalid to use in ecvrf proofs", + }, + { + code: 6068, + name: "VrfTooManyVerifyCallsError", + msg: "Number of required verify calls exceeded", + }, + { + code: 6069, + name: "VrfRequestAlreadyLaunchedError", + msg: "Vrf request is already pending", + }, + { + code: 6070, + name: "VrfInsufficientVerificationError", + msg: "Insufficient amount of proofs collected for VRF callback", + }, + { + code: 6071, + name: "InvalidVrfProducerError", + msg: "An incorrect oracle attempted to submit a proof", + }, + { + code: 6072, + name: "InvalidGovernancePidError", + msg: "Invalid SPLGovernance Account Supplied", + }, + { + code: 6073, + name: "InvalidGovernanceAccountError", + msg: "An Invalid Governance Account was supplied", + }, + { + code: 6074, + name: "MissingOptionalAccount", + msg: "Expected an optional account", + }, + { + code: 6075, + name: "InvalidSpawnRecordOwner", + msg: "Invalid Owner for Spawn Record", + }, + { + code: 6076, + name: "NoopError", + msg: "Noop error", + }, + { + code: 6077, + name: "MissingRequiredAccountsError", + msg: "A required instruction account was not included", + }, + { + code: 6078, + name: "InvalidMintError", + msg: "Invalid mint account passed for instruction", + }, + { + code: 6079, + name: "InvalidTokenAccountKeyError", + msg: "An invalid token account was passed into the instruction", + }, + { + code: 6080, + name: "InvalidJobAccountError", + msg: "", + }, + { + code: 6081, + name: "VoterStakeRegistryError", + msg: "", + }, + { + code: 6082, + name: "AccountDiscriminatorMismatch", + msg: "Account discriminator did not match.", + }, + { + code: 6083, + name: "FuckingImpossibleError", + msg: "This error is fucking impossible.", + }, + { + code: 6084, + name: "InvalidVrfRound", + msg: "Responding to the wrong VRF round", + }, + { + code: 6085, + name: "JobSizeExceeded", + msg: "Job size has exceeded the max of 6400 bytes", + }, + { + code: 6086, + name: "JobChunksExceeded", + msg: "Job loading can only support a maximum of 8 chunks", + }, + { + code: 6087, + name: "JobDataLocked", + msg: "Job has finished initializing and is immutable", + }, + { + code: 6088, + name: "JobNotInitialized", + msg: "Job account has not finished initializing", + }, + { + code: 6089, + name: "BufferRelayerIllegalRoundOpenCall", + msg: "BufferRelayer round open called too early.", + }, + { + code: 6090, + name: "InvalidSliderAccount", + msg: "Invalid slider account.", + }, + { + code: 6091, + name: "VrfLiteHasExistingPool", + msg: "VRF lite account belongs to an existing pool.", + }, + { + code: 6092, + name: "VrfPoolFull", + msg: "VRF pool is at max capacity.", + }, + { + code: 6093, + name: "VrfPoolEmpty", + msg: "VRF pool is empty.", + }, + { + code: 6094, + name: "VrfAccountNotFound", + msg: "Failed to find VRF account in remaining accounts array.", + }, + { + code: 6095, + name: "AccountCloseNotReady", + msg: "Account is not ready to be closed.", + }, + { + code: 6096, + name: "VrfPoolRequestTooSoon", + msg: "VRF requested too soon.", + }, + { + code: 6097, + name: "VrfPoolMiss", + msg: "VRF pool miss.", + }, + { + code: 6098, + name: "VrfLiteOwnedByPool", + msg: "VRF lite belongs to a pool.", + }, + { + code: 6099, + name: "InsufficientTokenBalance", + msg: "Escrow has insufficient funds to perform this action.", + }, + { + code: 6100, + name: "InvalidQuoteError", + msg: "Invalid SAS quote account", + }, + { + code: 6101, + name: "InvalidHistoryAccountError", + msg: "", + }, + { + code: 6102, + name: "GenericError", + msg: "", + }, + { + code: 6103, + name: "InvalidAuthorityState", + msg: "", + }, + ], +}; diff --git a/javascript/sbv2-lite/tests/sbv2.test.ts b/javascript/sbv2-lite/tests/sbv2.test.ts new file mode 100644 index 0000000..636e17b --- /dev/null +++ b/javascript/sbv2-lite/tests/sbv2.test.ts @@ -0,0 +1,249 @@ +import SwitchboardProgram from "../src"; + +import * as anchor from "@coral-xyz/anchor"; +import { strict as assert } from "assert"; +import Big from "big.js"; + +describe("Switchboard V2 Lite Test", () => { + let sbv2: SwitchboardProgram; + + before(async () => { + // TODO: Add try catch block to check devnet environment accounts + sbv2 = await SwitchboardProgram.loadMainnet(); + }); + + // it("fetches and decodes SOL/USD mainnet aggregator", async () => { + // const accountInfo = await sbv2.program.provider.connection.getAccountInfo( + // solAggregatorPubkey + // ); + // if (!accountInfo) { + // throw new Error(`failed to fetch account info`); + // } + + // // Get latest value if its been updated in the last 300 seconds + // const latestResult = sbv2.decodeLatestAggregatorValue(accountInfo, 300); + // if (latestResult === null) { + // throw new Error(`failed to fetch latest result for aggregator`); + // } + // assert(latestResult instanceof Big, "latest result is not a big.js object"); + // assert( + // latestResult.toNumber() >= 0, + // "latest result is less than or equal to 0" + // ); + // }); + + it("decodes SOL/USD aggregator", async () => { + const aggregator = sbv2.decodeAggregator(solAggregatorAccountInfo); + + const latestResult = sbv2.decodeLatestAggregatorValue( + solAggregatorAccountInfo + ); + if (latestResult === null) { + throw new Error(`failed to fetch latest result for aggregator`); + } + assert(latestResult instanceof Big, "latest result is not a big.js object"); + assert( + latestResult.toNumber() === 104.967865328125, + "latest result is not equal to expected value of 104.967865328125" + ); + }); + + it("fails to decode stale aggregator", async () => { + const latestResult = sbv2.decodeLatestAggregatorValue( + solAggregatorAccountInfo, + 300 + ); + assert( + latestResult === null, + "aggregator should return null if value is more than 300s old" + ); + }); +}); + +const solAggregatorAccountInfo: anchor.web3.AccountInfo = { + data: Buffer.from([ + 217, 230, 65, 101, 201, 162, 27, 125, 83, 79, 76, 95, 85, 83, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 254, 83, 137, 67, 40, 165, 83, 155, 80, 27, 250, 104, 141, 83, 132, 233, 58, + 21, 213, 37, 206, 133, 134, 11, 167, 160, 205, 213, 5, 110, 232, 148, 33, + 220, 163, 22, 231, 144, 81, 75, 91, 144, 77, 37, 153, 183, 156, 217, 79, 99, + 143, 60, 146, 199, 29, 200, 242, 61, 250, 67, 81, 245, 189, 99, 3, 0, 0, 0, + 2, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 88, 96, 98, 0, 0, 0, 0, 0, + 232, 48, 130, 157, 109, 192, 148, 28, 222, 236, 197, 193, 185, 28, 120, 114, + 223, 110, 18, 68, 255, 63, 82, 34, 211, 20, 254, 125, 247, 195, 0, 190, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 216, 184, 200, 7, 0, 0, 0, 0, 108, 88, 96, 98, 0, 0, + 0, 0, 226, 211, 65, 91, 173, 186, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, + 0, 0, 221, 178, 249, 215, 167, 146, 206, 248, 90, 0, 0, 0, 0, 0, 28, 0, 0, + 0, 111, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 45, 134, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 32, 199, 151, 80, + 108, 73, 163, 195, 33, 198, 249, 191, 21, 162, 83, 134, 106, 247, 198, 82, + 36, 86, 177, 202, 241, 190, 232, 37, 55, 41, 29, 163, 222, 100, 183, 122, + 190, 54, 183, 109, 12, 229, 164, 70, 125, 112, 97, 247, 188, 14, 113, 24, + 176, 15, 175, 208, 157, 159, 107, 244, 41, 209, 227, 55, 231, 82, 60, 73, 4, + 36, 138, 53, 16, 25, 166, 74, 76, 144, 202, 226, 183, 187, 50, 183, 15, 179, + 60, 128, 97, 204, 166, 164, 161, 196, 113, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 163, 37, 143, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, + 228, 200, 58, 140, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 216, 184, 200, 7, 0, 0, 0, 0, 108, 88, 96, 98, 0, 0, 0, 0, 226, 211, 65, 91, + 173, 186, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 221, 178, 249, + 215, 167, 146, 206, 248, 90, 0, 0, 0, 0, 0, 28, 0, 0, 0, 111, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 45, 134, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 32, 199, 151, 80, 108, 73, 163, 195, 33, + 198, 249, 191, 21, 162, 83, 134, 106, 247, 198, 82, 36, 86, 177, 202, 241, + 190, 232, 37, 55, 41, 29, 163, 222, 100, 183, 122, 190, 54, 183, 109, 12, + 229, 164, 70, 125, 112, 97, 247, 188, 14, 113, 24, 176, 15, 175, 208, 157, + 159, 107, 244, 41, 209, 227, 55, 231, 82, 60, 73, 4, 36, 138, 53, 16, 25, + 166, 74, 76, 144, 202, 226, 183, 187, 50, 183, 15, 179, 60, 128, 97, 204, + 166, 164, 161, 196, 113, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 163, 37, 143, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 228, 200, 58, 140, + 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 212, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 48, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 45, 185, 18, 195, 245, 198, 216, + 233, 244, 18, 45, 14, 178, 93, 34, 177, 51, 25, 116, 102, 136, 188, 191, + 157, 71, 47, 158, 238, 28, 135, 110, 82, 134, 175, 95, 239, 3, 109, 92, 42, + 64, 56, 180, 32, 227, 236, 51, 157, 192, 153, 42, 190, 45, 255, 202, 12, + 242, 92, 15, 11, 14, 177, 185, 33, 246, 102, 130, 36, 106, 21, 161, 247, + 205, 155, 14, 124, 142, 3, 168, 151, 84, 181, 87, 173, 190, 106, 59, 132, + 136, 154, 229, 166, 218, 27, 254, 15, 12, 81, 31, 191, 153, 61, 184, 173, + 48, 160, 244, 41, 218, 75, 26, 56, 127, 150, 233, 41, 239, 214, 129, 194, + 98, 70, 104, 108, 76, 201, 199, 1, 114, 138, 67, 214, 204, 45, 81, 248, 201, + 102, 170, 130, 118, 159, 46, 111, 203, 207, 41, 179, 92, 83, 44, 137, 83, + 37, 172, 244, 190, 204, 148, 44, 144, 244, 196, 3, 215, 109, 102, 136, 14, + 91, 35, 45, 207, 101, 215, 32, 16, 32, 145, 151, 95, 213, 34, 67, 159, 141, + 241, 95, 34, 37, 27, 250, 181, 234, 77, 97, 0, 151, 71, 1, 11, 13, 80, 72, + 110, 160, 244, 210, 106, 163, 148, 141, 44, 186, 37, 238, 148, 24, 174, 95, + 4, 43, 72, 73, 105, 234, 83, 27, 132, 156, 157, 168, 18, 141, 66, 18, 10, + 180, 34, 74, 131, 207, 12, 238, 147, 14, 127, 12, 189, 235, 223, 218, 207, + 136, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 145, 18, 6, 17, 49, 126, 4, 68, 220, 147, 77, + 236, 138, 17, 39, 208, 107, 24, 211, 125, 170, 224, 128, 61, 223, 155, 37, + 149, 160, 11, 221, 174, 189, 225, 195, 114, 46, 165, 44, 213, 21, 155, 29, + 127, 14, 92, 73, 55, 26, 92, 23, 240, 56, 241, 200, 215, 196, 7, 201, 132, + 3, 99, 100, 225, 234, 208, 159, 177, 21, 205, 255, 192, 147, 93, 2, 96, 63, + 242, 200, 155, 213, 219, 243, 20, 253, 69, 114, 48, 237, 214, 59, 37, 39, + 77, 198, 171, 28, 164, 16, 10, 131, 26, 12, 190, 150, 68, 188, 48, 252, 199, + 156, 19, 116, 207, 255, 225, 136, 26, 230, 90, 112, 2, 0, 229, 167, 169, + 171, 197, 211, 123, 234, 255, 110, 0, 86, 32, 135, 64, 158, 98, 179, 86, 87, + 140, 208, 163, 129, 164, 90, 15, 76, 168, 62, 27, 170, 36, 159, 225, 233, + 167, 162, 101, 176, 19, 52, 14, 195, 66, 178, 53, 218, 155, 89, 174, 252, + 122, 165, 166, 113, 184, 60, 102, 207, 206, 3, 120, 64, 107, 228, 234, 49, + 189, 236, 79, 136, 142, 206, 151, 242, 234, 167, 95, 96, 237, 99, 153, 188, + 43, 63, 191, 63, 185, 119, 37, 39, 1, 114, 48, 47, 174, 23, 83, 57, 99, 58, + 84, 135, 120, 90, 129, 130, 178, 93, 98, 36, 16, 7, 22, 86, 238, 55, 78, + 184, 132, 246, 30, 109, 138, 157, 70, 169, 207, 203, 214, 171, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0, 211, 99, 128, 93, 12, 140, 85, 191, 58, 26, 142, 190, 248, + 72, 216, 45, 94, 39, 1, 153, 200, 155, 92, 125, 159, 237, 129, 71, 26, 9, + 215, 164, 236, 129, 16, 81, 18, 162, 87, 214, 29, 244, 207, 95, 19, 238, 10, + 27, 1, 145, 151, 200, 197, 52, 59, 79, 42, 126, 200, 132, 106, 226, 44, 26, + 193, 211, 158, 16, 56, 168, 103, 76, 155, 255, 160, 102, 203, 171, 43, 147, + 5, 136, 255, 154, 90, 206, 174, 147, 168, 217, 240, 103, 28, 252, 117, 64, + 241, 135, 8, 125, 137, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 90, + 184, 200, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + ]), + executable: false, + lamports: 27693840, + owner: SwitchboardProgram.oracleProgramId, + rentEpoch: 302, +}; + +const solAggregatorPubkey = new anchor.web3.PublicKey( + "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR" +); diff --git a/javascript/sbv2-lite/tests/tsconfig.json b/javascript/sbv2-lite/tests/tsconfig.json new file mode 100644 index 0000000..d97e7ba --- /dev/null +++ b/javascript/sbv2-lite/tests/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../tsconfig.json", + "include": [ + "../src", + "../test", + "../test/data/**.json" + ], + "exclude": [ + "**/node_modules" + ], + "compilerOptions": { + "types": [ + "node", + "mocha" + ], + "module": "ESNext", + "allowJs": true, + "rootDir": "../", + "resolveJsonModule": true + } +} \ No newline at end of file diff --git a/javascript/sbv2-lite/tsconfig.base.json b/javascript/sbv2-lite/tsconfig.base.json new file mode 100644 index 0000000..b7ae1eb --- /dev/null +++ b/javascript/sbv2-lite/tsconfig.base.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "include": [ + "./src/**/*", + "./src/**/*.json" + ], + "compilerOptions": { + "lib": [ + "ES2021", + "ES2022.Object", + "DOM" + ], + "moduleResolution": "nodenext", + "inlineSourceMap": false, + "inlineSources": false, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "resolveJsonModule": true, + "skipLibCheck": true, + // strict + "strict": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "strictFunctionTypes": true, + "noImplicitReturns": true, + "esModuleInterop": true + } +} \ No newline at end of file diff --git a/javascript/sbv2-lite/tsconfig.cjs.json b/javascript/sbv2-lite/tsconfig.cjs.json new file mode 100644 index 0000000..13426bd --- /dev/null +++ b/javascript/sbv2-lite/tsconfig.cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "**/tests/**/*.ts", "dist"], + "compilerOptions": { + "module": "commonjs", + "composite": false, + "declaration": false, + "declarationMap": false + } +} diff --git a/javascript/sbv2-lite/tsconfig.json b/javascript/sbv2-lite/tsconfig.json new file mode 100644 index 0000000..59f6efa --- /dev/null +++ b/javascript/sbv2-lite/tsconfig.json @@ -0,0 +1,34 @@ +{ + "extends": "./tsconfig.base.json", + "exclude": [ + "node_modules", + "**/tests/**/*.ts", + "lib" + ], + "include": [ + "src/**/*", + "src/**/*.json" + ], + "compilerOptions": { + "module": "ESNext", + "target": "es2022", + "lib": [ + "ES2021", + "ES2022.Object", + "DOM" + ], + "outDir": "lib", + "rootDir": "./src", + "declaration": true, + "experimentalDecorators": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "useDefineForClassFields": true, + "strictPropertyInitialization": false, + "strict": true, + "strictNullChecks": true, + "allowJs": true, + } +} \ No newline at end of file diff --git a/javascript/solana.js/package.json b/javascript/solana.js/package.json index a862d37..f00c12c 100644 --- a/javascript/solana.js/package.json +++ b/javascript/solana.js/package.json @@ -1,6 +1,6 @@ { "name": "@switchboard-xyz/solana.js", - "version": "2.4.4", + "version": "2.4.7", "author": "", "license": "MIT", "description": "A Typescript client to interact with Switchboard on Solana.", @@ -166,14 +166,14 @@ "@coral-xyz/borsh": "^0.28.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.0", - "@switchboard-xyz/common": "^2.2.5", + "@switchboard-xyz/common": "^2.2.8", "cron-validator": "^1.3.1", "dotenv": "^16.3.1", "lodash": "^4.17.21" }, "devDependencies": { - "@switchboard-xyz/eslint-config": "^0.1.9", - "@switchboard-xyz/oracle": "^2.1.13", + "@switchboard-xyz/eslint-config": "latest", + "@switchboard-xyz/oracle": "latest", "@types/chai": "^4.3.5", "@types/lodash": "^4.14.195", "@types/mocha": "^10.0.1", diff --git a/javascript/solana.js/src/accounts/attestationQueueAccount.ts b/javascript/solana.js/src/accounts/attestationQueueAccount.ts index de579a8..029fcb0 100644 --- a/javascript/solana.js/src/accounts/attestationQueueAccount.ts +++ b/javascript/solana.js/src/accounts/attestationQueueAccount.ts @@ -7,8 +7,7 @@ import type { TransactionObjectOptions, } from "../TransactionObject.js"; import { TransactionObject } from "../TransactionObject.js"; -import type { RawBuffer } from "../types.js"; -import { parseMrEnclave, parseRawBuffer } from "../utils.js"; +import { parseRawBuffer } from "../utils.js"; import { Account } from "./account.js"; import type { AttestationPermissionSetParams } from "./attestationPermissionAccount.js"; @@ -25,6 +24,11 @@ import type { TransactionSignature, } from "@solana/web3.js"; import { Keypair, SystemProgram } from "@solana/web3.js"; +import { + parseMrEnclave, + parseRawMrEnclave, + type RawBuffer, +} from "@switchboard-xyz/common"; /** * Parameters for initializing an {@linkcode QueueAccount} */ @@ -337,7 +341,9 @@ export class AttestationQueueAccount extends Account { Buffer.from(params.version ?? "latest", "utf8") ), schedule: new Uint8Array(cronSchedule), - mrEnclave: Array.from(parseMrEnclave(params.mrEnclave)), + mrEnclave: Array.from( + params.mrEnclave ? parseRawMrEnclave(params.mrEnclave) : [] + ), recentSlot: recentSlot, requestsDisabled: params.requestsDisabled ?? false, requestsRequireAuthorization: diff --git a/javascript/solana.js/src/accounts/functionRequestAccount.ts b/javascript/solana.js/src/accounts/functionRequestAccount.ts index 9d5776b..73b83bc 100644 --- a/javascript/solana.js/src/accounts/functionRequestAccount.ts +++ b/javascript/solana.js/src/accounts/functionRequestAccount.ts @@ -7,8 +7,6 @@ import type { TransactionObjectOptions, } from "../TransactionObject.js"; import { TransactionObject } from "../TransactionObject.js"; -import type { RawBuffer } from "../types.js"; -import { parseMrEnclave } from "../utils.js"; import { FunctionAccount } from "./index.js"; @@ -23,7 +21,8 @@ import type { TransactionSignature, } from "@solana/web3.js"; import { Keypair, SystemProgram } from "@solana/web3.js"; -import { BN, sleep } from "@switchboard-xyz/common"; +import type { RawBuffer } from "@switchboard-xyz/common"; +import { BN, parseRawMrEnclave, sleep } from "@switchboard-xyz/common"; /** * Parameters for initializing a {@linkcode FunctionRequestAccount} @@ -309,13 +308,13 @@ export class FunctionRequestAccount extends Account { queueAccount: this, queueAuthority: queueAuthorityPubkey, keypair: params.keypair, - authority: payer, + authority: params.authority, }, options ); @@ -547,13 +547,13 @@ export class QueueAccount extends Account { { fundAmount: params.fundAmount, funderTokenWallet: params.funderTokenWallet ?? userTokenAddress, - funderAuthority: params.funderAuthority ?? undefined, + funderAuthority: params.funderAuthority, + withdrawAuthority: params.withdrawAuthority ?? params.authority, aggregatorAccount: aggregatorAccount, queueAccount: this, jobAuthorities: [], // create lease before adding jobs to skip this step jobPubkeys: [], disableWrap: params.disableWrap, - withdrawAuthority: params.withdrawAuthority ?? payer, }, options ); diff --git a/javascript/solana.js/src/accounts/verifierAccount.ts b/javascript/solana.js/src/accounts/verifierAccount.ts index 7c469bb..69ce2a2 100644 --- a/javascript/solana.js/src/accounts/verifierAccount.ts +++ b/javascript/solana.js/src/accounts/verifierAccount.ts @@ -6,8 +6,7 @@ import type { TransactionObjectOptions, } from "../TransactionObject.js"; import { TransactionObject } from "../TransactionObject.js"; -import type { RawBuffer } from "../types.js"; -import { parseMrEnclave, parseRawBuffer } from "../utils.js"; +import { parseRawBuffer } from "../utils.js"; import { Account } from "./account.js"; import { @@ -21,6 +20,7 @@ import type { TransactionSignature, } from "@solana/web3.js"; import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; +import { parseRawMrEnclave, type RawBuffer } from "@switchboard-xyz/common"; export const QUOTE_SEED: string = "QuoteAccountData"; @@ -396,7 +396,7 @@ export class VerifierAccount extends Account { { params: { timestamp: params.timestamp, - mrEnclave: Array.from(parseMrEnclave(params.mrEnclave)), + mrEnclave: Array.from(parseRawMrEnclave(params.mrEnclave)), idx: verifierIdx, }, }, diff --git a/javascript/solana.js/src/types.ts b/javascript/solana.js/src/types.ts index ec75826..f54d8f5 100644 --- a/javascript/solana.js/src/types.ts +++ b/javascript/solana.js/src/types.ts @@ -27,8 +27,6 @@ import type { import type { OracleJob } from "@switchboard-xyz/common"; -export type RawBuffer = string | Buffer | Uint8Array | number[]; - export interface AccountDefinition { account: T; } diff --git a/javascript/solana.js/src/utils.ts b/javascript/solana.js/src/utils.ts index 42efe95..bb6ed62 100644 --- a/javascript/solana.js/src/utils.ts +++ b/javascript/solana.js/src/utils.ts @@ -7,11 +7,11 @@ import { JobAccount } from "./accounts/index.js"; import type { AggregatorAccountData } from "./generated/index.js"; import { InvalidCronSchedule } from "./errors.js"; import { TransactionObject } from "./TransactionObject.js"; -import type { RawBuffer } from "./types.js"; import type { AccountMeta } from "@solana/web3.js"; import { TransactionInstruction } from "@solana/web3.js"; import { Keypair, PublicKey } from "@solana/web3.js"; +import type { RawBuffer } from "@switchboard-xyz/common"; import { BN, OracleJob } from "@switchboard-xyz/common"; import { isValidCron } from "cron-validator"; import fs from "fs"; @@ -218,7 +218,9 @@ export function parseRawBuffer(rawBuffer: RawBuffer, size = 32): Uint8Array { myUint8Array = new Uint8Array(JSON.parse(rawBuffer)); } else if (hexRegex.test(rawBuffer)) { // check if its a hex string '0x1A' - myUint8Array = new Uint8Array(Buffer.from(rawBuffer, "hex")); + myUint8Array = new Uint8Array( + Buffer.from(rawBuffer.replaceAll(/0x|0X/g, ""), "hex") + ); } else if (base64Regex.test(rawBuffer)) { // check if its a base64 string myUint8Array = new Uint8Array(Buffer.from(rawBuffer, "base64")); @@ -241,10 +243,6 @@ export function parseRawBuffer(rawBuffer: RawBuffer, size = 32): Uint8Array { ); } -export function parseMrEnclave(mrEnclave: RawBuffer) { - return parseRawBuffer(mrEnclave, 32); -} - /** * Validate a cron schedule and return a valid 6 element cron string which includes seconds * @param cronSchedule - the cron string to validate diff --git a/javascript/solana.js/tsconfig.base.json b/javascript/solana.js/tsconfig.base.json index 5858ee8..99a5cdd 100644 --- a/javascript/solana.js/tsconfig.base.json +++ b/javascript/solana.js/tsconfig.base.json @@ -28,6 +28,16 @@ "strictNullChecks": false, "strictFunctionTypes": true, "noImplicitReturns": true, - "esModuleInterop": true - } + "esModuleInterop": true, + "paths": { + "@switchboard-xyz/common": [ + "../common" + ] + } + }, + "references": [ + { + "path": "../common" + } + ] } \ No newline at end of file diff --git a/javascript/solana.js/tsconfig.json b/javascript/solana.js/tsconfig.json index c35fbf1..88367ef 100644 --- a/javascript/solana.js/tsconfig.json +++ b/javascript/solana.js/tsconfig.json @@ -28,8 +28,24 @@ "strictPropertyInitialization": false, "strict": true, "strictNullChecks": true, - "allowJs": true + "allowJs": true, + "paths": { + "@switchboard-xyz/common": [ + "../common" + ], + "@switchboard-xyz/oracle": [ + "../oracle" + ] + } }, + "references": [ + { + "path": "../common" + }, + { + "path": "../oracle" + } + ], "typedocOptions": { "entryPoints": [ "src/index.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ba1ea8..4baa00a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' settings: autoInstallPeers: true @@ -16,7 +16,7 @@ importers: version: 17.4.4 '@switchboard-xyz/eslint-config': specifier: latest - version: 0.1.8 + version: 0.1.9 '@types/node': specifier: ^20.2.5 version: 20.2.5 @@ -64,7 +64,7 @@ importers: version: 1.77.3 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.77.3) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -98,7 +98,7 @@ importers: version: 4.1.5 prettier-plugin-organize-imports: specifier: ^2.3.4 - version: 2.3.4(prettier@2.8.8)(typescript@5.1.3) + version: 2.3.4(prettier@2.8.8)(typescript@5.1.6) ts-mocha: specifier: ^9.0.2 version: 9.0.2(mocha@9.2.2) @@ -113,7 +113,7 @@ importers: version: 1.77.3 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.77.3) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -150,7 +150,7 @@ importers: version: 1.78.0 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.78.0) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -199,7 +199,7 @@ importers: version: 1.78.0 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.78.0) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -248,7 +248,7 @@ importers: version: 1.78.0 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.78.0) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -294,7 +294,7 @@ importers: version: 0.3.8(@solana/web3.js@1.78.0) '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.78.0) '@switchboard-xyz/solana.js': specifier: latest version: link:../../../javascript/solana.js @@ -348,7 +348,7 @@ importers: version: 1.77.3 '@switchboard-xyz/common': specifier: latest - version: 2.2.5 + version: 2.2.9(@solana/web3.js@1.77.3) '@switchboard-xyz/oracle': specifier: latest version: 2.1.13 @@ -382,7 +382,7 @@ importers: version: 4.1.5 prettier-plugin-organize-imports: specifier: ^2.3.4 - version: 2.3.4(prettier@2.8.8)(typescript@5.1.3) + version: 2.3.4(prettier@2.8.8)(typescript@5.1.6) ts-mocha: specifier: ^9.0.2 version: 9.0.2(mocha@9.2.2) @@ -413,7 +413,7 @@ importers: devDependencies: '@switchboard-xyz/eslint-config': specifier: latest - version: 0.1.8 + version: 0.1.9 '@types/node': specifier: ^18.7.18 version: 18.11.18 @@ -436,6 +436,49 @@ importers: specifier: ^4.8.3 version: 4.9.4 + javascript/sbv2-lite: + dependencies: + '@coral-xyz/anchor': + specifier: ^0.28.0 + version: 0.28.0 + big.js: + specifier: ^6.1.1 + version: 6.2.1 + devDependencies: + '@types/big.js': + specifier: ^6.1.3 + version: 6.1.6 + '@types/chai': + specifier: ^4.3.1 + version: 4.3.5 + '@types/mocha': + specifier: ^9.1.0 + version: 9.1.1 + '@types/node': + specifier: ^18.7.18 + version: 18.11.18 + assert: + specifier: ^2.0.0 + version: 2.0.0 + chai: + specifier: ^4.3.6 + version: 4.3.7 + mocha: + specifier: ^9.2.2 + version: 9.2.2 + shx: + specifier: ^0.3.4 + version: 0.3.4 + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@types/node@18.11.18)(typescript@5.1.6) + typedoc: + specifier: ^0.23.8 + version: 0.23.28(typescript@5.1.6) + typescript: + specifier: ^5.1.6 + version: 5.1.6 + javascript/solana.js: dependencies: '@coral-xyz/anchor': @@ -451,8 +494,8 @@ importers: specifier: ^1.78.0 version: 1.78.0 '@switchboard-xyz/common': - specifier: ^2.2.5 - version: 2.2.5 + specifier: ^2.2.8 + version: 2.2.9(@solana/web3.js@1.78.0) cron-validator: specifier: ^1.3.1 version: 1.3.1 @@ -464,10 +507,10 @@ importers: version: 4.17.21 devDependencies: '@switchboard-xyz/eslint-config': - specifier: ^0.1.9 + specifier: latest version: 0.1.9 '@switchboard-xyz/oracle': - specifier: ^2.1.13 + specifier: latest version: 2.1.13 '@types/chai': specifier: ^4.3.5 @@ -1186,17 +1229,17 @@ packages: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: eslint: 8.42.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.45.0 - eslint-visitor-keys: 3.4.1 + eslint: 8.46.0 + eslint-visitor-keys: 3.4.2 dev: true /@eslint-community/regexpp@4.5.1: @@ -1204,6 +1247,11 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true + /@eslint-community/regexpp@4.6.2: + resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + /@eslint/eslintrc@0.4.3: resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1227,9 +1275,9 @@ packages: dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) - espree: 9.5.2 + espree: 9.6.1 globals: 13.20.0 - ignore: 5.2.0 + ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -1238,8 +1286,8 @@ packages: - supports-color dev: true - /@eslint/eslintrc@2.1.0: - resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} + /@eslint/eslintrc@2.1.1: + resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -1260,8 +1308,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@eslint/js@8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} + /@eslint/js@8.46.0: + resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -1560,7 +1608,7 @@ packages: buffer: 6.0.3 fast-stable-stringify: 1.0.0 jayson: 4.1.0 - node-fetch: 2.6.9 + node-fetch: 2.6.12 rpc-websockets: 7.5.1 superstruct: 0.14.2 transitivePeerDependencies: @@ -1614,24 +1662,22 @@ packages: - utf-8-validate dev: false - /@switchboard-xyz/common@2.2.5: - resolution: {integrity: sha512-pDVhm2tJSIM/4dPxtMzkzoEi2Eexo4Vo2Pei90aNd0luSp+A6Wxycqpypo0cD+W6kzRmCuFntywp3qOg7Np6UQ==} + /@switchboard-xyz/common@2.2.9(@solana/web3.js@1.77.3): + resolution: {integrity: sha512-ZhGLT8YobM3A3GKv8UMXQHUgW3bthyk+fsqEDWhO0Ej1xcOjGOS3c++K1/9Z8/xl1xekgQ5kj2CKC8AWxr+U+w==} engines: {node: '>=12'} dependencies: - '@solana/web3.js': 1.78.0 + '@coral-xyz/borsh': 0.28.0(@solana/web3.js@1.77.3) '@types/big.js': 6.1.6 '@types/bn.js': 5.1.1 big.js: 6.2.1 bn.js: 5.2.1 bs58: 5.0.0 decimal.js: 10.4.3 + lodash: 4.17.21 protobufjs: 7.2.3 yaml: 2.2.1 transitivePeerDependencies: - - bufferutil - - encoding - - supports-color - - utf-8-validate + - '@solana/web3.js' dev: false /@switchboard-xyz/common@2.2.9(@solana/web3.js@1.78.0): @@ -1652,40 +1698,20 @@ packages: - '@solana/web3.js' dev: false - /@switchboard-xyz/eslint-config@0.1.8: - resolution: {integrity: sha512-ZlWCsFuyAqqALEIT6UVHNQGQRs0Oxe3p9fLLI86QpQ52aOtM96Y2N5PkfTRTCKVtGmtpOOm+QaDcDowQcSeeUw==} - dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/type-utils': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - eslint: 8.45.0 - eslint-config-prettier: 8.8.0(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint@8.45.0) - eslint-plugin-node: 11.1.0(eslint@8.45.0) - eslint-plugin-prettier: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.45.0)(prettier@2.8.8) - eslint-plugin-simple-import-sort: 10.0.0(eslint@8.45.0) - prettier: 2.8.8 - typescript: 5.1.3 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - /@switchboard-xyz/eslint-config@0.1.9: resolution: {integrity: sha512-ZvCAsXn4NsBCECWvew/GIrkvDGzPhhDzT77jkEKQ7Xd2ftrjFJOeYoREDQIOhD88uN3qBl0cIKHbS4t0amkzGw==} dependencies: - '@typescript-eslint/eslint-plugin': 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/parser': 6.2.0(eslint@8.45.0)(typescript@5.0.4) - '@typescript-eslint/type-utils': 6.2.0(eslint@8.45.0)(typescript@5.1.3) - eslint: 8.45.0 - eslint-config-prettier: 8.9.0(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.2.0)(eslint@8.45.0) - eslint-plugin-node: 11.1.0(eslint@8.45.0) - eslint-plugin-prettier: 5.0.0(eslint-config-prettier@8.9.0)(eslint@8.45.0)(prettier@2.8.8) - eslint-plugin-simple-import-sort: 10.0.0(eslint@8.45.0) + '@typescript-eslint/eslint-plugin': 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + eslint: 8.46.0 + eslint-config-prettier: 8.9.0(eslint@8.46.0) + eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0) + eslint-plugin-node: 11.1.0(eslint@8.46.0) + eslint-plugin-prettier: 5.0.0(eslint-config-prettier@8.9.0)(eslint@8.46.0)(prettier@2.8.8) + eslint-plugin-simple-import-sort: 10.0.0(eslint@8.46.0) prettier: 2.8.8 - typescript: 5.1.3 + typescript: 5.1.6 transitivePeerDependencies: - '@types/eslint' - eslint-import-resolver-typescript @@ -1753,7 +1779,6 @@ packages: /@types/big.js@6.1.6: resolution: {integrity: sha512-0r9J+Zz9rYm2hOTwiMAVkm3XFQ4u5uTK37xrQMhc9bysn/sf/okzovWMYYIBMFTn/yrEZ11pusgLEaoarTlQbA==} - dev: false /@types/bn.js@5.1.1: resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} @@ -1913,44 +1938,16 @@ packages: debug: 4.3.4(supports-color@8.1.1) eslint: 7.32.0 functional-red-black-tree: 1.0.1 - ignore: 5.2.0 + ignore: 5.2.4 regexpp: 3.2.0 - semver: 7.3.8 + semver: 7.5.4 tsutils: 3.21.0(typescript@4.9.4) typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.45.0)(typescript@5.1.3): - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - 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: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 - graphemer: 1.4.0 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/eslint-plugin@6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.45.0)(typescript@5.1.3): + /@typescript-eslint/eslint-plugin@6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1962,20 +1959,20 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 6.2.0(eslint@8.45.0)(typescript@5.0.4) + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) '@typescript-eslint/scope-manager': 6.2.0 - '@typescript-eslint/type-utils': 6.2.0(eslint@8.45.0)(typescript@5.1.3) - '@typescript-eslint/utils': 6.2.0(eslint@8.45.0)(typescript@5.1.3) + '@typescript-eslint/type-utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 + eslint: 8.46.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 natural-compare-lite: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.3) - typescript: 5.1.3 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -2018,27 +2015,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.3): - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - 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.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.3) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 - typescript: 5.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser@6.2.0(eslint@8.45.0)(typescript@5.0.4): + /@typescript-eslint/parser@6.2.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2050,11 +2027,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.2.0 '@typescript-eslint/types': 6.2.0 - '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 - typescript: 5.0.4 + eslint: 8.46.0 + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -2067,14 +2044,6 @@ packages: '@typescript-eslint/visitor-keys': 4.33.0 dev: true - /@typescript-eslint/scope-manager@5.62.0: - resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - dev: true - /@typescript-eslint/scope-manager@6.2.0: resolution: {integrity: sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2083,27 +2052,7 @@ packages: '@typescript-eslint/visitor-keys': 6.2.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.45.0)(typescript@5.1.3): - resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.3) - '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.1.3) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/type-utils@6.2.0(eslint@8.45.0)(typescript@5.1.3): + /@typescript-eslint/type-utils@6.2.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2113,12 +2062,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.3) - '@typescript-eslint/utils': 6.2.0(eslint@8.45.0)(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.2.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.45.0 - ts-api-utils: 1.0.1(typescript@5.1.3) - typescript: 5.1.3 + eslint: 8.46.0 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -2128,11 +2077,6 @@ packages: engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} dev: true - /@typescript-eslint/types@5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@typescript-eslint/types@6.2.0: resolution: {integrity: sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2159,28 +2103,7 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.3): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree@6.2.0(typescript@5.0.4): + /@typescript-eslint/typescript-estree@6.2.0(typescript@5.1.6): resolution: {integrity: sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2195,66 +2118,25 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.0.4) - typescript: 5.0.4 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.2.0(typescript@5.1.3): - resolution: {integrity: sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.2.0 - '@typescript-eslint/visitor-keys': 6.2.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.3) - typescript: 5.1.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/utils@5.62.0(eslint@8.45.0)(typescript@5.1.3): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.3) - eslint: 8.45.0 - eslint-scope: 5.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils@6.2.0(eslint@8.45.0)(typescript@5.1.3): + /@typescript-eslint/utils@6.2.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.2.0 '@typescript-eslint/types': 6.2.0 - '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.3) - eslint: 8.45.0 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@5.1.6) + eslint: 8.46.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -2269,20 +2151,12 @@ packages: eslint-visitor-keys: 2.1.0 dev: true - /@typescript-eslint/visitor-keys@5.62.0: - resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - eslint-visitor-keys: 3.4.1 - dev: true - /@typescript-eslint/visitor-keys@6.2.0: resolution: {integrity: sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: '@typescript-eslint/types': 6.2.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /@ungap/promise-all-settled@1.1.2: @@ -2312,14 +2186,6 @@ packages: acorn: 8.10.0 dev: true - /acorn-jsx@5.3.2(acorn@8.8.1): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.8.1 - dev: true - /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} @@ -2439,6 +2305,13 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 + dev: true + /array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} dev: true @@ -2459,6 +2332,17 @@ packages: engines: {node: '>=8'} dev: true + /array.prototype.findlastindex@1.2.2: + resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.1.3 + dev: true + /array.prototype.flat@1.3.1: resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} @@ -2479,11 +2363,32 @@ packages: es-shim-unscopables: 1.0.0 dev: true + /arraybuffer.prototype.slice@1.0.1: + resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 + dev: true + /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} dev: true + /assert@2.0.0: + resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} + dependencies: + es6-object-assign: 1.1.0 + is-nan: 1.3.2 + object-is: 1.1.5 + util: 0.12.5 + dev: true + /assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true @@ -2493,6 +2398,11 @@ packages: engines: {node: '>=8'} dev: true + /available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -2672,7 +2582,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /callsites@3.1.0: @@ -3101,6 +3011,14 @@ packages: object-keys: 1.1.1 dev: true + /define-properties@1.2.0: + resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + engines: {node: '>= 0.4'} + dependencies: + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: true + /delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} @@ -3165,7 +3083,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.0 dev: false /dot-prop@5.3.0: @@ -3214,7 +3132,7 @@ packages: es-to-primitive: 1.2.1 function-bind: 1.1.1 function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 has: 1.0.3 has-property-descriptors: 1.0.0 @@ -3236,6 +3154,60 @@ packages: unbox-primitive: 1.0.2 dev: true + /es-abstract@1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.1 + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.2.1 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.12 + is-weakref: 1.0.2 + object-inspect: 1.12.3 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.5.0 + safe-array-concat: 1.0.0 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.7 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.11 + dev: true + + /es-set-tostringtag@2.0.1: + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + has-tostringtag: 1.0.0 + dev: true + /es-shim-unscopables@1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: @@ -3251,6 +3223,10 @@ packages: is-symbol: 1.0.4 dev: true + /es6-object-assign@1.1.0: + resolution: {integrity: sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==} + dev: true + /es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} dev: false @@ -3314,36 +3290,27 @@ packages: eslint: 7.32.0 dev: true - /eslint-config-prettier@8.8.0(eslint@8.45.0): - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.45.0 - dev: true - - /eslint-config-prettier@8.9.0(eslint@8.45.0): + /eslint-config-prettier@8.9.0(eslint@8.46.0): resolution: {integrity: sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true /eslint-import-resolver-node@0.3.7: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} dependencies: debug: 3.2.7 - is-core-module: 2.11.0 - resolve: 1.22.1 + is-core-module: 2.12.1 + resolve: 1.22.3 transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0): - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3363,38 +3330,9 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.3) + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7 - eslint: 8.45.0 - eslint-import-resolver-node: 0.3.7 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-module-utils@2.7.4(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0): - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 6.2.0(eslint@8.45.0)(typescript@5.0.4) - debug: 3.2.7 - eslint: 8.45.0 + eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color @@ -3411,19 +3349,19 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-es@3.0.1(eslint@8.45.0): + /eslint-plugin-es@3.0.1(eslint@8.46.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0)(eslint@8.45.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} + /eslint-plugin-import@2.28.0(@typescript-eslint/parser@6.2.0)(eslint@8.46.0): + resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3432,56 +3370,26 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.3) + '@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6) array-includes: 3.1.6 + array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.45.0 + eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0) has: 1.0.3 - is-core-module: 2.11.0 + is-core-module: 2.12.1 is-glob: 4.0.3 minimatch: 3.1.2 + object.fromentries: 2.0.6 + object.groupby: 1.0.0 object.values: 1.1.6 - resolve: 1.22.1 - semver: 6.3.0 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@6.2.0)(eslint@8.45.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - '@typescript-eslint/parser': 6.2.0(eslint@8.45.0)(typescript@5.0.4) - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.45.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0) - has: 1.0.3 - is-core-module: 2.11.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.1 - semver: 6.3.0 - tsconfig-paths: 3.14.1 + resolve: 1.22.3 + semver: 6.3.1 + tsconfig-paths: 3.14.2 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -3497,22 +3405,22 @@ packages: eslint: 7.32.0 eslint-plugin-es: 3.0.1(eslint@7.32.0) eslint-utils: 2.1.0 - ignore: 5.2.0 + ignore: 5.2.4 minimatch: 3.1.2 - resolve: 1.22.1 - semver: 6.3.0 + resolve: 1.22.3 + semver: 6.3.1 dev: true - /eslint-plugin-node@11.1.0(eslint@8.45.0): + /eslint-plugin-node@11.1.0(eslint@8.46.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.45.0 - eslint-plugin-es: 3.0.1(eslint@8.45.0) + eslint: 8.46.0 + eslint-plugin-es: 3.0.1(eslint@8.46.0) eslint-utils: 2.1.0 - ignore: 5.2.0 + ignore: 5.2.4 minimatch: 3.1.2 resolve: 1.22.1 semver: 6.3.0 @@ -3535,24 +3443,7 @@ packages: prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.45.0)(prettier@2.8.8): - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: '>=7.28.0' - eslint-config-prettier: '*' - prettier: '>=2.0.0' - peerDependenciesMeta: - eslint-config-prettier: - optional: true - dependencies: - eslint: 8.45.0 - eslint-config-prettier: 8.8.0(eslint@8.45.0) - prettier: 2.8.8 - prettier-linter-helpers: 1.0.0 - dev: true - - /eslint-plugin-prettier@5.0.0(eslint-config-prettier@8.9.0)(eslint@8.45.0)(prettier@2.8.8): + /eslint-plugin-prettier@5.0.0(eslint-config-prettier@8.9.0)(eslint@8.46.0)(prettier@2.8.8): resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -3566,19 +3457,19 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.45.0 - eslint-config-prettier: 8.9.0(eslint@8.45.0) + eslint: 8.46.0 + eslint-config-prettier: 8.9.0(eslint@8.46.0) prettier: 2.8.8 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 dev: true - /eslint-plugin-simple-import-sort@10.0.0(eslint@8.45.0): + /eslint-plugin-simple-import-sort@10.0.0(eslint@8.46.0): resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} peerDependencies: eslint: '>=5.0.0' dependencies: - eslint: 8.45.0 + eslint: 8.46.0 dev: true /eslint-scope@5.1.1: @@ -3597,6 +3488,14 @@ packages: estraverse: 5.3.0 dev: true + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + /eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} engines: {node: '>=6'} @@ -3629,6 +3528,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /eslint-visitor-keys@3.4.2: + resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /eslint@7.32.0: resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3665,10 +3569,10 @@ packages: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.1 + optionator: 0.9.3 progress: 2.0.3 regexpp: 3.2.0 - semver: 7.3.8 + semver: 7.5.4 strip-ansi: 6.0.1 strip-json-comments: 3.1.1 table: 6.8.0 @@ -3726,15 +3630,15 @@ packages: - supports-color dev: true - /eslint@8.45.0: - resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} + /eslint@8.46.0: + resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.44.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.1 + '@eslint/js': 8.46.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -3744,8 +3648,8 @@ packages: debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.2 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -3785,9 +3689,9 @@ packages: resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.1 - acorn-jsx: 5.3.2(acorn@8.8.1) - eslint-visitor-keys: 3.4.1 + acorn: 8.10.0 + acorn-jsx: 5.3.2(acorn@8.10.0) + eslint-visitor-keys: 3.4.2 dev: true /espree@9.6.1: @@ -3796,7 +3700,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.2 dev: true /esprima@4.0.1: @@ -3907,17 +3811,6 @@ packages: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - dev: true - /fast-glob@3.3.0: resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} engines: {node: '>=8.6.0'} @@ -4017,6 +3910,12 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + /fs-extra@11.1.0: resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} engines: {node: '>=14.14'} @@ -4065,8 +3964,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.0 + es-abstract: 1.22.1 functions-have-names: 1.2.3 dev: true @@ -4108,6 +4007,15 @@ packages: has-symbols: 1.0.3 dev: true + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: true + /get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -4124,7 +4032,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 dev: true /get-tsconfig@4.6.0: @@ -4195,18 +4103,31 @@ packages: type-fest: 0.20.2 dev: true + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.0 + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.0 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 dev: true + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.1 + dev: true + /got@11.8.6: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} engines: {node: '>=10.19.0'} @@ -4288,7 +4209,12 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 + dev: true + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} dev: true /has-symbols@1.0.3: @@ -4441,7 +4367,16 @@ packages: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 + has: 1.0.3 + side-channel: 1.0.4 + dev: true + + /internal-slot@1.0.5: + resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 has: 1.0.3 side-channel: 1.0.4 dev: true @@ -4451,6 +4386,22 @@ packages: engines: {node: '>= 0.10'} dev: true + /is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: true + /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true @@ -4488,8 +4439,8 @@ packages: ci-info: 3.8.0 dev: true - /is-core-module@2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + /is-core-module@2.12.1: + resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} dependencies: has: 1.0.3 dev: true @@ -4522,6 +4473,13 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -4537,6 +4495,14 @@ packages: is-docker: 3.0.0 dev: true + /is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -4626,6 +4592,13 @@ packages: text-extensions: 1.9.0 dev: true + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.11 + dev: true + /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true @@ -4653,6 +4626,10 @@ packages: is-docker: 2.2.1 dev: true + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true @@ -4766,6 +4743,14 @@ packages: dependencies: minimist: 1.2.7 dev: true + optional: true + + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + dependencies: + minimist: 1.2.7 + dev: true /json5@2.2.1: resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} @@ -5274,7 +5259,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.1 + resolve: 1.22.3 semver: 5.7.1 validate-npm-package-license: 3.0.4 dev: true @@ -5284,7 +5269,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.11.0 + is-core-module: 2.12.1 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -5336,6 +5321,18 @@ packages: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} dev: true + /object-inspect@1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: true + + /object-is@1.1.5: + resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + dev: true + /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} @@ -5346,11 +5343,29 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 + define-properties: 1.2.0 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true + /object.fromentries@2.0.6: + resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.1.4 + es-abstract: 1.20.4 + dev: true + + /object.groupby@1.0.0: + resolution: {integrity: sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + dev: true + /object.values@1.1.6: resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} @@ -5602,14 +5617,14 @@ packages: fast-diff: 1.2.0 dev: true - /prettier-plugin-organize-imports@2.3.4(prettier@2.8.8)(typescript@5.1.3): + /prettier-plugin-organize-imports@2.3.4(prettier@2.8.8)(typescript@5.1.6): resolution: {integrity: sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==} peerDependencies: prettier: '>=2.0' typescript: '>=2.9' dependencies: prettier: 2.8.8 - typescript: 5.1.3 + typescript: 5.1.6 dev: true /prettier@2.8.0: @@ -5749,7 +5764,7 @@ packages: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} dependencies: - resolve: 1.22.1 + resolve: 1.22.3 dev: true /redent@3.0.0: @@ -5768,7 +5783,16 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 + define-properties: 1.2.0 + functions-have-names: 1.2.3 + dev: true + + /regexp.prototype.flags@1.5.0: + resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 functions-have-names: 1.2.3 dev: true @@ -5818,7 +5842,16 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.12.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /resolve@1.22.3: + resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} + hasBin: true + dependencies: + is-core-module: 2.12.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -5885,6 +5918,16 @@ packages: tslib: 1.14.1 dev: true + /safe-array-concat@1.0.0: + resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -5892,7 +5935,7 @@ packages: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 is-regex: 1.1.4 dev: true @@ -5910,6 +5953,11 @@ packages: hasBin: true dev: true + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + /semver@7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} @@ -5996,8 +6044,8 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 - object-inspect: 1.12.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 dev: true /signal-exit@3.0.7: @@ -6111,20 +6159,29 @@ packages: es-abstract: 1.20.4 dev: true + /string.prototype.trim@1.2.7: + resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + /string.prototype.trimend@1.0.6: resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.0 + es-abstract: 1.22.1 dev: true /string.prototype.trimstart@1.0.6: resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 + define-properties: 1.2.0 + es-abstract: 1.22.1 dev: true /string_decoder@1.3.0: @@ -6275,22 +6332,13 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.0.1(typescript@5.0.4): + /ts-api-utils@1.0.1(typescript@5.1.6): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.0.4 - dev: true - - /ts-api-utils@1.0.1(typescript@5.1.3): - resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} - engines: {node: '>=16.13.0'} - peerDependencies: - typescript: '>=4.2.0' - dependencies: - typescript: 5.1.3 + typescript: 5.1.6 dev: true /ts-mocha@10.0.0(mocha@10.2.0): @@ -6363,6 +6411,37 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.1(@types/node@18.11.18)(typescript@5.1.6): + 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': 18.11.18 + 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: 5.1.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /ts-node@10.9.1(@types/node@20.2.5)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -6480,6 +6559,16 @@ packages: minimist: 1.2.7 strip-bom: 3.0.0 dev: true + optional: true + + /tsconfig-paths@3.14.2: + resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.7 + strip-bom: 3.0.0 + dev: true /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -6502,16 +6591,6 @@ packages: typescript: 4.9.4 dev: true - /tsutils@3.21.0(typescript@5.1.3): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.1.3 - dev: true - /tsx@3.12.7: resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} hasBin: true @@ -6640,6 +6719,44 @@ packages: engines: {node: '>=8'} dev: true + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + is-typed-array: 1.1.12 + dev: true + /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: @@ -6660,6 +6777,20 @@ packages: typescript: 5.0.4 dev: true + /typedoc@0.23.28(typescript@5.1.6): + resolution: {integrity: sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==} + engines: {node: '>= 14.14'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x + dependencies: + lunr: 2.3.9 + marked: 4.3.0 + minimatch: 7.4.6 + shiki: 0.14.3 + typescript: 5.1.6 + dev: true + /typescript@4.9.4: resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} engines: {node: '>=4.2.0'} @@ -6672,8 +6803,8 @@ packages: hasBin: true dev: true - /typescript@5.1.3: - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -6720,6 +6851,16 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true + /util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 + dev: true + /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true @@ -6785,6 +6926,17 @@ packages: path-exists: 4.0.0 dev: true + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: true + /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -7007,6 +7159,7 @@ packages: file:javascript/solana.js: resolution: {directory: javascript/solana.js, type: directory} name: '@switchboard-xyz/solana.js' + version: 2.4.7 engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: '@coral-xyz/anchor': 0.28.0 diff --git a/rust/switchboard-solana/Cargo.lock b/rust/switchboard-solana/Cargo.lock index b90d90e..7495c58 100644 --- a/rust/switchboard-solana/Cargo.lock +++ b/rust/switchboard-solana/Cargo.lock @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.9.4" +version = "0.9.5" dependencies = [ "anchor-client", "anchor-lang", diff --git a/rust/switchboard-solana/Cargo.toml b/rust/switchboard-solana/Cargo.toml index cfc36b1..dbf6760 100644 --- a/rust/switchboard-solana/Cargo.toml +++ b/rust/switchboard-solana/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchboard-solana" -version = "0.9.4" +version = "0.9.5" edition = "2021" description = "A Rust library to interact with Switchboard accounts." readme = "README.md" @@ -8,7 +8,6 @@ keywords = ["switchboard", "oracle", "solana"] homepage = "https://switchboard.xyz" repository = "https://github.com/switchboard-xyz/sbv2-solana/tree/main/rust/switchboard-solana" license = "MIT" -documentation = "https://docs.switchboard.xyz" [lib] crate-type = ["cdylib", "lib"] diff --git a/rust/switchboard-solana/src/client/function_runner.rs b/rust/switchboard-solana/src/client/function_runner.rs index ad328ca..e91b1ae 100644 --- a/rust/switchboard-solana/src/client/function_runner.rs +++ b/rust/switchboard-solana/src/client/function_runner.rs @@ -102,22 +102,27 @@ impl FunctionRunner { ) -> Result { let current_time = unix_timestamp(); - let fn_data: FunctionAccountData = - FunctionAccountData::fetch(&self.client, self.function).await?; + // let fn_data: FunctionAccountData = + // FunctionAccountData::fetch(&self.client, self.function).await?; + println!("Fetching verifier account {}", self.verifier); let verifier_quote: VerifierAccountData = VerifierAccountData::fetch(&self.client, self.verifier).await?; + println!( + "Fetching attestation queue account {}", + self.function_data.attestation_queue + ); let queue_data: AttestationQueueAccountData = - crate::client::load_account(&self.client, fn_data.attestation_queue).await?; + crate::client::load_account(&self.client, self.function_data.attestation_queue).await?; let verifier_permission = AttestationPermissionAccountData::get_pda( &queue_data.authority, - &fn_data.attestation_queue, + &self.function_data.attestation_queue, &self.verifier, ); - let maybe_next_allowed_timestamp = fn_data.get_next_execution_datetime(); + let maybe_next_allowed_timestamp = self.function_data.get_next_execution_datetime(); let next_allowed_timestamp: i64 = if maybe_next_allowed_timestamp.is_some() { maybe_next_allowed_timestamp.unwrap().timestamp() } else { @@ -137,9 +142,9 @@ impl FunctionRunner { verifier_quote: self.verifier, verifier_enclave_signer: verifier_quote.enclave.enclave_signer, verifier_permission, - escrow_wallet: fn_data.escrow_wallet, - escrow_token_wallet: fn_data.escrow_token_wallet, - attestation_queue: fn_data.attestation_queue, + escrow_wallet: self.function_data.escrow_wallet, + escrow_token_wallet: self.function_data.escrow_token_wallet, + attestation_queue: self.function_data.attestation_queue, receiver: self.reward_receiver, }; let ixn: Instruction = accounts.get_instruction(ixn_params)?; @@ -161,18 +166,18 @@ impl FunctionRunner { )); } - let fn_data: FunctionAccountData = - FunctionAccountData::fetch(&self.client, self.function).await?; + // let fn_data: FunctionAccountData = + // FunctionAccountData::fetch(&self.client, self.function).await?; let verifier_quote: VerifierAccountData = VerifierAccountData::fetch(&self.client, self.verifier).await?; let queue_data: AttestationQueueAccountData = - crate::client::load_account(&self.client, fn_data.attestation_queue).await?; + crate::client::load_account(&self.client, self.function_data.attestation_queue).await?; let verifier_permission = AttestationPermissionAccountData::get_pda( &queue_data.authority, - &fn_data.attestation_queue, + &self.function_data.attestation_queue, &self.verifier, ); @@ -192,12 +197,12 @@ impl FunctionRunner { function_enclave_signer: self.signer, token_wallet: fn_request_data.escrow, function: self.function, - function_escrow: fn_data.escrow_token_wallet, + function_escrow: self.function_data.escrow_token_wallet, verifier_quote: self.verifier, verifier_enclave_signer: verifier_quote.enclave.enclave_signer, verifier_permission, state: state_pubkey, - attestation_queue: fn_data.attestation_queue, + attestation_queue: self.function_data.attestation_queue, receiver: self.reward_receiver, }; let ixn: Instruction = accounts.get_instruction(ixn_params)?;