From dc8d155b62400fe5f88f50b055f5d26f353ddf4c Mon Sep 17 00:00:00 2001 From: Conner Gallagher Date: Tue, 11 Jul 2023 11:51:04 -0600 Subject: [PATCH] chore: release --- examples/feeds/01_feed_client/Cargo.lock | 8 +- examples/feeds/01_feed_client/Cargo.toml | 2 +- examples/feeds/01_feed_client/package.json | 1 - examples/feeds/02_spl_native/Cargo.toml | 2 +- examples/feeds/02_spl_native/package.json | 1 - .../functions/01_basic_oracle/Anchor.toml | 4 +- examples/functions/01_basic_oracle/Cargo.lock | 469 +++-- examples/functions/01_basic_oracle/Cargo.toml | 8 +- .../functions/01_basic_oracle/package.json | 21 +- .../01_basic_oracle/sgx-function/Cargo.lock | 1530 ++++++----------- .../01_basic_oracle/sgx-function/Cargo.toml | 6 +- .../01_basic_oracle/sgx-function/Dockerfile | 3 + .../01_basic_oracle/sgx-function/package.json | 1 - .../sgx-function/src/binance.rs | 12 +- .../01_basic_oracle/src/actions/initialize.rs | 18 +- .../01_basic_oracle/src/actions/mod.rs | 3 + .../src/actions/refresh_prices.rs | 29 +- .../src/actions/set_function.rs | 10 +- .../src/actions/trigger_function.rs | 43 + .../functions/01_basic_oracle/src/error.rs | 4 +- examples/functions/01_basic_oracle/src/lib.rs | 16 +- .../01_basic_oracle/tests/basic_oracle.ts | 103 +- .../functions/01_basic_oracle/tests/utils.ts | 16 + .../functions/01_basic_oracle/tsconfig.json | 29 +- examples/vrf/01_vrf_client/Cargo.lock | 8 +- examples/vrf/01_vrf_client/Cargo.toml | 3 +- javascript/solana.js/package.json | 2 +- javascript/solana.js/src/SolanaClock.ts | 5 +- javascript/solana.js/src/SwitchboardError.ts | 2 +- javascript/solana.js/src/SwitchboardEvents.ts | 6 +- .../solana.js/src/SwitchboardNetwork.ts | 29 +- .../solana.js/src/SwitchboardProgram.ts | 22 +- .../solana.js/src/SwitchboardTestContext.ts | 24 +- javascript/solana.js/src/TransactionObject.ts | 16 +- javascript/solana.js/src/accounts/account.ts | 28 +- .../src/accounts/aggregatorAccount.ts | 52 +- .../src/accounts/aggregatorHistoryBuffer.ts | 21 +- .../accounts/attestationPermissionAccount.ts | 16 +- .../attestationProgramStateAccount.ts | 4 +- .../src/accounts/attestationQueueAccount.ts | 140 +- .../src/accounts/bufferRelayAccount.ts | 21 +- .../solana.js/src/accounts/crankAccount.ts | 21 +- .../solana.js/src/accounts/crankDataBuffer.ts | 12 +- .../solana.js/src/accounts/functionAccount.ts | 298 +++- .../src/accounts/functionRequestAccount.ts | 13 +- javascript/solana.js/src/accounts/index.ts | 2 +- .../solana.js/src/accounts/jobAccount.ts | 12 +- .../solana.js/src/accounts/leaseAccount.ts | 17 +- .../solana.js/src/accounts/oracleAccount.ts | 19 +- .../src/accounts/permissionAccount.ts | 12 +- .../src/accounts/programStateAccount.ts | 12 +- .../solana.js/src/accounts/queueAccount.ts | 101 +- .../solana.js/src/accounts/queueDataBuffer.ts | 19 +- .../src/accounts/switchboardWallet.ts | 13 +- .../{enclaveAccount.ts => verifierAccount.ts} | 161 +- .../solana.js/src/accounts/vrfAccount.ts | 19 +- .../solana.js/src/accounts/vrfLiteAccount.ts | 21 +- .../solana.js/src/accounts/vrfPoolAccount.ts | 18 +- javascript/solana.js/src/errors.ts | 4 +- .../AttestationPermissionAccountData.ts | 12 +- .../accounts/AttestationProgramState.ts | 15 +- .../accounts/AttestationQueueAccountData.ts | 12 +- .../accounts/FunctionAccountData.ts | 146 +- .../accounts/FunctionRequestAccountData.ts | 12 +- .../accounts/SwitchboardWallet.ts | 12 +- ...eAccountData.ts => VerifierAccountData.ts} | 141 +- .../attestation-program/accounts/index.ts | 10 +- .../attestation-program/errors/anchor.ts | 36 +- .../attestation-program/errors/custom.ts | 3 +- ...errideClose.ts => accountCloseOverride.ts} | 19 +- .../instructions/attestationPermissionInit.ts | 18 +- .../instructions/attestationPermissionSet.ts | 22 +- .../attestationQueueAddMrEnclave.ts | 18 +- .../instructions/attestationQueueInit.ts | 18 +- .../attestationQueueRemoveMrEnclave.ts | 18 +- .../instructions/functionClose.ts | 20 +- .../instructions/functionDeactivateLookup.ts | 9 +- .../instructions/functionExtendLookup.ts | 18 +- .../instructions/functionInit.ts | 22 +- .../instructions/functionRequestClose.ts | 18 +- .../instructions/functionRequestInit.ts | 18 +- .../functionRequestInitAndTrigger.ts | 18 +- .../instructions/functionRequestSetConfig.ts | 18 +- .../instructions/functionRequestTrigger.ts | 18 +- .../instructions/functionRequestVerify.ts | 18 +- .../instructions/functionResetEscrow.ts | 20 +- .../instructions/functionSetAuthority.ts | 18 +- .../instructions/functionSetConfig.ts | 20 +- .../instructions/functionSetEscrow.ts | 18 +- .../instructions/functionTrigger.ts | 18 +- .../instructions/functionVerify.ts | 36 +- .../attestation-program/instructions/index.ts | 28 +- .../instructions/quoteRotate.ts | 51 - .../instructions/stateInit.ts | 18 +- ...quoteHeartbeat.ts => verifierHeartbeat.ts} | 42 +- .../{quoteInit.ts => verifierInit.ts} | 40 +- .../instructions/verifierQuoteRotate.ts | 47 + ...{quoteVerify.ts => verifierQuoteVerify.ts} | 38 +- .../instructions/walletClose.ts | 18 +- .../instructions/walletFund.ts | 18 +- .../instructions/walletInit.ts | 18 +- .../instructions/walletWithdraw.ts | 18 +- .../types/AttestationPermissionInitParams.ts | 5 +- .../types/AttestationPermissionSetParams.ts | 5 +- .../AttestationQueueAddMrEnclaveParams.ts | 5 +- .../types/AttestationQueueInitParams.ts | 5 +- .../AttestationQueueRemoveMrEnclaveParams.ts | 5 +- .../types/FunctionCloseParams.ts | 5 +- .../types/FunctionExtendLookupParams.ts | 5 +- .../types/FunctionInitParams.ts | 5 +- .../types/FunctionRequestCloseParams.ts | 5 +- .../FunctionRequestInitAndTriggerParams.ts | 5 +- .../types/FunctionRequestInitParams.ts | 5 +- .../types/FunctionRequestSetConfigParams.ts | 5 +- .../types/FunctionRequestTriggerParams.ts | 5 +- .../types/FunctionRequestTriggerRound.ts | 5 +- .../types/FunctionRequestVerifyParams.ts | 5 +- .../types/FunctionResetEscrowParams.ts | 5 +- .../types/FunctionSetAuthorityParams.ts | 5 +- .../types/FunctionSetConfigParams.ts | 5 +- .../types/FunctionSetEscrowParams.ts | 5 +- .../types/FunctionStatus.ts | 5 +- .../types/FunctionTriggerParams.ts | 5 +- .../types/FunctionVerifyParams.ts | 5 +- .../types/FundingStatus.ts | 5 +- .../attestation-program/types/Quote.ts | 12 + .../types/RequestStatus.ts | 5 +- .../types/StateInitParams.ts | 5 +- .../types/SwitchboardAttestationPermission.ts | 2 +- .../types/VerificationStatus.ts | 2 +- ...atParams.ts => VerifierHeartbeatParams.ts} | 20 +- ...oteInitParams.ts => VerifierInitParams.ts} | 20 +- ...Params.ts => VerifierQuoteRotateParams.ts} | 22 +- ...Params.ts => VerifierQuoteVerifyParams.ts} | 22 +- .../types/WalletCloseParams.ts | 5 +- .../types/WalletFundParams.ts | 5 +- .../types/WalletInitParams.ts | 5 +- .../types/WalletWithdrawParams.ts | 5 +- .../attestation-program/types/index.ts | 40 +- .../accounts/AggregatorAccountData.ts | 12 +- .../accounts/BufferRelayerAccountData.ts | 12 +- .../accounts/CrankAccountData.ts | 12 +- .../oracle-program/accounts/JobAccountData.ts | 12 +- .../accounts/LeaseAccountData.ts | 12 +- .../accounts/OracleAccountData.ts | 12 +- .../accounts/OracleQueueAccountData.ts | 12 +- .../accounts/PermissionAccountData.ts | 12 +- .../accounts/RealmSpawnRecordAccountData.ts | 15 +- .../oracle-program/accounts/SbState.ts | 12 +- .../accounts/SlidingResultAccountData.ts | 15 +- .../oracle-program/accounts/TaskSpecRecord.ts | 15 +- .../oracle-program/accounts/VrfAccountData.ts | 12 +- .../accounts/VrfLiteAccountData.ts | 12 +- .../accounts/VrfPoolAccountData.ts | 12 +- .../oracle-program/accounts/index.ts | 110 +- .../generated/oracle-program/errors/anchor.ts | 36 +- .../instructions/aggregatorAddJob.ts | 18 +- .../instructions/aggregatorClose.ts | 18 +- .../instructions/aggregatorInit.ts | 18 +- .../instructions/aggregatorLock.ts | 18 +- .../instructions/aggregatorOpenRound.ts | 18 +- .../instructions/aggregatorRemoveJob.ts | 18 +- .../instructions/aggregatorSaveResult.ts | 18 +- .../instructions/aggregatorSaveResultV2.ts | 18 +- .../instructions/aggregatorSetAuthority.ts | 18 +- .../instructions/aggregatorSetConfig.ts | 18 +- .../aggregatorSetHistoryBuffer.ts | 18 +- .../instructions/aggregatorSetQueue.ts | 18 +- .../aggregatorSetResolutionMode.ts | 18 +- .../instructions/aggregatorTeeSaveResult.ts | 18 +- .../instructions/bufferRelayerInit.ts | 18 +- .../instructions/bufferRelayerOpenRound.ts | 18 +- .../instructions/bufferRelayerSaveResult.ts | 18 +- .../oracle-program/instructions/crankInit.ts | 18 +- .../oracle-program/instructions/crankPop.ts | 18 +- .../oracle-program/instructions/crankPopV2.ts | 18 +- .../oracle-program/instructions/crankPush.ts | 18 +- .../oracle-program/instructions/index.ts | 316 ++-- .../oracle-program/instructions/jobInit.ts | 18 +- .../oracle-program/instructions/jobSetData.ts | 18 +- .../instructions/leaseExtend.ts | 18 +- .../oracle-program/instructions/leaseInit.ts | 18 +- .../instructions/leaseSetAuthority.ts | 18 +- .../instructions/leaseWithdraw.ts | 18 +- .../instructions/oracleHeartbeat.ts | 18 +- .../oracle-program/instructions/oracleInit.ts | 18 +- .../instructions/oracleQueueInit.ts | 18 +- .../instructions/oracleQueueSetConfig.ts | 18 +- .../instructions/oracleTeeHeartbeat.ts | 18 +- .../instructions/oracleWithdraw.ts | 18 +- .../instructions/permissionInit.ts | 18 +- .../instructions/permissionSet.ts | 18 +- .../instructions/programConfig.ts | 18 +- .../instructions/programInit.ts | 18 +- .../oracle-program/instructions/setBumps.ts | 18 +- .../instructions/vaultTransfer.ts | 18 +- .../instructions/vrfCloseAction.ts | 18 +- .../oracle-program/instructions/vrfInit.ts | 18 +- .../instructions/vrfLiteCloseAction.ts | 18 +- .../instructions/vrfLiteInit.ts | 18 +- .../instructions/vrfLiteProveAndVerify.ts | 18 +- .../instructions/vrfLiteRequestRandomness.ts | 18 +- .../oracle-program/instructions/vrfPoolAdd.ts | 18 +- .../instructions/vrfPoolInit.ts | 18 +- .../instructions/vrfPoolRemove.ts | 18 +- .../instructions/vrfPoolRequest.ts | 18 +- .../instructions/vrfProveAndVerify.ts | 18 +- .../instructions/vrfRequestRandomness.ts | 18 +- .../instructions/vrfSetCallback.ts | 18 +- .../oracle-program/types/AccountMetaBorsh.ts | 5 +- .../oracle-program/types/AccountMetaZC.ts | 5 +- .../types/AggregatorAddJobParams.ts | 5 +- .../types/AggregatorCloseParams.ts | 5 +- .../types/AggregatorHistoryRow.ts | 5 +- .../types/AggregatorInitParams.ts | 5 +- .../types/AggregatorLockParams.ts | 5 +- .../types/AggregatorOpenRoundParams.ts | 5 +- .../types/AggregatorRemoveJobParams.ts | 5 +- .../types/AggregatorResolutionMode.ts | 5 +- .../oracle-program/types/AggregatorRound.ts | 5 +- .../types/AggregatorSaveResultParams.ts | 5 +- .../types/AggregatorSaveResultParamsV2.ts | 5 +- .../types/AggregatorSetAuthorityParams.ts | 5 +- .../types/AggregatorSetBatchSizeParams.ts | 5 +- .../types/AggregatorSetConfigParams.ts | 5 +- .../AggregatorSetForceReportPeriodParams.ts | 5 +- .../types/AggregatorSetHistoryBufferParams.ts | 5 +- .../types/AggregatorSetMinJobsParams.ts | 5 +- .../types/AggregatorSetMinOraclesParams.ts | 5 +- .../types/AggregatorSetQueueParams.ts | 5 +- .../AggregatorSetResolutionModeParams.ts | 5 +- .../AggregatorSetUpdateIntervalParams.ts | 5 +- .../AggregatorSetVarianceThresholdParams.ts | 5 +- .../types/AggregatorTeeSaveResultParams.ts | 5 +- .../oracle-program/types/BorshDecimal.ts | 5 +- .../types/BufferRelayerInitParams.ts | 5 +- .../types/BufferRelayerOpenRoundParams.ts | 5 +- .../types/BufferRelayerRound.ts | 5 +- .../types/BufferRelayerSaveResultParams.ts | 5 +- .../oracle-program/types/Callback.ts | 5 +- .../oracle-program/types/CallbackZC.ts | 5 +- .../oracle-program/types/CompletedPointZC.ts | 5 +- .../oracle-program/types/CrankInitParams.ts | 5 +- .../oracle-program/types/CrankPopParams.ts | 5 +- .../oracle-program/types/CrankPopParamsV2.ts | 5 +- .../oracle-program/types/CrankPushParams.ts | 5 +- .../oracle-program/types/CrankRow.ts | 5 +- .../oracle-program/types/EcvrfIntermediate.ts | 5 +- .../oracle-program/types/EcvrfProofZC.ts | 5 +- .../oracle-program/types/EdwardsPointZC.ts | 5 +- .../types/EnclaveAccountData.ts | 261 --- .../generated/oracle-program/types/Error.ts | 5 +- .../oracle-program/types/FieldElementZC.ts | 5 +- .../generated/oracle-program/types/Hash.ts | 5 +- .../oracle-program/types/JobInitParams.ts | 5 +- .../oracle-program/types/JobSetDataParams.ts | 5 +- .../generated/oracle-program/types/Lanes.ts | 2 +- .../oracle-program/types/LeaseExtendParams.ts | 5 +- .../oracle-program/types/LeaseInitParams.ts | 5 +- .../types/LeaseSetAuthorityParams.ts | 5 +- .../types/LeaseWithdrawParams.ts | 5 +- .../types/OracleHeartbeatParams.ts | 5 +- .../oracle-program/types/OracleInitParams.ts | 5 +- .../oracle-program/types/OracleMetrics.ts | 5 +- .../types/OracleQueueInitParams.ts | 5 +- .../types/OracleQueueSetConfigParams.ts | 5 +- .../types/OracleQueueSetRewardsParams.ts | 5 +- .../types/OracleResponseType.ts | 5 +- .../types/OracleTeeHeartbeatParams.ts | 5 +- .../types/OracleWithdrawParams.ts | 5 +- .../types/PermissionInitParams.ts | 5 +- .../types/PermissionSetParams.ts | 5 +- .../types/ProgramConfigParams.ts | 5 +- .../oracle-program/types/ProgramInitParams.ts | 5 +- .../oracle-program/types/ProjectivePointZC.ts | 5 +- .../generated/oracle-program/types/Scalar.ts | 5 +- .../oracle-program/types/SetBumpsParams.ts | 5 +- .../generated/oracle-program/types/Shuffle.ts | 5 +- .../types/SlidingWindowElement.ts | 5 +- .../types/SwitchboardPermission.ts | 2 +- .../types/VaultTransferParams.ts | 5 +- .../oracle-program/types/VrfBuilder.ts | 5 +- .../oracle-program/types/VrfCloseParams.ts | 5 +- .../oracle-program/types/VrfInitParams.ts | 5 +- .../types/VrfLiteCloseParams.ts | 5 +- .../oracle-program/types/VrfLiteInitParams.ts | 5 +- .../types/VrfLiteProveAndVerifyParams.ts | 5 +- .../types/VrfLiteRequestRandomnessParams.ts | 5 +- .../oracle-program/types/VrfPoolAddParams.ts | 5 +- .../oracle-program/types/VrfPoolInitParams.ts | 5 +- .../types/VrfPoolRemoveParams.ts | 5 +- .../types/VrfPoolRequestParams.ts | 5 +- .../oracle-program/types/VrfPoolRow.ts | 5 +- .../types/VrfProveAndVerifyParams.ts | 5 +- .../oracle-program/types/VrfProveParams.ts | 5 +- .../types/VrfRequestRandomnessParams.ts | 5 +- .../oracle-program/types/VrfRound.ts | 5 +- .../types/VrfSetCallbackParams.ts | 5 +- .../oracle-program/types/VrfStatus.ts | 5 +- .../generated/oracle-program/types/index.ts | 15 +- javascript/solana.js/src/mint.ts | 8 +- javascript/solana.js/src/types.ts | 50 +- javascript/solana.js/src/utils.ts | 39 +- pnpm-lock.yaml | 246 ++- rust/switchboard-solana/Cargo.lock | 1231 ++++++++----- rust/switchboard-solana/Cargo.toml | 16 +- rust/switchboard-solana/package.json | 3 +- rust/switchboard-solana/src/accounts.rs | 2 +- .../attestation_program/accounts/function.rs | 180 +- .../src/attestation_program/accounts/mod.rs | 4 +- .../accounts/{enclave.rs => verifier.rs} | 123 +- .../instructions/function_init.rs | 43 +- .../instructions/function_set_config.rs | 19 +- .../instructions/function_verify.rs | 93 +- .../instructions/request_verify.rs | 101 +- .../src/attestation_program/mod.rs | 3 + .../src/attestation_program/types.rs | 50 + .../src/client/function_runner.rs | 56 +- rust/switchboard-solana/src/client/utils.rs | 2 +- rust/switchboard-solana/src/error.rs | 6 + rust/switchboard-solana/src/seeds.rs | 3 - rust/switchboard-solana/src/types.rs | 2 +- 322 files changed, 4493 insertions(+), 5041 deletions(-) create mode 100644 examples/functions/01_basic_oracle/src/actions/trigger_function.rs create mode 100644 examples/functions/01_basic_oracle/tests/utils.ts rename javascript/solana.js/src/accounts/{enclaveAccount.ts => verifierAccount.ts} (69%) rename javascript/solana.js/src/generated/attestation-program/accounts/{EnclaveAccountData.ts => VerifierAccountData.ts} (53%) rename javascript/solana.js/src/generated/attestation-program/instructions/{functionOverrideClose.ts => accountCloseOverride.ts} (60%) delete mode 100644 javascript/solana.js/src/generated/attestation-program/instructions/quoteRotate.ts rename javascript/solana.js/src/generated/attestation-program/instructions/{quoteHeartbeat.ts => verifierHeartbeat.ts} (50%) rename javascript/solana.js/src/generated/attestation-program/instructions/{quoteInit.ts => verifierInit.ts} (53%) create mode 100644 javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteRotate.ts rename javascript/solana.js/src/generated/attestation-program/instructions/{quoteVerify.ts => verifierQuoteVerify.ts} (52%) rename javascript/solana.js/src/generated/attestation-program/types/{QuoteHeartbeatParams.ts => VerifierHeartbeatParams.ts} (56%) rename javascript/solana.js/src/generated/attestation-program/types/{QuoteInitParams.ts => VerifierInitParams.ts} (59%) rename javascript/solana.js/src/generated/attestation-program/types/{QuoteRotateParams.ts => VerifierQuoteRotateParams.ts} (65%) rename javascript/solana.js/src/generated/attestation-program/types/{QuoteVerifyParams.ts => VerifierQuoteVerifyParams.ts} (73%) delete mode 100644 javascript/solana.js/src/generated/oracle-program/types/EnclaveAccountData.ts rename rust/switchboard-solana/src/attestation_program/accounts/{enclave.rs => verifier.rs} (62%) create mode 100644 rust/switchboard-solana/src/attestation_program/types.rs diff --git a/examples/feeds/01_feed_client/Cargo.lock b/examples/feeds/01_feed_client/Cargo.lock index 626cccd..d8490fd 100644 --- a/examples/feeds/01_feed_client/Cargo.lock +++ b/examples/feeds/01_feed_client/Cargo.lock @@ -4227,9 +4227,9 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-common" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba2cc1d6055e0989756adc4f54fa1e27d684ce08d6164da23900e93ac0b13b6" +checksum = "c5a03303674fb73b1dbe6cfc83aa8faa0e99264472a47177a1803f7475b318d1" dependencies = [ "getrandom 0.2.10", "hex", @@ -4249,7 +4249,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.8.4" +version = "0.9.1" dependencies = [ "anchor-client", "anchor-lang", @@ -4258,6 +4258,7 @@ dependencies = [ "bytemuck", "chrono", "cron", + "hex", "rust_decimal", "sgx-quote", "solana-address-lookup-table-program", @@ -4265,6 +4266,7 @@ dependencies = [ "solana-program", "superslice", "switchboard-common", + "tokio", ] [[package]] diff --git a/examples/feeds/01_feed_client/Cargo.toml b/examples/feeds/01_feed_client/Cargo.toml index 4413788..920588f 100644 --- a/examples/feeds/01_feed_client/Cargo.toml +++ b/examples/feeds/01_feed_client/Cargo.toml @@ -17,5 +17,5 @@ cpi = ["no-entrypoint"] [dependencies] # switchboard-solana = "0.8.4" -switchboard-solana = { version = "0.8.4", path = "../../../rust/switchboard-solana" } +switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" } bytemuck = "1.13.1" diff --git a/examples/feeds/01_feed_client/package.json b/examples/feeds/01_feed_client/package.json index 3a0dfdd..86c8864 100644 --- a/examples/feeds/01_feed_client/package.json +++ b/examples/feeds/01_feed_client/package.json @@ -40,7 +40,6 @@ "prettier": "^2.4.1", "prettier-plugin-organize-imports": "^2.3.4", "shx": "^0.3.4", - "switchboard-solana": "workspace:*", "ts-mocha": "^9.0.2", "ts-node": "^10.9.1", "typescript": "^4.9.3" diff --git a/examples/feeds/02_spl_native/Cargo.toml b/examples/feeds/02_spl_native/Cargo.toml index 0d4fee6..4bc1591 100644 --- a/examples/feeds/02_spl_native/Cargo.toml +++ b/examples/feeds/02_spl_native/Cargo.toml @@ -12,4 +12,4 @@ no-entrypoint = [] [dependencies] # switchboard-solana = "0.8.4" -switchboard-solana = { version = "0.8.4", path = "../../../rust/switchboard-solana" } +switchboard-solana = { version = "0.9.1", path = "../../../rust/switchboard-solana" } diff --git a/examples/feeds/02_spl_native/package.json b/examples/feeds/02_spl_native/package.json index 1bd7d98..b3e8ee9 100644 --- a/examples/feeds/02_spl_native/package.json +++ b/examples/feeds/02_spl_native/package.json @@ -25,7 +25,6 @@ "@types/node": "^17.0.45", "chai": "^4.3.6", "mocha": "^9.0.3", - "switchboard-solana": "workspace:*", "ts-mocha": "^9.0.2", "ts-node": "^10.4.0", "typescript": "^4.7" diff --git a/examples/functions/01_basic_oracle/Anchor.toml b/examples/functions/01_basic_oracle/Anchor.toml index 94959ab..d410435 100644 --- a/examples/functions/01_basic_oracle/Anchor.toml +++ b/examples/functions/01_basic_oracle/Anchor.toml @@ -6,9 +6,11 @@ seeds = false skip-lint = false [programs.localnet] -basic_oracle = "CE1HrS25FhvPjcAH4Zjka6uJBbYrDRY7uZ8PPSkiUwAh" +basic_oracle = "8GHcguBXZEfKaLxRrBvis7LqPcFjBszv4ZYBgKwCUipS" [provider] +# cluster = "https://switchbo-switchbo-6225.devnet.rpcpool.com/f6fb9f02-0777-498b-b8f5-67cbb1fc0d14" +# wallet = "~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json" cluster = "Localnet" wallet = "~/.config/solana/id.json" diff --git a/examples/functions/01_basic_oracle/Cargo.lock b/examples/functions/01_basic_oracle/Cargo.lock index 10c9b13..22246c0 100644 --- a/examples/functions/01_basic_oracle/Cargo.lock +++ b/examples/functions/01_basic_oracle/Cargo.lock @@ -110,7 +110,7 @@ dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "regex", "syn 1.0.109", ] @@ -125,7 +125,7 @@ dependencies = [ "anyhow", "bs58 0.5.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustversion", "syn 1.0.109", ] @@ -149,7 +149,7 @@ checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" dependencies = [ "anchor-syn", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -162,7 +162,7 @@ dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -175,7 +175,7 @@ dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -207,7 +207,7 @@ dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -218,7 +218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -269,7 +269,7 @@ dependencies = [ "bs58 0.5.0", "heck", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "serde", "serde_json", "sha2 0.10.7", @@ -361,7 +361,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -374,7 +374,7 @@ dependencies = [ "num-bigint 0.4.3", "num-traits", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -410,7 +410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -477,7 +477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "synstructure", ] @@ -489,7 +489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -501,9 +501,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -535,13 +535,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -589,6 +589,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" name = "basic_oracle" version = "0.1.0" dependencies = [ + "anchor-lang", "bytemuck", "switchboard-solana", ] @@ -631,9 +632,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -721,7 +722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -732,7 +733,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -743,7 +744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -754,7 +755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -828,7 +829,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -848,8 +849,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -938,7 +939,7 @@ dependencies = [ "atty", "bitflags", "clap_lex", - "indexmap 1.9.3", + "indexmap", "once_cell", "strsim 0.10.0", "termcolor", @@ -1017,9 +1018,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" @@ -1039,9 +1040,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1177,9 +1178,9 @@ dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "strsim 0.10.0", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1189,8 +1190,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1235,7 +1236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -1278,8 +1279,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1383,8 +1384,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1400,12 +1401,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" - [[package]] name = "errno" version = "0.3.1" @@ -1534,8 +1529,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1638,7 +1633,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -1681,12 +1676,6 @@ dependencies = [ "ahash 0.8.3", ] -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - [[package]] name = "heck" version = "0.3.3" @@ -1707,18 +1696,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1907,16 +1887,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown 0.14.0", -] - [[package]] name = "indicatif" version = "0.17.5" @@ -1945,7 +1915,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] @@ -1967,9 +1937,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jobserver" @@ -2293,7 +2263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2341,11 +2311,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2375,7 +2345,7 @@ checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2387,8 +2357,8 @@ checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -2475,14 +2445,14 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "pbkdf2" @@ -2528,9 +2498,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2638,7 +2608,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2712,9 +2682,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2 1.0.63", ] @@ -2859,9 +2829,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" dependencies = [ "aho-corasick", "memchr", @@ -2870,9 +2852,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "rend" @@ -2963,7 +2945,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -3038,9 +3020,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags", "errno", @@ -3076,32 +3058,32 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -3126,8 +3108,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -3177,38 +3159,38 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "d614f89548720367ded108b3c843be93f3a341e22d5674ca0dd5cd57f34926af" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "d4fe589678c688e44177da4f27152ee2d190757271dc7f1d5b6b9f68d869d641" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", @@ -3245,8 +3227,8 @@ checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ "darling", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -3363,9 +3345,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -3379,9 +3361,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380584cb468a1eb2ea79495c0c574ca09a11bf6796093b97a48a94cd98fe5b30" +checksum = "f63c62ec28eaf2f4ef06f39d549230699068e9b2171a67a8232e11993ecb86dd" dependencies = [ "Inflector", "base64 0.21.2", @@ -3403,9 +3385,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dcdcbe2a61849b7692ac9eb6ad567ea4f333c36272d5d12de554aa2f60fa792" +checksum = "5ddbc426b2e0443c2e58c0ab721c93a788f0e97eb4f25340e4e50dd1e6978027" dependencies = [ "bincode", "bytemuck", @@ -3424,9 +3406,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe8a1443f3efac9c351c0b55efa39df488e73bcdd512272cb39e58198dcf9cc" +checksum = "a19777832c5623c5a1b642f35d847acaf7243124e8f4f300dbe9d387b05b4f78" dependencies = [ "chrono", "clap 2.34.0", @@ -3442,15 +3424,15 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46e6294e67101c8df185e9c371293ff2502bf5b35d4d70eb68472eae135692e5" +checksum = "c7e3458b0fcf87b14560836a9dc1d0270fe1b4d70425235e91b94a74f4a614f0" dependencies = [ "async-trait", "bincode", "futures", "futures-util", - "indexmap 1.9.3", + "indexmap", "indicatif", "log", "quinn", @@ -3475,9 +3457,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44cd8bbbc468503ca8d337c91a6f6049ced080be31854d866a25974f1b90619" +checksum = "1ac78caf77ffe8cc8c108b2e424f5e710f640777f3d78faf2ac7535008a39f5a" dependencies = [ "bincode", "chrono", @@ -3489,14 +3471,14 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e953284f00e9b706032fe36b30054f3c804f37a363fac7d8cb1753a1737cf20b" +checksum = "964e4b517d80543e9ff0676bb1700f5011e8588795f4e68fb8ab343c87eefad4" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 1.9.3", + "indexmap", "log", "rand 0.7.3", "rayon", @@ -3510,9 +3492,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea8be57163366de9ffee3652cd42ea02fd5cca672408722f1426eb0d234a330" +checksum = "6c272bd949536a92f0fc4d9572bf72b35b3545fc1f6ee031e44f9d075809055d" dependencies = [ "ahash 0.8.3", "blake3", @@ -3543,21 +3525,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4121f91307234cec8c8d8cd2d7ec171881c07db2222335e8c840d555ebe89cc" +checksum = "2f84be4b6dd2cc4e8ad5baa54a23018c8936ec32322ebcffd88355631700292a" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustc_version", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] name = "solana-logger" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f590904a129707c5bf6b9f2e198e49ce8984e802dad26babd2c406a4e898b0ce" +checksum = "b3cb934e8c9015e86cd9c7382ea3083578d1c0813a351644cfdabe3009591b03" dependencies = [ "env_logger", "lazy_static", @@ -3566,9 +3548,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26976359ec46d158ce2880d5a31bca4b08e971d29d03c25e9ba80f9a3d42b28e" +checksum = "2a038b70fac9cd5529839efc258e6453f0018d34937a414cd030318916d6dba6" dependencies = [ "log", "solana-sdk", @@ -3576,9 +3558,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d97a86ca9bc1c33b77f98502ef0ec133823ebbb813fc60e10c6cf6377bbbdf2" +checksum = "cca14a16eac701e20bda3e103e3d078074a18e83e126f90d918e141379eade8d" dependencies = [ "crossbeam-channel", "gethostname", @@ -3590,9 +3572,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63f59abfa214c43b2b0d0360f7a50c180a0e86ea9a16ad7598ca0c9d8843483" +checksum = "509c3d5bc7fe8dbcc25b3238d7cd4a0994c39207260b7b5271a3110ea0ac5f75" dependencies = [ "bincode", "clap 3.2.25", @@ -3612,9 +3594,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7219016f9a81863decafd5256ec0d32d57a8c4e9529f9134fd8727684cc0936" +checksum = "3a65308af752a91eddf06c7b7bb5e5d6296ec8cd8de5a1cbebd61f53f45a808c" dependencies = [ "ahash 0.8.3", "bincode", @@ -3639,9 +3621,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ac28d05adeff2212cdec76dfacc6eb631d69d065b1b83c063a1fab505d5e62" +checksum = "476510cb86b9602a793582788f5e23a9cca11929d3880b7427a67142b1e4a430" dependencies = [ "ark-bn254", "ark-ec", @@ -3693,9 +3675,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cb661d9fe32ec33ba8df554827becd5bcc1758392194420899771344177fb1" +checksum = "8311e581ff6406c84ce8ed5d4f1316cf091f723b4823a1ece3e36be6cfb3d69c" dependencies = [ "base64 0.21.2", "bincode", @@ -3721,9 +3703,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a503785ba377f33dd5b1fac75cb60c086ba625c5305f0bf3e687240cdcc7381f" +checksum = "5274196946dfef625ec905f7834e7d45b8367364f8eaf99e2c754951da6b972d" dependencies = [ "crossbeam-channel", "futures-util", @@ -3746,9 +3728,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ede431a588575037db080835f09e9436bb9d5f3b3e19a5592eca3af13da369" +checksum = "3b27ad60edef844f182cd7071e653731ec16b3a319524448935a1183f6b99b80" dependencies = [ "async-mutex", "async-trait", @@ -3774,9 +3756,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4131723cc61f9981c3fa792567c658cf8fa64366331647835c3b88ba0685bad9" +checksum = "441bde92d8befd3a698e54c35bff63a396f1e3e5e85754d85a5308a8f5d0328a" dependencies = [ "lazy_static", "num_cpus", @@ -3784,9 +3766,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74894d82e6adcd95398dd4d190e6f303e424d47841b20f822a5ec27d5b77473" +checksum = "e1b8820ed78c726c9359248a8fb6456657ce6feca2ff31ffac1286f55bee99e8" dependencies = [ "console", "dialoguer", @@ -3803,9 +3785,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e9519b92e003d763ab2123ac099c32a56f66951cd810d4fa3615a800300860" +checksum = "5baeb95820862d14c1391dfda9a3173b0509f1b17ebd1090b3778fac1743ab69" dependencies = [ "async-trait", "base64 0.21.2", @@ -3829,9 +3811,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5556080cb9a1c70b782de622ee5840d6e1a256c65ab35a3b8542656ffe69a0" +checksum = "29009927e289fc5ccd19cec05780dc8465eb65e52922087cf769e57d72c0b7b5" dependencies = [ "base64 0.21.2", "bs58 0.4.0", @@ -3851,9 +3833,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe69e5bab1a8afc475c1aab69ce53360e76fafa0f5efcc5ce151298be763653" +checksum = "df466014e9768f4741be00acea0067bde11a2ec1162a12ebf896960990a2e6b8" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -3864,9 +3846,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa2d54c0e9109d1bf9edafbd86d645217776df783814397f79c3929cf4316ba" +checksum = "352b70bb14d8968d5484aa73a1aede3acc816f10a0b264c6599108c5dd6b647b" dependencies = [ "assert_matches", "base64 0.21.2", @@ -3917,29 +3899,29 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa991e6d6ae7c57ef9fc56f964b22f3bae6ba6c144ccb07b0fe07e06a3efc47c" +checksum = "e38a884c027b0759d0969efc1253f3b8798f9d5fbef2eb158cdb70763619d2f3" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustversion", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] name = "solana-streamer" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2500570c1fe541d3e36c3ce318f25dab24dfd6aeab216afafa5c7c161d4979c8" +checksum = "13b87bd090a462765b6e3196e6c22cc0edebf8942fb4a6de9a807ce3d8d5d436" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 1.9.3", + "indexmap", "itertools", "libc", "log", @@ -3963,9 +3945,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2fd4ae4d27790ae211f16a6e85a02585b7cae7057f8d555bad3762b4901c" +checksum = "ab8dc82e52a443249c5b1df3ddd7273306c81fde2c8057cc398e0fbd0fae7a47" dependencies = [ "bincode", "log", @@ -3978,14 +3960,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56bfe97fb1ab0eb44abb623272648bea404d309e584ba6f8e981e6626cfb0cb" +checksum = "5a09c139e796337646ba4f013a849555f50d35ae7278461d685a429c29f6295f" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 1.9.3", + "indexmap", "indicatif", "log", "rand 0.7.3", @@ -4003,9 +3985,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5331f3dfa4a8228dd69b6954859d6aafdd3234b24802690c1f7446bc37df6d" +checksum = "284227b302a68b0c384f46cb95e5472d39e7c7094d6079c4e5bd2f133f6920ff" dependencies = [ "Inflector", "base64 0.21.2", @@ -4029,9 +4011,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371e23c982638eeabab1a62bf637c70648b730fc807378042214382c3b550000" +checksum = "23aa72c84646a65727b63ff2988147062a792b569591351f06c0e6014ca52de9" dependencies = [ "async-trait", "solana-connection-cache", @@ -4044,9 +4026,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbad2a5e055b53a7d41e52f98963bcef1ee6ce782f90f1d4ea9237cae1ee87ee" +checksum = "036b2c0f4b3dfbe48d96c0f5e9be0fadd019bf46327013475bbf3b8ae9870dfe" dependencies = [ "log", "rustc_version", @@ -4060,9 +4042,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27089add49014dc9a917ddb95d5af0ab31bd15308adb4bdce78fd72b52d787b" +checksum = "85fe8c3382ac0c050c2224037fc8be990f713526e6b136f3a8da9464e2e1a506" dependencies = [ "bincode", "log", @@ -4082,12 +4064,11 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aa69c3f19df466a68a26f009e9dc39de671bf022c66fbbfab2d1c021b62a97" +checksum = "02a4c38e1cf77cc046a48d0e515ec3fe654d9c3ba49790523f2d8fd28a5e51d3" dependencies = [ "aes-gcm-siv", - "arrayref", "base64 0.21.2", "bincode", "bytemuck", @@ -4112,9 +4093,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae90c406f0a2d4a15f08d16c8b64f37997a57611fec0a89f1277854166996e8" +checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" dependencies = [ "byteorder", "combine", @@ -4235,9 +4216,9 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-common" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba2cc1d6055e0989756adc4f54fa1e27d684ce08d6164da23900e93ac0b13b6" +checksum = "c5a03303674fb73b1dbe6cfc83aa8faa0e99264472a47177a1803f7475b318d1" dependencies = [ "getrandom 0.2.10", "hex", @@ -4249,9 +4230,9 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef20c714a71811af9804d6676ad4e7f1353ef34d3fb39d9f187b8fc2aa7441e" +checksum = "7b04503c979165d8ad5efe21bb63b9978cb70103f208fab1339aae7c38e94c62" dependencies = [ "anchor-client", "anchor-lang", @@ -4260,6 +4241,7 @@ dependencies = [ "bytemuck", "chrono", "cron", + "hex", "rust_decimal", "sgx-quote", "solana-address-lookup-table-program", @@ -4267,6 +4249,7 @@ dependencies = [ "solana-program", "superslice", "switchboard-common", + "tokio", ] [[package]] @@ -4287,18 +4270,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.22" +version = "2.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] @@ -4309,7 +4292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "unicode-xid 0.2.4", ] @@ -4360,22 +4343,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -4477,7 +4460,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -4544,17 +4527,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ - "indexmap 2.0.0", + "indexmap", "toml_datetime", "winnow", ] @@ -4585,8 +4568,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -4640,9 +4623,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -4731,9 +4714,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.3.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" [[package]] name = "vec_map" @@ -4800,8 +4783,8 @@ dependencies = [ "log", "once_cell", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", "wasm-bindgen-shared", ] @@ -4823,7 +4806,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "wasm-bindgen-macro-support", ] @@ -4834,8 +4817,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4912,7 +4895,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -4945,7 +4928,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -4965,9 +4948,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -5064,9 +5047,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" dependencies = [ "memchr", ] @@ -5132,8 +5115,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] diff --git a/examples/functions/01_basic_oracle/Cargo.toml b/examples/functions/01_basic_oracle/Cargo.toml index e231212..626a5d4 100644 --- a/examples/functions/01_basic_oracle/Cargo.toml +++ b/examples/functions/01_basic_oracle/Cargo.toml @@ -17,6 +17,10 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -switchboard-solana = "0.8.4" -# switchboard-solana = { version = "0.8.4", path = "../../../rust/switchboard-solana" } +switchboard-solana = { version = "=0.9.1" } +# switchboard-solana = { version = "0.9.1", 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 diff --git a/examples/functions/01_basic_oracle/package.json b/examples/functions/01_basic_oracle/package.json index a1e018d..a7f0024 100644 --- a/examples/functions/01_basic_oracle/package.json +++ b/examples/functions/01_basic_oracle/package.json @@ -7,27 +7,24 @@ "directory": "examples/functions/01_basic_oracle" }, "scripts": { - "build": "anchor build", - "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", - "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + "build:anchor": "anchor build", + "clean": "pnpm exec rimraf node_modules .anchor lib .turbo" }, "dependencies": { "@coral-xyz/anchor": "^0.28.0", "@solana/spl-token": "^0.3.6", - "@solana/web3.js": "^1.77.3", - "@switchboard-xyz/common": "^2.2.4", - "@switchboard-xyz/oracle": "^2.1.13", + "@solana/web3.js": "^1.78.0", + "@switchboard-xyz/common": "*", + "@switchboard-xyz/oracle": "*", "@switchboard-xyz/solana.js": "workspace:*" }, "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.3", - "ts-mocha": "^10.0.0", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", - "typescript": "^4.3.5", - "prettier": "^2.6.2", - "switchboard-solana": "workspace:*" + "@types/node": "^20.4.0", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^10.0.0" } } diff --git a/examples/functions/01_basic_oracle/sgx-function/Cargo.lock b/examples/functions/01_basic_oracle/sgx-function/Cargo.lock index 66f7b9a..3e18271 100644 --- a/examples/functions/01_basic_oracle/sgx-function/Cargo.lock +++ b/examples/functions/01_basic_oracle/sgx-function/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -34,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher", + "cipher 0.3.0", "cpufeatures", "opaque-debug", ] @@ -47,7 +56,7 @@ checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" dependencies = [ "aead", "aes", - "cipher", + "cipher 0.3.0", "ctr", "polyval", "subtle", @@ -72,7 +81,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.10", "once_cell", "version_check", ] @@ -103,38 +111,38 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +checksum = "2d5e1a413b311b039d29b61d0dbb401c9dbf04f792497ceca87593454bf6d7dd" dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "regex", "syn 1.0.109", ] [[package]] name = "anchor-attribute-account" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +checksum = "cca9aeaf633c6e2365fed0525dcac68610be58eee5dc69d3b86fe0b1d4b320b9" dependencies = [ "anchor-syn", "anyhow", - "bs58 0.5.0", + "bs58 0.4.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustversion", "syn 1.0.109", ] [[package]] name = "anchor-attribute-constant" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +checksum = "788e44f9e8501dabeb6f9229da0f3268fb2ae3208912608ffaa056a72031296f" dependencies = [ "anchor-syn", "proc-macro2 1.0.63", @@ -143,90 +151,88 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +checksum = "ea0c4d8c7e4a2605ede6fcdced9690288b2f74e24768619a85229d57e597bc97" dependencies = [ "anchor-syn", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "anchor-attribute-event" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +checksum = "7a3b07d5c5d87b5edc72428b447b8e9ee1143b83dd1afc6a6b1d352c6a6164d8" dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "anchor-attribute-program" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +checksum = "b22ad0445115dbea5869b1d062da49ae125abed9132fc20c33227f25e42dfa6b" dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" +checksum = "04c06e06497b5b4f392845e0d04dde8374fd244fa2832dd0e5c27bfd99cb0342" dependencies = [ "anchor-lang", "anyhow", - "futures", "regex", "serde", "solana-account-decoder", "solana-client", "solana-sdk", "thiserror", - "tokio", "url", ] [[package]] name = "anchor-derive-accounts" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +checksum = "48daeff6781ba2f02961b0ad211feb9a2de75af345d42c62b1a252fd4dfb0724" dependencies = [ "anchor-syn", "anyhow", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "anchor-derive-space" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +checksum = "c4fe2886f92c4f33ec1b2b8b2b43ca1b9070cf4929e63c7eaaa09a9f2c0d5123" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "anchor-lang" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +checksum = "dbbe5d1c7c057c6d63b4f2f538a320e4a22111126c9966340c3d9490e2f15ed1" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -239,18 +245,17 @@ dependencies = [ "arrayref", "base64 0.13.1", "bincode", - "borsh 0.10.3", + "borsh 0.9.3", "bytemuck", - "getrandom 0.2.10", "solana-program", "thiserror", ] [[package]] name = "anchor-spl" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" +checksum = "75cc8066fbd45e0e03edf48342c79265aa34ca76cefeace48ef6c402b6946665" dependencies = [ "anchor-lang", "solana-program", @@ -261,18 +266,18 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.28.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +checksum = "11cb31fe143aedb36fc41409ea072aa0b840cbea727e62eb2ff6e7b6cea036ff" dependencies = [ "anyhow", - "bs58 0.5.0", + "bs58 0.3.1", "heck 0.3.3", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.9.9", "syn 1.0.109", "thiserror", ] @@ -307,129 +312,6 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint 0.4.3", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote 1.0.28", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint 0.4.3", - "num-traits", - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint 0.4.3", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "array-bytes" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" - [[package]] name = "arrayref" version = "0.3.7" @@ -448,12 +330,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "ascii" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" - [[package]] name = "asn1-rs" version = "0.5.2" @@ -477,7 +353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "synstructure", ] @@ -489,7 +365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -499,22 +375,11 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" -[[package]] -name = "async-channel" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - [[package]] name = "async-compression" -version = "0.3.15" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "5b0122885821398cc923ece939e24d1056a2384ee719432397fa9db87230ff11" dependencies = [ "brotli", "flate2", @@ -535,13 +400,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -561,6 +426,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -644,9 +524,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -734,7 +614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -745,7 +625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -756,7 +636,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -767,7 +647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -794,18 +674,15 @@ dependencies = [ [[package]] name = "bs58" -version = "0.4.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" [[package]] name = "bs58" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "tinyvec", -] +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bumpalo" @@ -841,7 +718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -861,8 +738,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -936,6 +813,16 @@ dependencies = [ "generic-array", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" version = "2.34.0" @@ -960,7 +847,7 @@ dependencies = [ "atty", "bitflags", "clap_lex", - "indexmap 1.9.3", + "indexmap", "once_cell", "strsim 0.10.0", "termcolor", @@ -976,28 +863,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "combine" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", -] - -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.7" @@ -1039,9 +904,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" @@ -1061,9 +926,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1163,7 +1028,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher", + "cipher 0.3.0", ] [[package]] @@ -1180,41 +1045,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2 1.0.63", - "quote 1.0.28", - "strsim 0.10.0", - "syn 2.0.22", -] - -[[package]] -name = "darling_macro" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" -dependencies = [ - "darling_core", - "quote 1.0.28", - "syn 2.0.22", -] - [[package]] name = "data-encoding" version = "2.4.0" @@ -1250,17 +1080,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 1.0.109", -] - [[package]] name = "dialoguer" version = "0.10.4" @@ -1293,6 +1112,27 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.4" @@ -1300,8 +1140,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1391,22 +1231,34 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "1.4.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" +checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "1.2.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" +checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 1.0.109", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +dependencies = [ + "once_cell", + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1422,12 +1274,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" - [[package]] name = "errno" version = "0.3.1" @@ -1577,8 +1423,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -1611,6 +1457,15 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1659,15 +1514,10 @@ dependencies = [ ] [[package]] -name = "goblin" -version = "0.5.4" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll", -] +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "h2" @@ -1681,22 +1531,13 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.11.2" @@ -1724,12 +1565,6 @@ dependencies = [ "ahash 0.8.3", ] -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - [[package]] name = "heck" version = "0.3.3" @@ -1756,18 +1591,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1880,15 +1706,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", - "rustls", + "rustls 0.21.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -1927,12 +1754,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.4.0" @@ -1970,26 +1791,24 @@ dependencies = [ ] [[package]] -name = "indexmap" -version = "2.0.0" +name = "indicatif" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" dependencies = [ - "equivalent", - "hashbrown 0.14.0", + "console", + "lazy_static", + "number_prefix", + "regex", ] [[package]] -name = "indicatif" -version = "0.17.5" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", + "generic-array", ] [[package]] @@ -2007,7 +1826,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] @@ -2029,9 +1848,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jobserver" @@ -2112,6 +1931,16 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + [[package]] name = "libsecp256k1" version = "0.6.0" @@ -2160,6 +1989,12 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2199,9 +2034,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -2250,24 +2085,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] @@ -2296,16 +2120,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", + "memoffset 0.6.5", ] [[package]] @@ -2329,15 +2151,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.2.1" @@ -2391,7 +2204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2439,11 +2252,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2453,16 +2266,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive", ] [[package]] @@ -2473,28 +2277,25 @@ checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", -] - [[package]] name = "number_prefix" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -2538,8 +2339,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -2566,17 +2367,6 @@ version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -2584,21 +2374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2611,15 +2387,9 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] -[[package]] -name = "paste" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" - [[package]] name = "pbkdf2" version = "0.4.0" @@ -2691,8 +2461,8 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -2713,14 +2483,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2745,12 +2515,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "polyval" version = "0.5.3" @@ -2763,12 +2527,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "portable-atomic" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2865,7 +2623,7 @@ dependencies = [ "anyhow", "itertools", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2894,7 +2652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -2929,16 +2687,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.9.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445cbfe2382fa023c4f2f3c7e1c95c03dcc1df2bf23cebcb2b13e1402c4394d1" +checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" dependencies = [ "bytes", - "pin-project-lite", + "futures-channel", + "futures-util", + "fxhash", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls", + "rustls 0.20.8", "thiserror", "tokio", "tracing", @@ -2947,16 +2706,17 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" dependencies = [ "bytes", + "fxhash", "rand 0.8.5", "ring", - "rustc-hash", - "rustls", + "rustls 0.20.8", "rustls-native-certs", + "rustls-pemfile 0.2.1", "slab", "thiserror", "tinyvec", @@ -2966,15 +2726,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.3.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54" dependencies = [ + "futures-util", "libc", "quinn-proto", "socket2", + "tokio", "tracing", - "windows-sys 0.42.0", ] [[package]] @@ -2988,9 +2749,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2 1.0.63", ] @@ -3105,9 +2866,9 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.10.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", @@ -3134,10 +2895,33 @@ dependencies = [ ] [[package]] -name = "regex" -version = "1.8.4" +name = "redox_users" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom 0.2.10", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" dependencies = [ "aho-corasick", "memchr", @@ -3146,9 +2930,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "rend" @@ -3161,9 +2945,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "async-compression", "base64 0.21.2", @@ -3185,14 +2969,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.3", + "rustls-pemfile 1.0.3", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", @@ -3242,28 +3026,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "rpassword" -version = "7.2.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" -dependencies = [ - "libc", - "rtoolbox", - "winapi", -] - -[[package]] -name = "rtoolbox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" dependencies = [ "libc", + "serde", + "serde_json", "winapi", ] @@ -3317,9 +3092,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags", "errno", @@ -3341,6 +3116,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b19faa85ecb5197342b54f987b142fb3e30d0c90da40f80ef4fa9a726e6676ed" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -3348,39 +3135,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] -name = "rustversion" -version = "1.0.12" +name = "rustls-webpki" +version = "0.101.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -3389,26 +3195,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", -] - [[package]] name = "sct" version = "0.7.0" @@ -3456,38 +3242,38 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", @@ -3507,25 +3293,15 @@ dependencies = [ ] [[package]] -name = "serde_with" -version = "2.3.3" +name = "serde_yaml" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ + "indexmap", + "ryu", "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling", - "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "yaml-rust", ] [[package]] @@ -3642,9 +3418,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -3658,12 +3434,12 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380584cb468a1eb2ea79495c0c574ca09a11bf6796093b97a48a94cd98fe5b30" +checksum = "ec36d5c2ec5469dacc4fd2bdfcaaf4b253a4814d86d88686d50fd407cf7b3330" dependencies = [ "Inflector", - "base64 0.21.2", + "base64 0.13.1", "bincode", "bs58 0.4.0", "bv", @@ -3674,6 +3450,7 @@ dependencies = [ "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", + "solana-vote-program", "spl-token", "spl-token-2022", "thiserror", @@ -3682,9 +3459,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dcdcbe2a61849b7692ac9eb6ad567ea4f333c36272d5d12de554aa2f60fa792" +checksum = "bf23fb5a4ff0e902bf94fbc63ba51b10b1f86c6bca18574b583ec3baf6383a0b" dependencies = [ "bincode", "bytemuck", @@ -3703,9 +3480,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe8a1443f3efac9c351c0b55efa39df488e73bcdd512272cb39e58198dcf9cc" +checksum = "39e6537858df8634c4cf7e9e8a84a9f1967b8983bcb4e4833cad3ae200b7170d" dependencies = [ "chrono", "clap 2.34.0", @@ -3720,43 +3497,80 @@ dependencies = [ ] [[package]] -name = "solana-client" -version = "1.16.1" +name = "solana-cli-config" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46e6294e67101c8df185e9c371293ff2502bf5b35d4d70eb68472eae135692e5" +checksum = "2234deff9765c25fc6189322689d1b702490f4389680dfdef0af582856041844" dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-client" +version = "1.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e706f894fe68d518c125e27a7186d07a56f5b179d67c8fb2cf719cef8e1ee7cd" +dependencies = [ + "async-mutex", "async-trait", + "base64 0.13.1", "bincode", + "bs58 0.4.0", + "bytes", + "clap 2.34.0", + "crossbeam-channel", + "enum_dispatch", "futures", "futures-util", - "indexmap 1.9.3", + "indexmap", "indicatif", + "itertools", + "jsonrpc-core", + "lazy_static", "log", "quinn", + "quinn-proto", "rand 0.7.3", + "rand_chacha 0.2.2", "rayon", - "solana-connection-cache", + "reqwest", + "rustls 0.20.8", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-faucet", "solana-measure", "solana-metrics", - "solana-pubsub-client", - "solana-quic-client", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-rpc-client-nonce-utils", + "solana-net-utils", "solana-sdk", "solana-streamer", - "solana-thin-client", - "solana-tpu-client", - "solana-udp-client", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "spl-token-2022", "thiserror", "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", ] [[package]] name = "solana-config-program" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44cd8bbbc468503ca8d337c91a6f6049ced080be31854d866a25974f1b90619" +checksum = "645c2d438fdfa4f5774c70fb0eeb2325caa073c838a229ef6a876c65c8703294" dependencies = [ "bincode", "chrono", @@ -3767,35 +3581,38 @@ dependencies = [ ] [[package]] -name = "solana-connection-cache" -version = "1.16.1" +name = "solana-faucet" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e953284f00e9b706032fe36b30054f3c804f37a363fac7d8cb1753a1737cf20b" +checksum = "3ba3e5e2acc09b2fcb54957d05c0943b194d48f825f879fc2cf5d255e2608b05" dependencies = [ - "async-trait", "bincode", - "futures-util", - "indexmap 1.9.3", + "byteorder", + "clap 2.34.0", + "crossbeam-channel", "log", - "rand 0.7.3", - "rayon", - "rcgen", - "solana-measure", + "serde", + "serde_derive", + "solana-clap-utils", + "solana-cli-config", + "solana-logger", "solana-metrics", "solana-sdk", + "solana-version", + "spl-memo", "thiserror", "tokio", ] [[package]] name = "solana-frozen-abi" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea8be57163366de9ffee3652cd42ea02fd5cca672408722f1426eb0d234a330" +checksum = "23b4953578272ac0fadec245e85e83ae86454611f0c0a7fff7d906835124bdcf" dependencies = [ - "ahash 0.8.3", + "ahash 0.7.6", "blake3", - "block-buffer 0.10.4", + "block-buffer 0.9.0", "bs58 0.4.0", "bv", "byteorder", @@ -3803,6 +3620,7 @@ dependencies = [ "either", "generic-array", "getrandom 0.1.16", + "hashbrown 0.12.3", "im", "lazy_static", "log", @@ -3822,21 +3640,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4121f91307234cec8c8d8cd2d7ec171881c07db2222335e8c840d555ebe89cc" +checksum = "57892538250428ad3dc3cbe05f6cd75ad14f4f16734fcb91bc7cd5fbb63d6315" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustc_version", - "syn 2.0.22", + "syn 1.0.109", ] [[package]] name = "solana-logger" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f590904a129707c5bf6b9f2e198e49ce8984e802dad26babd2c406a4e898b0ce" +checksum = "06aa701c49493e93085dd1e800c05475baca15a9d4d527b59794f2ed0b66e055" dependencies = [ "env_logger", "lazy_static", @@ -3845,9 +3663,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26976359ec46d158ce2880d5a31bca4b08e971d29d03c25e9ba80f9a3d42b28e" +checksum = "f7300180957635b33c88bd6844a5dff4f1f5c6352d0861ee7845eab84185aa6a" dependencies = [ "log", "solana-sdk", @@ -3855,9 +3673,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d97a86ca9bc1c33b77f98502ef0ec133823ebbb813fc60e10c6cf6377bbbdf2" +checksum = "2960981c4bbe9177dafe986542ba11a10afcae320f4201aa809cd5b650e202e1" dependencies = [ "crossbeam-channel", "gethostname", @@ -3869,9 +3687,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63f59abfa214c43b2b0d0360f7a50c180a0e86ea9a16ad7598ca0c9d8843483" +checksum = "31062ce5ddceb92bdb78df2eaf33e9889c1519e8a8d89baa783e2d08a76cfc62" dependencies = [ "bincode", "clap 3.2.25", @@ -3891,11 +3709,11 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7219016f9a81863decafd5256ec0d32d57a8c4e9529f9134fd8727684cc0936" +checksum = "23b2b84a3d7a24523b9117c0ae4608f1e561ae492638acea2bb2960a0c0c8eb6" dependencies = [ - "ahash 0.8.3", + "ahash 0.7.6", "bincode", "bv", "caps", @@ -3918,20 +3736,16 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ac28d05adeff2212cdec76dfacc6eb631d69d065b1b83c063a1fab505d5e62" +checksum = "3f99052873619df68913cb8e92e28ff251a5483828925e87fa97ba15a9cbad51" dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "array-bytes", - "base64 0.21.2", + "base64 0.13.1", "bincode", "bitflags", "blake3", - "borsh 0.10.3", + "borsh 0.9.3", + "borsh-derive 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -3946,11 +3760,10 @@ dependencies = [ "libc", "libsecp256k1", "log", - "memoffset 0.9.0", - "num-bigint 0.4.3", + "memoffset 0.6.5", "num-derive", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -3972,20 +3785,20 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cb661d9fe32ec33ba8df554827becd5bcc1758392194420899771344177fb1" +checksum = "4d57d0b6ef85b50f9ad6b9a75fc9d5051dc26f8b1a4ddf03656e3d603e139eb3" dependencies = [ - "base64 0.21.2", + "base64 0.13.1", "bincode", "eager", "enum-iterator", "itertools", "libc", + "libloading", "log", "num-derive", "num-traits", - "percentage", "rand 0.7.3", "rustc_version", "serde", @@ -3994,68 +3807,14 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-sdk", - "solana_rbpf", "thiserror", ] -[[package]] -name = "solana-pubsub-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a503785ba377f33dd5b1fac75cb60c086ba625c5305f0bf3e687240cdcc7381f" -dependencies = [ - "crossbeam-channel", - "futures-util", - "log", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-rpc-client-api", - "solana-sdk", - "thiserror", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", -] - -[[package]] -name = "solana-quic-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ede431a588575037db080835f09e9436bb9d5f3b3e19a5592eca3af13da369" -dependencies = [ - "async-mutex", - "async-trait", - "futures", - "itertools", - "lazy_static", - "log", - "quinn", - "quinn-proto", - "quinn-udp", - "rcgen", - "rustls", - "solana-connection-cache", - "solana-measure", - "solana-metrics", - "solana-net-utils", - "solana-rpc-client-api", - "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", -] - [[package]] name = "solana-rayon-threadlimit" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4131723cc61f9981c3fa792567c658cf8fa64366331647835c3b88ba0685bad9" +checksum = "10e1d068ba8080ca1e41703c600cc9b263ff7ce26b6811cd83221723ae0d10ae" dependencies = [ "lazy_static", "num_cpus", @@ -4063,16 +3822,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74894d82e6adcd95398dd4d190e6f303e424d47841b20f822a5ec27d5b77473" +checksum = "661cd486da7419134663f1c3684d71d3fd6d13b8e557da23070f4c920b1d2baa" dependencies = [ "console", "dialoguer", "log", "num-derive", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -4080,78 +3839,17 @@ dependencies = [ "uriparse", ] -[[package]] -name = "solana-rpc-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e9519b92e003d763ab2123ac099c32a56f66951cd810d4fa3615a800300860" -dependencies = [ - "async-trait", - "base64 0.21.2", - "bincode", - "bs58 0.4.0", - "indicatif", - "log", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-version", - "solana-vote-program", - "tokio", -] - -[[package]] -name = "solana-rpc-client-api" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5556080cb9a1c70b782de622ee5840d6e1a256c65ab35a3b8542656ffe69a0" -dependencies = [ - "base64 0.21.2", - "bs58 0.4.0", - "jsonrpc-core", - "reqwest", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-sdk", - "solana-transaction-status", - "solana-version", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "solana-rpc-client-nonce-utils" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe69e5bab1a8afc475c1aab69ce53360e76fafa0f5efcc5ce151298be763653" -dependencies = [ - "clap 2.34.0", - "solana-clap-utils", - "solana-rpc-client", - "solana-sdk", - "thiserror", -] - [[package]] name = "solana-sdk" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa2d54c0e9109d1bf9edafbd86d645217776df783814397f79c3929cf4316ba" +checksum = "edb47da3e18cb669f6ace0b40cee0610e278903783e0c9f7fce1e1beb881a1b7" dependencies = [ "assert_matches", - "base64 0.21.2", + "base64 0.13.1", "bincode", "bitflags", - "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4170,7 +3868,6 @@ dependencies = [ "memmap2", "num-derive", "num-traits", - "num_enum 0.6.1", "pbkdf2 0.11.0", "qstring", "rand 0.7.3", @@ -4181,7 +3878,6 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "serde_with", "sha2 0.10.7", "sha3 0.10.8", "solana-frozen-abi", @@ -4196,29 +3892,27 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa991e6d6ae7c57ef9fc56f964b22f3bae6ba6c144ccb07b0fe07e06a3efc47c" +checksum = "7d41a09b9cecd0a4df63c78a192adee99ebf2d3757c19713a68246e1d9789c7c" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustversion", - "syn 2.0.22", + "syn 1.0.109", ] [[package]] name = "solana-streamer" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2500570c1fe541d3e36c3ce318f25dab24dfd6aeab216afafa5c7c161d4979c8" +checksum = "a2ffb2c6918eda6aa8b18219790b7a4e4d74914aeae97cb1a0e09fdb943b18cc" dependencies = [ - "async-channel", - "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 1.9.3", + "indexmap", "itertools", "libc", "log", @@ -4227,11 +3921,9 @@ dependencies = [ "percentage", "pkcs8", "quinn", - "quinn-proto", - "quinn-udp", "rand 0.7.3", "rcgen", - "rustls", + "rustls 0.20.8", "solana-metrics", "solana-perf", "solana-sdk", @@ -4240,54 +3932,14 @@ dependencies = [ "x509-parser", ] -[[package]] -name = "solana-thin-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2fd4ae4d27790ae211f16a6e85a02585b7cae7057f8d555bad3762b4901c" -dependencies = [ - "bincode", - "log", - "rayon", - "solana-connection-cache", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-sdk", -] - -[[package]] -name = "solana-tpu-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56bfe97fb1ab0eb44abb623272648bea404d309e584ba6f8e981e6626cfb0cb" -dependencies = [ - "async-trait", - "bincode", - "futures-util", - "indexmap 1.9.3", - "indicatif", - "log", - "rand 0.7.3", - "rayon", - "solana-connection-cache", - "solana-measure", - "solana-metrics", - "solana-pubsub-client", - "solana-rpc-client", - "solana-rpc-client-api", - "solana-sdk", - "thiserror", - "tokio", -] - [[package]] name = "solana-transaction-status" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5331f3dfa4a8228dd69b6954859d6aafdd3234b24802690c1f7446bc37df6d" +checksum = "df1a6ee396d436ae4ee36350043c3cb34ad66b7515f045c1e5006695559d88ac" dependencies = [ "Inflector", - "base64 0.21.2", + "base64 0.13.1", "bincode", "borsh 0.9.3", "bs58 0.4.0", @@ -4298,7 +3950,10 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-address-lookup-table-program", + "solana-measure", + "solana-metrics", "solana-sdk", + "solana-vote-program", "spl-associated-token-account", "spl-memo", "spl-token", @@ -4306,26 +3961,11 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-udp-client" -version = "1.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371e23c982638eeabab1a62bf637c70648b730fc807378042214382c3b550000" -dependencies = [ - "async-trait", - "solana-connection-cache", - "solana-net-utils", - "solana-sdk", - "solana-streamer", - "thiserror", - "tokio", -] - [[package]] name = "solana-version" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbad2a5e055b53a7d41e52f98963bcef1ee6ce782f90f1d4ea9237cae1ee87ee" +checksum = "d177dc97f7facd8fbc3148f3d44a9ff5bbbc72c1db7e2889dc4911ae641cea8a" dependencies = [ "log", "rustc_version", @@ -4339,9 +3979,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27089add49014dc9a917ddb95d5af0ab31bd15308adb4bdce78fd72b52d787b" +checksum = "6280815d28c90ea8f51c8eb2026258e8693cab5a8456ee7b207a791b20f9c576" dependencies = [ "bincode", "log", @@ -4353,7 +3993,6 @@ dependencies = [ "solana-frozen-abi", "solana-frozen-abi-macro", "solana-metrics", - "solana-program", "solana-program-runtime", "solana-sdk", "thiserror", @@ -4361,16 +4000,17 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.1" +version = "1.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aa69c3f19df466a68a26f009e9dc39de671bf022c66fbbfab2d1c021b62a97" +checksum = "7ab38abd096769f79fd8e3fe8465070f04742395db724606a5263c8ebc215567" dependencies = [ "aes-gcm-siv", "arrayref", - "base64 0.21.2", + "base64 0.13.1", "bincode", "bytemuck", "byteorder", + "cipher 0.4.4", "curve25519-dalek", "getrandom 0.1.16", "itertools", @@ -4389,25 +4029,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "solana_rbpf" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae90c406f0a2d4a15f08d16c8b64f37997a57611fec0a89f1277854166996e8" -dependencies = [ - "byteorder", - "combine", - "goblin", - "hash32", - "libc", - "log", - "rand 0.8.5", - "rustc-demangle", - "scroll", - "thiserror", - "winapi", -] - [[package]] name = "spin" version = "0.5.2" @@ -4426,9 +4047,9 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" +checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" dependencies = [ "assert_matches", "borsh 0.9.3", @@ -4459,22 +4080,22 @@ dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum 0.5.11", + "num_enum", "solana-program", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.6.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" +checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", - "num_enum 0.5.11", + "num_enum", "solana-program", "solana-zk-token-sdk", "spl-memo", @@ -4514,9 +4135,7 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-common" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba2cc1d6055e0989756adc4f54fa1e27d684ce08d6164da23900e93ac0b13b6" +version = "0.8.5" dependencies = [ "getrandom 0.2.10", "hex", @@ -4528,9 +4147,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b592cf45365511c23316f9876780dade6688f9cb2b138a7b7dde94cbc2f78447" +version = "0.8.18" dependencies = [ "anchor-client", "anchor-lang", @@ -4539,6 +4156,7 @@ dependencies = [ "bytemuck", "chrono", "cron", + "hex", "rust_decimal", "sgx-quote", "solana-address-lookup-table-program", @@ -4546,13 +4164,15 @@ dependencies = [ "solana-program", "superslice", "switchboard-common", + "tokio", + "toml_datetime", + "toml_edit", + "winnow", ] [[package]] name = "switchboard-utils" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e18a6e7377b936fbd485fa641e6c2c7ad37e03336da90ef554c81df25369ecac" dependencies = [ "bytes", "bytestring", @@ -4588,18 +4208,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.22" +version = "2.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] @@ -4610,7 +4230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "unicode-xid 0.2.4", ] @@ -4661,22 +4281,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -4753,33 +4373,33 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.14.1" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 1.0.109", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -4798,16 +4418,26 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.8", "tokio", "webpki", ] [[package]] -name = "tokio-stream" -version = "0.1.12" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.3", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -4822,9 +4452,9 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.20.8", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite", "webpki", "webpki-roots", @@ -4832,9 +4462,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -4855,17 +4485,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ - "indexmap 2.0.0", + "indexmap", "toml_datetime", "winnow", ] @@ -4883,7 +4513,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4896,8 +4525,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -4928,7 +4557,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.20.8", "sha-1", "thiserror", "url", @@ -4945,9 +4574,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicase" @@ -4966,9 +4595,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -5013,15 +4642,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -5057,9 +4677,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.3.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" [[package]] name = "vcpkg" @@ -5079,12 +4699,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "want" version = "0.3.1" @@ -5132,8 +4746,8 @@ dependencies = [ "log", "once_cell", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", "wasm-bindgen-shared", ] @@ -5155,7 +4769,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "wasm-bindgen-macro-support", ] @@ -5166,8 +4780,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5255,22 +4869,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.1", ] [[package]] @@ -5288,7 +4887,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -5308,9 +4907,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -5407,9 +5006,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" dependencies = [ "memchr", ] @@ -5450,6 +5049,15 @@ dependencies = [ "time 0.3.22", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yasna" version = "0.5.2" @@ -5475,8 +5083,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 2.0.22", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] diff --git a/examples/functions/01_basic_oracle/sgx-function/Cargo.toml b/examples/functions/01_basic_oracle/sgx-function/Cargo.toml index 74a2c4e..d25f2b9 100644 --- a/examples/functions/01_basic_oracle/sgx-function/Cargo.toml +++ b/examples/functions/01_basic_oracle/sgx-function/Cargo.toml @@ -13,7 +13,5 @@ tokio = "^1" futures = "0.3" serde = "^1" serde_json = "^1" -switchboard-utils = "0.8.0" -# switchboard-utils = { version = "0.8.1", path = "../../../../../sbv2-core/rust/switchboard-utils" } -switchboard-solana = "0.8.4" -# switchboard-solana = { version = "0.8.4", path = "../../../../rust/switchboard-solana" } +switchboard-utils = { version = "0.8.0" } +switchboard-solana = { version = "=0.9.1" } \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/sgx-function/Dockerfile b/examples/functions/01_basic_oracle/sgx-function/Dockerfile index bea3750..76a759f 100644 --- a/examples/functions/01_basic_oracle/sgx-function/Dockerfile +++ b/examples/functions/01_basic_oracle/sgx-function/Dockerfile @@ -22,4 +22,7 @@ COPY --from=builder /sgx/app /sgx # Get the measurement from the enclave RUN /get_measurement.sh +RUN cp /app.manifest.sgx /sgx/app.manifest.sgx +RUN cp /app.sig /sgx/app.sig + ENTRYPOINT ["bash", "/boot.sh"] diff --git a/examples/functions/01_basic_oracle/sgx-function/package.json b/examples/functions/01_basic_oracle/sgx-function/package.json index 39d2965..4426abe 100644 --- a/examples/functions/01_basic_oracle/sgx-function/package.json +++ b/examples/functions/01_basic_oracle/sgx-function/package.json @@ -4,7 +4,6 @@ "build:function": "make" }, "dependencies": { - "switchboard-solana": "workspace:*", "basic-oracle": "workspace:*" } } diff --git a/examples/functions/01_basic_oracle/sgx-function/src/binance.rs b/examples/functions/01_basic_oracle/sgx-function/src/binance.rs index fe8acb0..4d44cad 100644 --- a/examples/functions/01_basic_oracle/sgx-function/src/binance.rs +++ b/examples/functions/01_basic_oracle/sgx-function/src/binance.rs @@ -173,11 +173,6 @@ impl Binance { let ixn = Instruction { program_id: basic_oracle::ID, accounts: vec![ - AccountMeta { - pubkey: program_state_pubkey, - is_signer: false, - is_writable: false, - }, AccountMeta { pubkey: oracle_pubkey, is_signer: false, @@ -188,11 +183,6 @@ impl Binance { is_signer: false, is_writable: false, }, - AccountMeta { - pubkey: runner.quote, - is_signer: false, - is_writable: false, - }, AccountMeta { pubkey: runner.signer, is_signer: true, @@ -211,4 +201,4 @@ pub fn parse_string_value(value: &str) -> i128 { let f64_value = value.parse::().unwrap(); let sb_decimal = SwitchboardDecimal::from_f64(f64_value); sb_decimal.scale_to(9) -} +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/src/actions/initialize.rs b/examples/functions/01_basic_oracle/src/actions/initialize.rs index 5c6cd84..7c16096 100644 --- a/examples/functions/01_basic_oracle/src/actions/initialize.rs +++ b/examples/functions/01_basic_oracle/src/actions/initialize.rs @@ -21,18 +21,11 @@ pub struct Initialize<'info> { )] pub oracle: AccountLoader<'info, MyOracleState>, - #[account( - constraint = function.load()?.authority == program.key() - )] - pub function: AccountLoader<'info, FunctionAccountData>, - - /// CHECK: pub authority: Signer<'info>, #[account(mut)] pub payer: Signer<'info>, - // SYSTEM ACCOUNTS pub system_program: Program<'info, System>, } @@ -43,19 +36,18 @@ impl Initialize<'_> { pub fn validate( &self, _ctx: &Context, - params: &InitializeParams, + _params: &InitializeParams, ) -> anchor_lang::Result<()> { Ok(()) } - pub fn actuate(ctx: &Context, params: &InitializeParams) -> anchor_lang::Result<()> { + pub fn actuate(ctx: &Context, _params: &InitializeParams) -> anchor_lang::Result<()> { let program = &mut ctx.accounts.program.load_init()?; - program.bump = *ctx.bumps.get("program").unwrap_or(&0); + program.bump = *ctx.bumps.get("program").unwrap(); program.authority = ctx.accounts.authority.key(); - program.function = ctx.accounts.function.key(); let oracle = &mut ctx.accounts.oracle.load_init()?; - oracle.bump = *ctx.bumps.get("oracle").unwrap_or(&0); + oracle.bump = *ctx.bumps.get("oracle").unwrap(); Ok(()) } -} +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/src/actions/mod.rs b/examples/functions/01_basic_oracle/src/actions/mod.rs index 6dde55a..b9f3ede 100644 --- a/examples/functions/01_basic_oracle/src/actions/mod.rs +++ b/examples/functions/01_basic_oracle/src/actions/mod.rs @@ -6,3 +6,6 @@ pub use refresh_prices::*; pub mod set_function; pub use set_function::*; + +pub mod trigger_function; +pub use trigger_function::*; \ No newline at end of file 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 20cd42b..978a9f1 100644 --- a/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs +++ b/examples/functions/01_basic_oracle/src/actions/refresh_prices.rs @@ -2,13 +2,6 @@ use crate::*; #[derive(Accounts)] pub struct RefreshPrices<'info> { - #[account( - seeds = [PROGRAM_SEED], - bump = program_state.load()?.bump, - has_one = function @ BasicOracleError::IncorrectSwitchboardFunction, - )] - pub program_state: AccountLoader<'info, MyProgramState>, - #[account( mut, seeds = [ORACLE_SEED], @@ -16,22 +9,21 @@ pub struct RefreshPrices<'info> { )] pub oracle: AccountLoader<'info, MyOracleState>, - // We use this to derive and verify the functions enclave state + // We use this to verify the functions enclave state #[account( - constraint = - FunctionAccountData::validate_enclave( - &function.to_account_info(), - &enclave.to_account_info(), - &enclave_signer.to_account_info() - )? + constraint = + 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: AccountLoader<'info, EnclaveAccountData>, pub enclave_signer: Signer<'info>, } - - #[derive(Clone, AnchorSerialize, AnchorDeserialize)] pub struct RefreshPricesParams { pub rows: Vec, @@ -48,8 +40,9 @@ impl RefreshPrices<'_> { pub fn actuate(ctx: &Context, params: &RefreshPricesParams) -> anchor_lang::Result<()> { let oracle = &mut ctx.accounts.oracle.load_mut()?; + msg!("saving oracle data"); oracle.save_rows(¶ms.rows)?; Ok(()) } -} +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/src/actions/set_function.rs b/examples/functions/01_basic_oracle/src/actions/set_function.rs index 513b2a8..2044342 100644 --- a/examples/functions/01_basic_oracle/src/actions/set_function.rs +++ b/examples/functions/01_basic_oracle/src/actions/set_function.rs @@ -18,22 +18,20 @@ pub struct SetFunction<'info> { } #[derive(Clone, AnchorSerialize, AnchorDeserialize)] -pub struct SetFunctionParams { - -} +pub struct SetFunctionParams { } impl SetFunction<'_> { pub fn validate( &self, _ctx: &Context, - params: &SetFunctionParams, + _params: &SetFunctionParams, ) -> anchor_lang::Result<()> { Ok(()) } - pub fn actuate(ctx: &Context, params: &SetFunctionParams) -> anchor_lang::Result<()> { + pub fn actuate(ctx: &Context, _params: &SetFunctionParams) -> anchor_lang::Result<()> { let program = &mut ctx.accounts.program.load_init()?; program.function = ctx.accounts.function.key(); Ok(()) } -} +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/src/actions/trigger_function.rs b/examples/functions/01_basic_oracle/src/actions/trigger_function.rs new file mode 100644 index 0000000..fdaec3e --- /dev/null +++ b/examples/functions/01_basic_oracle/src/actions/trigger_function.rs @@ -0,0 +1,43 @@ +use crate::*; +use switchboard_solana::attestation_program::instructions::function_trigger::FunctionTrigger; +use switchboard_solana::SWITCHBOARD_ATTESTATION_PROGRAM_ID; + +#[derive(Accounts)] +#[instruction(params: TriggerFunctionParams)] // rpc parameters hint +pub struct TriggerFunction<'info> { + #[account( + has_one = authority, + has_one = attestation_queue, + )] + pub function: AccountLoader<'info, FunctionAccountData>, + + pub attestation_queue: AccountLoader<'info, AttestationQueueAccountData>, + + pub authority: Signer<'info>, + + /// CHECK: address is explicit + #[account(address = SWITCHBOARD_ATTESTATION_PROGRAM_ID)] + pub attestation_program: AccountInfo<'info>, +} + +#[derive(Clone, AnchorSerialize, AnchorDeserialize)] +pub struct TriggerFunctionParams { } + +impl TriggerFunction<'_> { + pub fn validate( + &self, + _ctx: &Context, + _params: &TriggerFunctionParams, + ) -> anchor_lang::Result<()> { + Ok(()) + } + + pub fn actuate(ctx: &Context, _params: &TriggerFunctionParams) -> anchor_lang::Result<()> { + FunctionTrigger { + function: ctx.accounts.function.clone(), + authority: ctx.accounts.authority.clone(), + attestation_queue: ctx.accounts.attestation_queue.clone(), + }.invoke(ctx.accounts.attestation_program.clone())?; + Ok(()) + } +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/src/error.rs b/examples/functions/01_basic_oracle/src/error.rs index b4dd16a..e4aca36 100644 --- a/examples/functions/01_basic_oracle/src/error.rs +++ b/examples/functions/01_basic_oracle/src/error.rs @@ -13,12 +13,12 @@ pub enum BasicOracleError { InvalidTrustedSigner, #[msg("Invalid MRENCLAVE")] InvalidMrEnclave, - #[msg("Switchboard QuoteAccount has an empty MrEnclave (invalid)")] - EmptySwitchboardQuote, #[msg("Failed to find a valid trading symbol for this price")] InvalidSymbol, #[msg("FunctionAccount pubkey did not match program_state.function")] IncorrectSwitchboardFunction, #[msg("FunctionAccount pubkey did not match program_state.function")] InvalidSwitchboardFunction, + #[msg("FunctionAccount was not validated successfully")] + FunctionValidationFailed, } diff --git a/examples/functions/01_basic_oracle/src/lib.rs b/examples/functions/01_basic_oracle/src/lib.rs index 310c3fb..2bab8df 100644 --- a/examples/functions/01_basic_oracle/src/lib.rs +++ b/examples/functions/01_basic_oracle/src/lib.rs @@ -1,4 +1,7 @@ +pub mod actions; +pub use actions::*; pub use switchboard_solana::prelude::*; +declare_id!("EF68PJkRqQu2VthTSy19kg6TWynMtRmLpxcMDKEdLC8t"); pub mod error; pub use error::*; @@ -9,10 +12,7 @@ pub use model::*; pub mod utils; pub use utils::*; -pub mod actions; -pub use actions::*; -declare_id!("CE1HrS25FhvPjcAH4Zjka6uJBbYrDRY7uZ8PPSkiUwAh"); pub const PROGRAM_SEED: &[u8] = b"BASICORACLE"; @@ -45,4 +45,12 @@ pub mod basic_oracle { ) -> anchor_lang::Result<()> { SetFunction::actuate(&ctx, ¶ms) } -} + + #[access_control(ctx.accounts.validate(&ctx, ¶ms))] + pub fn trigger_function( + ctx: Context, + params: TriggerFunctionParams, + ) -> anchor_lang::Result<()> { + TriggerFunction::actuate(&ctx, ¶ms) + } +} \ No newline at end of file diff --git a/examples/functions/01_basic_oracle/tests/basic_oracle.ts b/examples/functions/01_basic_oracle/tests/basic_oracle.ts index b466b97..f2419a6 100644 --- a/examples/functions/01_basic_oracle/tests/basic_oracle.ts +++ b/examples/functions/01_basic_oracle/tests/basic_oracle.ts @@ -1,18 +1,22 @@ +// eslint-disable-next-line node/no-unpublished-import +import type { BasicOracle } from "../target/types/basic_oracle"; + +import { printLogs } from "./utils"; + +import type { Program } from "@coral-xyz/anchor"; import * as anchor from "@coral-xyz/anchor"; -import { Program } from "@coral-xyz/anchor"; -import { BasicOracle } from "../target/types/basic_oracle"; -import { - AttestationQueueAccount, - SwitchboardProgram, - type BootstrappedAttestationQueue, - FunctionAccount, - parseMrEnclave, - MrEnclave, - types, - attestationTypes, - AttestationProgramStateAccount, -} from "@switchboard-xyz/solana.js"; import { sleep } from "@switchboard-xyz/common"; +import type { FunctionAccount, MrEnclave } from "@switchboard-xyz/solana.js"; +import { SwitchboardWallet } from "@switchboard-xyz/solana.js"; +import { + AttestationProgramStateAccount, + AttestationQueueAccount, + attestationTypes, + type BootstrappedAttestationQueue, + parseMrEnclave, + SwitchboardProgram, + types, +} from "@switchboard-xyz/solana.js"; const unixTimestamp = () => Math.floor(Date.now() / 1000); @@ -49,28 +53,47 @@ describe("basic_oracle", () => { )[0]; let switchboard: BootstrappedAttestationQueue; + let wallet: SwitchboardWallet; let functionAccount: FunctionAccount; before(async () => { const switchboardProgram = await SwitchboardProgram.fromProvider( program.provider as anchor.AnchorProvider ); + await AttestationProgramStateAccount.getOrCreate(switchboardProgram); + switchboard = await AttestationQueueAccount.bootstrapNewQueue( switchboardProgram ); - [functionAccount] = await FunctionAccount.create( - switchboard.attestationQueueAccount.program, - { - container: "switchboardlabs/basic-oracle-function", - version: "latest", - schedule: "15 * * * * *", - mrEnclave: MRENCLAVE, - attestationQueue: switchboard.attestationQueueAccount, - authority: programStatePubkey, - } + console.log(`programStatePubkey: ${programStatePubkey}`); + + [wallet] = await SwitchboardWallet.create( + switchboard.program, + switchboard.attestationQueue.publicKey, + payer, + "MySharedWallet", + 16 ); + + console.log(`wallet: ${wallet.publicKey}`); + + [functionAccount] = + await switchboard.attestationQueue.account.createFunction( + { + name: "test function", + metadata: "this function handles XYZ for my protocol", + schedule: "15 * * * * *", + container: "switchboardlabs/basic-oracle-function", + version: "latest", + mrEnclave: MRENCLAVE, + authority: programStatePubkey, + }, + wallet + ); + + console.log(`functionAccount: ${functionAccount.publicKey}`); }); it("Is initialized!", async () => { @@ -81,7 +104,8 @@ describe("basic_oracle", () => { program: programStatePubkey, oracle: oraclePubkey, authority: payer, - function: functionAccount.publicKey, + payer: payer, + // function: functionAccount.publicKey, }) .rpc() .catch((err) => { @@ -114,13 +138,13 @@ describe("basic_oracle", () => { const securedSigner = anchor.web3.Keypair.generate(); const rewardAddress = - await switchboard.attestationQueueAccount.program.mint.getOrCreateAssociatedUser( - payer - ); + await switchboard.program.mint.getOrCreateAssociatedUser(payer); + + const functionState = await functionAccount.loadData(); // TODO: generate function verify ixn const functionVerifyIxn = attestationTypes.functionVerify( - switchboard.attestationQueueAccount.program, + switchboard.program, { params: { observedTime: new anchor.BN(unixTimestamp()), @@ -132,16 +156,13 @@ describe("basic_oracle", () => { { function: functionAccount.publicKey, functionEnclaveSigner: securedSigner.publicKey, - verifierEnclaveSigner: switchboard.verifier.signer.publicKey, - verifierQuote: switchboard.verifier.quoteAccount.publicKey, - attestationQueue: switchboard.attestationQueueAccount.publicKey, - escrow: functionAccount.getEscrow(), + verifier: switchboard.verifier.publicKey, + verifierSigner: switchboard.verifier.signer.publicKey, + attestationQueue: switchboard.attestationQueue.publicKey, + escrowWallet: functionState.escrowWallet, + escrowTokenWallet: functionState.escrowTokenWallet, receiver: rewardAddress, verifierPermission: switchboard.verifier.permissionAccount.publicKey, - state: - switchboard.attestationQueueAccount.program.attestationProgramState - .publicKey, - fnQuote: functionAccount.getEnclaveAccount()[0].publicKey, tokenProgram: anchor.utils.token.TOKEN_PROGRAM_ID, } ); @@ -175,22 +196,18 @@ describe("basic_oracle", () => { ], }) .accounts({ - programState: programStatePubkey, oracle: oraclePubkey, function: functionAccount.publicKey, - enclave: functionAccount.getEnclaveAccount()[0].publicKey, enclaveSigner: securedSigner.publicKey, }) .preInstructions([functionVerifyIxn]) .signers([switchboard.verifier.signer, securedSigner]) - .rpc() - .catch((err) => { - console.error(err); - throw err; - }); + .rpc({ skipPreflight: true }); console.log("Your transaction signature", tx); + await printLogs(switchboard.program.connection, tx ? tx : ""); + await sleep(5000); const oracleState = await program.account.myOracleState.fetch(oraclePubkey); diff --git a/examples/functions/01_basic_oracle/tests/utils.ts b/examples/functions/01_basic_oracle/tests/utils.ts new file mode 100644 index 0000000..ed0d5d5 --- /dev/null +++ b/examples/functions/01_basic_oracle/tests/utils.ts @@ -0,0 +1,16 @@ +import type { Connection } from "@solana/web3.js"; +import { sleep } from "@switchboard-xyz/common"; + +export async function printLogs( + connection: Connection, + tx: string, + v0Txn?: boolean, + delay = 3000 +) { + await sleep(delay); + const parsed = await connection.getParsedTransaction(tx, { + commitment: "confirmed", + maxSupportedTransactionVersion: v0Txn ? 0 : undefined, + }); + console.log(parsed?.meta?.logMessages?.join("\n")); +} diff --git a/examples/functions/01_basic_oracle/tsconfig.json b/examples/functions/01_basic_oracle/tsconfig.json index 4b70412..6675a17 100644 --- a/examples/functions/01_basic_oracle/tsconfig.json +++ b/examples/functions/01_basic_oracle/tsconfig.json @@ -5,14 +5,8 @@ } }, "compilerOptions": { - "types": [ - "mocha", - "chai", - "node" - ], - "typeRoots": [ - "./node_modules/@types" - ], + "types": ["mocha", "chai", "node"], + "typeRoots": ["./node_modules/@types"], "module": "commonjs", "noEmit": true, "esModuleInterop": true, @@ -20,23 +14,14 @@ "strictNullChecks": false, "target": "es6", "paths": { - "@switchboard-xyz/solana.js": [ - "../../../javascript/solana.js" - ] + "@switchboard-xyz/solana.js": ["../../../javascript/solana.js"] } }, - "include": [ - "tests/**/*", - "./cli.ts", - "./client/**/*" - ], - "exclude": [ - "target", - "lib" - ], + "include": ["tests/**/*", "target/types/*.ts"], + "exclude": ["target", "lib"], "references": [ { - "path": "../../../javascript/solana.js" + "path": "../../../../../javascript/solana.js" } ] -} \ No newline at end of file +} diff --git a/examples/vrf/01_vrf_client/Cargo.lock b/examples/vrf/01_vrf_client/Cargo.lock index cb5736d..55e3724 100644 --- a/examples/vrf/01_vrf_client/Cargo.lock +++ b/examples/vrf/01_vrf_client/Cargo.lock @@ -4235,9 +4235,9 @@ checksum = "ab16ced94dbd8a46c82fd81e3ed9a8727dac2977ea869d217bcc4ea1f122e81f" [[package]] name = "switchboard-common" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba2cc1d6055e0989756adc4f54fa1e27d684ce08d6164da23900e93ac0b13b6" +checksum = "c5a03303674fb73b1dbe6cfc83aa8faa0e99264472a47177a1803f7475b318d1" dependencies = [ "getrandom 0.2.10", "hex", @@ -4249,7 +4249,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.8.4" +version = "0.9.1" dependencies = [ "anchor-client", "anchor-lang", @@ -4258,6 +4258,7 @@ dependencies = [ "bytemuck", "chrono", "cron", + "hex", "rust_decimal", "sgx-quote", "solana-address-lookup-table-program", @@ -4265,6 +4266,7 @@ dependencies = [ "solana-program", "superslice", "switchboard-common", + "tokio", ] [[package]] diff --git a/examples/vrf/01_vrf_client/Cargo.toml b/examples/vrf/01_vrf_client/Cargo.toml index ff18b93..fc21f93 100644 --- a/examples/vrf/01_vrf_client/Cargo.toml +++ b/examples/vrf/01_vrf_client/Cargo.toml @@ -17,5 +17,4 @@ cpi = ["no-entrypoint"] [dependencies] bytemuck = "1.13.1" -switchboard-solana = { path = "../../../rust/switchboard-solana", version = "0.8.4" } -# switchboard-solana = { version = "^0.8.4", path = "../../../rust/switchboard-solana" } +switchboard-solana = { version = "^0.9.1", path = "../../../rust/switchboard-solana" } diff --git a/javascript/solana.js/package.json b/javascript/solana.js/package.json index 1f1dac9..76db2f9 100644 --- a/javascript/solana.js/package.json +++ b/javascript/solana.js/package.json @@ -1,6 +1,6 @@ { "name": "@switchboard-xyz/solana.js", - "version": "2.3.3", + "version": "2.4.1", "author": "", "license": "MIT", "description": "A Typescript client to interact with Switchboard on Solana.", diff --git a/javascript/solana.js/src/SolanaClock.ts b/javascript/solana.js/src/SolanaClock.ts index 149dfbb..bc815bf 100644 --- a/javascript/solana.js/src/SolanaClock.ts +++ b/javascript/solana.js/src/SolanaClock.ts @@ -1,6 +1,7 @@ import * as borsh from "@coral-xyz/borsh"; -import { Connection, SYSVAR_CLOCK_PUBKEY } from "@solana/web3.js"; -import { BN } from "@switchboard-xyz/common"; +import type { Connection } from "@solana/web3.js"; +import { SYSVAR_CLOCK_PUBKEY } from "@solana/web3.js"; +import type { BN } from "@switchboard-xyz/common"; export interface SolanaClockDataFields { slot: BN; diff --git a/javascript/solana.js/src/SwitchboardError.ts b/javascript/solana.js/src/SwitchboardError.ts index 622a111..3e26bac 100644 --- a/javascript/solana.js/src/SwitchboardError.ts +++ b/javascript/solana.js/src/SwitchboardError.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "./SwitchboardProgram.js"; +import type { SwitchboardProgram } from "./SwitchboardProgram.js"; /** * Switchboard wrapper for anchor program errors. diff --git a/javascript/solana.js/src/SwitchboardEvents.ts b/javascript/solana.js/src/SwitchboardEvents.ts index ed15ca6..5da48ce 100644 --- a/javascript/solana.js/src/SwitchboardEvents.ts +++ b/javascript/solana.js/src/SwitchboardEvents.ts @@ -1,7 +1,7 @@ -import * as types from "./generated/index.js"; +import type * as types from "./generated/index.js"; -import * as anchor from "@coral-xyz/anchor"; -import { BN } from "@switchboard-xyz/common"; +import type * as anchor from "@coral-xyz/anchor"; +import type { BN } from "@switchboard-xyz/common"; export type AggregatorAddJobEvent = { feedPubkey: anchor.web3.PublicKey; diff --git a/javascript/solana.js/src/SwitchboardNetwork.ts b/javascript/solana.js/src/SwitchboardNetwork.ts index 0dd4fb5..ec28381 100644 --- a/javascript/solana.js/src/SwitchboardNetwork.ts +++ b/javascript/solana.js/src/SwitchboardNetwork.ts @@ -1,19 +1,21 @@ -import { - AggregatorAccount, - BufferRelayerAccount, - CrankAccount, +import type { CreateQueueBufferRelayerParams, CreateQueueCrankParams, CreateQueueFeedParams, CreateQueueOracleParams, CreateQueueVrfParams, + QueueInitParams, +} from "./accounts/index.js"; +import { + AggregatorAccount, + BufferRelayerAccount, + CrankAccount, JobAccount, LeaseAccount, OracleAccount, PermissionAccount, ProgramStateAccount, QueueAccount, - QueueInitParams, VrfAccount, } from "./accounts/index.js"; import { @@ -28,12 +30,12 @@ import { SbState, VrfAccountData, } from "./generated/index.js"; -import { +import type { SendTransactionOptions, SwitchboardProgram, } from "./SwitchboardProgram.js"; import { TransactionObject } from "./TransactionObject.js"; -import { +import type { AggregatorDefinition, BufferRelayerDefinition, CrankDefinition, @@ -53,12 +55,8 @@ import { } from "./types.js"; import * as anchor from "@coral-xyz/anchor"; -import { - AccountInfo, - Keypair, - PublicKey, - TransactionSignature, -} from "@solana/web3.js"; +import type { AccountInfo, TransactionSignature } from "@solana/web3.js"; +import { Keypair, PublicKey } from "@solana/web3.js"; import { OracleJob } from "@switchboard-xyz/common"; import fs from "fs"; import path from "path"; @@ -331,7 +329,10 @@ export class SwitchboardNetwork implements ISwitchboardNetwork { const [queueAccount, queueInit] = await QueueAccount.createInstructions( program, payer, - { ...params, authority: queueAuthorityPubkey } + { + ...params, + authority: queueAuthorityPubkey, + } ); txns.push(queueInit); diff --git a/javascript/solana.js/src/SwitchboardProgram.ts b/javascript/solana.js/src/SwitchboardProgram.ts index feb74ae..1ff6904 100644 --- a/javascript/solana.js/src/SwitchboardProgram.ts +++ b/javascript/solana.js/src/SwitchboardProgram.ts @@ -1,3 +1,7 @@ +import type { + SwitchboardAccountData, + SwitchboardAccountType, +} from "./accounts/index.js"; import { AttestationProgramStateAccount, BUFFER_DISCRIMINATOR, @@ -6,8 +10,6 @@ import { JobAccount, ProgramStateAccount, QueueAccount, - SwitchboardAccountData, - SwitchboardAccountType, } from "./accounts/index.js"; import { AggregatorAccountData, @@ -36,33 +38,31 @@ import { } from "./const.js"; import * as errors from "./errors.js"; import { NativeMint } from "./mint.js"; -import { SwitchboardEvents } from "./SwitchboardEvents.js"; -import { TransactionObject, TransactionOptions } from "./TransactionObject.js"; -import { LoadedJobDefinition } from "./types.js"; +import type { SwitchboardEvents } from "./SwitchboardEvents.js"; +import type { TransactionOptions } from "./TransactionObject.js"; +import { TransactionObject } from "./TransactionObject.js"; +import type { LoadedJobDefinition } from "./types.js"; +import type { AccountNamespace, Idl, Wallet } from "@coral-xyz/anchor"; import { ACCOUNT_DISCRIMINATOR_SIZE, - AccountNamespace, AnchorProvider, BorshAccountsCoder, - Idl, Program, utils as AnchorUtils, - Wallet, } from "@coral-xyz/anchor"; -import { +import type { AccountInfo, Cluster, ConfirmOptions, Connection, GetProgramAccountsResponse, - Keypair, - PublicKey, SendOptions, Transaction, TransactionSignature, VersionedTransaction, } from "@solana/web3.js"; +import { Keypair, PublicKey } from "@solana/web3.js"; import { OracleJob } from "@switchboard-xyz/common"; export type SendTransactionOptions = (ConfirmOptions | SendOptions) & { diff --git a/javascript/solana.js/src/SwitchboardTestContext.ts b/javascript/solana.js/src/SwitchboardTestContext.ts index 0cb23d1..b1e9862 100644 --- a/javascript/solana.js/src/SwitchboardTestContext.ts +++ b/javascript/solana.js/src/SwitchboardTestContext.ts @@ -1,21 +1,21 @@ -import { - AggregatorAccount, - type CreateQueueFeedParams, - type CreateQueueOracleParams, - OracleAccount, - QueueAccount, +import type { AggregatorAccount, OracleAccount } from "./accounts/index.js"; +import type { + CreateQueueFeedParams, + CreateQueueOracleParams, } from "./accounts/index.js"; -import { AggregatorAccountData } from "./generated/index.js"; -import { +import { QueueAccount } from "./accounts/index.js"; +import type { AggregatorAccountData } from "./generated/index.js"; +import type { LoadedSwitchboardNetwork, - type NetworkInitParams, - SwitchboardNetwork, + NetworkInitParams, } from "./SwitchboardNetwork.js"; +import { SwitchboardNetwork } from "./SwitchboardNetwork.js"; import { SwitchboardProgram } from "./SwitchboardProgram.js"; import { createStaticFeed, loadKeypair, updateStaticFeed } from "./utils.js"; -import { AnchorProvider } from "@coral-xyz/anchor"; -import { Connection, Keypair, PublicKey } from "@solana/web3.js"; +import type { AnchorProvider } from "@coral-xyz/anchor"; +import type { Connection, PublicKey } from "@solana/web3.js"; +import { Keypair } from "@solana/web3.js"; import fs from "fs"; import _ from "lodash"; import os from "os"; diff --git a/javascript/solana.js/src/TransactionObject.ts b/javascript/solana.js/src/TransactionObject.ts index c697bcb..e3b578c 100644 --- a/javascript/solana.js/src/TransactionObject.ts +++ b/javascript/solana.js/src/TransactionObject.ts @@ -2,23 +2,25 @@ import * as attestationTypes from "./generated/attestation-program/index.js"; import { fromTxError } from "./generated/oracle-program/errors/index.js"; import { isBrowser } from "./browser.js"; import * as errors from "./errors.js"; -import { +import type { AnchorWallet, - DEFAULT_SEND_TRANSACTION_OPTIONS, SendTransactionOptions, } from "./SwitchboardProgram.js"; +import { DEFAULT_SEND_TRANSACTION_OPTIONS } from "./SwitchboardProgram.js"; -import { AnchorProvider } from "@coral-xyz/anchor"; -import { - ComputeBudgetProgram, +import type { AnchorProvider } from "@coral-xyz/anchor"; +import type { Keypair, NonceInformation, + TransactionInstruction, + TransactionSignature, +} from "@solana/web3.js"; +import { + ComputeBudgetProgram, PACKET_DATA_SIZE, PublicKey, Transaction, - TransactionInstruction, TransactionMessage, - TransactionSignature, VersionedTransaction, } from "@solana/web3.js"; import { sleep } from "@switchboard-xyz/common"; diff --git a/javascript/solana.js/src/accounts/account.ts b/javascript/solana.js/src/accounts/account.ts index e947ba5..2932809 100644 --- a/javascript/solana.js/src/accounts/account.ts +++ b/javascript/solana.js/src/accounts/account.ts @@ -11,21 +11,21 @@ import { SlidingResultAccountData, VrfAccountData, } from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { AggregatorAccount } from "./aggregatorAccount.js"; -import { AggregatorHistoryBuffer } from "./aggregatorHistoryBuffer.js"; -import { BufferRelayerAccount } from "./bufferRelayAccount.js"; -import { CrankAccount } from "./crankAccount.js"; -import { CrankDataBuffer } from "./crankDataBuffer.js"; -import { JobAccount } from "./jobAccount.js"; -import { LeaseAccount } from "./leaseAccount.js"; -import { OracleAccount } from "./oracleAccount.js"; -import { PermissionAccount } from "./permissionAccount.js"; -import { ProgramStateAccount } from "./programStateAccount.js"; -import { QueueAccount } from "./queueAccount.js"; -import { QueueDataBuffer } from "./queueDataBuffer.js"; -import { VrfAccount } from "./vrfAccount.js"; +import type { AggregatorAccount } from "./aggregatorAccount.js"; +import type { AggregatorHistoryBuffer } from "./aggregatorHistoryBuffer.js"; +import type { BufferRelayerAccount } from "./bufferRelayAccount.js"; +import type { CrankAccount } from "./crankAccount.js"; +import type { CrankDataBuffer } from "./crankDataBuffer.js"; +import type { JobAccount } from "./jobAccount.js"; +import type { LeaseAccount } from "./leaseAccount.js"; +import type { OracleAccount } from "./oracleAccount.js"; +import type { PermissionAccount } from "./permissionAccount.js"; +import type { ProgramStateAccount } from "./programStateAccount.js"; +import type { QueueAccount } from "./queueAccount.js"; +import type { QueueDataBuffer } from "./queueDataBuffer.js"; +import type { VrfAccount } from "./vrfAccount.js"; import * as anchor from "@coral-xyz/anchor"; diff --git a/javascript/solana.js/src/accounts/aggregatorAccount.ts b/javascript/solana.js/src/accounts/aggregatorAccount.ts index c1987d7..797206c 100644 --- a/javascript/solana.js/src/accounts/aggregatorAccount.ts +++ b/javascript/solana.js/src/accounts/aggregatorAccount.ts @@ -1,48 +1,46 @@ import * as errors from "../errors.js"; -import { - AggregatorAccountData, +import type { AggregatorAccountDataFields, AggregatorAccountDataJSON, } from "../generated/oracle-program/accounts/AggregatorAccountData.js"; -import { - JobAccountData, - JobAccountDataJSON, -} from "../generated/oracle-program/accounts/JobAccountData.js"; -import { - LeaseAccountData, - LeaseAccountDataJSON, -} from "../generated/oracle-program/accounts/LeaseAccountData.js"; -import { OracleAccountData } from "../generated/oracle-program/accounts/OracleAccountData.js"; -import { +import { AggregatorAccountData } from "../generated/oracle-program/accounts/AggregatorAccountData.js"; +import type { JobAccountDataJSON } from "../generated/oracle-program/accounts/JobAccountData.js"; +import { JobAccountData } from "../generated/oracle-program/accounts/JobAccountData.js"; +import type { LeaseAccountDataJSON } from "../generated/oracle-program/accounts/LeaseAccountData.js"; +import { LeaseAccountData } from "../generated/oracle-program/accounts/LeaseAccountData.js"; +import type { OracleAccountData } from "../generated/oracle-program/accounts/OracleAccountData.js"; +import type { OracleQueueAccountData, OracleQueueAccountDataJSON, } from "../generated/oracle-program/accounts/OracleQueueAccountData.js"; -import { - PermissionAccountData, - PermissionAccountDataJSON, -} from "../generated/oracle-program/accounts/PermissionAccountData.js"; +import type { PermissionAccountDataJSON } from "../generated/oracle-program/accounts/PermissionAccountData.js"; +import { PermissionAccountData } from "../generated/oracle-program/accounts/PermissionAccountData.js"; import * as ix from "../generated/oracle-program/instructions/index.js"; -import { +import type { AggregatorHistoryRow, - AggregatorResolutionMode, AggregatorResolutionModeKind, +} from "../generated/oracle-program/types/index.js"; +import { + AggregatorResolutionMode, BorshDecimal, } from "../generated/oracle-program/types/index.js"; import { SwitchboardDecimal } from "../generated/oracle-program/types/SwitchboardDecimal.js"; import { PermitOracleQueueUsage } from "../generated/oracle-program/types/SwitchboardPermission.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, TransactionPackOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; import { AggregatorHistoryBuffer } from "./aggregatorHistoryBuffer.js"; import { CrankAccount } from "./crankAccount.js"; import { JobAccount } from "./jobAccount.js"; -import { LeaseAccount, LeaseExtendParams } from "./leaseAccount.js"; +import type { LeaseExtendParams } from "./leaseAccount.js"; +import { LeaseAccount } from "./leaseAccount.js"; import { OracleAccount } from "./oracleAccount.js"; import { PermissionAccount } from "./permissionAccount.js"; import { QueueAccount } from "./queueAccount.js"; @@ -50,16 +48,18 @@ import { QueueAccount } from "./queueAccount.js"; import * as anchor from "@coral-xyz/anchor"; import * as spl from "@solana/spl-token"; import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; -import { +import type { AccountInfo, AccountMeta, Commitment, + TransactionInstruction, + TransactionSignature, +} from "@solana/web3.js"; +import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, - TransactionInstruction, - TransactionSignature, } from "@solana/web3.js"; import { Big, diff --git a/javascript/solana.js/src/accounts/aggregatorHistoryBuffer.ts b/javascript/solana.js/src/accounts/aggregatorHistoryBuffer.ts index 0354301..3d5d37e 100644 --- a/javascript/solana.js/src/accounts/aggregatorHistoryBuffer.ts +++ b/javascript/solana.js/src/accounts/aggregatorHistoryBuffer.ts @@ -1,27 +1,22 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { - Account, - BUFFER_DISCRIMINATOR, - OnAccountChangeCallback, -} from "./account.js"; -import { AggregatorAccount } from "./aggregatorAccount.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account, BUFFER_DISCRIMINATOR } from "./account.js"; +import type { AggregatorAccount } from "./aggregatorAccount.js"; -import { +import type { Commitment, - Keypair, - PublicKey, - SystemProgram, TransactionInstruction, TransactionSignature, } from "@solana/web3.js"; +import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; import { Big, BN } from "@switchboard-xyz/common"; export interface AggregatorHistoryInit { diff --git a/javascript/solana.js/src/accounts/attestationPermissionAccount.ts b/javascript/solana.js/src/accounts/attestationPermissionAccount.ts index a9a5b7c..29488ca 100644 --- a/javascript/solana.js/src/accounts/attestationPermissionAccount.ts +++ b/javascript/solana.js/src/accounts/attestationPermissionAccount.ts @@ -1,20 +1,16 @@ import * as errors from "../errors.js"; import * as types from "../generated/attestation-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; import { Account } from "./account.js"; -import { - Keypair, - PublicKey, - SystemProgram, - TransactionSignature, -} from "@solana/web3.js"; +import type { Keypair, TransactionSignature } from "@solana/web3.js"; +import { PublicKey, SystemProgram } from "@solana/web3.js"; /** * Parameters for initializing an {@linkcode AttestationPermissionAccount} @@ -201,7 +197,7 @@ export class AttestationPermissionAccount extends Account & Partial & { @@ -208,11 +202,11 @@ export class AttestationQueueAccount extends Account { + ): Promise<[VerifierAccount, TransactionObject]> { this.program.verifyAttestation(); const authority = params.authority ?? payer; @@ -220,15 +214,16 @@ export class AttestationQueueAccount extends Account { - const [account, txnObject] = await this.createQuoteInstruction( + ): Promise<[VerifierAccount, TransactionSignature]> { + const [account, txnObject] = await this.createVerifierInstruction( this.program.walletPubkey, params, options @@ -304,7 +299,7 @@ export class AttestationQueueAccount extends Account = []; const signers: Array = [ authority, attestationQueueKeypair, - verifierQuoteKeypair1, - verifierQuoteSigner1, + verifierKeypair1, + verifierSigner1, ]; // create attestation queue @@ -459,7 +454,7 @@ export class AttestationQueueAccount extends Account; @@ -100,6 +104,24 @@ export interface FunctionSetConfigParams { authority?: Keypair; } +/** + * Parameters for setting a {@linkcode FunctionAccount} escrow + */ +export interface FunctionSetEscrowParams { + authority?: Keypair; + newEscrow: SwitchboardWallet; + newEscrowAuthority?: Keypair; +} + +/** + * Parameters for setting a {@linkcode FunctionAccount} authority + */ +export interface FunctionSetAuthorityParams { + authority?: Keypair; + newAuthority: PublicKey; + walletAuthority?: Keypair; +} + /** * Parameters for an {@linkcode types.functionVerify} instruction. */ @@ -111,8 +133,6 @@ export interface FunctionVerifySyncParams { mrEnclave: Uint8Array; escrowWallet: PublicKey; - - functionAuthority: PublicKey; functionEnclaveSigner: PublicKey; attestationQueue: PublicKey; @@ -133,7 +153,7 @@ export interface FunctionVerifyParams { nextAllowedTimestamp: anchor.BN; isFailure: boolean; mrEnclave: Uint8Array; - verifier: EnclaveAccount; + verifier: VerifierAccount; verifierEnclaveSigner: PublicKey; functionEnclaveSigner: PublicKey; receiver: PublicKey; @@ -170,14 +190,14 @@ export class FunctionAccount extends Account { /** * Returns the functions's name buffer in a stringified format. */ - public static getName = (functionData: types.FunctionAccountData) => - toUtf8(functionData.name); + public static getName = (functionState: types.FunctionAccountData) => + toUtf8(functionState.name); /** * Returns the functions's metadata buffer in a stringified format. */ - public static getMetadata = (functionData: types.FunctionAccountData) => - toUtf8(functionData.metadata); + public static getMetadata = (functionState: types.FunctionAccountData) => + toUtf8(functionState.metadata); /** * Load an existing {@linkcode FunctionAccount} with its current on-chain state @@ -302,7 +322,9 @@ export class FunctionAccount extends Account { const authorityPubkey = params.authority ?? payer; - const cronSchedule = parseCronSchedule(params.schedule); + const cronSchedule: Buffer = params.schedule + ? Buffer.from(parseCronSchedule(params.schedule), "utf-8") + : Buffer.from(Array(64).fill(0)); const attestationQueueAccount = params.attestationQueue; @@ -360,8 +382,6 @@ export class FunctionAccount extends Account { escrowWalletAuthority = authorityPubkey; } - const enclaveAccount = functionAccount.getEnclaveAccount(); - const instruction = types.functionInit( program, { @@ -370,10 +390,12 @@ export class FunctionAccount extends Account { metadata: new Uint8Array(Buffer.from(params.metadata ?? "", "utf8")), container: new Uint8Array(Buffer.from(params.container, "utf8")), containerRegistry: new Uint8Array( - Buffer.from(params.containerRegistry ?? "", "utf8") + Buffer.from(params.containerRegistry ?? "dockerhub", "utf8") ), - version: new Uint8Array(Buffer.from(params.version, "utf8")), - schedule: new Uint8Array(Buffer.from(cronSchedule, "utf8")), + version: new Uint8Array( + Buffer.from(params.version ?? "latest", "utf8") + ), + schedule: new Uint8Array(cronSchedule), mrEnclave: Array.from(parseMrEnclave(params.mrEnclave)), recentSlot: recentSlot, requestsDisabled: params.requestsDisabled ?? false, @@ -391,13 +413,11 @@ export class FunctionAccount extends Account { function: functionAccount.publicKey, addressLookupTable: addressLookupTable, authority: authorityPubkey, - quote: enclaveAccount.publicKey, attestationQueue: attestationQueueAccount.publicKey, payer, wallet: escrowWallet.publicKey, walletAuthority: escrowWalletAuthority, tokenWallet: escrowWallet.tokenWallet, - state: program.attestationProgramState.publicKey, mint: program.mint.address, tokenProgram: TOKEN_PROGRAM_ID, associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, @@ -442,10 +462,6 @@ export class FunctionAccount extends Account { return [account, txSignature]; } - public getEnclaveAccount(): EnclaveAccount { - return EnclaveAccount.fromSeed(this.program, this.publicKey); - } - public async createRequestInstruction( payer: PublicKey, params: CreateFunctionRequestParams, @@ -484,18 +500,18 @@ export class FunctionAccount extends Account { params: FunctionSetConfigParams, options?: TransactionObjectOptions ): Promise { - const functionData = await this.loadData(); + const functionState = await this.loadData(); if (params.authority) { - if (!params.authority.publicKey.equals(functionData.authority)) { + if (!params.authority.publicKey.equals(functionState.authority)) { throw new errors.IncorrectAuthority( - functionData.authority, + functionState.authority, params.authority.publicKey ); } } else { - if (!payer.equals(functionData.authority)) { - throw new errors.IncorrectAuthority(functionData.authority, payer); + if (!payer.equals(functionState.authority)) { + throw new errors.IncorrectAuthority(functionState.authority, payer); } } @@ -521,17 +537,17 @@ export class FunctionAccount extends Account { requestsDisabled: params.requestsDisabled ?? null, requestsRequireAuthorization: params.requestsRequireAuthorization ?? null, - requestsDefaultSlotsUntilExpiration: + requestsDefaultSlotsUntilExpiration: Number.isFinite( params.requestsDefaultSlotsUntilExpiration - ? new BN(params.requestsDefaultSlotsUntilExpiration) - : null, + ) + ? new BN(params.requestsDefaultSlotsUntilExpiration) + : null, requestsFee: params.requestsFee ? new BN(params.requestsFee) : null, }, }, { function: this.publicKey, - quote: this.getEnclaveAccount().publicKey, - authority: functionData.authority, + authority: functionState.authority, } ); @@ -554,6 +570,112 @@ export class FunctionAccount extends Account { ).then((txn) => this.program.signAndSend(txn, options)); } + public async setEscrowInstruction( + payer: PublicKey, + params: FunctionSetEscrowParams, + options?: TransactionObjectOptions + ): Promise { + const signers: Keypair[] = []; + if (params.authority) { + signers.push(params.authority); + } + if (params.newEscrowAuthority) { + signers.push(params.newEscrowAuthority); + } + const functionState = await this.loadData(); + + const currentWallet = await this.wallet; + const currentWalletState = await currentWallet.loadData(); + + const newWallet = params.newEscrow; + const newWalletState = await newWallet.loadData(); + + const functionSetEscrowIxn = types.functionSetEscrow( + this.program, + { params: {} }, + { + function: this.publicKey, + authority: functionState.authority, + attestationQueue: functionState.attestationQueue, + escrowWallet: currentWallet.publicKey, + escrowAuthority: currentWalletState.authority, + newEscrow: newWallet.publicKey, + newEscrowAuthority: newWalletState.authority, + newEscrowTokenWallet: newWallet.tokenWallet, + } + ); + + return new TransactionObject( + payer, + [functionSetEscrowIxn], + signers, + options + ); + } + + public async setEscrow( + params: FunctionSetEscrowParams, + options?: SendTransactionObjectOptions + ): Promise { + return await this.setEscrowInstruction( + this.program.walletPubkey, + params, + options + ).then((txn) => this.program.signAndSend(txn, options)); + } + + public async setAuthorityInstruction( + payer: PublicKey, + params: FunctionSetAuthorityParams, + options?: TransactionObjectOptions + ): Promise { + const signers: Keypair[] = []; + if (params.authority) { + signers.push(params.authority); + } + if (params.walletAuthority) { + signers.push(params.walletAuthority); + } + + const functionState = await this.loadData(); + const wallet = await this.wallet; + const walletState = await wallet.loadData(); + + const functionSetAuthorityIxn = types.functionSetAuthority( + this.program, + { params: {} }, + { + function: this.publicKey, + authority: functionState.authority, + attestationQueue: functionState.attestationQueue, + escrowWallet: wallet.publicKey, + escrowAuthority: walletState.authority, + newAuthority: params.newAuthority, + walletAuthority: params.walletAuthority + ? params.walletAuthority.publicKey + : SB_ATTESTATION_PID, + } + ); + + return new TransactionObject( + payer, + [handleOptionalPubkeys(functionSetAuthorityIxn)], + signers, + options + ); + } + + public async setAuthority( + params: FunctionSetAuthorityParams, + options?: SendTransactionObjectOptions + ): Promise { + return await this.setAuthorityInstruction( + this.program.walletPubkey, + params, + options + ).then((txn) => this.program.signAndSend(txn, options)); + } + public async resetEscrowInstruction( payer: PublicKey, authority?: Keypair, @@ -582,7 +704,6 @@ export class FunctionAccount extends Account { defaultWallet: defaultWallet.publicKey, tokenWallet: defaultWallet.tokenWallet, payer: payer, - state: this.program.attestationProgramState.publicKey, tokenProgram: anchor.utils.token.TOKEN_PROGRAM_ID, associatedTokenProgram: anchor.utils.token.ASSOCIATED_PROGRAM_ID, systemProgram: anchor.web3.SystemProgram.programId, @@ -693,7 +814,6 @@ export class FunctionAccount extends Account { public verifyInstructionSync( params: FunctionVerifySyncParams ): TransactionInstruction { - const fnEnclaveAccount = this.getEnclaveAccount(); const wallet = new SwitchboardWallet(this.program, params.escrowWallet); const escrowTokenWallet = wallet.tokenWallet; @@ -710,12 +830,10 @@ export class FunctionAccount extends Account { { // fn accounts function: this.publicKey, - authority: params.functionAuthority, functionEnclaveSigner: params.functionEnclaveSigner, - fnQuote: fnEnclaveAccount.publicKey, // verifier accounts - verifierQuote: params.quoteVerifier, - verifierEnclaveSigner: params.quoteVerifierEnclaveSigner, + verifier: params.quoteVerifier, + verifierSigner: params.quoteVerifierEnclaveSigner, verifierPermission: AttestationPermissionAccount.fromSeed( this.program, params.attestationQueueAuthority, @@ -727,7 +845,6 @@ export class FunctionAccount extends Account { escrowTokenWallet: escrowTokenWallet, receiver: params.receiver, // others - state: this.program.attestationProgramState.publicKey, attestationQueue: params.attestationQueue, tokenProgram: spl.TOKEN_PROGRAM_ID, } @@ -739,7 +856,7 @@ export class FunctionAccount extends Account { ): Promise { this.program.verifyAttestation(); - const functionData = params.fnState ?? (await this.loadData()); + const functionState = params.fnState ?? (await this.loadData()); const wallet = await this.wallet; @@ -747,7 +864,7 @@ export class FunctionAccount extends Account { if (!attestationQueueAuthority) { const attestationQueueAccount = new AttestationQueueAccount( this.program, - functionData.attestationQueue + functionState.attestationQueue ); attestationQueueAuthority = (await attestationQueueAccount.loadData()) .authority; @@ -762,14 +879,13 @@ export class FunctionAccount extends Account { mrEnclave: params.mrEnclave, escrowWallet: wallet.publicKey, - functionAuthority: functionData.authority, functionEnclaveSigner: params.functionEnclaveSigner, - attestationQueue: functionData.attestationQueue, + attestationQueue: functionState.attestationQueue, attestationQueueAuthority: attestationQueueAuthority, quoteVerifier: params.verifier.publicKey, - quoteVerifierEnclaveSigner: quoteVerifier.enclaveSigner, + quoteVerifierEnclaveSigner: quoteVerifier.enclave.enclaveSigner, receiver: params.receiver, }); @@ -803,7 +919,7 @@ export class FunctionAccount extends Account { isFailure: boolean; mrEnclave: Uint8Array; - verifier: EnclaveAccount; + verifier: VerifierAccount; verifierEnclaveSigner: Keypair; functionEnclaveSigner: Keypair; @@ -836,19 +952,19 @@ export class FunctionAccount extends Account { params?: FunctionTriggerParams, options?: TransactionObjectOptions ): Promise { - const functionData = await this.loadData(); + const functionState = await this.loadData(); // verify authority is correct if (params && params?.authority) { - if (!params.authority.publicKey.equals(functionData.authority)) { + if (!params.authority.publicKey.equals(functionState.authority)) { throw new errors.IncorrectAuthority( - functionData.authority, + functionState.authority, params.authority.publicKey ); } } else { - if (!payer.equals(functionData.authority)) { - throw new errors.IncorrectAuthority(functionData.authority, payer); + if (!payer.equals(functionState.authority)) { + throw new errors.IncorrectAuthority(functionState.authority, payer); } } @@ -857,15 +973,16 @@ export class FunctionAccount extends Account { { params: {} }, { function: this.publicKey, - authority: functionData.authority, - attestationQueue: functionData.attestationQueue, + authority: functionState.authority, + attestationQueue: functionState.attestationQueue, } ); return new TransactionObject( payer, [functionTrigger], - params?.authority ? [params.authority] : [] + params?.authority ? [params.authority] : [], + options ); } @@ -882,7 +999,7 @@ export class FunctionAccount extends Account { public static decodeAddressLookup(lookupTable: AddressLookupTableAccount) { const addresses = lookupTable.state.addresses; - if (addresses.length < 18) { + if (addresses.length < 16) { throw new Error(`Failed to decode address lookup table`); } @@ -943,14 +1060,12 @@ export class FunctionAccount extends Account { } // switchboard accounts, not worth the network calls - const statePubkey = addresses[10]!; - const attestationQueuePubkey = addresses[11]!; - const functionPubkey = addresses[12]!; - const functionAuthorityPubkey = addresses[13]!; - const fnQuote = addresses[14]!; - const mintPubkey = addresses[15]!; - const walletPubkey = addresses[16]!; - const escrowPubkey = addresses[17]!; + const attestationQueuePubkey = addresses[10]!; + const functionPubkey = addresses[11]!; + const functionAuthorityPubkey = addresses[12]!; + const mintPubkey = addresses[13]!; + const walletPubkey = addresses[14]!; + const escrowPubkey = addresses[15]!; return { systemProgram, // 1 @@ -963,14 +1078,33 @@ export class FunctionAccount extends Account { sysVarSlotHistory, switchboardProgram, attestationProgram, // 10 - statePubkey, attestationQueuePubkey, functionPubkey, functionAuthorityPubkey, - fnQuote, // 15 mintPubkey, - walletPubkey, - escrowPubkey, // 18 + walletPubkey, // 15 + escrowPubkey, // 16 }; } + + public static getVerificationStatus( + state: types.FunctionAccountData + ): types.VerificationStatusKind { + switch (state.enclave.verificationStatus) { + case types.VerificationStatus.None.discriminator: + return new types.VerificationStatus.None(); + case types.VerificationStatus.VerificationPending.discriminator: + return new types.VerificationStatus.VerificationPending(); + case types.VerificationStatus.VerificationFailure.discriminator: + return new types.VerificationStatus.VerificationFailure(); + case types.VerificationStatus.VerificationSuccess.discriminator: + return new types.VerificationStatus.VerificationSuccess(); + case types.VerificationStatus.VerificationOverride.discriminator: + return new types.VerificationStatus.VerificationOverride(); + } + + throw new Error( + `Failed to get the verification status, expected [${types.VerificationStatus.None.discriminator}, ${types.VerificationStatus.VerificationPending.discriminator}, ${types.VerificationStatus.VerificationFailure.discriminator}, ${types.VerificationStatus.VerificationSuccess.discriminator}], or ${types.VerificationStatus.VerificationOverride.discriminator}], received ${state.enclave.verificationStatus}` + ); + } } diff --git a/javascript/solana.js/src/accounts/functionRequestAccount.ts b/javascript/solana.js/src/accounts/functionRequestAccount.ts index 105cf98..bbbad96 100644 --- a/javascript/solana.js/src/accounts/functionRequestAccount.ts +++ b/javascript/solana.js/src/accounts/functionRequestAccount.ts @@ -1,13 +1,13 @@ import { Account } from "../accounts/account.js"; import * as errors from "../errors.js"; import * as types from "../generated/attestation-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; -import { RawBuffer } from "../types.js"; +import { TransactionObject } from "../TransactionObject.js"; +import type { RawBuffer } from "../types.js"; import { parseMrEnclave } from "../utils.js"; import { FunctionAccount } from "./index.js"; @@ -16,13 +16,12 @@ import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; -import { - Keypair, +import type { PublicKey, - SystemProgram, TransactionInstruction, TransactionSignature, } from "@solana/web3.js"; +import { Keypair, SystemProgram } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; /** diff --git a/javascript/solana.js/src/accounts/index.ts b/javascript/solana.js/src/accounts/index.ts index 003ba2a..f0041bc 100644 --- a/javascript/solana.js/src/accounts/index.ts +++ b/javascript/solana.js/src/accounts/index.ts @@ -7,7 +7,6 @@ export * from "./attestationQueueAccount.js"; export * from "./bufferRelayAccount.js"; export * from "./crankAccount.js"; export * from "./crankDataBuffer.js"; -export * from "./enclaveAccount.js"; export * from "./functionAccount.js"; export * from "./functionRequestAccount.js"; export * from "./jobAccount.js"; @@ -18,6 +17,7 @@ export * from "./programStateAccount.js"; export * from "./queueAccount.js"; export * from "./queueDataBuffer.js"; export * from "./switchboardWallet.js"; +export * from "./verifierAccount.js"; export * from "./vrfAccount.js"; export * from "./vrfLiteAccount.js"; export * from "./vrfPoolAccount.js"; diff --git a/javascript/solana.js/src/accounts/jobAccount.ts b/javascript/solana.js/src/accounts/jobAccount.ts index 2b8164a..fbf5483 100644 --- a/javascript/solana.js/src/accounts/jobAccount.ts +++ b/javascript/solana.js/src/accounts/jobAccount.ts @@ -1,23 +1,25 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; import { Account } from "./account.js"; import * as anchor from "@coral-xyz/anchor"; -import { +import type { AccountInfo, Commitment, + TransactionSignature, +} from "@solana/web3.js"; +import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, - TransactionSignature, } from "@solana/web3.js"; import { BN, OracleJob, toUtf8 } from "@switchboard-xyz/common"; diff --git a/javascript/solana.js/src/accounts/leaseAccount.ts b/javascript/solana.js/src/accounts/leaseAccount.ts index 8f7868d..aa3e5f2 100644 --- a/javascript/solana.js/src/accounts/leaseAccount.ts +++ b/javascript/solana.js/src/accounts/leaseAccount.ts @@ -1,28 +1,31 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; import { Account } from "./account.js"; import { AggregatorAccount } from "./aggregatorAccount.js"; -import { JobAccount } from "./jobAccount.js"; +import type { JobAccount } from "./jobAccount.js"; import { QueueAccount } from "./queueAccount.js"; import * as spl from "@solana/spl-token"; -import { +import type { AccountInfo, AccountMeta, + TransactionSignature, +} from "@solana/web3.js"; +import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, - TransactionSignature, } from "@solana/web3.js"; -import { BN, OracleJob } from "@switchboard-xyz/common"; +import type { OracleJob } from "@switchboard-xyz/common"; +import { BN } from "@switchboard-xyz/common"; /** * Account type representing an {@linkcode AggregatorAccount}'s pre-funded escrow used to reward {@linkcode OracleAccount}'s for responding to open round requests. diff --git a/javascript/solana.js/src/accounts/oracleAccount.ts b/javascript/solana.js/src/accounts/oracleAccount.ts index ee1dd00..fc572fc 100644 --- a/javascript/solana.js/src/accounts/oracleAccount.ts +++ b/javascript/solana.js/src/accounts/oracleAccount.ts @@ -1,29 +1,32 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; import { PermissionAccount } from "./permissionAccount.js"; import { QueueAccount } from "./queueAccount.js"; import * as anchor from "@coral-xyz/anchor"; import * as spl from "@solana/spl-token"; -import { +import type { AccountInfo, Commitment, + TransactionInstruction, + TransactionSignature, +} from "@solana/web3.js"; +import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, - TransactionInstruction, - TransactionSignature, } from "@solana/web3.js"; -import { BN } from "@switchboard-xyz/common"; +import type { BN } from "@switchboard-xyz/common"; /** * Account type holding an oracle's configuration including the authority and the reward/slashing wallet along with a set of metrics tracking its reliability. diff --git a/javascript/solana.js/src/accounts/permissionAccount.ts b/javascript/solana.js/src/accounts/permissionAccount.ts index e7fdd25..bfa0533 100644 --- a/javascript/solana.js/src/accounts/permissionAccount.ts +++ b/javascript/solana.js/src/accounts/permissionAccount.ts @@ -6,24 +6,22 @@ import { PermitOracleQueueUsage, PermitVrfRequests, } from "../generated/oracle-program/types/SwitchboardPermission.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; import { Account } from "./account.js"; import { ACCOUNT_DISCRIMINATOR_SIZE } from "@coral-xyz/anchor"; -import { +import type { AccountInfo, Keypair, - LAMPORTS_PER_SOL, - PublicKey, - SystemProgram, TransactionSignature, } from "@solana/web3.js"; +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js"; /** * Parameters for initializing an {@linkcode PermissionAccount} diff --git a/javascript/solana.js/src/accounts/programStateAccount.ts b/javascript/solana.js/src/accounts/programStateAccount.ts index a0b7d2a..6b2bba7 100644 --- a/javascript/solana.js/src/accounts/programStateAccount.ts +++ b/javascript/solana.js/src/accounts/programStateAccount.ts @@ -1,21 +1,19 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; import { Mint } from "../mint.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; import { TransactionObject } from "../TransactionObject.js"; import { Account } from "./account.js"; -import * as anchor from "@coral-xyz/anchor"; +import type * as anchor from "@coral-xyz/anchor"; import * as spl from "@solana/spl-token"; -import { - Keypair, - PublicKey, - SystemProgram, +import type { TransactionInstruction, TransactionSignature, } from "@solana/web3.js"; -import { BN } from "@switchboard-xyz/common"; +import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; +import type { BN } from "@switchboard-xyz/common"; /** * Account type representing Switchboard global program state. diff --git a/javascript/solana.js/src/accounts/queueAccount.ts b/javascript/solana.js/src/accounts/queueAccount.ts index 79e460b..f421b5e 100644 --- a/javascript/solana.js/src/accounts/queueAccount.ts +++ b/javascript/solana.js/src/accounts/queueAccount.ts @@ -6,45 +6,40 @@ import { PermitVrfRequests, } from "../generated/oracle-program/types/SwitchboardPermission.js"; import { SolanaClock } from "../SolanaClock.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; -import { - AggregatorAccount, - AggregatorInitParams, -} from "./aggregatorAccount.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; +import type { AggregatorInitParams } from "./aggregatorAccount.js"; +import { AggregatorAccount } from "./aggregatorAccount.js"; import { AggregatorHistoryBuffer } from "./aggregatorHistoryBuffer.js"; -import { - BufferRelayerAccount, - BufferRelayerInit, -} from "./bufferRelayAccount.js"; -import { CrankAccount, CrankInitParams } from "./crankAccount.js"; -import { JobAccount, JobInitParams } from "./jobAccount.js"; -import { LeaseAccount, LeaseInitParams } from "./leaseAccount.js"; -import { - OracleAccount, - OracleInitParams, - OracleStakeParams, -} from "./oracleAccount.js"; -import { PermissionAccount, PermissionSetParams } from "./permissionAccount.js"; +import type { BufferRelayerInit } from "./bufferRelayAccount.js"; +import { BufferRelayerAccount } from "./bufferRelayAccount.js"; +import type { CrankInitParams } from "./crankAccount.js"; +import { CrankAccount } from "./crankAccount.js"; +import type { JobInitParams } from "./jobAccount.js"; +import { JobAccount } from "./jobAccount.js"; +import type { LeaseInitParams } from "./leaseAccount.js"; +import { LeaseAccount } from "./leaseAccount.js"; +import type { OracleInitParams, OracleStakeParams } from "./oracleAccount.js"; +import { OracleAccount } from "./oracleAccount.js"; +import type { PermissionSetParams } from "./permissionAccount.js"; +import { PermissionAccount } from "./permissionAccount.js"; import { QueueDataBuffer } from "./queueDataBuffer.js"; -import { VrfAccount, VrfInitParams } from "./vrfAccount.js"; -import { VrfLiteAccount, VrfLiteInitParams } from "./vrfLiteAccount.js"; +import type { VrfInitParams } from "./vrfAccount.js"; +import { VrfAccount } from "./vrfAccount.js"; +import type { VrfLiteInitParams } from "./vrfLiteAccount.js"; +import { VrfLiteAccount } from "./vrfLiteAccount.js"; -import * as anchor from "@coral-xyz/anchor"; -import * as spl from "@solana/spl-token"; -import { - Commitment, - Keypair, - PublicKey, - SystemProgram, - TransactionSignature, -} from "@solana/web3.js"; +import type * as anchor from "@coral-xyz/anchor"; +import type * as spl from "@solana/spl-token"; +import type { Commitment, TransactionSignature } from "@solana/web3.js"; +import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; import { Big, BN, SwitchboardDecimal, toUtf8 } from "@switchboard-xyz/common"; /** @@ -917,18 +912,20 @@ export class QueueAccount extends Account { options ); - // eslint-disable-next-line prefer-const - let [permissionAccount, permissionInit] = - PermissionAccount.createInstruction( - this.program, - payer, - { - granter: this.publicKey, - grantee: vrfAccount.publicKey, - authority: queueAuthorityPubkey, - }, - options - ); + let [ + // eslint-disable-next-line prefer-const + permissionAccount, + permissionInit, + ] = PermissionAccount.createInstruction( + this.program, + payer, + { + granter: this.publicKey, + grantee: vrfAccount.publicKey, + authority: queueAuthorityPubkey, + }, + options + ); if ( params.enable && @@ -1059,13 +1056,15 @@ export class QueueAccount extends Account { txns.push(bufferInit); - // eslint-disable-next-line prefer-const - let [permissionAccount, permissionInit] = - PermissionAccount.createInstruction(this.program, payer, { - granter: this.publicKey, - grantee: bufferAccount.publicKey, - authority: queueAuthorityPubkey, - }); + let [ + // eslint-disable-next-line prefer-const + permissionAccount, + permissionInit, + ] = PermissionAccount.createInstruction(this.program, payer, { + granter: this.publicKey, + grantee: bufferAccount.publicKey, + authority: queueAuthorityPubkey, + }); if ( params.enable && diff --git a/javascript/solana.js/src/accounts/queueDataBuffer.ts b/javascript/solana.js/src/accounts/queueDataBuffer.ts index 1079a2a..1d1689a 100644 --- a/javascript/solana.js/src/accounts/queueDataBuffer.ts +++ b/javascript/solana.js/src/accounts/queueDataBuffer.ts @@ -1,19 +1,12 @@ import * as errors from "../errors.js"; -import * as types from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type * as types from "../generated/oracle-program/index.js"; +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { - Account, - BUFFER_DISCRIMINATOR, - OnAccountChangeCallback, -} from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account, BUFFER_DISCRIMINATOR } from "./account.js"; -import { - AccountInfo, - Commitment, - LAMPORTS_PER_SOL, - PublicKey, -} from "@solana/web3.js"; +import type { AccountInfo, Commitment } from "@solana/web3.js"; +import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js"; import assert from "assert"; /** diff --git a/javascript/solana.js/src/accounts/switchboardWallet.ts b/javascript/solana.js/src/accounts/switchboardWallet.ts index 0ec58ac..36ffc6d 100644 --- a/javascript/solana.js/src/accounts/switchboardWallet.ts +++ b/javascript/solana.js/src/accounts/switchboardWallet.ts @@ -1,24 +1,23 @@ import * as errors from "../errors.js"; import * as types from "../generated/attestation-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; import { parseRawBuffer } from "../utils.js"; import { Account } from "./account.js"; import * as spl from "@solana/spl-token"; -import { +import type { AccountMeta, Keypair, - PublicKey, - SystemProgram, TransactionSignature, } from "@solana/web3.js"; -import { BN } from "@switchboard-xyz/common"; +import { PublicKey, SystemProgram } from "@solana/web3.js"; +import type { BN } from "@switchboard-xyz/common"; import assert from "assert"; export interface SwitchboardWalletTransferParams { diff --git a/javascript/solana.js/src/accounts/enclaveAccount.ts b/javascript/solana.js/src/accounts/verifierAccount.ts similarity index 69% rename from javascript/solana.js/src/accounts/enclaveAccount.ts rename to javascript/solana.js/src/accounts/verifierAccount.ts index 3cb7696..95ff255 100644 --- a/javascript/solana.js/src/accounts/enclaveAccount.ts +++ b/javascript/solana.js/src/accounts/verifierAccount.ts @@ -1,12 +1,12 @@ import * as errors from "../errors.js"; import * as types from "../generated/attestation-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; -import { RawBuffer } from "../types.js"; +import { TransactionObject } from "../TransactionObject.js"; +import type { RawBuffer } from "../types.js"; import { parseMrEnclave, parseRawBuffer } from "../utils.js"; import { Account } from "./account.js"; @@ -15,21 +15,19 @@ import { AttestationQueueAccount, } from "./index.js"; -import * as anchor from "@coral-xyz/anchor"; -import { - Keypair, - PublicKey, - SystemProgram, +import type * as anchor from "@coral-xyz/anchor"; +import type { TransactionInstruction, TransactionSignature, } from "@solana/web3.js"; +import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; export const QUOTE_SEED: string = "QuoteAccountData"; /** - * Parameters for initializing an {@linkcode EnclaveAccount} + * Parameters for initializing an {@linkcode VerifierAccount} */ -export interface EnclaveAccountInitParams { +export interface VerifierAccountInitParams { /** * Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ @@ -55,7 +53,7 @@ export interface EnclaveAccountInitParams { /** * Parameters for an {@linkcode types.quoteHeartbeat} instruction. */ -export interface EnclaveHeartbeatSyncParams { +export interface VerifierHeartbeatSyncParams { gcOracle: PublicKey; attestationQueue: PublicKey; permission: AttestationPermissionAccount; @@ -65,17 +63,17 @@ export interface EnclaveHeartbeatSyncParams { /** * Parameters for an {@linkcode types.quoteHeartbeat} instruction. */ -export type EnclaveHeartbeatParams = Partial & { +export type VerifierHeartbeatParams = Partial & { enclaveSigner: Keypair; } & Partial<{ - quote: types.EnclaveAccountData; + quote: types.VerifierAccountData; queue: types.AttestationQueueAccountData; }>; /** * Parameters for an {@linkcode types.quoteVerify} instruction. */ -export interface EnclaveVerifyParams { +export interface QuoteVerifyParams { /** * @TODO: Docs for timestamp */ @@ -86,16 +84,18 @@ export interface EnclaveVerifyParams { mrEnclave: RawBuffer; /** - * Keypair of the secured signer generated in the verifiers secure enclave + * Keypair of the enclave signer generated in the verifiers secure enclave */ - verifierSecuredSigner: Keypair; - verifier: PublicKey; + enclaveSigner?: Keypair; + + quote: VerifierAccount; + quoteState?: types.VerifierAccountData; } /** * Parameters for an {@linkcode types.quoteRotate} instruction. */ -export interface EnclaveRotateParams { +export interface VerifierRotateParams { authority?: Keypair; enclaveSigner: Keypair; registryKey: string | Buffer | Uint8Array; @@ -104,41 +104,41 @@ export interface EnclaveRotateParams { /** * Account type representing a Switchboard Attestation quote. * - * Data: {@linkcode types.EnclaveAccountData} + * Data: {@linkcode types.VerifierAccountData} */ -export class EnclaveAccount extends Account { - static accountName = "EnclaveAccountData"; +export class VerifierAccount extends Account { + static accountName = "VerifierAccountData"; /** - * Load an existing {@linkcode EnclaveAccount} with its current on-chain state + * Load an existing {@linkcode VerifierAccount} with its current on-chain state */ public static async load( program: SwitchboardProgram, address: PublicKey | string - ): Promise<[EnclaveAccount, types.EnclaveAccountData]> { + ): Promise<[VerifierAccount, types.VerifierAccountData]> { program.verifyAttestation(); - const enclaveAccount = new EnclaveAccount(program, address); - const state = await enclaveAccount.loadData(); - return [enclaveAccount, state]; + const verifierAccount = new VerifierAccount(program, address); + const state = await verifierAccount.loadData(); + return [verifierAccount, state]; } /** - * Finds the {@linkcode EnclaveAccount} from the seed from which it was generated. + * Finds the {@linkcode VerifierAccount} from the seed from which it was generated. * - * Only applicable for EnclaveAccounts tied to a {@linkcode FunctionAccount}. Enclaves can also be generated from a keypair. + * Only applicable for VerifierAccounts tied to a {@linkcode FunctionAccount}. Enclaves can also be generated from a keypair. * - * @return EnclaveAccount and PDA bump tuple. + * @return VerifierAccount and PDA bump tuple. */ public static fromSeed( program: SwitchboardProgram, functionPubkey: PublicKey - ): EnclaveAccount { + ): VerifierAccount { const [publicKey, bump] = PublicKey.findProgramAddressSync( [Buffer.from(QUOTE_SEED), functionPubkey.toBytes()], program.attestationProgramId ); - return new EnclaveAccount(program, publicKey); + return new VerifierAccount(program, publicKey); } /** @@ -147,13 +147,13 @@ export class EnclaveAccount extends Account { public static async createInstruction( program: SwitchboardProgram, payer: PublicKey, - params: EnclaveAccountInitParams, + params: VerifierAccountInitParams, options?: TransactionObjectOptions - ): Promise<[EnclaveAccount, TransactionObject]> { + ): Promise<[VerifierAccount, TransactionObject]> { program.verifyAttestation(); - const quoteKeypair = params.keypair ?? Keypair.generate(); - program.verifyNewKeypair(quoteKeypair); + const verifierKeypair = params.keypair ?? Keypair.generate(); + program.verifyNewKeypair(verifierKeypair); const queueData = await params.queueAccount.loadData(); @@ -161,11 +161,11 @@ export class EnclaveAccount extends Account { .concat(Array(64).fill(0)) .slice(0, 64); - const instruction = types.quoteInit( + const instruction = types.verifierInit( program, { params: { registryKey } }, { - quote: quoteKeypair.publicKey, + verifier: verifierKeypair.publicKey, attestationQueue: params.queueAccount.publicKey, queueAuthority: queueData.authority, authority: params.authority ?? payer, @@ -174,16 +174,16 @@ export class EnclaveAccount extends Account { } ); return [ - new EnclaveAccount(program, quoteKeypair.publicKey), - new TransactionObject(payer, [instruction], [quoteKeypair], options), + new VerifierAccount(program, verifierKeypair.publicKey), + new TransactionObject(payer, [instruction], [verifierKeypair], options), ]; } public static async create( program: SwitchboardProgram, - params: EnclaveAccountInitParams, + params: VerifierAccountInitParams, options?: SendTransactionObjectOptions - ): Promise<[EnclaveAccount, TransactionSignature]> { + ): Promise<[VerifierAccount, TransactionSignature]> { const [account, txnObject] = await this.createInstruction( program, program.walletPubkey, @@ -208,9 +208,9 @@ export class EnclaveAccount extends Account { } static getVerificationStatus( - state: types.EnclaveAccountData + state: types.VerifierAccountData ): types.VerificationStatusKind { - switch (state.verificationStatus) { + switch (state.enclave.verificationStatus) { case types.VerificationStatus.None.discriminator: return new types.VerificationStatus.None(); case types.VerificationStatus.VerificationPending.discriminator: @@ -224,27 +224,27 @@ export class EnclaveAccount extends Account { } throw new Error( - `Failed to get the verification status, expected [${types.VerificationStatus.None.discriminator}, ${types.VerificationStatus.VerificationPending.discriminator}, ${types.VerificationStatus.VerificationFailure.discriminator}, ${types.VerificationStatus.VerificationSuccess.discriminator}], or ${types.VerificationStatus.VerificationOverride.discriminator}], received ${state.verificationStatus}` + `Failed to get the verification status, expected [${types.VerificationStatus.None.discriminator}, ${types.VerificationStatus.VerificationPending.discriminator}, ${types.VerificationStatus.VerificationFailure.discriminator}, ${types.VerificationStatus.VerificationSuccess.discriminator}], or ${types.VerificationStatus.VerificationOverride.discriminator}], received ${state.enclave.verificationStatus}` ); } /** - * Get the size of an {@linkcode EnclaveAccount} on-chain. + * Get the size of an {@linkcode VerifierAccount} on-chain. */ public readonly size = - this.program.attestationAccount.enclaveAccountData.size; + this.program.attestationAccount.verifierAccountData.size; /** - * Retrieve and decode the {@linkcode types.EnclaveAccountData} stored in this account. + * Retrieve and decode the {@linkcode types.VerifierAccountData} stored in this account. */ - public async loadData(): Promise { + public async loadData(): Promise { this.program.verifyAttestation(); - const data = await types.EnclaveAccountData.fetch( + const data = await types.VerifierAccountData.fetch( this.program, this.publicKey ); if (data) return data; - throw new errors.AccountNotFoundError("Enclave", this.publicKey); + throw new errors.AccountNotFoundError("Verifier", this.publicKey); } public heartbeatInstruction(params: { @@ -256,12 +256,12 @@ export class EnclaveAccount extends Account { }): TransactionInstruction { this.program.verifyAttestation(); - const instruction = types.quoteHeartbeat( + const instruction = types.verifierHeartbeat( this.program, { params: {} }, { - quote: this.publicKey, - enclaveSigner: params.enclaveSigner, + verifier: this.publicKey, + verifierSigner: params.enclaveSigner, attestationQueue: params.attestationQueue, queueAuthority: params.queueAuthority, gcNode: params.gcOracle, @@ -272,7 +272,7 @@ export class EnclaveAccount extends Account { } public async heartbeat( - params: EnclaveHeartbeatParams, + params: VerifierHeartbeatParams, options?: SendTransactionObjectOptions ): Promise { const quote = params.quote ?? (await this.loadData()); @@ -317,7 +317,7 @@ export class EnclaveAccount extends Account { public async rotateInstruction( payer: PublicKey, - params: EnclaveRotateParams, + params: VerifierRotateParams, options?: TransactionObjectOptions ): Promise { this.program.verifyAttestation(); @@ -331,13 +331,13 @@ export class EnclaveAccount extends Account { throw new errors.IncorrectAuthority(quoteData.authority, authority); } - const rotateIxn = types.quoteRotate( + const rotateIxn = types.verifierQuoteRotate( this.program, { params: { registryKey: [...registryKey].slice(0, 64) }, }, { - quote: this.publicKey, + verifier: this.publicKey, authority: authority, enclaveSigner: params.enclaveSigner.publicKey, attestationQueue: quoteData.attestationQueue, @@ -356,7 +356,7 @@ export class EnclaveAccount extends Account { } public async rotate( - params: EnclaveRotateParams, + params: VerifierRotateParams, options?: SendTransactionObjectOptions ): Promise { return await this.rotateInstruction( @@ -368,26 +368,41 @@ export class EnclaveAccount extends Account { public async verifyInstruction( payer: PublicKey, - params: EnclaveVerifyParams, + params: QuoteVerifyParams, options?: TransactionObjectOptions ): Promise { this.program.verifyAttestation(); - const quoteData = await this.loadData(); + const verifierState = await this.loadData(); + + const signers: Keypair[] = []; + if (params.enclaveSigner) { + if ( + !params.enclaveSigner.publicKey.equals( + verifierState.enclave.enclaveSigner + ) + ) { + throw new Error( + `SignerMismatch, expected ${verifierState.enclave.enclaveSigner}, received ${params.enclaveSigner.publicKey}` + ); + } + signers.push(params.enclaveSigner); + } const attestationQueueAccount = new AttestationQueueAccount( this.program, - quoteData.attestationQueue + verifierState.attestationQueue ); + const attestationQueue = await attestationQueueAccount.loadData(); const verifierIdx = attestationQueue.data .slice(0, attestationQueue.dataLen) - .findIndex((pubkey) => pubkey.equals(params.verifier)); + .findIndex((pubkey) => pubkey.equals(this.publicKey)); if (verifierIdx === -1) { throw new Error(`Verifier not found on the attestation queue`); } - const instruction = types.quoteVerify( + const instruction = types.verifierQuoteVerify( this.program, { params: { @@ -397,23 +412,17 @@ export class EnclaveAccount extends Account { }, }, { - quote: this.publicKey, - quoteSigner: quoteData.enclaveSigner, - enclaveSigner: params.verifierSecuredSigner.publicKey, - verifier: params.verifier, - attestationQueue: quoteData.attestationQueue, + quote: params.quote.publicKey, + enclaveSigner: verifierState.enclave.enclaveSigner, + verifier: this.publicKey, + attestationQueue: verifierState.attestationQueue, } ); - return new TransactionObject( - payer, - [instruction], - [params.verifierSecuredSigner], - options - ); + return new TransactionObject(payer, [instruction], signers, options); } public async verify( - params: EnclaveVerifyParams, + params: QuoteVerifyParams, options?: SendTransactionObjectOptions ): Promise { return await this.verifyInstruction( diff --git a/javascript/solana.js/src/accounts/vrfAccount.ts b/javascript/solana.js/src/accounts/vrfAccount.ts index 49a70b9..60c2761 100644 --- a/javascript/solana.js/src/accounts/vrfAccount.ts +++ b/javascript/solana.js/src/accounts/vrfAccount.ts @@ -1,30 +1,33 @@ import * as errors from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; import { vrfCloseAction } from "../generated/oracle-program/index.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { SendTransactionObjectOptions, - TransactionObject, TransactionObjectOptions, } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; import { OracleAccount } from "./oracleAccount.js"; import { PermissionAccount } from "./permissionAccount.js"; import { QueueAccount } from "./queueAccount.js"; -import * as anchor from "@coral-xyz/anchor"; +import type * as anchor from "@coral-xyz/anchor"; import * as spl from "@solana/spl-token"; import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; -import { +import type { Commitment, - Keypair, ParsedTransactionWithMeta, + TransactionSignature, +} from "@solana/web3.js"; +import { + Keypair, PublicKey, SystemProgram, SYSVAR_INSTRUCTIONS_PUBKEY, SYSVAR_RECENT_BLOCKHASHES_PUBKEY, - TransactionSignature, } from "@solana/web3.js"; import { BN, promiseWithTimeout } from "@switchboard-xyz/common"; diff --git a/javascript/solana.js/src/accounts/vrfLiteAccount.ts b/javascript/solana.js/src/accounts/vrfLiteAccount.ts index 1bac090..97a73c7 100644 --- a/javascript/solana.js/src/accounts/vrfLiteAccount.ts +++ b/javascript/solana.js/src/accounts/vrfLiteAccount.ts @@ -2,32 +2,33 @@ import * as errors from "../errors.js"; import { vrfLiteInit } from "../generated/oracle-program/index.js"; import * as types from "../generated/oracle-program/index.js"; import { vrfLiteCloseAction } from "../generated/oracle-program/instructions/vrfLiteCloseAction.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; -import { - TransactionObject, - TransactionObjectOptions, -} from "../TransactionObject.js"; +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { TransactionObjectOptions } from "../TransactionObject.js"; +import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; import { OracleAccount } from "./oracleAccount.js"; import { PermissionAccount } from "./permissionAccount.js"; import { QueueAccount } from "./queueAccount.js"; -import { Callback, VrfResult } from "./vrfAccount.js"; +import type { Callback, VrfResult } from "./vrfAccount.js"; import { ASSOCIATED_TOKEN_PROGRAM_ID, createTransferInstruction, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; -import { +import type { Commitment, - Keypair, ParsedTransactionWithMeta, PublicKey, + TransactionSignature, +} from "@solana/web3.js"; +import { + Keypair, SystemProgram, SYSVAR_INSTRUCTIONS_PUBKEY, SYSVAR_RENT_PUBKEY, - TransactionSignature, } from "@solana/web3.js"; import { BN, promiseWithTimeout } from "@switchboard-xyz/common"; diff --git a/javascript/solana.js/src/accounts/vrfPoolAccount.ts b/javascript/solana.js/src/accounts/vrfPoolAccount.ts index 7d77f3c..a68406f 100644 --- a/javascript/solana.js/src/accounts/vrfPoolAccount.ts +++ b/javascript/solana.js/src/accounts/vrfPoolAccount.ts @@ -1,14 +1,16 @@ import { VRF_POOL_REQUEST_AMOUNT } from "../const.js"; import { AccountNotFoundError, InsufficientFundsError } from "../errors.js"; import * as types from "../generated/oracle-program/index.js"; -import { VrfPoolRequestEvent } from "../SwitchboardEvents.js"; -import { SwitchboardProgram } from "../SwitchboardProgram.js"; +import type { VrfPoolRequestEvent } from "../SwitchboardEvents.js"; +import type { SwitchboardProgram } from "../SwitchboardProgram.js"; import { TransactionObject } from "../TransactionObject.js"; -import { Account, OnAccountChangeCallback } from "./account.js"; +import type { OnAccountChangeCallback } from "./account.js"; +import { Account } from "./account.js"; import { PermissionAccount } from "./permissionAccount.js"; -import { CreateVrfLiteParams, QueueAccount } from "./queueAccount.js"; -import { Callback } from "./vrfAccount.js"; +import type { CreateVrfLiteParams } from "./queueAccount.js"; +import { QueueAccount } from "./queueAccount.js"; +import type { Callback } from "./vrfAccount.js"; import { VrfLiteAccount } from "./vrfLiteAccount.js"; import { @@ -16,15 +18,17 @@ import { createTransferInstruction, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; -import { +import type { AccountMeta, Commitment, + TransactionSignature, +} from "@solana/web3.js"; +import { Keypair, PublicKey, SystemProgram, SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY, - TransactionSignature, } from "@solana/web3.js"; import { promiseWithTimeout } from "@switchboard-xyz/common"; import _ from "lodash"; diff --git a/javascript/solana.js/src/errors.ts b/javascript/solana.js/src/errors.ts index b934b10..fa6174d 100644 --- a/javascript/solana.js/src/errors.ts +++ b/javascript/solana.js/src/errors.ts @@ -1,5 +1,5 @@ -import * as anchor from "@coral-xyz/anchor"; -import { PublicKey } from "@solana/web3.js"; +import type * as anchor from "@coral-xyz/anchor"; +import type { PublicKey } from "@solana/web3.js"; export class SwitchboardProgramIsBrowserError extends Error { constructor() { diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationPermissionAccountData.ts b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationPermissionAccountData.ts index 3fcdb8f..de28505 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationPermissionAccountData.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationPermissionAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -60,14 +60,15 @@ export class AttestationPermissionAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -76,7 +77,8 @@ export class AttestationPermissionAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -84,7 +86,7 @@ export class AttestationPermissionAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationProgramState.ts b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationProgramState.ts index 6a44a87..9528a28 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationProgramState.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationProgramState.ts @@ -1,8 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { Connection, PublicKey } from "@solana/web3.js"; +import type { PublicKey } from "@solana/web3.js"; +import { Connection } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationProgramStateFields { @@ -35,14 +36,15 @@ export class AttestationProgramState { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -51,7 +53,8 @@ export class AttestationProgramState { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -59,7 +62,7 @@ export class AttestationProgramState { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationQueueAccountData.ts b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationQueueAccountData.ts index adb8caf..963c229 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/AttestationQueueAccountData.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/AttestationQueueAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -177,14 +177,15 @@ export class AttestationQueueAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -193,7 +194,8 @@ export class AttestationQueueAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -201,7 +203,7 @@ export class AttestationQueueAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/FunctionAccountData.ts b/javascript/solana.js/src/generated/attestation-program/accounts/FunctionAccountData.ts index 5cd1ac6..45e33aa 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/FunctionAccountData.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/FunctionAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -13,20 +13,34 @@ export interface FunctionAccountDataFields { /** The function permissions granted by the attestation_queue.authority */ permissions: number; status: types.FunctionStatusKind; + /** PDA bump. */ + bump: number; + /** The payer who originally created the function. Cannot change, used to derive PDA. */ + creatorSeed: Array; /** The name of the function for easier identification. */ name: Array; /** The metadata of the function for easier identification. */ metadata: Array; /** The Solana slot when the function was created. (PDA) */ createdAtSlot: BN; + /** The unix timestamp when the function was created. */ + createdAt: BN; /** The unix timestamp when the function config (container, registry, version, or schedule) was changed. */ updatedAt: BN; + /** The enclave quote */ + enclave: types.QuoteFields; + /** An array of permitted mr_enclave measurements for the function. */ + mrEnclaves: Array>; /** The off-chain registry to fetch the function container from. */ containerRegistry: Array; /** The identifier of the container in the given container_registry. */ container: Array; /** The version tag of the container to pull. */ version: Array; + /** The expected schema for the container params. */ + paramsSchema: Array; + /** The default params passed to the container during scheduled execution. */ + defaultContainerParams: Array; /** The authority of the function which is authorized to make account changes. */ authority: PublicKey; /** The address of the AttestationQueueAccountData that will be processing function requests and verifying the function measurements. */ @@ -43,6 +57,8 @@ export interface FunctionAccountDataFields { nextAllowedTimestamp: BN; /** The number of times to trigger the function upon the next invocation. */ triggerCount: BN; + /** Time this function has been sitting in an explicitly triggered state */ + triggeredSince: BN; /** UNUSED. The unix timestamp when the current permissions expire. */ permissionExpiration: BN; /** Number of requests created for this function. Used to prevent closing when there are live requests. */ @@ -61,12 +77,6 @@ export interface FunctionAccountDataFields { requestsDefaultSlotsUntilExpiration: BN; /** The lamports paid to the FunctionAccount escrow on each successful update request. */ requestsFee: BN; - /** An array of permitted mr_enclave measurements for the function. */ - mrEnclaves: Array>; - /** PDA bump. */ - bump: number; - /** The payer who originally created the function. Cannot change, used to derive PDA. */ - creatorSeed: Array; /** The SwitchboardWallet that will handle pre-funding rewards paid out to function runners. */ escrowWallet: PublicKey; /** The escrow_wallet TokenAccount that handles pre-funding rewards paid out to function runners. */ @@ -78,8 +88,6 @@ export interface FunctionAccountDataFields { rewardEscrowWallet: PublicKey; /** The reward_escrow_wallet TokenAccount used to acrue rewards from requests made with custom parameters. */ rewardEscrowTokenWallet: PublicKey; - /** The unix timestamp when the function was created. */ - createdAt: BN; /** Reserved. */ ebuf: Array; } @@ -92,20 +100,34 @@ export interface FunctionAccountDataJSON { /** The function permissions granted by the attestation_queue.authority */ permissions: number; status: types.FunctionStatusJSON; + /** PDA bump. */ + bump: number; + /** The payer who originally created the function. Cannot change, used to derive PDA. */ + creatorSeed: Array; /** The name of the function for easier identification. */ name: Array; /** The metadata of the function for easier identification. */ metadata: Array; /** The Solana slot when the function was created. (PDA) */ createdAtSlot: string; + /** The unix timestamp when the function was created. */ + createdAt: string; /** The unix timestamp when the function config (container, registry, version, or schedule) was changed. */ updatedAt: string; + /** The enclave quote */ + enclave: types.QuoteJSON; + /** An array of permitted mr_enclave measurements for the function. */ + mrEnclaves: Array>; /** The off-chain registry to fetch the function container from. */ containerRegistry: Array; /** The identifier of the container in the given container_registry. */ container: Array; /** The version tag of the container to pull. */ version: Array; + /** The expected schema for the container params. */ + paramsSchema: Array; + /** The default params passed to the container during scheduled execution. */ + defaultContainerParams: Array; /** The authority of the function which is authorized to make account changes. */ authority: string; /** The address of the AttestationQueueAccountData that will be processing function requests and verifying the function measurements. */ @@ -122,6 +144,8 @@ export interface FunctionAccountDataJSON { nextAllowedTimestamp: string; /** The number of times to trigger the function upon the next invocation. */ triggerCount: string; + /** Time this function has been sitting in an explicitly triggered state */ + triggeredSince: string; /** UNUSED. The unix timestamp when the current permissions expire. */ permissionExpiration: string; /** Number of requests created for this function. Used to prevent closing when there are live requests. */ @@ -140,12 +164,6 @@ export interface FunctionAccountDataJSON { requestsDefaultSlotsUntilExpiration: string; /** The lamports paid to the FunctionAccount escrow on each successful update request. */ requestsFee: string; - /** An array of permitted mr_enclave measurements for the function. */ - mrEnclaves: Array>; - /** PDA bump. */ - bump: number; - /** The payer who originally created the function. Cannot change, used to derive PDA. */ - creatorSeed: Array; /** The SwitchboardWallet that will handle pre-funding rewards paid out to function runners. */ escrowWallet: string; /** The escrow_wallet TokenAccount that handles pre-funding rewards paid out to function runners. */ @@ -157,8 +175,6 @@ export interface FunctionAccountDataJSON { rewardEscrowWallet: string; /** The reward_escrow_wallet TokenAccount used to acrue rewards from requests made with custom parameters. */ rewardEscrowTokenWallet: string; - /** The unix timestamp when the function was created. */ - createdAt: string; /** Reserved. */ ebuf: Array; } @@ -171,20 +187,34 @@ export class FunctionAccountData { /** The function permissions granted by the attestation_queue.authority */ readonly permissions: number; readonly status: types.FunctionStatusKind; + /** PDA bump. */ + readonly bump: number; + /** The payer who originally created the function. Cannot change, used to derive PDA. */ + readonly creatorSeed: Array; /** The name of the function for easier identification. */ readonly name: Array; /** The metadata of the function for easier identification. */ readonly metadata: Array; /** The Solana slot when the function was created. (PDA) */ readonly createdAtSlot: BN; + /** The unix timestamp when the function was created. */ + readonly createdAt: BN; /** The unix timestamp when the function config (container, registry, version, or schedule) was changed. */ readonly updatedAt: BN; + /** The enclave quote */ + readonly enclave: types.Quote; + /** An array of permitted mr_enclave measurements for the function. */ + readonly mrEnclaves: Array>; /** The off-chain registry to fetch the function container from. */ readonly containerRegistry: Array; /** The identifier of the container in the given container_registry. */ readonly container: Array; /** The version tag of the container to pull. */ readonly version: Array; + /** The expected schema for the container params. */ + readonly paramsSchema: Array; + /** The default params passed to the container during scheduled execution. */ + readonly defaultContainerParams: Array; /** The authority of the function which is authorized to make account changes. */ readonly authority: PublicKey; /** The address of the AttestationQueueAccountData that will be processing function requests and verifying the function measurements. */ @@ -201,6 +231,8 @@ export class FunctionAccountData { readonly nextAllowedTimestamp: BN; /** The number of times to trigger the function upon the next invocation. */ readonly triggerCount: BN; + /** Time this function has been sitting in an explicitly triggered state */ + readonly triggeredSince: BN; /** UNUSED. The unix timestamp when the current permissions expire. */ readonly permissionExpiration: BN; /** Number of requests created for this function. Used to prevent closing when there are live requests. */ @@ -219,12 +251,6 @@ export class FunctionAccountData { readonly requestsDefaultSlotsUntilExpiration: BN; /** The lamports paid to the FunctionAccount escrow on each successful update request. */ readonly requestsFee: BN; - /** An array of permitted mr_enclave measurements for the function. */ - readonly mrEnclaves: Array>; - /** PDA bump. */ - readonly bump: number; - /** The payer who originally created the function. Cannot change, used to derive PDA. */ - readonly creatorSeed: Array; /** The SwitchboardWallet that will handle pre-funding rewards paid out to function runners. */ readonly escrowWallet: PublicKey; /** The escrow_wallet TokenAccount that handles pre-funding rewards paid out to function runners. */ @@ -236,8 +262,6 @@ export class FunctionAccountData { readonly rewardEscrowWallet: PublicKey; /** The reward_escrow_wallet TokenAccount used to acrue rewards from requests made with custom parameters. */ readonly rewardEscrowTokenWallet: PublicKey; - /** The unix timestamp when the function was created. */ - readonly createdAt: BN; /** Reserved. */ readonly ebuf: Array; @@ -250,13 +274,20 @@ export class FunctionAccountData { borsh.u8("isTriggered"), borsh.u32("permissions"), types.FunctionStatus.layout("status"), + borsh.u8("bump"), + borsh.array(borsh.u8(), 32, "creatorSeed"), borsh.array(borsh.u8(), 64, "name"), borsh.array(borsh.u8(), 256, "metadata"), borsh.u64("createdAtSlot"), + borsh.i64("createdAt"), borsh.i64("updatedAt"), + types.Quote.layout("enclave"), + borsh.array(borsh.array(borsh.u8(), 32), 32, "mrEnclaves"), borsh.array(borsh.u8(), 64, "containerRegistry"), borsh.array(borsh.u8(), 64, "container"), borsh.array(borsh.u8(), 32, "version"), + borsh.array(borsh.u8(), 256, "paramsSchema"), + borsh.array(borsh.u8(), 256, "defaultContainerParams"), borsh.publicKey("authority"), borsh.publicKey("attestationQueue"), borsh.u32("queueIdx"), @@ -265,21 +296,18 @@ export class FunctionAccountData { borsh.i64("lastExecutionTimestamp"), borsh.i64("nextAllowedTimestamp"), borsh.u64("triggerCount"), + borsh.i64("triggeredSince"), borsh.i64("permissionExpiration"), borsh.u64("numRequests"), borsh.bool("requestsDisabled"), borsh.bool("requestsRequireAuthorization"), borsh.u64("requestsDefaultSlotsUntilExpiration"), borsh.u64("requestsFee"), - borsh.array(borsh.array(borsh.u8(), 32), 32, "mrEnclaves"), - borsh.u8("bump"), - borsh.array(borsh.u8(), 32, "creatorSeed"), borsh.publicKey("escrowWallet"), borsh.publicKey("escrowTokenWallet"), borsh.publicKey("rewardEscrowWallet"), borsh.publicKey("rewardEscrowTokenWallet"), - borsh.i64("createdAt"), - borsh.array(borsh.u8(), 871, "ebuf"), + borsh.array(borsh.u8(), 1024, "ebuf"), ]); constructor(fields: FunctionAccountDataFields) { @@ -287,13 +315,20 @@ export class FunctionAccountData { this.isTriggered = fields.isTriggered; this.permissions = fields.permissions; this.status = fields.status; + this.bump = fields.bump; + this.creatorSeed = fields.creatorSeed; this.name = fields.name; this.metadata = fields.metadata; this.createdAtSlot = fields.createdAtSlot; + this.createdAt = fields.createdAt; this.updatedAt = fields.updatedAt; + this.enclave = new types.Quote({ ...fields.enclave }); + this.mrEnclaves = fields.mrEnclaves; this.containerRegistry = fields.containerRegistry; this.container = fields.container; this.version = fields.version; + this.paramsSchema = fields.paramsSchema; + this.defaultContainerParams = fields.defaultContainerParams; this.authority = fields.authority; this.attestationQueue = fields.attestationQueue; this.queueIdx = fields.queueIdx; @@ -302,6 +337,7 @@ export class FunctionAccountData { this.lastExecutionTimestamp = fields.lastExecutionTimestamp; this.nextAllowedTimestamp = fields.nextAllowedTimestamp; this.triggerCount = fields.triggerCount; + this.triggeredSince = fields.triggeredSince; this.permissionExpiration = fields.permissionExpiration; this.numRequests = fields.numRequests; this.requestsDisabled = fields.requestsDisabled; @@ -309,27 +345,24 @@ export class FunctionAccountData { this.requestsDefaultSlotsUntilExpiration = fields.requestsDefaultSlotsUntilExpiration; this.requestsFee = fields.requestsFee; - this.mrEnclaves = fields.mrEnclaves; - this.bump = fields.bump; - this.creatorSeed = fields.creatorSeed; this.escrowWallet = fields.escrowWallet; this.escrowTokenWallet = fields.escrowTokenWallet; this.rewardEscrowWallet = fields.rewardEscrowWallet; this.rewardEscrowTokenWallet = fields.rewardEscrowTokenWallet; - this.createdAt = fields.createdAt; this.ebuf = fields.ebuf; } static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -338,7 +371,8 @@ export class FunctionAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -346,7 +380,7 @@ export class FunctionAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -366,13 +400,20 @@ export class FunctionAccountData { isTriggered: dec.isTriggered, permissions: dec.permissions, status: types.FunctionStatus.fromDecoded(dec.status), + bump: dec.bump, + creatorSeed: dec.creatorSeed, name: dec.name, metadata: dec.metadata, createdAtSlot: dec.createdAtSlot, + createdAt: dec.createdAt, updatedAt: dec.updatedAt, + enclave: types.Quote.fromDecoded(dec.enclave), + mrEnclaves: dec.mrEnclaves, containerRegistry: dec.containerRegistry, container: dec.container, version: dec.version, + paramsSchema: dec.paramsSchema, + defaultContainerParams: dec.defaultContainerParams, authority: dec.authority, attestationQueue: dec.attestationQueue, queueIdx: dec.queueIdx, @@ -381,6 +422,7 @@ export class FunctionAccountData { lastExecutionTimestamp: dec.lastExecutionTimestamp, nextAllowedTimestamp: dec.nextAllowedTimestamp, triggerCount: dec.triggerCount, + triggeredSince: dec.triggeredSince, permissionExpiration: dec.permissionExpiration, numRequests: dec.numRequests, requestsDisabled: dec.requestsDisabled, @@ -388,14 +430,10 @@ export class FunctionAccountData { requestsDefaultSlotsUntilExpiration: dec.requestsDefaultSlotsUntilExpiration, requestsFee: dec.requestsFee, - mrEnclaves: dec.mrEnclaves, - bump: dec.bump, - creatorSeed: dec.creatorSeed, escrowWallet: dec.escrowWallet, escrowTokenWallet: dec.escrowTokenWallet, rewardEscrowWallet: dec.rewardEscrowWallet, rewardEscrowTokenWallet: dec.rewardEscrowTokenWallet, - createdAt: dec.createdAt, ebuf: dec.ebuf, }); } @@ -406,13 +444,20 @@ export class FunctionAccountData { isTriggered: this.isTriggered, permissions: this.permissions, status: this.status.toJSON(), + bump: this.bump, + creatorSeed: this.creatorSeed, name: this.name, metadata: this.metadata, createdAtSlot: this.createdAtSlot.toString(), + createdAt: this.createdAt.toString(), updatedAt: this.updatedAt.toString(), + enclave: this.enclave.toJSON(), + mrEnclaves: this.mrEnclaves, containerRegistry: this.containerRegistry, container: this.container, version: this.version, + paramsSchema: this.paramsSchema, + defaultContainerParams: this.defaultContainerParams, authority: this.authority.toString(), attestationQueue: this.attestationQueue.toString(), queueIdx: this.queueIdx, @@ -421,6 +466,7 @@ export class FunctionAccountData { lastExecutionTimestamp: this.lastExecutionTimestamp.toString(), nextAllowedTimestamp: this.nextAllowedTimestamp.toString(), triggerCount: this.triggerCount.toString(), + triggeredSince: this.triggeredSince.toString(), permissionExpiration: this.permissionExpiration.toString(), numRequests: this.numRequests.toString(), requestsDisabled: this.requestsDisabled, @@ -428,14 +474,10 @@ export class FunctionAccountData { requestsDefaultSlotsUntilExpiration: this.requestsDefaultSlotsUntilExpiration.toString(), requestsFee: this.requestsFee.toString(), - mrEnclaves: this.mrEnclaves, - bump: this.bump, - creatorSeed: this.creatorSeed, escrowWallet: this.escrowWallet.toString(), escrowTokenWallet: this.escrowTokenWallet.toString(), rewardEscrowWallet: this.rewardEscrowWallet.toString(), rewardEscrowTokenWallet: this.rewardEscrowTokenWallet.toString(), - createdAt: this.createdAt.toString(), ebuf: this.ebuf, }; } @@ -446,13 +488,20 @@ export class FunctionAccountData { isTriggered: obj.isTriggered, permissions: obj.permissions, status: types.FunctionStatus.fromJSON(obj.status), + bump: obj.bump, + creatorSeed: obj.creatorSeed, name: obj.name, metadata: obj.metadata, createdAtSlot: new BN(obj.createdAtSlot), + createdAt: new BN(obj.createdAt), updatedAt: new BN(obj.updatedAt), + enclave: types.Quote.fromJSON(obj.enclave), + mrEnclaves: obj.mrEnclaves, containerRegistry: obj.containerRegistry, container: obj.container, version: obj.version, + paramsSchema: obj.paramsSchema, + defaultContainerParams: obj.defaultContainerParams, authority: new PublicKey(obj.authority), attestationQueue: new PublicKey(obj.attestationQueue), queueIdx: obj.queueIdx, @@ -461,6 +510,7 @@ export class FunctionAccountData { lastExecutionTimestamp: new BN(obj.lastExecutionTimestamp), nextAllowedTimestamp: new BN(obj.nextAllowedTimestamp), triggerCount: new BN(obj.triggerCount), + triggeredSince: new BN(obj.triggeredSince), permissionExpiration: new BN(obj.permissionExpiration), numRequests: new BN(obj.numRequests), requestsDisabled: obj.requestsDisabled, @@ -469,14 +519,10 @@ export class FunctionAccountData { obj.requestsDefaultSlotsUntilExpiration ), requestsFee: new BN(obj.requestsFee), - mrEnclaves: obj.mrEnclaves, - bump: obj.bump, - creatorSeed: obj.creatorSeed, escrowWallet: new PublicKey(obj.escrowWallet), escrowTokenWallet: new PublicKey(obj.escrowTokenWallet), rewardEscrowWallet: new PublicKey(obj.rewardEscrowWallet), rewardEscrowTokenWallet: new PublicKey(obj.rewardEscrowTokenWallet), - createdAt: new BN(obj.createdAt), ebuf: obj.ebuf, }); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/FunctionRequestAccountData.ts b/javascript/solana.js/src/generated/attestation-program/accounts/FunctionRequestAccountData.ts index 37e6f59..f9ac337 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/FunctionRequestAccountData.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/FunctionRequestAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -158,14 +158,15 @@ export class FunctionRequestAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -174,7 +175,8 @@ export class FunctionRequestAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -182,7 +184,7 @@ export class FunctionRequestAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/SwitchboardWallet.ts b/javascript/solana.js/src/generated/attestation-program/accounts/SwitchboardWallet.ts index b4d6eae..2c1fc50 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/SwitchboardWallet.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/SwitchboardWallet.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -86,14 +86,15 @@ export class SwitchboardWallet { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.attestationProgramId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -102,7 +103,8 @@ export class SwitchboardWallet { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -110,7 +112,7 @@ export class SwitchboardWallet { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/EnclaveAccountData.ts b/javascript/solana.js/src/generated/attestation-program/accounts/VerifierAccountData.ts similarity index 53% rename from javascript/solana.js/src/generated/attestation-program/accounts/EnclaveAccountData.ts rename to javascript/solana.js/src/generated/attestation-program/accounts/VerifierAccountData.ts index 3600aa7..e28fab0 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/EnclaveAccountData.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/VerifierAccountData.ts @@ -1,37 +1,23 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars import { Connection, PublicKey } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface EnclaveAccountDataFields { - /** The address of the signer generated within an enclave. */ - enclaveSigner: PublicKey; +export interface VerifierAccountDataFields { + /** Represents the state of the quote verifiers enclave. */ + enclave: types.QuoteFields; /** The authority of the EnclaveAccount which is permitted to make account changes. */ authority: PublicKey; /** Queue used for attestation to verify a MRENCLAVE measurement. */ attestationQueue: PublicKey; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - mrEnclave: Array; - /** The VerificationStatus of the quote. */ - verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - verificationTimestamp: BN; - /** The unix timestamp when the quotes verification status expires. */ - validUntil: BN; /** The unix timestamp when the quote was created. */ createdAt: BN; - /** The off-chain registry where the verifiers quote can be located. */ - quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - registryKey: Array; /** Whether the quote is located on the AttestationQueues buffer. */ isOnQueue: boolean; /** The last time the quote heartbeated on-chain. */ lastHeartbeat: BN; - /** The PDA bump. Only set for FunctionAccount quotes. */ - bump: number; /** * 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. @@ -46,33 +32,19 @@ export interface EnclaveAccountDataFields { ebuf: Array; } -export interface EnclaveAccountDataJSON { - /** The address of the signer generated within an enclave. */ - enclaveSigner: string; +export interface VerifierAccountDataJSON { + /** Represents the state of the quote verifiers enclave. */ + enclave: types.QuoteJSON; /** The authority of the EnclaveAccount which is permitted to make account changes. */ authority: string; /** Queue used for attestation to verify a MRENCLAVE measurement. */ attestationQueue: string; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - mrEnclave: Array; - /** The VerificationStatus of the quote. */ - verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - verificationTimestamp: string; - /** The unix timestamp when the quotes verification status expires. */ - validUntil: string; /** The unix timestamp when the quote was created. */ createdAt: string; - /** The off-chain registry where the verifiers quote can be located. */ - quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - registryKey: Array; /** Whether the quote is located on the AttestationQueues buffer. */ isOnQueue: boolean; /** The last time the quote heartbeated on-chain. */ lastHeartbeat: string; - /** The PDA bump. Only set for FunctionAccount quotes. */ - bump: number; /** * 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. @@ -87,33 +59,19 @@ export interface EnclaveAccountDataJSON { ebuf: Array; } -export class EnclaveAccountData { - /** The address of the signer generated within an enclave. */ - readonly enclaveSigner: PublicKey; +export class VerifierAccountData { + /** Represents the state of the quote verifiers enclave. */ + readonly enclave: types.Quote; /** The authority of the EnclaveAccount which is permitted to make account changes. */ readonly authority: PublicKey; /** Queue used for attestation to verify a MRENCLAVE measurement. */ readonly attestationQueue: PublicKey; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - readonly mrEnclave: Array; - /** The VerificationStatus of the quote. */ - readonly verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - readonly verificationTimestamp: BN; - /** The unix timestamp when the quotes verification status expires. */ - readonly validUntil: BN; /** The unix timestamp when the quote was created. */ readonly createdAt: BN; - /** The off-chain registry where the verifiers quote can be located. */ - readonly quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - readonly registryKey: Array; /** Whether the quote is located on the AttestationQueues buffer. */ readonly isOnQueue: boolean; /** The last time the quote heartbeated on-chain. */ readonly lastHeartbeat: BN; - /** The PDA bump. Only set for FunctionAccount quotes. */ - readonly bump: number; /** * 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. @@ -128,42 +86,28 @@ export class EnclaveAccountData { readonly ebuf: Array; static readonly discriminator = Buffer.from([ - 90, 162, 39, 88, 77, 157, 156, 165, + 106, 146, 60, 232, 231, 52, 189, 253, ]); static readonly layout = borsh.struct([ - borsh.publicKey("enclaveSigner"), + types.Quote.layout("enclave"), borsh.publicKey("authority"), borsh.publicKey("attestationQueue"), - borsh.array(borsh.u8(), 32, "mrEnclave"), - borsh.u8("verificationStatus"), - borsh.i64("verificationTimestamp"), - borsh.i64("validUntil"), borsh.i64("createdAt"), - borsh.array(borsh.u8(), 32, "quoteRegistry"), - borsh.array(borsh.u8(), 64, "registryKey"), borsh.bool("isOnQueue"), borsh.i64("lastHeartbeat"), - borsh.u8("bump"), borsh.publicKey("rewardEscrow"), borsh.publicKey("stakeWallet"), - borsh.array(borsh.u8(), 928, "ebuf"), + borsh.array(borsh.u8(), 1024, "ebuf"), ]); - constructor(fields: EnclaveAccountDataFields) { - this.enclaveSigner = fields.enclaveSigner; + constructor(fields: VerifierAccountDataFields) { + this.enclave = new types.Quote({ ...fields.enclave }); this.authority = fields.authority; this.attestationQueue = fields.attestationQueue; - this.mrEnclave = fields.mrEnclave; - this.verificationStatus = fields.verificationStatus; - this.verificationTimestamp = fields.verificationTimestamp; - this.validUntil = fields.validUntil; this.createdAt = fields.createdAt; - this.quoteRegistry = fields.quoteRegistry; - this.registryKey = fields.registryKey; this.isOnQueue = fields.isOnQueue; this.lastHeartbeat = fields.lastHeartbeat; - this.bump = fields.bump; this.rewardEscrow = fields.rewardEscrow; this.stakeWallet = fields.stakeWallet; this.ebuf = fields.ebuf; @@ -171,14 +115,15 @@ export class EnclaveAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey - ): Promise { + address: PublicKey, + programId: PublicKey = program.attestationProgramId + ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -187,15 +132,16 @@ export class EnclaveAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] - ): Promise> { + addresses: PublicKey[], + programId: PublicKey = program.attestationProgramId + ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); return infos.map((info) => { if (info === null) { return null; } - if (!info.owner.equals(program.attestationProgramId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -203,69 +149,48 @@ export class EnclaveAccountData { }); } - static decode(data: Buffer): EnclaveAccountData { - if (!data.slice(0, 8).equals(EnclaveAccountData.discriminator)) { + static decode(data: Buffer): VerifierAccountData { + if (!data.slice(0, 8).equals(VerifierAccountData.discriminator)) { throw new Error("invalid account discriminator"); } - const dec = EnclaveAccountData.layout.decode(data.slice(8)); + const dec = VerifierAccountData.layout.decode(data.slice(8)); - return new EnclaveAccountData({ - enclaveSigner: dec.enclaveSigner, + return new VerifierAccountData({ + enclave: types.Quote.fromDecoded(dec.enclave), authority: dec.authority, attestationQueue: dec.attestationQueue, - mrEnclave: dec.mrEnclave, - verificationStatus: dec.verificationStatus, - verificationTimestamp: dec.verificationTimestamp, - validUntil: dec.validUntil, createdAt: dec.createdAt, - quoteRegistry: dec.quoteRegistry, - registryKey: dec.registryKey, isOnQueue: dec.isOnQueue, lastHeartbeat: dec.lastHeartbeat, - bump: dec.bump, rewardEscrow: dec.rewardEscrow, stakeWallet: dec.stakeWallet, ebuf: dec.ebuf, }); } - toJSON(): EnclaveAccountDataJSON { + toJSON(): VerifierAccountDataJSON { return { - enclaveSigner: this.enclaveSigner.toString(), + enclave: this.enclave.toJSON(), authority: this.authority.toString(), attestationQueue: this.attestationQueue.toString(), - mrEnclave: this.mrEnclave, - verificationStatus: this.verificationStatus, - verificationTimestamp: this.verificationTimestamp.toString(), - validUntil: this.validUntil.toString(), createdAt: this.createdAt.toString(), - quoteRegistry: this.quoteRegistry, - registryKey: this.registryKey, isOnQueue: this.isOnQueue, lastHeartbeat: this.lastHeartbeat.toString(), - bump: this.bump, rewardEscrow: this.rewardEscrow.toString(), stakeWallet: this.stakeWallet.toString(), ebuf: this.ebuf, }; } - static fromJSON(obj: EnclaveAccountDataJSON): EnclaveAccountData { - return new EnclaveAccountData({ - enclaveSigner: new PublicKey(obj.enclaveSigner), + static fromJSON(obj: VerifierAccountDataJSON): VerifierAccountData { + return new VerifierAccountData({ + enclave: types.Quote.fromJSON(obj.enclave), authority: new PublicKey(obj.authority), attestationQueue: new PublicKey(obj.attestationQueue), - mrEnclave: obj.mrEnclave, - verificationStatus: obj.verificationStatus, - verificationTimestamp: new BN(obj.verificationTimestamp), - validUntil: new BN(obj.validUntil), createdAt: new BN(obj.createdAt), - quoteRegistry: obj.quoteRegistry, - registryKey: obj.registryKey, isOnQueue: obj.isOnQueue, lastHeartbeat: new BN(obj.lastHeartbeat), - bump: obj.bump, rewardEscrow: new PublicKey(obj.rewardEscrow), stakeWallet: new PublicKey(obj.stakeWallet), ebuf: obj.ebuf, diff --git a/javascript/solana.js/src/generated/attestation-program/accounts/index.ts b/javascript/solana.js/src/generated/attestation-program/accounts/index.ts index 5915365..cb7def3 100644 --- a/javascript/solana.js/src/generated/attestation-program/accounts/index.ts +++ b/javascript/solana.js/src/generated/attestation-program/accounts/index.ts @@ -13,11 +13,6 @@ export type { AttestationQueueAccountDataJSON, } from "./AttestationQueueAccountData.js"; export { AttestationQueueAccountData } from "./AttestationQueueAccountData.js"; -export type { - EnclaveAccountDataFields, - EnclaveAccountDataJSON, -} from "./EnclaveAccountData.js"; -export { EnclaveAccountData } from "./EnclaveAccountData.js"; export type { FunctionAccountDataFields, FunctionAccountDataJSON, @@ -33,3 +28,8 @@ export type { SwitchboardWalletJSON, } from "./SwitchboardWallet.js"; export { SwitchboardWallet } from "./SwitchboardWallet.js"; +export type { + VerifierAccountDataFields, + VerifierAccountDataJSON, +} from "./VerifierAccountData.js"; +export { VerifierAccountData } from "./VerifierAccountData.js"; diff --git a/javascript/solana.js/src/generated/attestation-program/errors/anchor.ts b/javascript/solana.js/src/generated/attestation-program/errors/anchor.ts index 5290ae5..5bb0bbe 100644 --- a/javascript/solana.js/src/generated/attestation-program/errors/anchor.ts +++ b/javascript/solana.js/src/generated/attestation-program/errors/anchor.ts @@ -26,6 +26,7 @@ export type AnchorError = | ConstraintMintFreezeAuthority | ConstraintMintDecimals | ConstraintSpace + | ConstraintAccountIsNone | RequireViolated | RequireEqViolated | RequireKeysEqViolated @@ -51,7 +52,6 @@ export type AnchorError = | AccountSysvarMismatch | AccountReallocExceedsLimit | AccountDuplicateReallocs - | StateInvalidAddress | DeclaredProgramIdMismatch | Deprecated; @@ -139,10 +139,10 @@ export class ConstraintHasOne extends Error { static readonly code = 2001; readonly code = 2001; readonly name = "ConstraintHasOne"; - readonly msg = "A has_one constraint was violated"; + readonly msg = "A has one constraint was violated"; constructor(readonly logs?: string[]) { - super("2001: A has_one constraint was violated"); + super("2001: A has one constraint was violated"); } } @@ -216,10 +216,10 @@ export class ConstraintState extends Error { static readonly code = 2008; readonly code = 2008; readonly name = "ConstraintState"; - readonly msg = "A state constraint was violated"; + readonly msg = "Deprecated Error, feel free to replace with something else"; constructor(readonly logs?: string[]) { - super("2008: A state constraint was violated"); + super("2008: Deprecated Error, feel free to replace with something else"); } } @@ -344,6 +344,17 @@ export class ConstraintSpace extends Error { } } +export class ConstraintAccountIsNone extends Error { + static readonly code = 2020; + readonly code = 2020; + readonly name = "ConstraintAccountIsNone"; + readonly msg = "A required account for the constraint is None"; + + constructor(readonly logs?: string[]) { + super("2020: A required account for the constraint is None"); + } +} + export class RequireViolated extends Error { static readonly code = 2500; readonly code = 2500; @@ -625,17 +636,6 @@ export class AccountDuplicateReallocs extends Error { } } -export class StateInvalidAddress extends Error { - static readonly code = 4000; - readonly code = 4000; - readonly name = "StateInvalidAddress"; - readonly msg = "The given state account does not have the correct address"; - - constructor(readonly logs?: string[]) { - super("4000: The given state account does not have the correct address"); - } -} - export class DeclaredProgramIdMismatch extends Error { static readonly code = 4100; readonly code = 4100; @@ -715,6 +715,8 @@ export function fromCode(code: number, logs?: string[]): AnchorError | null { return new ConstraintMintDecimals(logs); case 2019: return new ConstraintSpace(logs); + case 2020: + return new ConstraintAccountIsNone(logs); case 2500: return new RequireViolated(logs); case 2501: @@ -765,8 +767,6 @@ export function fromCode(code: number, logs?: string[]): AnchorError | null { return new AccountReallocExceedsLimit(logs); case 3017: return new AccountDuplicateReallocs(logs); - case 4000: - return new StateInvalidAddress(logs); case 4100: return new DeclaredProgramIdMismatch(logs); case 5000: diff --git a/javascript/solana.js/src/generated/attestation-program/errors/custom.ts b/javascript/solana.js/src/generated/attestation-program/errors/custom.ts index 8cb3136..ab209af 100644 --- a/javascript/solana.js/src/generated/attestation-program/errors/custom.ts +++ b/javascript/solana.js/src/generated/attestation-program/errors/custom.ts @@ -56,9 +56,10 @@ export class InvalidQuote extends Error { static readonly code = 6001; readonly code = 6001; readonly name = "InvalidQuote"; + readonly msg = "The provided enclave quote is invalid"; constructor(readonly logs?: string[]) { - super("6001: "); + super("6001: The provided enclave quote is invalid"); } } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionOverrideClose.ts b/javascript/solana.js/src/generated/attestation-program/instructions/accountCloseOverride.ts similarity index 60% rename from javascript/solana.js/src/generated/attestation-program/instructions/functionOverrideClose.ts rename to javascript/solana.js/src/generated/attestation-program/instructions/accountCloseOverride.ts index eec943b..d8254ec 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionOverrideClose.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/accountCloseOverride.ts @@ -1,30 +1,29 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface FunctionOverrideCloseAccounts { +export interface AccountCloseOverrideAccounts { + enclave: PublicKey; function: PublicKey; solDest: PublicKey; systemProgram: PublicKey; } -export function functionOverrideClose( +export function accountCloseOverride( program: SwitchboardProgram, - accounts: FunctionOverrideCloseAccounts + accounts: AccountCloseOverrideAccounts ) { const keys: Array = [ + { pubkey: accounts.enclave, isSigner: false, isWritable: true }, { pubkey: accounts.function, isSigner: false, isWritable: true }, { pubkey: accounts.solDest, isSigner: false, isWritable: false }, { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, ]; - const identifier = Buffer.from([42, 133, 154, 32, 207, 168, 89, 45]); + const identifier = Buffer.from([65, 72, 78, 213, 38, 245, 58, 189]); const data = identifier; const ix = new TransactionInstruction({ keys, diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionInit.ts index 560bdb6..d5bdffe 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationPermissionInitArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([ export function attestationPermissionInit( program: SwitchboardProgram, args: AttestationPermissionInitArgs, - accounts: AttestationPermissionInitAccounts + accounts: AttestationPermissionInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.permission, isSigner: false, isWritable: true }, @@ -48,10 +46,6 @@ export function attestationPermissionInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionSet.ts b/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionSet.ts index 0713957..2bd4587 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionSet.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/attestationPermissionSet.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationPermissionSetArgs { @@ -17,7 +14,7 @@ export interface AttestationPermissionSetAccounts { permission: PublicKey; authority: PublicKey; attestationQueue: PublicKey; - enclave: PublicKey; + grantee: PublicKey; } export const layout = borsh.struct([ @@ -27,13 +24,14 @@ export const layout = borsh.struct([ export function attestationPermissionSet( program: SwitchboardProgram, args: AttestationPermissionSetArgs, - accounts: AttestationPermissionSetAccounts + accounts: AttestationPermissionSetAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.permission, isSigner: false, isWritable: true }, { pubkey: accounts.authority, isSigner: true, isWritable: false }, { pubkey: accounts.attestationQueue, isSigner: false, isWritable: false }, - { pubkey: accounts.enclave, isSigner: false, isWritable: false }, + { pubkey: accounts.grantee, isSigner: false, isWritable: false }, ]; const identifier = Buffer.from([56, 253, 255, 201, 100, 153, 10, 76]); const buffer = Buffer.alloc(1000); @@ -44,10 +42,6 @@ export function attestationPermissionSet( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueAddMrEnclave.ts b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueAddMrEnclave.ts index 8067e62..1420649 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueAddMrEnclave.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueAddMrEnclave.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationQueueAddMrEnclaveArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function attestationQueueAddMrEnclave( program: SwitchboardProgram, args: AttestationQueueAddMrEnclaveArgs, - accounts: AttestationQueueAddMrEnclaveAccounts + accounts: AttestationQueueAddMrEnclaveAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.queue, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function attestationQueueAddMrEnclave( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueInit.ts index dc33728..449ed30 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationQueueInitArgs { @@ -27,7 +24,8 @@ export const layout = borsh.struct([ export function attestationQueueInit( program: SwitchboardProgram, args: AttestationQueueInitArgs, - accounts: AttestationQueueInitAccounts + accounts: AttestationQueueInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.queue, isSigner: true, isWritable: true }, @@ -44,10 +42,6 @@ export function attestationQueueInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueRemoveMrEnclave.ts b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueRemoveMrEnclave.ts index d8115e8..a075735 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueRemoveMrEnclave.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/attestationQueueRemoveMrEnclave.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AttestationQueueRemoveMrEnclaveArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function attestationQueueRemoveMrEnclave( program: SwitchboardProgram, args: AttestationQueueRemoveMrEnclaveArgs, - accounts: AttestationQueueRemoveMrEnclaveAccounts + accounts: AttestationQueueRemoveMrEnclaveAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.queue, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function attestationQueueRemoveMrEnclave( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionClose.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionClose.ts index 3e0a635..620797c 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionClose.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionClose.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionCloseArgs { @@ -20,7 +17,6 @@ export interface FunctionCloseAccounts { escrowWallet: PublicKey; solDest: PublicKey; escrowDest: PublicKey; - state: PublicKey; tokenProgram: PublicKey; systemProgram: PublicKey; addressLookupProgram: PublicKey; @@ -33,7 +29,8 @@ export const layout = borsh.struct([ export function functionClose( program: SwitchboardProgram, args: FunctionCloseArgs, - accounts: FunctionCloseAccounts + accounts: FunctionCloseAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -42,7 +39,6 @@ export function functionClose( { pubkey: accounts.escrowWallet, isSigner: false, isWritable: true }, { pubkey: accounts.solDest, isSigner: false, isWritable: false }, { pubkey: accounts.escrowDest, isSigner: false, isWritable: true }, - { pubkey: accounts.state, isSigner: false, isWritable: false }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, { @@ -60,10 +56,6 @@ export function functionClose( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionDeactivateLookup.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionDeactivateLookup.ts index 0ef589c..3419e48 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionDeactivateLookup.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionDeactivateLookup.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionDeactivateLookupAccounts { diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionExtendLookup.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionExtendLookup.ts index 115801b..6f5c55b 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionExtendLookup.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionExtendLookup.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionExtendLookupArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([ export function functionExtendLookup( program: SwitchboardProgram, args: FunctionExtendLookupArgs, - accounts: FunctionExtendLookupAccounts + accounts: FunctionExtendLookupAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function functionExtendLookup( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionInit.ts index dd71c1a..c6cf2bf 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionInitArgs { @@ -17,13 +14,11 @@ export interface FunctionInitAccounts { function: PublicKey; addressLookupTable: PublicKey; authority: PublicKey; - quote: PublicKey; attestationQueue: PublicKey; payer: PublicKey; wallet: PublicKey; walletAuthority: PublicKey; tokenWallet: PublicKey; - state: PublicKey; mint: PublicKey; tokenProgram: PublicKey; associatedTokenProgram: PublicKey; @@ -36,19 +31,18 @@ export const layout = borsh.struct([types.FunctionInitParams.layout("params")]); export function functionInit( program: SwitchboardProgram, args: FunctionInitArgs, - accounts: FunctionInitAccounts + accounts: FunctionInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, { pubkey: accounts.addressLookupTable, isSigner: false, isWritable: true }, { pubkey: accounts.authority, isSigner: false, isWritable: false }, - { pubkey: accounts.quote, isSigner: false, isWritable: true }, { pubkey: accounts.attestationQueue, isSigner: false, isWritable: false }, { pubkey: accounts.payer, isSigner: true, isWritable: true }, { pubkey: accounts.wallet, isSigner: false, isWritable: true }, { pubkey: accounts.walletAuthority, isSigner: true, isWritable: false }, { pubkey: accounts.tokenWallet, isSigner: false, isWritable: true }, - { pubkey: accounts.state, isSigner: false, isWritable: false }, { pubkey: accounts.mint, isSigner: false, isWritable: false }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, { @@ -72,10 +66,6 @@ export function functionInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestClose.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestClose.ts index 0f0d4ce..1225a93 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestClose.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestClose.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestCloseArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function functionRequestClose( program: SwitchboardProgram, args: FunctionRequestCloseArgs, - accounts: FunctionRequestCloseAccounts + accounts: FunctionRequestCloseAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function functionRequestClose( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInit.ts index a3a6b33..61b92f6 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestInitArgs { @@ -35,7 +32,8 @@ export const layout = borsh.struct([ export function functionRequestInit( program: SwitchboardProgram, args: FunctionRequestInitArgs, - accounts: FunctionRequestInitAccounts + accounts: FunctionRequestInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: true, isWritable: true }, @@ -64,10 +62,6 @@ export function functionRequestInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInitAndTrigger.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInitAndTrigger.ts index 04d61e5..c81fb52 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInitAndTrigger.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestInitAndTrigger.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestInitAndTriggerArgs { @@ -33,7 +30,8 @@ export const layout = borsh.struct([ export function functionRequestInitAndTrigger( program: SwitchboardProgram, args: FunctionRequestInitAndTriggerArgs, - accounts: FunctionRequestInitAndTriggerAccounts + accounts: FunctionRequestInitAndTriggerAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: true, isWritable: true }, @@ -62,10 +60,6 @@ export function functionRequestInitAndTrigger( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestSetConfig.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestSetConfig.ts index 5f108e3..1fce001 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestSetConfig.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestSetConfig.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestSetConfigArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function functionRequestSetConfig( program: SwitchboardProgram, args: FunctionRequestSetConfigArgs, - accounts: FunctionRequestSetConfigAccounts + accounts: FunctionRequestSetConfigAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function functionRequestSetConfig( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestTrigger.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestTrigger.ts index b7b7464..3503c3e 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestTrigger.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestTrigger.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestTriggerArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function functionRequestTrigger( program: SwitchboardProgram, args: FunctionRequestTriggerArgs, - accounts: FunctionRequestTriggerAccounts + accounts: FunctionRequestTriggerAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function functionRequestTrigger( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestVerify.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestVerify.ts index 03429a0..1cef109 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestVerify.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionRequestVerify.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionRequestVerifyArgs { @@ -35,7 +32,8 @@ export const layout = borsh.struct([ export function functionRequestVerify( program: SwitchboardProgram, args: FunctionRequestVerifyArgs, - accounts: FunctionRequestVerifyAccounts + accounts: FunctionRequestVerifyAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.request, isSigner: false, isWritable: true }, @@ -68,10 +66,6 @@ export function functionRequestVerify( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionResetEscrow.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionResetEscrow.ts index 43dec71..8601e84 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionResetEscrow.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionResetEscrow.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionResetEscrowArgs { @@ -22,7 +19,6 @@ export interface FunctionResetEscrowAccounts { defaultWallet: PublicKey; tokenWallet: PublicKey; payer: PublicKey; - state: PublicKey; tokenProgram: PublicKey; associatedTokenProgram: PublicKey; systemProgram: PublicKey; @@ -35,7 +31,8 @@ export const layout = borsh.struct([ export function functionResetEscrow( program: SwitchboardProgram, args: FunctionResetEscrowArgs, - accounts: FunctionResetEscrowAccounts + accounts: FunctionResetEscrowAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -46,7 +43,6 @@ export function functionResetEscrow( { pubkey: accounts.defaultWallet, isSigner: false, isWritable: true }, { pubkey: accounts.tokenWallet, isSigner: false, isWritable: true }, { pubkey: accounts.payer, isSigner: true, isWritable: true }, - { pubkey: accounts.state, isSigner: false, isWritable: false }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, { pubkey: accounts.associatedTokenProgram, @@ -64,10 +60,6 @@ export function functionResetEscrow( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetAuthority.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetAuthority.ts index 6da39e2..c52b2ae 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetAuthority.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetAuthority.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionSetAuthorityArgs { @@ -30,7 +27,8 @@ export const layout = borsh.struct([ export function functionSetAuthority( program: SwitchboardProgram, args: FunctionSetAuthorityArgs, - accounts: FunctionSetAuthorityAccounts + accounts: FunctionSetAuthorityAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -50,10 +48,6 @@ export function functionSetAuthority( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetConfig.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetConfig.ts index 26649fe..e72c7a5 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetConfig.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetConfig.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionSetConfigArgs { @@ -15,7 +12,6 @@ export interface FunctionSetConfigArgs { export interface FunctionSetConfigAccounts { function: PublicKey; - quote: PublicKey; authority: PublicKey; } @@ -26,11 +22,11 @@ export const layout = borsh.struct([ export function functionSetConfig( program: SwitchboardProgram, args: FunctionSetConfigArgs, - accounts: FunctionSetConfigAccounts + accounts: FunctionSetConfigAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, - { pubkey: accounts.quote, isSigner: false, isWritable: true }, { pubkey: accounts.authority, isSigner: true, isWritable: false }, ]; const identifier = Buffer.from([232, 132, 21, 251, 253, 189, 96, 94]); @@ -42,10 +38,6 @@ export function functionSetConfig( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetEscrow.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetEscrow.ts index 96ba36c..6aeb891 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionSetEscrow.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionSetEscrow.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionSetEscrowArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([ export function functionSetEscrow( program: SwitchboardProgram, args: FunctionSetEscrowArgs, - accounts: FunctionSetEscrowAccounts + accounts: FunctionSetEscrowAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -56,10 +54,6 @@ export function functionSetEscrow( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionTrigger.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionTrigger.ts index e7e46a6..c00e9e1 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionTrigger.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionTrigger.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionTriggerArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function functionTrigger( program: SwitchboardProgram, args: FunctionTriggerArgs, - accounts: FunctionTriggerAccounts + accounts: FunctionTriggerAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function functionTrigger( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/functionVerify.ts b/javascript/solana.js/src/generated/attestation-program/instructions/functionVerify.ts index 068e05e..a7f2c87 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/functionVerify.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/functionVerify.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface FunctionVerifyArgs { @@ -15,16 +12,13 @@ export interface FunctionVerifyArgs { export interface FunctionVerifyAccounts { function: PublicKey; - authority: PublicKey; functionEnclaveSigner: PublicKey; - fnQuote: PublicKey; - verifierQuote: PublicKey; - verifierEnclaveSigner: PublicKey; + verifier: PublicKey; + verifierSigner: PublicKey; verifierPermission: PublicKey; escrowWallet: PublicKey; escrowTokenWallet: PublicKey; receiver: PublicKey; - state: PublicKey; attestationQueue: PublicKey; tokenProgram: PublicKey; } @@ -36,28 +30,22 @@ export const layout = borsh.struct([ export function functionVerify( program: SwitchboardProgram, args: FunctionVerifyArgs, - accounts: FunctionVerifyAccounts + accounts: FunctionVerifyAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.function, isSigner: false, isWritable: true }, - { pubkey: accounts.authority, isSigner: false, isWritable: false }, { pubkey: accounts.functionEnclaveSigner, isSigner: true, isWritable: false, }, - { pubkey: accounts.fnQuote, isSigner: false, isWritable: true }, - { pubkey: accounts.verifierQuote, isSigner: false, isWritable: false }, - { - pubkey: accounts.verifierEnclaveSigner, - isSigner: true, - isWritable: false, - }, + { pubkey: accounts.verifier, isSigner: false, isWritable: false }, + { pubkey: accounts.verifierSigner, isSigner: true, isWritable: false }, { pubkey: accounts.verifierPermission, isSigner: false, isWritable: false }, { pubkey: accounts.escrowWallet, isSigner: false, isWritable: false }, { pubkey: accounts.escrowTokenWallet, isSigner: false, isWritable: true }, { pubkey: accounts.receiver, isSigner: false, isWritable: true }, - { pubkey: accounts.state, isSigner: false, isWritable: false }, { pubkey: accounts.attestationQueue, isSigner: false, isWritable: false }, { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }, ]; @@ -70,10 +58,6 @@ export function functionVerify( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/index.ts b/javascript/solana.js/src/generated/attestation-program/instructions/index.ts index da9b1d6..78a51b9 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/index.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/index.ts @@ -97,19 +97,25 @@ export type { FunctionVerifyArgs, } from "./functionVerify.js"; export { functionVerify } from "./functionVerify.js"; -export type { - QuoteHeartbeatAccounts, - QuoteHeartbeatArgs, -} from "./quoteHeartbeat.js"; -export { quoteHeartbeat } from "./quoteHeartbeat.js"; -export type { QuoteInitAccounts, QuoteInitArgs } from "./quoteInit.js"; -export { quoteInit } from "./quoteInit.js"; -export type { QuoteRotateAccounts, QuoteRotateArgs } from "./quoteRotate.js"; -export { quoteRotate } from "./quoteRotate.js"; -export type { QuoteVerifyAccounts, QuoteVerifyArgs } from "./quoteVerify.js"; -export { quoteVerify } from "./quoteVerify.js"; export type { StateInitAccounts, StateInitArgs } from "./stateInit.js"; export { stateInit } from "./stateInit.js"; +export type { + VerifierHeartbeatAccounts, + VerifierHeartbeatArgs, +} from "./verifierHeartbeat.js"; +export { verifierHeartbeat } from "./verifierHeartbeat.js"; +export type { VerifierInitAccounts, VerifierInitArgs } from "./verifierInit.js"; +export { verifierInit } from "./verifierInit.js"; +export type { + VerifierQuoteRotateAccounts, + VerifierQuoteRotateArgs, +} from "./verifierQuoteRotate.js"; +export { verifierQuoteRotate } from "./verifierQuoteRotate.js"; +export type { + VerifierQuoteVerifyAccounts, + VerifierQuoteVerifyArgs, +} from "./verifierQuoteVerify.js"; +export { verifierQuoteVerify } from "./verifierQuoteVerify.js"; export type { WalletCloseAccounts, WalletCloseArgs } from "./walletClose.js"; export { walletClose } from "./walletClose.js"; export type { WalletFundAccounts, WalletFundArgs } from "./walletFund.js"; diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/quoteRotate.ts b/javascript/solana.js/src/generated/attestation-program/instructions/quoteRotate.ts deleted file mode 100644 index 909fd60..0000000 --- a/javascript/solana.js/src/generated/attestation-program/instructions/quoteRotate.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars - -export interface QuoteRotateArgs { - params: types.QuoteRotateParamsFields; -} - -export interface QuoteRotateAccounts { - quote: PublicKey; - authority: PublicKey; - enclaveSigner: PublicKey; - attestationQueue: PublicKey; -} - -export const layout = borsh.struct([types.QuoteRotateParams.layout("params")]); - -export function quoteRotate( - program: SwitchboardProgram, - args: QuoteRotateArgs, - accounts: QuoteRotateAccounts -) { - const keys: Array = [ - { pubkey: accounts.quote, isSigner: false, isWritable: true }, - { pubkey: accounts.authority, isSigner: true, isWritable: false }, - { pubkey: accounts.enclaveSigner, isSigner: false, isWritable: false }, - { pubkey: accounts.attestationQueue, isSigner: false, isWritable: true }, - ]; - const identifier = Buffer.from([153, 94, 246, 7, 7, 124, 62, 7]); - const buffer = Buffer.alloc(1000); - const len = layout.encode( - { - params: types.QuoteRotateParams.toEncodable(args.params), - }, - buffer - ); - const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); - return ix; -} diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/stateInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/stateInit.ts index 063b6b7..bab12e7 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/stateInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/stateInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface StateInitArgs { @@ -24,7 +21,8 @@ export const layout = borsh.struct([types.StateInitParams.layout("params")]); export function stateInit( program: SwitchboardProgram, args: StateInitArgs, - accounts: StateInitAccounts + accounts: StateInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.state, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function stateInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/quoteHeartbeat.ts b/javascript/solana.js/src/generated/attestation-program/instructions/verifierHeartbeat.ts similarity index 50% rename from javascript/solana.js/src/generated/attestation-program/instructions/quoteHeartbeat.ts rename to javascript/solana.js/src/generated/attestation-program/instructions/verifierHeartbeat.ts index 44023c0..e3aa949 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/quoteHeartbeat.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/verifierHeartbeat.ts @@ -1,21 +1,18 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteHeartbeatArgs { - params: types.QuoteHeartbeatParamsFields; +export interface VerifierHeartbeatArgs { + params: types.VerifierHeartbeatParamsFields; } -export interface QuoteHeartbeatAccounts { - quote: PublicKey; - enclaveSigner: PublicKey; +export interface VerifierHeartbeatAccounts { + verifier: PublicKey; + verifierSigner: PublicKey; attestationQueue: PublicKey; queueAuthority: PublicKey; gcNode: PublicKey; @@ -23,35 +20,32 @@ export interface QuoteHeartbeatAccounts { } export const layout = borsh.struct([ - types.QuoteHeartbeatParams.layout("params"), + types.VerifierHeartbeatParams.layout("params"), ]); -export function quoteHeartbeat( +export function verifierHeartbeat( program: SwitchboardProgram, - args: QuoteHeartbeatArgs, - accounts: QuoteHeartbeatAccounts + args: VerifierHeartbeatArgs, + accounts: VerifierHeartbeatAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ - { pubkey: accounts.quote, isSigner: false, isWritable: true }, - { pubkey: accounts.enclaveSigner, isSigner: true, isWritable: false }, + { pubkey: accounts.verifier, isSigner: false, isWritable: true }, + { pubkey: accounts.verifierSigner, isSigner: true, isWritable: false }, { pubkey: accounts.attestationQueue, isSigner: false, isWritable: true }, { pubkey: accounts.queueAuthority, isSigner: false, isWritable: false }, { pubkey: accounts.gcNode, isSigner: false, isWritable: true }, { pubkey: accounts.permission, isSigner: false, isWritable: false }, ]; - const identifier = Buffer.from([202, 24, 19, 240, 75, 39, 154, 110]); + const identifier = Buffer.from([25, 238, 221, 14, 250, 148, 0, 140]); const buffer = Buffer.alloc(1000); const len = layout.encode( { - params: types.QuoteHeartbeatParams.toEncodable(args.params), + params: types.VerifierHeartbeatParams.toEncodable(args.params), }, buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/quoteInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/verifierInit.ts similarity index 53% rename from javascript/solana.js/src/generated/attestation-program/instructions/quoteInit.ts rename to javascript/solana.js/src/generated/attestation-program/instructions/verifierInit.ts index 55ad784..7ace0c3 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/quoteInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/verifierInit.ts @@ -1,20 +1,17 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteInitArgs { - params: types.QuoteInitParamsFields; +export interface VerifierInitArgs { + params: types.VerifierInitParamsFields; } -export interface QuoteInitAccounts { - quote: PublicKey; +export interface VerifierInitAccounts { + verifier: PublicKey; attestationQueue: PublicKey; queueAuthority: PublicKey; authority: PublicKey; @@ -22,34 +19,31 @@ export interface QuoteInitAccounts { systemProgram: PublicKey; } -export const layout = borsh.struct([types.QuoteInitParams.layout("params")]); +export const layout = borsh.struct([types.VerifierInitParams.layout("params")]); -export function quoteInit( +export function verifierInit( program: SwitchboardProgram, - args: QuoteInitArgs, - accounts: QuoteInitAccounts + args: VerifierInitArgs, + accounts: VerifierInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ - { pubkey: accounts.quote, isSigner: true, isWritable: true }, - { pubkey: accounts.attestationQueue, isSigner: false, isWritable: true }, + { pubkey: accounts.verifier, isSigner: true, isWritable: true }, + { pubkey: accounts.attestationQueue, isSigner: false, isWritable: false }, { pubkey: accounts.queueAuthority, isSigner: false, isWritable: false }, { pubkey: accounts.authority, isSigner: false, isWritable: false }, { pubkey: accounts.payer, isSigner: true, isWritable: true }, { pubkey: accounts.systemProgram, isSigner: false, isWritable: false }, ]; - const identifier = Buffer.from([124, 251, 28, 247, 136, 141, 198, 116]); + const identifier = Buffer.from([197, 138, 116, 14, 24, 81, 9, 245]); const buffer = Buffer.alloc(1000); const len = layout.encode( { - params: types.QuoteInitParams.toEncodable(args.params), + params: types.VerifierInitParams.toEncodable(args.params), }, buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteRotate.ts b/javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteRotate.ts new file mode 100644 index 0000000..4c690c9 --- /dev/null +++ b/javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteRotate.ts @@ -0,0 +1,47 @@ +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars + +import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars + +export interface VerifierQuoteRotateArgs { + params: types.VerifierQuoteRotateParamsFields; +} + +export interface VerifierQuoteRotateAccounts { + verifier: PublicKey; + authority: PublicKey; + enclaveSigner: PublicKey; + attestationQueue: PublicKey; +} + +export const layout = borsh.struct([ + types.VerifierQuoteRotateParams.layout("params"), +]); + +export function verifierQuoteRotate( + program: SwitchboardProgram, + args: VerifierQuoteRotateArgs, + accounts: VerifierQuoteRotateAccounts, + programId: PublicKey = program.attestationProgramId +) { + const keys: Array = [ + { pubkey: accounts.verifier, isSigner: false, isWritable: true }, + { pubkey: accounts.authority, isSigner: true, isWritable: false }, + { pubkey: accounts.enclaveSigner, isSigner: false, isWritable: false }, + { pubkey: accounts.attestationQueue, isSigner: false, isWritable: true }, + ]; + const identifier = Buffer.from([52, 93, 191, 90, 182, 82, 65, 197]); + const buffer = Buffer.alloc(1000); + const len = layout.encode( + { + params: types.VerifierQuoteRotateParams.toEncodable(args.params), + }, + buffer + ); + const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); + const ix = new TransactionInstruction({ keys, programId, data }); + return ix; +} diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/quoteVerify.ts b/javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteVerify.ts similarity index 52% rename from javascript/solana.js/src/generated/attestation-program/instructions/quoteVerify.ts rename to javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteVerify.ts index d6447f3..38f17d3 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/quoteVerify.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/verifierQuoteVerify.ts @@ -1,53 +1,47 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteVerifyArgs { - params: types.QuoteVerifyParamsFields; +export interface VerifierQuoteVerifyArgs { + params: types.VerifierQuoteVerifyParamsFields; } -export interface QuoteVerifyAccounts { +export interface VerifierQuoteVerifyAccounts { quote: PublicKey; - quoteSigner: PublicKey; verifier: PublicKey; enclaveSigner: PublicKey; attestationQueue: PublicKey; } -export const layout = borsh.struct([types.QuoteVerifyParams.layout("params")]); +export const layout = borsh.struct([ + types.VerifierQuoteVerifyParams.layout("params"), +]); -export function quoteVerify( +export function verifierQuoteVerify( program: SwitchboardProgram, - args: QuoteVerifyArgs, - accounts: QuoteVerifyAccounts + args: VerifierQuoteVerifyArgs, + accounts: VerifierQuoteVerifyAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.quote, isSigner: false, isWritable: true }, - { pubkey: accounts.quoteSigner, isSigner: false, isWritable: false }, { pubkey: accounts.verifier, isSigner: false, isWritable: false }, { pubkey: accounts.enclaveSigner, isSigner: true, isWritable: false }, { pubkey: accounts.attestationQueue, isSigner: false, isWritable: false }, ]; - const identifier = Buffer.from([158, 203, 69, 10, 212, 218, 45, 184]); + const identifier = Buffer.from([73, 38, 235, 197, 78, 209, 141, 253]); const buffer = Buffer.alloc(1000); const len = layout.encode( { - params: types.QuoteVerifyParams.toEncodable(args.params), + params: types.VerifierQuoteVerifyParams.toEncodable(args.params), }, buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/walletClose.ts b/javascript/solana.js/src/generated/attestation-program/instructions/walletClose.ts index 52cacca..ebb2068 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/walletClose.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/walletClose.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface WalletCloseArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([types.WalletCloseParams.layout("params")]); export function walletClose( program: SwitchboardProgram, args: WalletCloseArgs, - accounts: WalletCloseAccounts + accounts: WalletCloseAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.wallet, isSigner: false, isWritable: true }, @@ -56,10 +54,6 @@ export function walletClose( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/walletFund.ts b/javascript/solana.js/src/generated/attestation-program/instructions/walletFund.ts index 93b34c6..4340e85 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/walletFund.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/walletFund.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface WalletFundArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([types.WalletFundParams.layout("params")]); export function walletFund( program: SwitchboardProgram, args: WalletFundArgs, - accounts: WalletFundAccounts + accounts: WalletFundAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.wallet, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function walletFund( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/walletInit.ts b/javascript/solana.js/src/generated/attestation-program/instructions/walletInit.ts index d1653cd..504d85c 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/walletInit.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/walletInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface WalletInitArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([types.WalletInitParams.layout("params")]); export function walletInit( program: SwitchboardProgram, args: WalletInitArgs, - accounts: WalletInitAccounts + accounts: WalletInitAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.wallet, isSigner: false, isWritable: true }, @@ -58,10 +56,6 @@ export function walletInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/instructions/walletWithdraw.ts b/javascript/solana.js/src/generated/attestation-program/instructions/walletWithdraw.ts index e43f3a5..acea1b6 100644 --- a/javascript/solana.js/src/generated/attestation-program/instructions/walletWithdraw.ts +++ b/javascript/solana.js/src/generated/attestation-program/instructions/walletWithdraw.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface WalletWithdrawArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([ export function walletWithdraw( program: SwitchboardProgram, args: WalletWithdrawArgs, - accounts: WalletWithdrawAccounts + accounts: WalletWithdrawAccounts, + programId: PublicKey = program.attestationProgramId ) { const keys: Array = [ { pubkey: accounts.wallet, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function walletWithdraw( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.attestationProgramId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionInitParams.ts index 5181e08..314a406 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AttestationPermissionInitParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionSetParams.ts b/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionSetParams.ts index 0a22aaf..2f0ae42 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionSetParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/AttestationPermissionSetParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AttestationPermissionSetParamsFields { permission: number; diff --git a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueAddMrEnclaveParams.ts b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueAddMrEnclaveParams.ts index 68e11ad..c41c26d 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueAddMrEnclaveParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueAddMrEnclaveParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AttestationQueueAddMrEnclaveParamsFields { mrEnclave: Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueInitParams.ts index 172e85e..caa8ed0 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AttestationQueueInitParamsFields { allowAuthorityOverrideAfter: number; diff --git a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueRemoveMrEnclaveParams.ts b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueRemoveMrEnclaveParams.ts index b037c8a..8e5586b 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueRemoveMrEnclaveParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/AttestationQueueRemoveMrEnclaveParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AttestationQueueRemoveMrEnclaveParamsFields { mrEnclave: Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionCloseParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionCloseParams.ts index 1e08fec..0f74557 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionCloseParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionCloseParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionExtendLookupParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionExtendLookupParams.ts index 1d96e32..4ba4f8e 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionExtendLookupParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionExtendLookupParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionExtendLookupParamsFields { newAddresses: Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionInitParams.ts index d19f83d..0030510 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionInitParamsFields { name: Uint8Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestCloseParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestCloseParams.ts index c3685f8..a823edf 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestCloseParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestCloseParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitAndTriggerParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitAndTriggerParams.ts index b63f6cf..eda2b46 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitAndTriggerParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitAndTriggerParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestInitAndTriggerParamsFields { bounty: BN | null; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitParams.ts index e26cb86..4b1aa63 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestInitParamsFields { maxContainerParamsLen: number | null; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestSetConfigParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestSetConfigParams.ts index a322e40..7c0855c 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestSetConfigParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestSetConfigParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestSetConfigParamsFields { containerParams: Uint8Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerParams.ts index 4abe346..6aa3601 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestTriggerParamsFields { bounty: BN | null; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerRound.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerRound.ts index 5eeb7c9..0198f9b 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerRound.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestTriggerRound.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestTriggerRoundFields { /** The status of the request. */ diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestVerifyParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestVerifyParams.ts index 837f6ec..3ee3673 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestVerifyParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionRequestVerifyParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionRequestVerifyParamsFields { observedTime: BN; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionResetEscrowParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionResetEscrowParams.ts index 8109148..6ddd709 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionResetEscrowParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionResetEscrowParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionResetEscrowParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetAuthorityParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetAuthorityParams.ts index 95c7dd2..4ae6dad 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetAuthorityParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetAuthorityParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionSetAuthorityParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetConfigParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetConfigParams.ts index a88a8b0..bf4c75b 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetConfigParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetConfigParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionSetConfigParamsFields { name: Uint8Array | null; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetEscrowParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetEscrowParams.ts index f6e7fd2..413326e 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionSetEscrowParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionSetEscrowParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionSetEscrowParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionStatus.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionStatus.ts index 754eb9d..1c237e3 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionStatus.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionStatus.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface NoneJSON { kind: "None"; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionTriggerParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionTriggerParams.ts index 88bd84f..bed19a5 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionTriggerParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionTriggerParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionTriggerParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/FunctionVerifyParams.ts b/javascript/solana.js/src/generated/attestation-program/types/FunctionVerifyParams.ts index e7d30dd..fd1d7b2 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FunctionVerifyParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FunctionVerifyParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FunctionVerifyParamsFields { observedTime: BN; diff --git a/javascript/solana.js/src/generated/attestation-program/types/FundingStatus.ts b/javascript/solana.js/src/generated/attestation-program/types/FundingStatus.ts index aa2bbe7..8f5704d 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/FundingStatus.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/FundingStatus.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface InactiveJSON { kind: "Inactive"; diff --git a/javascript/solana.js/src/generated/attestation-program/types/Quote.ts b/javascript/solana.js/src/generated/attestation-program/types/Quote.ts index 44cb2f7..df13282 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/Quote.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/Quote.ts @@ -20,6 +20,8 @@ export interface QuoteFields { quoteRegistry: Array; /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ registryKey: Array; + /** Reserved. */ + ebuf: Array; } export interface QuoteJSON { @@ -37,6 +39,8 @@ export interface QuoteJSON { quoteRegistry: Array; /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ registryKey: Array; + /** Reserved. */ + ebuf: Array; } export class Quote { @@ -54,6 +58,8 @@ export class Quote { readonly quoteRegistry: Array; /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ readonly registryKey: Array; + /** Reserved. */ + readonly ebuf: Array; constructor(fields: QuoteFields) { this.enclaveSigner = fields.enclaveSigner; @@ -63,6 +69,7 @@ export class Quote { this.validUntil = fields.validUntil; this.quoteRegistry = fields.quoteRegistry; this.registryKey = fields.registryKey; + this.ebuf = fields.ebuf; } static layout(property?: string) { @@ -75,6 +82,7 @@ export class Quote { borsh.i64("validUntil"), borsh.array(borsh.u8(), 32, "quoteRegistry"), borsh.array(borsh.u8(), 64, "registryKey"), + borsh.array(borsh.u8(), 256, "ebuf"), ], property ); @@ -90,6 +98,7 @@ export class Quote { validUntil: obj.validUntil, quoteRegistry: obj.quoteRegistry, registryKey: obj.registryKey, + ebuf: obj.ebuf, }); } @@ -102,6 +111,7 @@ export class Quote { validUntil: fields.validUntil, quoteRegistry: fields.quoteRegistry, registryKey: fields.registryKey, + ebuf: fields.ebuf, }; } @@ -114,6 +124,7 @@ export class Quote { validUntil: this.validUntil.toString(), quoteRegistry: this.quoteRegistry, registryKey: this.registryKey, + ebuf: this.ebuf, }; } @@ -126,6 +137,7 @@ export class Quote { validUntil: new BN(obj.validUntil), quoteRegistry: obj.quoteRegistry, registryKey: obj.registryKey, + ebuf: obj.ebuf, }); } diff --git a/javascript/solana.js/src/generated/attestation-program/types/RequestStatus.ts b/javascript/solana.js/src/generated/attestation-program/types/RequestStatus.ts index 81ca7dc..00b0dbf 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/RequestStatus.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/RequestStatus.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface NoneJSON { kind: "None"; diff --git a/javascript/solana.js/src/generated/attestation-program/types/StateInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/StateInitParams.ts index fe08e86..c192206 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/StateInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/StateInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface StateInitParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/SwitchboardAttestationPermission.ts b/javascript/solana.js/src/generated/attestation-program/types/SwitchboardAttestationPermission.ts index 9b03e8a..fcd394c 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/SwitchboardAttestationPermission.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/SwitchboardAttestationPermission.ts @@ -1,5 +1,5 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars diff --git a/javascript/solana.js/src/generated/attestation-program/types/VerificationStatus.ts b/javascript/solana.js/src/generated/attestation-program/types/VerificationStatus.ts index 88b028b..9361e55 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/VerificationStatus.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/VerificationStatus.ts @@ -1,6 +1,6 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars diff --git a/javascript/solana.js/src/generated/attestation-program/types/QuoteHeartbeatParams.ts b/javascript/solana.js/src/generated/attestation-program/types/VerifierHeartbeatParams.ts similarity index 56% rename from javascript/solana.js/src/generated/attestation-program/types/QuoteHeartbeatParams.ts rename to javascript/solana.js/src/generated/attestation-program/types/VerifierHeartbeatParams.ts index 935fb34..34f3f30 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/QuoteHeartbeatParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/VerifierHeartbeatParams.ts @@ -5,12 +5,12 @@ import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteHeartbeatParamsFields {} +export interface VerifierHeartbeatParamsFields {} -export interface QuoteHeartbeatParamsJSON {} +export interface VerifierHeartbeatParamsJSON {} -export class QuoteHeartbeatParams { - constructor(fields: QuoteHeartbeatParamsFields) {} +export class VerifierHeartbeatParams { + constructor(fields: VerifierHeartbeatParamsFields) {} static layout(property?: string) { return borsh.struct([], property); @@ -18,22 +18,22 @@ export class QuoteHeartbeatParams { // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { - return new QuoteHeartbeatParams({}); + return new VerifierHeartbeatParams({}); } - static toEncodable(fields: QuoteHeartbeatParamsFields) { + static toEncodable(fields: VerifierHeartbeatParamsFields) { return {}; } - toJSON(): QuoteHeartbeatParamsJSON { + toJSON(): VerifierHeartbeatParamsJSON { return {}; } - static fromJSON(obj: QuoteHeartbeatParamsJSON): QuoteHeartbeatParams { - return new QuoteHeartbeatParams({}); + static fromJSON(obj: VerifierHeartbeatParamsJSON): VerifierHeartbeatParams { + return new VerifierHeartbeatParams({}); } toEncodable() { - return QuoteHeartbeatParams.toEncodable(this); + return VerifierHeartbeatParams.toEncodable(this); } } diff --git a/javascript/solana.js/src/generated/attestation-program/types/QuoteInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/VerifierInitParams.ts similarity index 59% rename from javascript/solana.js/src/generated/attestation-program/types/QuoteInitParams.ts rename to javascript/solana.js/src/generated/attestation-program/types/VerifierInitParams.ts index 57694fe..2649a06 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/QuoteInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/VerifierInitParams.ts @@ -5,12 +5,12 @@ import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteInitParamsFields {} +export interface VerifierInitParamsFields {} -export interface QuoteInitParamsJSON {} +export interface VerifierInitParamsJSON {} -export class QuoteInitParams { - constructor(fields: QuoteInitParamsFields) {} +export class VerifierInitParams { + constructor(fields: VerifierInitParamsFields) {} static layout(property?: string) { return borsh.struct([], property); @@ -18,22 +18,22 @@ export class QuoteInitParams { // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { - return new QuoteInitParams({}); + return new VerifierInitParams({}); } - static toEncodable(fields: QuoteInitParamsFields) { + static toEncodable(fields: VerifierInitParamsFields) { return {}; } - toJSON(): QuoteInitParamsJSON { + toJSON(): VerifierInitParamsJSON { return {}; } - static fromJSON(obj: QuoteInitParamsJSON): QuoteInitParams { - return new QuoteInitParams({}); + static fromJSON(obj: VerifierInitParamsJSON): VerifierInitParams { + return new VerifierInitParams({}); } toEncodable() { - return QuoteInitParams.toEncodable(this); + return VerifierInitParams.toEncodable(this); } } diff --git a/javascript/solana.js/src/generated/attestation-program/types/QuoteRotateParams.ts b/javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteRotateParams.ts similarity index 65% rename from javascript/solana.js/src/generated/attestation-program/types/QuoteRotateParams.ts rename to javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteRotateParams.ts index 3974956..748433c 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/QuoteRotateParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteRotateParams.ts @@ -5,18 +5,18 @@ import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteRotateParamsFields { +export interface VerifierQuoteRotateParamsFields { registryKey: Array; } -export interface QuoteRotateParamsJSON { +export interface VerifierQuoteRotateParamsJSON { registryKey: Array; } -export class QuoteRotateParams { +export class VerifierQuoteRotateParams { readonly registryKey: Array; - constructor(fields: QuoteRotateParamsFields) { + constructor(fields: VerifierQuoteRotateParamsFields) { this.registryKey = fields.registryKey; } @@ -26,30 +26,32 @@ export class QuoteRotateParams { // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { - return new QuoteRotateParams({ + return new VerifierQuoteRotateParams({ registryKey: obj.registryKey, }); } - static toEncodable(fields: QuoteRotateParamsFields) { + static toEncodable(fields: VerifierQuoteRotateParamsFields) { return { registryKey: fields.registryKey, }; } - toJSON(): QuoteRotateParamsJSON { + toJSON(): VerifierQuoteRotateParamsJSON { return { registryKey: this.registryKey, }; } - static fromJSON(obj: QuoteRotateParamsJSON): QuoteRotateParams { - return new QuoteRotateParams({ + static fromJSON( + obj: VerifierQuoteRotateParamsJSON + ): VerifierQuoteRotateParams { + return new VerifierQuoteRotateParams({ registryKey: obj.registryKey, }); } toEncodable() { - return QuoteRotateParams.toEncodable(this); + return VerifierQuoteRotateParams.toEncodable(this); } } diff --git a/javascript/solana.js/src/generated/attestation-program/types/QuoteVerifyParams.ts b/javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteVerifyParams.ts similarity index 73% rename from javascript/solana.js/src/generated/attestation-program/types/QuoteVerifyParams.ts rename to javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteVerifyParams.ts index 450f319..3256b84 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/QuoteVerifyParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/VerifierQuoteVerifyParams.ts @@ -5,24 +5,24 @@ import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars -export interface QuoteVerifyParamsFields { +export interface VerifierQuoteVerifyParamsFields { timestamp: BN; mrEnclave: Array; idx: number; } -export interface QuoteVerifyParamsJSON { +export interface VerifierQuoteVerifyParamsJSON { timestamp: string; mrEnclave: Array; idx: number; } -export class QuoteVerifyParams { +export class VerifierQuoteVerifyParams { readonly timestamp: BN; readonly mrEnclave: Array; readonly idx: number; - constructor(fields: QuoteVerifyParamsFields) { + constructor(fields: VerifierQuoteVerifyParamsFields) { this.timestamp = fields.timestamp; this.mrEnclave = fields.mrEnclave; this.idx = fields.idx; @@ -41,14 +41,14 @@ export class QuoteVerifyParams { // eslint-disable-next-line @typescript-eslint/no-explicit-any static fromDecoded(obj: any) { - return new QuoteVerifyParams({ + return new VerifierQuoteVerifyParams({ timestamp: obj.timestamp, mrEnclave: obj.mrEnclave, idx: obj.idx, }); } - static toEncodable(fields: QuoteVerifyParamsFields) { + static toEncodable(fields: VerifierQuoteVerifyParamsFields) { return { timestamp: fields.timestamp, mrEnclave: fields.mrEnclave, @@ -56,7 +56,7 @@ export class QuoteVerifyParams { }; } - toJSON(): QuoteVerifyParamsJSON { + toJSON(): VerifierQuoteVerifyParamsJSON { return { timestamp: this.timestamp.toString(), mrEnclave: this.mrEnclave, @@ -64,8 +64,10 @@ export class QuoteVerifyParams { }; } - static fromJSON(obj: QuoteVerifyParamsJSON): QuoteVerifyParams { - return new QuoteVerifyParams({ + static fromJSON( + obj: VerifierQuoteVerifyParamsJSON + ): VerifierQuoteVerifyParams { + return new VerifierQuoteVerifyParams({ timestamp: new BN(obj.timestamp), mrEnclave: obj.mrEnclave, idx: obj.idx, @@ -73,6 +75,6 @@ export class QuoteVerifyParams { } toEncodable() { - return QuoteVerifyParams.toEncodable(this); + return VerifierQuoteVerifyParams.toEncodable(this); } } diff --git a/javascript/solana.js/src/generated/attestation-program/types/WalletCloseParams.ts b/javascript/solana.js/src/generated/attestation-program/types/WalletCloseParams.ts index 7d0ac32..1a1cee4 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/WalletCloseParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/WalletCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface WalletCloseParamsFields {} diff --git a/javascript/solana.js/src/generated/attestation-program/types/WalletFundParams.ts b/javascript/solana.js/src/generated/attestation-program/types/WalletFundParams.ts index 0ce6585..0dd17f3 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/WalletFundParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/WalletFundParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface WalletFundParamsFields { transferAmount: BN | null; diff --git a/javascript/solana.js/src/generated/attestation-program/types/WalletInitParams.ts b/javascript/solana.js/src/generated/attestation-program/types/WalletInitParams.ts index dbaf462..e4e888a 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/WalletInitParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/WalletInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface WalletInitParamsFields { name: Uint8Array; diff --git a/javascript/solana.js/src/generated/attestation-program/types/WalletWithdrawParams.ts b/javascript/solana.js/src/generated/attestation-program/types/WalletWithdrawParams.ts index 658e647..add9917 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/WalletWithdrawParams.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/WalletWithdrawParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface WalletWithdrawParamsFields { amount: BN; diff --git a/javascript/solana.js/src/generated/attestation-program/types/index.ts b/javascript/solana.js/src/generated/attestation-program/types/index.ts index 1ad7d3d..3b8eda1 100644 --- a/javascript/solana.js/src/generated/attestation-program/types/index.ts +++ b/javascript/solana.js/src/generated/attestation-program/types/index.ts @@ -111,31 +111,31 @@ export type { export { FunctionVerifyParams } from "./FunctionVerifyParams.js"; export type { QuoteFields, QuoteJSON } from "./Quote.js"; export { Quote } from "./Quote.js"; -export type { - QuoteHeartbeatParamsFields, - QuoteHeartbeatParamsJSON, -} from "./QuoteHeartbeatParams.js"; -export { QuoteHeartbeatParams } from "./QuoteHeartbeatParams.js"; -export type { - QuoteInitParamsFields, - QuoteInitParamsJSON, -} from "./QuoteInitParams.js"; -export { QuoteInitParams } from "./QuoteInitParams.js"; -export type { - QuoteRotateParamsFields, - QuoteRotateParamsJSON, -} from "./QuoteRotateParams.js"; -export { QuoteRotateParams } from "./QuoteRotateParams.js"; -export type { - QuoteVerifyParamsFields, - QuoteVerifyParamsJSON, -} from "./QuoteVerifyParams.js"; -export { QuoteVerifyParams } from "./QuoteVerifyParams.js"; export type { StateInitParamsFields, StateInitParamsJSON, } from "./StateInitParams.js"; export { StateInitParams } from "./StateInitParams.js"; +export type { + VerifierHeartbeatParamsFields, + VerifierHeartbeatParamsJSON, +} from "./VerifierHeartbeatParams.js"; +export { VerifierHeartbeatParams } from "./VerifierHeartbeatParams.js"; +export type { + VerifierInitParamsFields, + VerifierInitParamsJSON, +} from "./VerifierInitParams.js"; +export { VerifierInitParams } from "./VerifierInitParams.js"; +export type { + VerifierQuoteRotateParamsFields, + VerifierQuoteRotateParamsJSON, +} from "./VerifierQuoteRotateParams.js"; +export { VerifierQuoteRotateParams } from "./VerifierQuoteRotateParams.js"; +export type { + VerifierQuoteVerifyParamsFields, + VerifierQuoteVerifyParamsJSON, +} from "./VerifierQuoteVerifyParams.js"; +export { VerifierQuoteVerifyParams } from "./VerifierQuoteVerifyParams.js"; export type { WalletCloseParamsFields, WalletCloseParamsJSON, diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/AggregatorAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/AggregatorAccountData.ts index fbd9269..82154fc 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/AggregatorAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/AggregatorAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -319,14 +319,15 @@ export class AggregatorAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -335,7 +336,8 @@ export class AggregatorAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -343,7 +345,7 @@ export class AggregatorAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/BufferRelayerAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/BufferRelayerAccountData.ts index 46d95b3..6a73854 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/BufferRelayerAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/BufferRelayerAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -117,14 +117,15 @@ export class BufferRelayerAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -133,7 +134,8 @@ export class BufferRelayerAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -141,7 +143,7 @@ export class BufferRelayerAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/CrankAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/CrankAccountData.ts index 01c893f..f2c89c9 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/CrankAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/CrankAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -89,14 +89,15 @@ export class CrankAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -105,7 +106,8 @@ export class CrankAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -113,7 +115,7 @@ export class CrankAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/JobAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/JobAccountData.ts index 767c54b..b775e24 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/JobAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/JobAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -102,14 +102,15 @@ export class JobAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -118,7 +119,8 @@ export class JobAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -126,7 +128,7 @@ export class JobAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/LeaseAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/LeaseAccountData.ts index f9a9e1d..c37cda3 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/LeaseAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/LeaseAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -111,14 +111,15 @@ export class LeaseAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -127,7 +128,8 @@ export class LeaseAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -135,7 +137,7 @@ export class LeaseAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/OracleAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/OracleAccountData.ts index 45d7a35..ee63282 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/OracleAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/OracleAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -105,14 +105,15 @@ export class OracleAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -121,7 +122,8 @@ export class OracleAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -129,7 +131,7 @@ export class OracleAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/OracleQueueAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/OracleQueueAccountData.ts index b7c5ec9..af618bd 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/OracleQueueAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/OracleQueueAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -245,14 +245,15 @@ export class OracleQueueAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -261,7 +262,8 @@ export class OracleQueueAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -269,7 +271,7 @@ export class OracleQueueAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/PermissionAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/PermissionAccountData.ts index b66990e..361374d 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/PermissionAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/PermissionAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -93,14 +93,15 @@ export class PermissionAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -109,7 +110,8 @@ export class PermissionAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -117,7 +119,7 @@ export class PermissionAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/RealmSpawnRecordAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/RealmSpawnRecordAccountData.ts index eccf3d1..61893bc 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/RealmSpawnRecordAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/RealmSpawnRecordAccountData.ts @@ -1,8 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { Connection, PublicKey } from "@solana/web3.js"; +import type { PublicKey } from "@solana/web3.js"; +import { Connection } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface RealmSpawnRecordAccountDataFields { @@ -28,14 +29,15 @@ export class RealmSpawnRecordAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -44,7 +46,8 @@ export class RealmSpawnRecordAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -52,7 +55,7 @@ export class RealmSpawnRecordAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/SbState.ts b/javascript/solana.js/src/generated/oracle-program/accounts/SbState.ts index d0ba255..2ba953a 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/SbState.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/SbState.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -81,14 +81,15 @@ export class SbState { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -97,7 +98,8 @@ export class SbState { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -105,7 +107,7 @@ export class SbState { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/SlidingResultAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/SlidingResultAccountData.ts index b620fd7..cebe00d 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/SlidingResultAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/SlidingResultAccountData.ts @@ -1,8 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { Connection, PublicKey } from "@solana/web3.js"; +import type { PublicKey } from "@solana/web3.js"; +import { Connection } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface SlidingResultAccountDataFields { @@ -42,14 +43,15 @@ export class SlidingResultAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -58,7 +60,8 @@ export class SlidingResultAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -66,7 +69,7 @@ export class SlidingResultAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/TaskSpecRecord.ts b/javascript/solana.js/src/generated/oracle-program/accounts/TaskSpecRecord.ts index 5771f5a..bf2293b 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/TaskSpecRecord.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/TaskSpecRecord.ts @@ -1,8 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { Connection, PublicKey } from "@solana/web3.js"; +import type { PublicKey } from "@solana/web3.js"; +import { Connection } from "@solana/web3.js"; import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface TaskSpecRecordFields { @@ -28,14 +29,15 @@ export class TaskSpecRecord { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -44,7 +46,8 @@ export class TaskSpecRecord { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -52,7 +55,7 @@ export class TaskSpecRecord { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/VrfAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/VrfAccountData.ts index d491f78..004c436 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/VrfAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/VrfAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -120,14 +120,15 @@ export class VrfAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -136,7 +137,8 @@ export class VrfAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -144,7 +146,7 @@ export class VrfAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/VrfLiteAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/VrfLiteAccountData.ts index fb1ccb1..fbd2b5f 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/VrfLiteAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/VrfLiteAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -155,14 +155,15 @@ export class VrfLiteAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -171,7 +172,8 @@ export class VrfLiteAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -179,7 +181,7 @@ export class VrfLiteAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/VrfPoolAccountData.ts b/javascript/solana.js/src/generated/oracle-program/accounts/VrfPoolAccountData.ts index 823ae28..5cb54bd 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/VrfPoolAccountData.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/VrfPoolAccountData.ts @@ -1,4 +1,4 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars @@ -73,14 +73,15 @@ export class VrfPoolAccountData { static async fetch( program: SwitchboardProgram, - address: PublicKey + address: PublicKey, + programId: PublicKey = program.programId ): Promise { const info = await program.connection.getAccountInfo(address); if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } @@ -89,7 +90,8 @@ export class VrfPoolAccountData { static async fetchMultiple( program: SwitchboardProgram, - addresses: PublicKey[] + addresses: PublicKey[], + programId: PublicKey = program.programId ): Promise> { const infos = await program.connection.getMultipleAccountsInfo(addresses); @@ -97,7 +99,7 @@ export class VrfPoolAccountData { if (info === null) { return null; } - if (!info.owner.equals(program.programId)) { + if (!info.owner.equals(programId)) { throw new Error("account doesn't belong to this program"); } diff --git a/javascript/solana.js/src/generated/oracle-program/accounts/index.ts b/javascript/solana.js/src/generated/oracle-program/accounts/index.ts index 7c3f5a6..49105d9 100644 --- a/javascript/solana.js/src/generated/oracle-program/accounts/index.ts +++ b/javascript/solana.js/src/generated/oracle-program/accounts/index.ts @@ -1,72 +1,72 @@ -export type { - AggregatorAccountDataFields, - AggregatorAccountDataJSON, -} from "./AggregatorAccountData.js"; -export { AggregatorAccountData } from "./AggregatorAccountData.js"; -export type { - BufferRelayerAccountDataFields, - BufferRelayerAccountDataJSON, -} from "./BufferRelayerAccountData.js"; -export { BufferRelayerAccountData } from "./BufferRelayerAccountData.js"; -export type { - CrankAccountDataFields, - CrankAccountDataJSON, -} from "./CrankAccountData.js"; -export { CrankAccountData } from "./CrankAccountData.js"; -export type { - JobAccountDataFields, - JobAccountDataJSON, -} from "./JobAccountData.js"; -export { JobAccountData } from "./JobAccountData.js"; -export type { - LeaseAccountDataFields, - LeaseAccountDataJSON, -} from "./LeaseAccountData.js"; -export { LeaseAccountData } from "./LeaseAccountData.js"; -export type { - OracleAccountDataFields, - OracleAccountDataJSON, -} from "./OracleAccountData.js"; -export { OracleAccountData } from "./OracleAccountData.js"; -export type { - OracleQueueAccountDataFields, - OracleQueueAccountDataJSON, -} from "./OracleQueueAccountData.js"; -export { OracleQueueAccountData } from "./OracleQueueAccountData.js"; -export type { - PermissionAccountDataFields, - PermissionAccountDataJSON, -} from "./PermissionAccountData.js"; -export { PermissionAccountData } from "./PermissionAccountData.js"; -export type { - RealmSpawnRecordAccountDataFields, - RealmSpawnRecordAccountDataJSON, -} from "./RealmSpawnRecordAccountData.js"; -export { RealmSpawnRecordAccountData } from "./RealmSpawnRecordAccountData.js"; -export type { SbStateFields, SbStateJSON } from "./SbState.js"; export { SbState } from "./SbState.js"; -export type { - SlidingResultAccountDataFields, - SlidingResultAccountDataJSON, -} from "./SlidingResultAccountData.js"; -export { SlidingResultAccountData } from "./SlidingResultAccountData.js"; +export type { SbStateFields, SbStateJSON } from "./SbState.js"; +export { TaskSpecRecord } from "./TaskSpecRecord.js"; export type { TaskSpecRecordFields, TaskSpecRecordJSON, } from "./TaskSpecRecord.js"; -export { TaskSpecRecord } from "./TaskSpecRecord.js"; +export { AggregatorAccountData } from "./AggregatorAccountData.js"; +export type { + AggregatorAccountDataFields, + AggregatorAccountDataJSON, +} from "./AggregatorAccountData.js"; +export { SlidingResultAccountData } from "./SlidingResultAccountData.js"; +export type { + SlidingResultAccountDataFields, + SlidingResultAccountDataJSON, +} from "./SlidingResultAccountData.js"; +export { PermissionAccountData } from "./PermissionAccountData.js"; +export type { + PermissionAccountDataFields, + PermissionAccountDataJSON, +} from "./PermissionAccountData.js"; +export { RealmSpawnRecordAccountData } from "./RealmSpawnRecordAccountData.js"; +export type { + RealmSpawnRecordAccountDataFields, + RealmSpawnRecordAccountDataJSON, +} from "./RealmSpawnRecordAccountData.js"; +export { LeaseAccountData } from "./LeaseAccountData.js"; +export type { + LeaseAccountDataFields, + LeaseAccountDataJSON, +} from "./LeaseAccountData.js"; +export { OracleQueueAccountData } from "./OracleQueueAccountData.js"; +export type { + OracleQueueAccountDataFields, + OracleQueueAccountDataJSON, +} from "./OracleQueueAccountData.js"; +export { CrankAccountData } from "./CrankAccountData.js"; +export type { + CrankAccountDataFields, + CrankAccountDataJSON, +} from "./CrankAccountData.js"; +export { OracleAccountData } from "./OracleAccountData.js"; +export type { + OracleAccountDataFields, + OracleAccountDataJSON, +} from "./OracleAccountData.js"; +export { JobAccountData } from "./JobAccountData.js"; +export type { + JobAccountDataFields, + JobAccountDataJSON, +} from "./JobAccountData.js"; +export { VrfAccountData } from "./VrfAccountData.js"; export type { VrfAccountDataFields, VrfAccountDataJSON, } from "./VrfAccountData.js"; -export { VrfAccountData } from "./VrfAccountData.js"; +export { VrfLiteAccountData } from "./VrfLiteAccountData.js"; export type { VrfLiteAccountDataFields, VrfLiteAccountDataJSON, } from "./VrfLiteAccountData.js"; -export { VrfLiteAccountData } from "./VrfLiteAccountData.js"; +export { VrfPoolAccountData } from "./VrfPoolAccountData.js"; export type { VrfPoolAccountDataFields, VrfPoolAccountDataJSON, } from "./VrfPoolAccountData.js"; -export { VrfPoolAccountData } from "./VrfPoolAccountData.js"; +export { BufferRelayerAccountData } from "./BufferRelayerAccountData.js"; +export type { + BufferRelayerAccountDataFields, + BufferRelayerAccountDataJSON, +} from "./BufferRelayerAccountData.js"; diff --git a/javascript/solana.js/src/generated/oracle-program/errors/anchor.ts b/javascript/solana.js/src/generated/oracle-program/errors/anchor.ts index 5290ae5..5bb0bbe 100644 --- a/javascript/solana.js/src/generated/oracle-program/errors/anchor.ts +++ b/javascript/solana.js/src/generated/oracle-program/errors/anchor.ts @@ -26,6 +26,7 @@ export type AnchorError = | ConstraintMintFreezeAuthority | ConstraintMintDecimals | ConstraintSpace + | ConstraintAccountIsNone | RequireViolated | RequireEqViolated | RequireKeysEqViolated @@ -51,7 +52,6 @@ export type AnchorError = | AccountSysvarMismatch | AccountReallocExceedsLimit | AccountDuplicateReallocs - | StateInvalidAddress | DeclaredProgramIdMismatch | Deprecated; @@ -139,10 +139,10 @@ export class ConstraintHasOne extends Error { static readonly code = 2001; readonly code = 2001; readonly name = "ConstraintHasOne"; - readonly msg = "A has_one constraint was violated"; + readonly msg = "A has one constraint was violated"; constructor(readonly logs?: string[]) { - super("2001: A has_one constraint was violated"); + super("2001: A has one constraint was violated"); } } @@ -216,10 +216,10 @@ export class ConstraintState extends Error { static readonly code = 2008; readonly code = 2008; readonly name = "ConstraintState"; - readonly msg = "A state constraint was violated"; + readonly msg = "Deprecated Error, feel free to replace with something else"; constructor(readonly logs?: string[]) { - super("2008: A state constraint was violated"); + super("2008: Deprecated Error, feel free to replace with something else"); } } @@ -344,6 +344,17 @@ export class ConstraintSpace extends Error { } } +export class ConstraintAccountIsNone extends Error { + static readonly code = 2020; + readonly code = 2020; + readonly name = "ConstraintAccountIsNone"; + readonly msg = "A required account for the constraint is None"; + + constructor(readonly logs?: string[]) { + super("2020: A required account for the constraint is None"); + } +} + export class RequireViolated extends Error { static readonly code = 2500; readonly code = 2500; @@ -625,17 +636,6 @@ export class AccountDuplicateReallocs extends Error { } } -export class StateInvalidAddress extends Error { - static readonly code = 4000; - readonly code = 4000; - readonly name = "StateInvalidAddress"; - readonly msg = "The given state account does not have the correct address"; - - constructor(readonly logs?: string[]) { - super("4000: The given state account does not have the correct address"); - } -} - export class DeclaredProgramIdMismatch extends Error { static readonly code = 4100; readonly code = 4100; @@ -715,6 +715,8 @@ export function fromCode(code: number, logs?: string[]): AnchorError | null { return new ConstraintMintDecimals(logs); case 2019: return new ConstraintSpace(logs); + case 2020: + return new ConstraintAccountIsNone(logs); case 2500: return new RequireViolated(logs); case 2501: @@ -765,8 +767,6 @@ export function fromCode(code: number, logs?: string[]): AnchorError | null { return new AccountReallocExceedsLimit(logs); case 3017: return new AccountDuplicateReallocs(logs); - case 4000: - return new StateInvalidAddress(logs); case 4100: return new DeclaredProgramIdMismatch(logs); case 5000: diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorAddJob.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorAddJob.ts index a29a6e9..72cbaa5 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorAddJob.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorAddJob.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorAddJobArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function aggregatorAddJob( program: SwitchboardProgram, args: AggregatorAddJobArgs, - accounts: AggregatorAddJobAccounts + accounts: AggregatorAddJobAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function aggregatorAddJob( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorClose.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorClose.ts index 87ff1b7..d0b1a02 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorClose.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorClose.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorCloseArgs { @@ -38,7 +35,8 @@ export const layout = borsh.struct([ export function aggregatorClose( program: SwitchboardProgram, args: AggregatorCloseArgs, - accounts: AggregatorCloseAccounts + accounts: AggregatorCloseAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -65,10 +63,6 @@ export function aggregatorClose( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorInit.ts index 39648ee..9090506 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorInitArgs { @@ -27,7 +24,8 @@ export const layout = borsh.struct([ export function aggregatorInit( program: SwitchboardProgram, args: AggregatorInitArgs, - accounts: AggregatorInitAccounts + accounts: AggregatorInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -44,10 +42,6 @@ export function aggregatorInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorLock.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorLock.ts index 2e6a96a..60e65e5 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorLock.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorLock.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorLockArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function aggregatorLock( program: SwitchboardProgram, args: AggregatorLockArgs, - accounts: AggregatorLockAccounts + accounts: AggregatorLockAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function aggregatorLock( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorOpenRound.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorOpenRound.ts index e085653..f171b5d 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorOpenRound.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorOpenRound.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorOpenRoundArgs { @@ -34,7 +31,8 @@ export const layout = borsh.struct([ export function aggregatorOpenRound( program: SwitchboardProgram, args: AggregatorOpenRoundArgs, - accounts: AggregatorOpenRoundAccounts + accounts: AggregatorOpenRoundAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -58,10 +56,6 @@ export function aggregatorOpenRound( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorRemoveJob.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorRemoveJob.ts index 85eeefb..41b7453 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorRemoveJob.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorRemoveJob.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorRemoveJobArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function aggregatorRemoveJob( program: SwitchboardProgram, args: AggregatorRemoveJobArgs, - accounts: AggregatorRemoveJobAccounts + accounts: AggregatorRemoveJobAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function aggregatorRemoveJob( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResult.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResult.ts index f3fdefe..e500d87 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResult.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResult.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSaveResultArgs { @@ -36,7 +33,8 @@ export const layout = borsh.struct([ export function aggregatorSaveResult( program: SwitchboardProgram, args: AggregatorSaveResultArgs, - accounts: AggregatorSaveResultAccounts + accounts: AggregatorSaveResultAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -62,10 +60,6 @@ export function aggregatorSaveResult( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResultV2.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResultV2.ts index 985b8fd..8bb3b39 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResultV2.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSaveResultV2.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSaveResultV2Args { @@ -36,7 +33,8 @@ export const layout = borsh.struct([ export function aggregatorSaveResultV2( program: SwitchboardProgram, args: AggregatorSaveResultV2Args, - accounts: AggregatorSaveResultV2Accounts + accounts: AggregatorSaveResultV2Accounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -62,10 +60,6 @@ export function aggregatorSaveResultV2( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetAuthority.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetAuthority.ts index 9699e80..2497740 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetAuthority.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetAuthority.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSetAuthorityArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function aggregatorSetAuthority( program: SwitchboardProgram, args: AggregatorSetAuthorityArgs, - accounts: AggregatorSetAuthorityAccounts + accounts: AggregatorSetAuthorityAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function aggregatorSetAuthority( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetConfig.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetConfig.ts index be6d7d4..38f57f0 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetConfig.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetConfig.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSetConfigArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function aggregatorSetConfig( program: SwitchboardProgram, args: AggregatorSetConfigArgs, - accounts: AggregatorSetConfigAccounts + accounts: AggregatorSetConfigAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function aggregatorSetConfig( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetHistoryBuffer.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetHistoryBuffer.ts index ea620a2..7d5317c 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetHistoryBuffer.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetHistoryBuffer.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSetHistoryBufferArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function aggregatorSetHistoryBuffer( program: SwitchboardProgram, args: AggregatorSetHistoryBufferArgs, - accounts: AggregatorSetHistoryBufferAccounts + accounts: AggregatorSetHistoryBufferAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function aggregatorSetHistoryBuffer( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetQueue.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetQueue.ts index ae19a0e..01c6b56 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetQueue.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetQueue.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSetQueueArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function aggregatorSetQueue( program: SwitchboardProgram, args: AggregatorSetQueueArgs, - accounts: AggregatorSetQueueAccounts + accounts: AggregatorSetQueueAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function aggregatorSetQueue( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetResolutionMode.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetResolutionMode.ts index a3afb2a..db49be2 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetResolutionMode.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorSetResolutionMode.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorSetResolutionModeArgs { @@ -28,7 +25,8 @@ export const layout = borsh.struct([ export function aggregatorSetResolutionMode( program: SwitchboardProgram, args: AggregatorSetResolutionModeArgs, - accounts: AggregatorSetResolutionModeAccounts + accounts: AggregatorSetResolutionModeAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -46,10 +44,6 @@ export function aggregatorSetResolutionMode( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorTeeSaveResult.ts b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorTeeSaveResult.ts index 97e7bb0..882edd8 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorTeeSaveResult.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/aggregatorTeeSaveResult.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface AggregatorTeeSaveResultArgs { @@ -41,7 +38,8 @@ export const layout = borsh.struct([ export function aggregatorTeeSaveResult( program: SwitchboardProgram, args: AggregatorTeeSaveResultArgs, - accounts: AggregatorTeeSaveResultAccounts + accounts: AggregatorTeeSaveResultAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.aggregator, isSigner: false, isWritable: true }, @@ -72,10 +70,6 @@ export function aggregatorTeeSaveResult( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerInit.ts index 278f17e..30e20c1 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface BufferRelayerInitArgs { @@ -35,7 +32,8 @@ export const layout = borsh.struct([ export function bufferRelayerInit( program: SwitchboardProgram, args: BufferRelayerInitArgs, - accounts: BufferRelayerInitAccounts + accounts: BufferRelayerInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.bufferRelayer, isSigner: false, isWritable: true }, @@ -64,10 +62,6 @@ export function bufferRelayerInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerOpenRound.ts b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerOpenRound.ts index e1f8876..e8d7e91 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerOpenRound.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerOpenRound.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface BufferRelayerOpenRoundArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([ export function bufferRelayerOpenRound( program: SwitchboardProgram, args: BufferRelayerOpenRoundArgs, - accounts: BufferRelayerOpenRoundAccounts + accounts: BufferRelayerOpenRoundAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.bufferRelayer, isSigner: false, isWritable: true }, @@ -48,10 +46,6 @@ export function bufferRelayerOpenRound( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerSaveResult.ts b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerSaveResult.ts index 6d44e55..51d1bcc 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerSaveResult.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/bufferRelayerSaveResult.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface BufferRelayerSaveResultArgs { @@ -34,7 +31,8 @@ export const layout = borsh.struct([ export function bufferRelayerSaveResult( program: SwitchboardProgram, args: BufferRelayerSaveResultArgs, - accounts: BufferRelayerSaveResultAccounts + accounts: BufferRelayerSaveResultAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.bufferRelayer, isSigner: false, isWritable: true }, @@ -58,10 +56,6 @@ export function bufferRelayerSaveResult( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/crankInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/crankInit.ts index 8bb9f02..dfc87cd 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/crankInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/crankInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface CrankInitArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([types.CrankInitParams.layout("params")]); export function crankInit( program: SwitchboardProgram, args: CrankInitArgs, - accounts: CrankInitAccounts + accounts: CrankInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.crank, isSigner: true, isWritable: true }, @@ -44,10 +42,6 @@ export function crankInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/crankPop.ts b/javascript/solana.js/src/generated/oracle-program/instructions/crankPop.ts index d89c685..d8d50c5 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/crankPop.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/crankPop.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface CrankPopArgs { @@ -30,7 +27,8 @@ export const layout = borsh.struct([types.CrankPopParams.layout("params")]); export function crankPop( program: SwitchboardProgram, args: CrankPopArgs, - accounts: CrankPopAccounts + accounts: CrankPopAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.crank, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function crankPop( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/crankPopV2.ts b/javascript/solana.js/src/generated/oracle-program/instructions/crankPopV2.ts index b98ac7a..6064cc3 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/crankPopV2.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/crankPopV2.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface CrankPopV2Args { @@ -30,7 +27,8 @@ export const layout = borsh.struct([types.CrankPopParamsV2.layout("params")]); export function crankPopV2( program: SwitchboardProgram, args: CrankPopV2Args, - accounts: CrankPopV2Accounts + accounts: CrankPopV2Accounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.crank, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function crankPopV2( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/crankPush.ts b/javascript/solana.js/src/generated/oracle-program/instructions/crankPush.ts index c1e55ff..f04d1aa 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/crankPush.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/crankPush.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface CrankPushArgs { @@ -30,7 +27,8 @@ export const layout = borsh.struct([types.CrankPushParams.layout("params")]); export function crankPush( program: SwitchboardProgram, args: CrankPushArgs, - accounts: CrankPushAccounts + accounts: CrankPushAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.crank, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function crankPush( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/index.ts b/javascript/solana.js/src/generated/oracle-program/instructions/index.ts index 0e1eee7..23023f2 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/index.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/index.ts @@ -1,215 +1,215 @@ -export type { - AggregatorAddJobAccounts, - AggregatorAddJobArgs, -} from "./aggregatorAddJob.js"; -export { aggregatorAddJob } from "./aggregatorAddJob.js"; -export type { - AggregatorCloseAccounts, - AggregatorCloseArgs, -} from "./aggregatorClose.js"; export { aggregatorClose } from "./aggregatorClose.js"; export type { - AggregatorInitAccounts, - AggregatorInitArgs, -} from "./aggregatorInit.js"; + AggregatorCloseArgs, + AggregatorCloseAccounts, +} from "./aggregatorClose.js"; +export { setBumps } from "./setBumps.js"; +export type { SetBumpsArgs, SetBumpsAccounts } from "./setBumps.js"; +export { aggregatorAddJob } from "./aggregatorAddJob.js"; +export type { + AggregatorAddJobArgs, + AggregatorAddJobAccounts, +} from "./aggregatorAddJob.js"; export { aggregatorInit } from "./aggregatorInit.js"; export type { - AggregatorLockAccounts, - AggregatorLockArgs, -} from "./aggregatorLock.js"; + AggregatorInitArgs, + AggregatorInitAccounts, +} from "./aggregatorInit.js"; export { aggregatorLock } from "./aggregatorLock.js"; export type { - AggregatorOpenRoundAccounts, - AggregatorOpenRoundArgs, -} from "./aggregatorOpenRound.js"; + AggregatorLockArgs, + AggregatorLockAccounts, +} from "./aggregatorLock.js"; export { aggregatorOpenRound } from "./aggregatorOpenRound.js"; export type { - AggregatorRemoveJobAccounts, - AggregatorRemoveJobArgs, -} from "./aggregatorRemoveJob.js"; + AggregatorOpenRoundArgs, + AggregatorOpenRoundAccounts, +} from "./aggregatorOpenRound.js"; export { aggregatorRemoveJob } from "./aggregatorRemoveJob.js"; export type { - AggregatorSaveResultAccounts, - AggregatorSaveResultArgs, -} from "./aggregatorSaveResult.js"; + AggregatorRemoveJobArgs, + AggregatorRemoveJobAccounts, +} from "./aggregatorRemoveJob.js"; export { aggregatorSaveResult } from "./aggregatorSaveResult.js"; export type { - AggregatorSaveResultV2Accounts, - AggregatorSaveResultV2Args, -} from "./aggregatorSaveResultV2.js"; + AggregatorSaveResultArgs, + AggregatorSaveResultAccounts, +} from "./aggregatorSaveResult.js"; export { aggregatorSaveResultV2 } from "./aggregatorSaveResultV2.js"; export type { - AggregatorSetAuthorityAccounts, - AggregatorSetAuthorityArgs, -} from "./aggregatorSetAuthority.js"; -export { aggregatorSetAuthority } from "./aggregatorSetAuthority.js"; -export type { - AggregatorSetConfigAccounts, - AggregatorSetConfigArgs, -} from "./aggregatorSetConfig.js"; -export { aggregatorSetConfig } from "./aggregatorSetConfig.js"; -export type { - AggregatorSetHistoryBufferAccounts, - AggregatorSetHistoryBufferArgs, -} from "./aggregatorSetHistoryBuffer.js"; -export { aggregatorSetHistoryBuffer } from "./aggregatorSetHistoryBuffer.js"; -export type { - AggregatorSetQueueAccounts, - AggregatorSetQueueArgs, -} from "./aggregatorSetQueue.js"; -export { aggregatorSetQueue } from "./aggregatorSetQueue.js"; -export type { - AggregatorSetResolutionModeAccounts, - AggregatorSetResolutionModeArgs, -} from "./aggregatorSetResolutionMode.js"; -export { aggregatorSetResolutionMode } from "./aggregatorSetResolutionMode.js"; -export type { - AggregatorTeeSaveResultAccounts, - AggregatorTeeSaveResultArgs, -} from "./aggregatorTeeSaveResult.js"; + AggregatorSaveResultV2Args, + AggregatorSaveResultV2Accounts, +} from "./aggregatorSaveResultV2.js"; export { aggregatorTeeSaveResult } from "./aggregatorTeeSaveResult.js"; export type { - BufferRelayerInitAccounts, - BufferRelayerInitArgs, -} from "./bufferRelayerInit.js"; + AggregatorTeeSaveResultArgs, + AggregatorTeeSaveResultAccounts, +} from "./aggregatorTeeSaveResult.js"; +export { aggregatorSetAuthority } from "./aggregatorSetAuthority.js"; +export type { + AggregatorSetAuthorityArgs, + AggregatorSetAuthorityAccounts, +} from "./aggregatorSetAuthority.js"; +export { aggregatorSetConfig } from "./aggregatorSetConfig.js"; +export type { + AggregatorSetConfigArgs, + AggregatorSetConfigAccounts, +} from "./aggregatorSetConfig.js"; +export { aggregatorSetResolutionMode } from "./aggregatorSetResolutionMode.js"; +export type { + AggregatorSetResolutionModeArgs, + AggregatorSetResolutionModeAccounts, +} from "./aggregatorSetResolutionMode.js"; +export { aggregatorSetHistoryBuffer } from "./aggregatorSetHistoryBuffer.js"; +export type { + AggregatorSetHistoryBufferArgs, + AggregatorSetHistoryBufferAccounts, +} from "./aggregatorSetHistoryBuffer.js"; +export { aggregatorSetQueue } from "./aggregatorSetQueue.js"; +export type { + AggregatorSetQueueArgs, + AggregatorSetQueueAccounts, +} from "./aggregatorSetQueue.js"; export { bufferRelayerInit } from "./bufferRelayerInit.js"; export type { - BufferRelayerOpenRoundAccounts, - BufferRelayerOpenRoundArgs, -} from "./bufferRelayerOpenRound.js"; + BufferRelayerInitArgs, + BufferRelayerInitAccounts, +} from "./bufferRelayerInit.js"; export { bufferRelayerOpenRound } from "./bufferRelayerOpenRound.js"; export type { - BufferRelayerSaveResultAccounts, - BufferRelayerSaveResultArgs, -} from "./bufferRelayerSaveResult.js"; + BufferRelayerOpenRoundArgs, + BufferRelayerOpenRoundAccounts, +} from "./bufferRelayerOpenRound.js"; export { bufferRelayerSaveResult } from "./bufferRelayerSaveResult.js"; -export type { CrankInitAccounts, CrankInitArgs } from "./crankInit.js"; -export { crankInit } from "./crankInit.js"; -export type { CrankPopAccounts, CrankPopArgs } from "./crankPop.js"; -export { crankPop } from "./crankPop.js"; -export type { CrankPopV2Accounts, CrankPopV2Args } from "./crankPopV2.js"; -export { crankPopV2 } from "./crankPopV2.js"; -export type { CrankPushAccounts, CrankPushArgs } from "./crankPush.js"; -export { crankPush } from "./crankPush.js"; -export type { JobInitAccounts, JobInitArgs } from "./jobInit.js"; -export { jobInit } from "./jobInit.js"; -export type { JobSetDataAccounts, JobSetDataArgs } from "./jobSetData.js"; -export { jobSetData } from "./jobSetData.js"; -export type { LeaseExtendAccounts, LeaseExtendArgs } from "./leaseExtend.js"; -export { leaseExtend } from "./leaseExtend.js"; -export type { LeaseInitAccounts, LeaseInitArgs } from "./leaseInit.js"; -export { leaseInit } from "./leaseInit.js"; export type { - LeaseSetAuthorityAccounts, - LeaseSetAuthorityArgs, -} from "./leaseSetAuthority.js"; + BufferRelayerSaveResultArgs, + BufferRelayerSaveResultAccounts, +} from "./bufferRelayerSaveResult.js"; +export { crankInit } from "./crankInit.js"; +export type { CrankInitArgs, CrankInitAccounts } from "./crankInit.js"; +export { crankPop } from "./crankPop.js"; +export type { CrankPopArgs, CrankPopAccounts } from "./crankPop.js"; +export { crankPopV2 } from "./crankPopV2.js"; +export type { CrankPopV2Args, CrankPopV2Accounts } from "./crankPopV2.js"; +export { crankPush } from "./crankPush.js"; +export type { CrankPushArgs, CrankPushAccounts } from "./crankPush.js"; +export { jobInit } from "./jobInit.js"; +export type { JobInitArgs, JobInitAccounts } from "./jobInit.js"; +export { jobSetData } from "./jobSetData.js"; +export type { JobSetDataArgs, JobSetDataAccounts } from "./jobSetData.js"; +export { leaseExtend } from "./leaseExtend.js"; +export type { LeaseExtendArgs, LeaseExtendAccounts } from "./leaseExtend.js"; +export { leaseInit } from "./leaseInit.js"; +export type { LeaseInitArgs, LeaseInitAccounts } from "./leaseInit.js"; export { leaseSetAuthority } from "./leaseSetAuthority.js"; export type { - LeaseWithdrawAccounts, - LeaseWithdrawArgs, -} from "./leaseWithdraw.js"; + LeaseSetAuthorityArgs, + LeaseSetAuthorityAccounts, +} from "./leaseSetAuthority.js"; export { leaseWithdraw } from "./leaseWithdraw.js"; export type { - OracleHeartbeatAccounts, - OracleHeartbeatArgs, -} from "./oracleHeartbeat.js"; + LeaseWithdrawArgs, + LeaseWithdrawAccounts, +} from "./leaseWithdraw.js"; export { oracleHeartbeat } from "./oracleHeartbeat.js"; -export type { OracleInitAccounts, OracleInitArgs } from "./oracleInit.js"; -export { oracleInit } from "./oracleInit.js"; export type { - OracleQueueInitAccounts, - OracleQueueInitArgs, -} from "./oracleQueueInit.js"; -export { oracleQueueInit } from "./oracleQueueInit.js"; -export type { - OracleQueueSetConfigAccounts, - OracleQueueSetConfigArgs, -} from "./oracleQueueSetConfig.js"; -export { oracleQueueSetConfig } from "./oracleQueueSetConfig.js"; -export type { - OracleTeeHeartbeatAccounts, - OracleTeeHeartbeatArgs, -} from "./oracleTeeHeartbeat.js"; + OracleHeartbeatArgs, + OracleHeartbeatAccounts, +} from "./oracleHeartbeat.js"; export { oracleTeeHeartbeat } from "./oracleTeeHeartbeat.js"; export type { - OracleWithdrawAccounts, - OracleWithdrawArgs, -} from "./oracleWithdraw.js"; + OracleTeeHeartbeatArgs, + OracleTeeHeartbeatAccounts, +} from "./oracleTeeHeartbeat.js"; +export { oracleInit } from "./oracleInit.js"; +export type { OracleInitArgs, OracleInitAccounts } from "./oracleInit.js"; +export { oracleQueueInit } from "./oracleQueueInit.js"; +export type { + OracleQueueInitArgs, + OracleQueueInitAccounts, +} from "./oracleQueueInit.js"; +export { oracleQueueSetConfig } from "./oracleQueueSetConfig.js"; +export type { + OracleQueueSetConfigArgs, + OracleQueueSetConfigAccounts, +} from "./oracleQueueSetConfig.js"; export { oracleWithdraw } from "./oracleWithdraw.js"; export type { - PermissionInitAccounts, - PermissionInitArgs, -} from "./permissionInit.js"; + OracleWithdrawArgs, + OracleWithdrawAccounts, +} from "./oracleWithdraw.js"; export { permissionInit } from "./permissionInit.js"; export type { - PermissionSetAccounts, - PermissionSetArgs, -} from "./permissionSet.js"; + PermissionInitArgs, + PermissionInitAccounts, +} from "./permissionInit.js"; export { permissionSet } from "./permissionSet.js"; export type { - ProgramConfigAccounts, - ProgramConfigArgs, -} from "./programConfig.js"; + PermissionSetArgs, + PermissionSetAccounts, +} from "./permissionSet.js"; export { programConfig } from "./programConfig.js"; -export type { ProgramInitAccounts, ProgramInitArgs } from "./programInit.js"; -export { programInit } from "./programInit.js"; -export type { SetBumpsAccounts, SetBumpsArgs } from "./setBumps.js"; -export { setBumps } from "./setBumps.js"; export type { - VaultTransferAccounts, - VaultTransferArgs, -} from "./vaultTransfer.js"; + ProgramConfigArgs, + ProgramConfigAccounts, +} from "./programConfig.js"; +export { programInit } from "./programInit.js"; +export type { ProgramInitArgs, ProgramInitAccounts } from "./programInit.js"; export { vaultTransfer } from "./vaultTransfer.js"; export type { - VrfCloseActionAccounts, - VrfCloseActionArgs, -} from "./vrfCloseAction.js"; -export { vrfCloseAction } from "./vrfCloseAction.js"; -export type { VrfInitAccounts, VrfInitArgs } from "./vrfInit.js"; + VaultTransferArgs, + VaultTransferAccounts, +} from "./vaultTransfer.js"; export { vrfInit } from "./vrfInit.js"; +export type { VrfInitArgs, VrfInitAccounts } from "./vrfInit.js"; +export { vrfCloseAction } from "./vrfCloseAction.js"; export type { - VrfLiteCloseActionAccounts, - VrfLiteCloseActionArgs, -} from "./vrfLiteCloseAction.js"; + VrfCloseActionArgs, + VrfCloseActionAccounts, +} from "./vrfCloseAction.js"; export { vrfLiteCloseAction } from "./vrfLiteCloseAction.js"; -export type { VrfLiteInitAccounts, VrfLiteInitArgs } from "./vrfLiteInit.js"; -export { vrfLiteInit } from "./vrfLiteInit.js"; export type { - VrfLiteProveAndVerifyAccounts, - VrfLiteProveAndVerifyArgs, -} from "./vrfLiteProveAndVerify.js"; + VrfLiteCloseActionArgs, + VrfLiteCloseActionAccounts, +} from "./vrfLiteCloseAction.js"; +export { vrfLiteInit } from "./vrfLiteInit.js"; +export type { VrfLiteInitArgs, VrfLiteInitAccounts } from "./vrfLiteInit.js"; export { vrfLiteProveAndVerify } from "./vrfLiteProveAndVerify.js"; export type { - VrfLiteRequestRandomnessAccounts, - VrfLiteRequestRandomnessArgs, -} from "./vrfLiteRequestRandomness.js"; + VrfLiteProveAndVerifyArgs, + VrfLiteProveAndVerifyAccounts, +} from "./vrfLiteProveAndVerify.js"; export { vrfLiteRequestRandomness } from "./vrfLiteRequestRandomness.js"; -export type { VrfPoolAddAccounts, VrfPoolAddArgs } from "./vrfPoolAdd.js"; -export { vrfPoolAdd } from "./vrfPoolAdd.js"; -export type { VrfPoolInitAccounts, VrfPoolInitArgs } from "./vrfPoolInit.js"; -export { vrfPoolInit } from "./vrfPoolInit.js"; export type { - VrfPoolRemoveAccounts, - VrfPoolRemoveArgs, -} from "./vrfPoolRemove.js"; + VrfLiteRequestRandomnessArgs, + VrfLiteRequestRandomnessAccounts, +} from "./vrfLiteRequestRandomness.js"; +export { vrfPoolInit } from "./vrfPoolInit.js"; +export type { VrfPoolInitArgs, VrfPoolInitAccounts } from "./vrfPoolInit.js"; export { vrfPoolRemove } from "./vrfPoolRemove.js"; export type { - VrfPoolRequestAccounts, - VrfPoolRequestArgs, -} from "./vrfPoolRequest.js"; + VrfPoolRemoveArgs, + VrfPoolRemoveAccounts, +} from "./vrfPoolRemove.js"; +export { vrfPoolAdd } from "./vrfPoolAdd.js"; +export type { VrfPoolAddArgs, VrfPoolAddAccounts } from "./vrfPoolAdd.js"; export { vrfPoolRequest } from "./vrfPoolRequest.js"; export type { - VrfProveAndVerifyAccounts, - VrfProveAndVerifyArgs, -} from "./vrfProveAndVerify.js"; + VrfPoolRequestArgs, + VrfPoolRequestAccounts, +} from "./vrfPoolRequest.js"; export { vrfProveAndVerify } from "./vrfProveAndVerify.js"; export type { - VrfRequestRandomnessAccounts, - VrfRequestRandomnessArgs, -} from "./vrfRequestRandomness.js"; + VrfProveAndVerifyArgs, + VrfProveAndVerifyAccounts, +} from "./vrfProveAndVerify.js"; export { vrfRequestRandomness } from "./vrfRequestRandomness.js"; export type { - VrfSetCallbackAccounts, - VrfSetCallbackArgs, -} from "./vrfSetCallback.js"; + VrfRequestRandomnessArgs, + VrfRequestRandomnessAccounts, +} from "./vrfRequestRandomness.js"; export { vrfSetCallback } from "./vrfSetCallback.js"; +export type { + VrfSetCallbackArgs, + VrfSetCallbackAccounts, +} from "./vrfSetCallback.js"; diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/jobInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/jobInit.ts index 050fe76..120d345 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/jobInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/jobInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface JobInitArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([types.JobInitParams.layout("params")]); export function jobInit( program: SwitchboardProgram, args: JobInitArgs, - accounts: JobInitAccounts + accounts: JobInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.job, isSigner: true, isWritable: true }, @@ -44,10 +42,6 @@ export function jobInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/jobSetData.ts b/javascript/solana.js/src/generated/oracle-program/instructions/jobSetData.ts index 5e2b618..bce990e 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/jobSetData.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/jobSetData.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface JobSetDataArgs { @@ -23,7 +20,8 @@ export const layout = borsh.struct([types.JobSetDataParams.layout("params")]); export function jobSetData( program: SwitchboardProgram, args: JobSetDataArgs, - accounts: JobSetDataAccounts + accounts: JobSetDataAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.job, isSigner: false, isWritable: true }, @@ -38,10 +36,6 @@ export function jobSetData( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/leaseExtend.ts b/javascript/solana.js/src/generated/oracle-program/instructions/leaseExtend.ts index 4b91e6a..785610f 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/leaseExtend.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/leaseExtend.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface LeaseExtendArgs { @@ -30,7 +27,8 @@ export const layout = borsh.struct([types.LeaseExtendParams.layout("params")]); export function leaseExtend( program: SwitchboardProgram, args: LeaseExtendArgs, - accounts: LeaseExtendAccounts + accounts: LeaseExtendAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.lease, isSigner: false, isWritable: true }, @@ -52,10 +50,6 @@ export function leaseExtend( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/leaseInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/leaseInit.ts index 8783565..507cdca 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/leaseInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/leaseInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface LeaseInitArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([types.LeaseInitParams.layout("params")]); export function leaseInit( program: SwitchboardProgram, args: LeaseInitArgs, - accounts: LeaseInitAccounts + accounts: LeaseInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.lease, isSigner: false, isWritable: true }, @@ -56,10 +54,6 @@ export function leaseInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/leaseSetAuthority.ts b/javascript/solana.js/src/generated/oracle-program/instructions/leaseSetAuthority.ts index 0550129..cd3d363 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/leaseSetAuthority.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/leaseSetAuthority.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface LeaseSetAuthorityArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function leaseSetAuthority( program: SwitchboardProgram, args: LeaseSetAuthorityArgs, - accounts: LeaseSetAuthorityAccounts + accounts: LeaseSetAuthorityAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.lease, isSigner: false, isWritable: true }, @@ -42,10 +40,6 @@ export function leaseSetAuthority( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/leaseWithdraw.ts b/javascript/solana.js/src/generated/oracle-program/instructions/leaseWithdraw.ts index d35eb92..002850e 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/leaseWithdraw.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/leaseWithdraw.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface LeaseWithdrawArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function leaseWithdraw( program: SwitchboardProgram, args: LeaseWithdrawArgs, - accounts: LeaseWithdrawAccounts + accounts: LeaseWithdrawAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.lease, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function leaseWithdraw( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleHeartbeat.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleHeartbeat.ts index 3867755..55e4b3a 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleHeartbeat.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleHeartbeat.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleHeartbeatArgs { @@ -30,7 +27,8 @@ export const layout = borsh.struct([ export function oracleHeartbeat( program: SwitchboardProgram, args: OracleHeartbeatArgs, - accounts: OracleHeartbeatAccounts + accounts: OracleHeartbeatAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.oracle, isSigner: false, isWritable: true }, @@ -50,10 +48,6 @@ export function oracleHeartbeat( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleInit.ts index e953765..8f114d9 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleInitArgs { @@ -28,7 +25,8 @@ export const layout = borsh.struct([types.OracleInitParams.layout("params")]); export function oracleInit( program: SwitchboardProgram, args: OracleInitArgs, - accounts: OracleInitAccounts + accounts: OracleInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.oracle, isSigner: false, isWritable: true }, @@ -48,10 +46,6 @@ export function oracleInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueInit.ts index 71216b7..ccd95bc 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleQueueInitArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([ export function oracleQueueInit( program: SwitchboardProgram, args: OracleQueueInitArgs, - accounts: OracleQueueInitAccounts + accounts: OracleQueueInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.oracleQueue, isSigner: true, isWritable: true }, @@ -48,10 +46,6 @@ export function oracleQueueInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueSetConfig.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueSetConfig.ts index e121d48..b35ed02 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueSetConfig.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleQueueSetConfig.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleQueueSetConfigArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function oracleQueueSetConfig( program: SwitchboardProgram, args: OracleQueueSetConfigArgs, - accounts: OracleQueueSetConfigAccounts + accounts: OracleQueueSetConfigAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.queue, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function oracleQueueSetConfig( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleTeeHeartbeat.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleTeeHeartbeat.ts index 4f1df26..057856d 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleTeeHeartbeat.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleTeeHeartbeat.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleTeeHeartbeatArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function oracleTeeHeartbeat( program: SwitchboardProgram, args: OracleTeeHeartbeatArgs, - accounts: OracleTeeHeartbeatAccounts + accounts: OracleTeeHeartbeatAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.oracle, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function oracleTeeHeartbeat( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/oracleWithdraw.ts b/javascript/solana.js/src/generated/oracle-program/instructions/oracleWithdraw.ts index fd71ca0..a293f64 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/oracleWithdraw.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/oracleWithdraw.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface OracleWithdrawArgs { @@ -33,7 +30,8 @@ export const layout = borsh.struct([ export function oracleWithdraw( program: SwitchboardProgram, args: OracleWithdrawArgs, - accounts: OracleWithdrawAccounts + accounts: OracleWithdrawAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.oracle, isSigner: false, isWritable: true }, @@ -56,10 +54,6 @@ export function oracleWithdraw( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/permissionInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/permissionInit.ts index 0a38d64..2a4700e 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/permissionInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/permissionInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface PermissionInitArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([ export function permissionInit( program: SwitchboardProgram, args: PermissionInitArgs, - accounts: PermissionInitAccounts + accounts: PermissionInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.permission, isSigner: false, isWritable: true }, @@ -48,10 +46,6 @@ export function permissionInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/permissionSet.ts b/javascript/solana.js/src/generated/oracle-program/instructions/permissionSet.ts index 9e75104..66efe08 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/permissionSet.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/permissionSet.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface PermissionSetArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function permissionSet( program: SwitchboardProgram, args: PermissionSetArgs, - accounts: PermissionSetAccounts + accounts: PermissionSetAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.permission, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function permissionSet( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/programConfig.ts b/javascript/solana.js/src/generated/oracle-program/instructions/programConfig.ts index ed31b7c..8260c25 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/programConfig.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/programConfig.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface ProgramConfigArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function programConfig( program: SwitchboardProgram, args: ProgramConfigArgs, - accounts: ProgramConfigAccounts + accounts: ProgramConfigAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -42,10 +40,6 @@ export function programConfig( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/programInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/programInit.ts index 92dbc85..0cbba74 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/programInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/programInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface ProgramInitArgs { @@ -29,7 +26,8 @@ export const layout = borsh.struct([types.ProgramInitParams.layout("params")]); export function programInit( program: SwitchboardProgram, args: ProgramInitArgs, - accounts: ProgramInitAccounts + accounts: ProgramInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.state, isSigner: false, isWritable: true }, @@ -50,10 +48,6 @@ export function programInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/setBumps.ts b/javascript/solana.js/src/generated/oracle-program/instructions/setBumps.ts index c04019f..15341aa 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/setBumps.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/setBumps.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface SetBumpsArgs { @@ -22,7 +19,8 @@ export const layout = borsh.struct([types.SetBumpsParams.layout("params")]); export function setBumps( program: SwitchboardProgram, args: SetBumpsArgs, - accounts: SetBumpsAccounts + accounts: SetBumpsAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.state, isSigner: false, isWritable: true }, @@ -36,10 +34,6 @@ export function setBumps( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vaultTransfer.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vaultTransfer.ts index ea30c3b..2b381f8 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vaultTransfer.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vaultTransfer.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VaultTransferArgs { @@ -28,7 +25,8 @@ export const layout = borsh.struct([ export function vaultTransfer( program: SwitchboardProgram, args: VaultTransferArgs, - accounts: VaultTransferAccounts + accounts: VaultTransferAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.state, isSigner: false, isWritable: false }, @@ -46,10 +44,6 @@ export function vaultTransfer( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfCloseAction.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfCloseAction.ts index 2e067f2..f1efbbe 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfCloseAction.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfCloseAction.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfCloseActionArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([types.VrfCloseParams.layout("params")]); export function vrfCloseAction( program: SwitchboardProgram, args: VrfCloseActionArgs, - accounts: VrfCloseActionAccounts + accounts: VrfCloseActionAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -54,10 +52,6 @@ export function vrfCloseAction( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfInit.ts index ec81633..19ae42a 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfInitArgs { @@ -27,7 +24,8 @@ export const layout = borsh.struct([types.VrfInitParams.layout("params")]); export function vrfInit( program: SwitchboardProgram, args: VrfInitArgs, - accounts: VrfInitAccounts + accounts: VrfInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.vrf, isSigner: false, isWritable: true }, @@ -46,10 +44,6 @@ export function vrfInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteCloseAction.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteCloseAction.ts index 9bb43d1..d252faf 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteCloseAction.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteCloseAction.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfLiteCloseActionArgs { @@ -31,7 +28,8 @@ export const layout = borsh.struct([types.VrfLiteCloseParams.layout("params")]); export function vrfLiteCloseAction( program: SwitchboardProgram, args: VrfLiteCloseActionArgs, - accounts: VrfLiteCloseActionAccounts + accounts: VrfLiteCloseActionAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -54,10 +52,6 @@ export function vrfLiteCloseAction( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteInit.ts index 75c8ae8..51361aa 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfLiteInitArgs { @@ -34,7 +31,8 @@ export const layout = borsh.struct([types.VrfLiteInitParams.layout("params")]); export function vrfLiteInit( program: SwitchboardProgram, args: VrfLiteInitArgs, - accounts: VrfLiteInitAccounts + accounts: VrfLiteInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: false, isWritable: false }, @@ -64,10 +62,6 @@ export function vrfLiteInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteProveAndVerify.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteProveAndVerify.ts index 6a4bb72..1d443b6 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteProveAndVerify.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteProveAndVerify.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfLiteProveAndVerifyArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function vrfLiteProveAndVerify( program: SwitchboardProgram, args: VrfLiteProveAndVerifyArgs, - accounts: VrfLiteProveAndVerifyAccounts + accounts: VrfLiteProveAndVerifyAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.vrfLite, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function vrfLiteProveAndVerify( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteRequestRandomness.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteRequestRandomness.ts index 4750c87..1e36d25 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteRequestRandomness.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfLiteRequestRandomness.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfLiteRequestRandomnessArgs { @@ -33,7 +30,8 @@ export const layout = borsh.struct([ export function vrfLiteRequestRandomness( program: SwitchboardProgram, args: VrfLiteRequestRandomnessArgs, - accounts: VrfLiteRequestRandomnessAccounts + accounts: VrfLiteRequestRandomnessAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -56,10 +54,6 @@ export function vrfLiteRequestRandomness( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolAdd.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolAdd.ts index 390fd38..324401d 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolAdd.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolAdd.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfPoolAddArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([types.VrfPoolAddParams.layout("params")]); export function vrfPoolAdd( program: SwitchboardProgram, args: VrfPoolAddArgs, - accounts: VrfPoolAddAccounts + accounts: VrfPoolAddAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: false, isWritable: false }, @@ -44,10 +42,6 @@ export function vrfPoolAdd( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolInit.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolInit.ts index 297cc98..3c175dd 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolInit.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolInit.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfPoolInitArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([types.VrfPoolInitParams.layout("params")]); export function vrfPoolInit( program: SwitchboardProgram, args: VrfPoolInitArgs, - accounts: VrfPoolInitAccounts + accounts: VrfPoolInitAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: false, isWritable: false }, @@ -60,10 +58,6 @@ export function vrfPoolInit( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRemove.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRemove.ts index d78e7ee..a51d3b8 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRemove.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRemove.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfPoolRemoveArgs { @@ -26,7 +23,8 @@ export const layout = borsh.struct([ export function vrfPoolRemove( program: SwitchboardProgram, args: VrfPoolRemoveArgs, - accounts: VrfPoolRemoveAccounts + accounts: VrfPoolRemoveAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -42,10 +40,6 @@ export function vrfPoolRemove( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRequest.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRequest.ts index efc4efb..79440b2 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRequest.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfPoolRequest.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfPoolRequestArgs { @@ -33,7 +30,8 @@ export const layout = borsh.struct([ export function vrfPoolRequest( program: SwitchboardProgram, args: VrfPoolRequestArgs, - accounts: VrfPoolRequestAccounts + accounts: VrfPoolRequestAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -56,10 +54,6 @@ export function vrfPoolRequest( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfProveAndVerify.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfProveAndVerify.ts index 4d8fb97..58f61f7 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfProveAndVerify.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfProveAndVerify.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfProveAndVerifyArgs { @@ -32,7 +29,8 @@ export const layout = borsh.struct([ export function vrfProveAndVerify( program: SwitchboardProgram, args: VrfProveAndVerifyArgs, - accounts: VrfProveAndVerifyAccounts + accounts: VrfProveAndVerifyAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.vrf, isSigner: false, isWritable: true }, @@ -54,10 +52,6 @@ export function vrfProveAndVerify( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfRequestRandomness.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfRequestRandomness.ts index 86747ca..ce01b1f 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfRequestRandomness.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfRequestRandomness.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfRequestRandomnessArgs { @@ -35,7 +32,8 @@ export const layout = borsh.struct([ export function vrfRequestRandomness( program: SwitchboardProgram, args: VrfRequestRandomnessArgs, - accounts: VrfRequestRandomnessAccounts + accounts: VrfRequestRandomnessAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.authority, isSigner: true, isWritable: false }, @@ -60,10 +58,6 @@ export function vrfRequestRandomness( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/instructions/vrfSetCallback.ts b/javascript/solana.js/src/generated/oracle-program/instructions/vrfSetCallback.ts index 68e7f11..11538e3 100644 --- a/javascript/solana.js/src/generated/oracle-program/instructions/vrfSetCallback.ts +++ b/javascript/solana.js/src/generated/oracle-program/instructions/vrfSetCallback.ts @@ -1,12 +1,9 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; +import type { SwitchboardProgram } from "../../../SwitchboardProgram.js"; import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { - AccountMeta, - PublicKey, - TransactionInstruction, -} from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type { AccountMeta, PublicKey } from "@solana/web3.js"; +import { TransactionInstruction } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars export interface VrfSetCallbackArgs { @@ -25,7 +22,8 @@ export const layout = borsh.struct([ export function vrfSetCallback( program: SwitchboardProgram, args: VrfSetCallbackArgs, - accounts: VrfSetCallbackAccounts + accounts: VrfSetCallbackAccounts, + programId: PublicKey = program.programId ) { const keys: Array = [ { pubkey: accounts.vrf, isSigner: false, isWritable: true }, @@ -40,10 +38,6 @@ export function vrfSetCallback( buffer ); const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len); - const ix = new TransactionInstruction({ - keys, - programId: program.programId, - data, - }); + const ix = new TransactionInstruction({ keys, programId, data }); return ix; } diff --git a/javascript/solana.js/src/generated/oracle-program/types/AccountMetaBorsh.ts b/javascript/solana.js/src/generated/oracle-program/types/AccountMetaBorsh.ts index 89b7228..dfdd3e8 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AccountMetaBorsh.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AccountMetaBorsh.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AccountMetaBorshFields { pubkey: PublicKey; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AccountMetaZC.ts b/javascript/solana.js/src/generated/oracle-program/types/AccountMetaZC.ts index 06485e4..5b56709 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AccountMetaZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AccountMetaZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AccountMetaZCFields { pubkey: PublicKey; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorAddJobParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorAddJobParams.ts index c644294..f46be09 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorAddJobParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorAddJobParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorAddJobParamsFields { weight: number | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorCloseParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorCloseParams.ts index 0804d33..e6f9e7a 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorCloseParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorCloseParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorHistoryRow.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorHistoryRow.ts index 0d153f9..91bcb6a 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorHistoryRow.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorHistoryRow.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorHistoryRowFields { /** The timestamp of the sample. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorInitParams.ts index e0cff7e..9e9785e 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorInitParamsFields { name: Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorLockParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorLockParams.ts index 9219dcf..5c86787 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorLockParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorLockParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorLockParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorOpenRoundParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorOpenRoundParams.ts index 62988d1..7217cc7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorOpenRoundParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorOpenRoundParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorOpenRoundParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorRemoveJobParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorRemoveJobParams.ts index 0723739..be650bd 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorRemoveJobParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorRemoveJobParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorRemoveJobParamsFields { jobIdx: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorResolutionMode.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorResolutionMode.ts index 7a6c352..548ce8b 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorResolutionMode.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorResolutionMode.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface ModeRoundResolutionJSON { kind: "ModeRoundResolution"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorRound.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorRound.ts index b2d3105..e01124e 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorRound.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorRound.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorRoundFields { /** diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParams.ts index 5a349b3..b7d8857 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSaveResultParamsFields { oracleIdx: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParamsV2.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParamsV2.ts index f5c650d..0eb5b57 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParamsV2.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSaveResultParamsV2.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSaveResultParamsV2Fields { oracleIdx: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetAuthorityParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetAuthorityParams.ts index f276e61..e6b3d08 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetAuthorityParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetAuthorityParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetAuthorityParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetBatchSizeParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetBatchSizeParams.ts index 0bb8c81..e650c65 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetBatchSizeParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetBatchSizeParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetBatchSizeParamsFields { batchSize: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetConfigParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetConfigParams.ts index fa6626e..cac734b 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetConfigParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetConfigParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetConfigParamsFields { name: Array | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetForceReportPeriodParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetForceReportPeriodParams.ts index 66fafde..90774d7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetForceReportPeriodParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetForceReportPeriodParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetForceReportPeriodParamsFields { forceReportPeriod: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetHistoryBufferParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetHistoryBufferParams.ts index fbbd474..db76133 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetHistoryBufferParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetHistoryBufferParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetHistoryBufferParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinJobsParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinJobsParams.ts index e4a59da..186818f 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinJobsParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinJobsParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetMinJobsParamsFields { minJobResults: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinOraclesParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinOraclesParams.ts index 94879d9..27f0b71 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinOraclesParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetMinOraclesParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetMinOraclesParamsFields { minOracleResults: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetQueueParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetQueueParams.ts index ae72dec..094f2bb 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetQueueParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetQueueParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetQueueParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetResolutionModeParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetResolutionModeParams.ts index 2966f99..e0a9ad2 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetResolutionModeParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetResolutionModeParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetResolutionModeParamsFields { mode: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetUpdateIntervalParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetUpdateIntervalParams.ts index 83d35d2..c13906c 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetUpdateIntervalParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetUpdateIntervalParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetUpdateIntervalParamsFields { newInterval: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetVarianceThresholdParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetVarianceThresholdParams.ts index edab863..5eaf486 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetVarianceThresholdParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorSetVarianceThresholdParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorSetVarianceThresholdParamsFields { varianceThreshold: types.BorshDecimalFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/AggregatorTeeSaveResultParams.ts b/javascript/solana.js/src/generated/oracle-program/types/AggregatorTeeSaveResultParams.ts index 042b309..1af7943 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/AggregatorTeeSaveResultParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/AggregatorTeeSaveResultParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AggregatorTeeSaveResultParamsFields { value: types.BorshDecimalFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/BorshDecimal.ts b/javascript/solana.js/src/generated/oracle-program/types/BorshDecimal.ts index 4858157..15e4179 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/BorshDecimal.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/BorshDecimal.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface BorshDecimalFields { mantissa: BN; diff --git a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerInitParams.ts index 284417d..a2d6bf0 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface BufferRelayerInitParamsFields { name: Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerOpenRoundParams.ts b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerOpenRoundParams.ts index 27e874c..470c481 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerOpenRoundParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerOpenRoundParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface BufferRelayerOpenRoundParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerRound.ts b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerRound.ts index 0a96afc..13db6bb 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerRound.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerRound.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface BufferRelayerRoundFields { /** Number of successful responses. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerSaveResultParams.ts b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerSaveResultParams.ts index 19fb668..e495d58 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerSaveResultParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/BufferRelayerSaveResultParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface BufferRelayerSaveResultParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/Callback.ts b/javascript/solana.js/src/generated/oracle-program/types/Callback.ts index bceb780..b5dce3c 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Callback.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Callback.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CallbackFields { programId: PublicKey; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CallbackZC.ts b/javascript/solana.js/src/generated/oracle-program/types/CallbackZC.ts index aeca856..d4e8074 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CallbackZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CallbackZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CallbackZCFields { /** The program ID of the callback program being invoked. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/CompletedPointZC.ts b/javascript/solana.js/src/generated/oracle-program/types/CompletedPointZC.ts index 81ff3a7..b1859e2 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CompletedPointZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CompletedPointZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CompletedPointZCFields { x: types.FieldElementZCFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CrankInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/CrankInitParams.ts index e0aa80a..2433616 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CrankInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CrankInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CrankInitParamsFields { name: Uint8Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CrankPopParams.ts b/javascript/solana.js/src/generated/oracle-program/types/CrankPopParams.ts index 10e1a49..d933a1c 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CrankPopParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CrankPopParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CrankPopParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CrankPopParamsV2.ts b/javascript/solana.js/src/generated/oracle-program/types/CrankPopParamsV2.ts index 2475f2d..800946f 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CrankPopParamsV2.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CrankPopParamsV2.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CrankPopParamsV2Fields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CrankPushParams.ts b/javascript/solana.js/src/generated/oracle-program/types/CrankPushParams.ts index bdc229b..1b37689 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CrankPushParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CrankPushParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CrankPushParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/CrankRow.ts b/javascript/solana.js/src/generated/oracle-program/types/CrankRow.ts index 8f76171..cf05bc9 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/CrankRow.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/CrankRow.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface CrankRowFields { /** The PublicKey of the AggregatorAccountData. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/EcvrfIntermediate.ts b/javascript/solana.js/src/generated/oracle-program/types/EcvrfIntermediate.ts index 10f8479..1d84e4f 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/EcvrfIntermediate.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/EcvrfIntermediate.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface EcvrfIntermediateFields { r: types.FieldElementZCFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/EcvrfProofZC.ts b/javascript/solana.js/src/generated/oracle-program/types/EcvrfProofZC.ts index 2689754..ebcc15b 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/EcvrfProofZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/EcvrfProofZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface EcvrfProofZCFields { gamma: types.EdwardsPointZCFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/EdwardsPointZC.ts b/javascript/solana.js/src/generated/oracle-program/types/EdwardsPointZC.ts index 7f778da..9df0769 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/EdwardsPointZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/EdwardsPointZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface EdwardsPointZCFields { x: types.FieldElementZCFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/EnclaveAccountData.ts b/javascript/solana.js/src/generated/oracle-program/types/EnclaveAccountData.ts deleted file mode 100644 index 0932489..0000000 --- a/javascript/solana.js/src/generated/oracle-program/types/EnclaveAccountData.ts +++ /dev/null @@ -1,261 +0,0 @@ -import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; -import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars -import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars - -export interface EnclaveAccountDataFields { - /** The address of the signer generated within an enclave. */ - enclaveSigner: PublicKey; - /** The authority of the EnclaveAccount which is permitted to make account changes. */ - authority: PublicKey; - /** Queue used for attestation to verify a MRENCLAVE measurement. */ - attestationQueue: PublicKey; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - mrEnclave: Array; - /** The VerificationStatus of the quote. */ - verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - verificationTimestamp: BN; - /** The unix timestamp when the quotes verification status expires. */ - validUntil: BN; - /** The unix timestamp when the quote was created. */ - createdAt: BN; - /** The off-chain registry where the verifiers quote can be located. */ - quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - registryKey: Array; - /** Whether the quote is located on the AttestationQueues buffer. */ - isOnQueue: boolean; - /** The last time the quote heartbeated on-chain. */ - lastHeartbeat: BN; - /** The PDA bump. Only set for FunctionAccount quotes. */ - bump: number; - /** - * 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. - */ - rewardEscrow: PublicKey; - /** - * 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. - */ - stakeWallet: PublicKey; - /** Reserved. */ - ebuf: Array; -} - -export interface EnclaveAccountDataJSON { - /** The address of the signer generated within an enclave. */ - enclaveSigner: string; - /** The authority of the EnclaveAccount which is permitted to make account changes. */ - authority: string; - /** Queue used for attestation to verify a MRENCLAVE measurement. */ - attestationQueue: string; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - mrEnclave: Array; - /** The VerificationStatus of the quote. */ - verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - verificationTimestamp: string; - /** The unix timestamp when the quotes verification status expires. */ - validUntil: string; - /** The unix timestamp when the quote was created. */ - createdAt: string; - /** The off-chain registry where the verifiers quote can be located. */ - quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - registryKey: Array; - /** Whether the quote is located on the AttestationQueues buffer. */ - isOnQueue: boolean; - /** The last time the quote heartbeated on-chain. */ - lastHeartbeat: string; - /** The PDA bump. Only set for FunctionAccount quotes. */ - bump: number; - /** - * 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. - */ - rewardEscrow: string; - /** - * 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. - */ - stakeWallet: string; - /** Reserved. */ - ebuf: Array; -} - -export class EnclaveAccountData { - /** The address of the signer generated within an enclave. */ - readonly enclaveSigner: PublicKey; - /** The authority of the EnclaveAccount which is permitted to make account changes. */ - readonly authority: PublicKey; - /** Queue used for attestation to verify a MRENCLAVE measurement. */ - readonly attestationQueue: PublicKey; - /** The quotes MRENCLAVE measurement dictating the contents of the secure enclave. */ - readonly mrEnclave: Array; - /** The VerificationStatus of the quote. */ - readonly verificationStatus: number; - /** The unix timestamp when the quote was last verified. */ - readonly verificationTimestamp: BN; - /** The unix timestamp when the quotes verification status expires. */ - readonly validUntil: BN; - /** The unix timestamp when the quote was created. */ - readonly createdAt: BN; - /** The off-chain registry where the verifiers quote can be located. */ - readonly quoteRegistry: Array; - /** Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. */ - readonly registryKey: Array; - /** Whether the quote is located on the AttestationQueues buffer. */ - readonly isOnQueue: boolean; - /** The last time the quote heartbeated on-chain. */ - readonly lastHeartbeat: BN; - /** The PDA bump. Only set for FunctionAccount quotes. */ - readonly bump: number; - /** - * 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. - */ - readonly rewardEscrow: PublicKey; - /** - * 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. - */ - readonly stakeWallet: PublicKey; - /** Reserved. */ - readonly ebuf: Array; - - constructor(fields: EnclaveAccountDataFields) { - this.enclaveSigner = fields.enclaveSigner; - this.authority = fields.authority; - this.attestationQueue = fields.attestationQueue; - this.mrEnclave = fields.mrEnclave; - this.verificationStatus = fields.verificationStatus; - this.verificationTimestamp = fields.verificationTimestamp; - this.validUntil = fields.validUntil; - this.createdAt = fields.createdAt; - this.quoteRegistry = fields.quoteRegistry; - this.registryKey = fields.registryKey; - this.isOnQueue = fields.isOnQueue; - this.lastHeartbeat = fields.lastHeartbeat; - this.bump = fields.bump; - this.rewardEscrow = fields.rewardEscrow; - this.stakeWallet = fields.stakeWallet; - this.ebuf = fields.ebuf; - } - - static layout(property?: string) { - return borsh.struct( - [ - borsh.publicKey("enclaveSigner"), - borsh.publicKey("authority"), - borsh.publicKey("attestationQueue"), - borsh.array(borsh.u8(), 32, "mrEnclave"), - borsh.u8("verificationStatus"), - borsh.i64("verificationTimestamp"), - borsh.i64("validUntil"), - borsh.i64("createdAt"), - borsh.array(borsh.u8(), 32, "quoteRegistry"), - borsh.array(borsh.u8(), 64, "registryKey"), - borsh.bool("isOnQueue"), - borsh.i64("lastHeartbeat"), - borsh.u8("bump"), - borsh.publicKey("rewardEscrow"), - borsh.publicKey("stakeWallet"), - borsh.array(borsh.u8(), 928, "ebuf"), - ], - property - ); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - static fromDecoded(obj: any) { - return new EnclaveAccountData({ - enclaveSigner: obj.enclaveSigner, - authority: obj.authority, - attestationQueue: obj.attestationQueue, - mrEnclave: obj.mrEnclave, - verificationStatus: obj.verificationStatus, - verificationTimestamp: obj.verificationTimestamp, - validUntil: obj.validUntil, - createdAt: obj.createdAt, - quoteRegistry: obj.quoteRegistry, - registryKey: obj.registryKey, - isOnQueue: obj.isOnQueue, - lastHeartbeat: obj.lastHeartbeat, - bump: obj.bump, - rewardEscrow: obj.rewardEscrow, - stakeWallet: obj.stakeWallet, - ebuf: obj.ebuf, - }); - } - - static toEncodable(fields: EnclaveAccountDataFields) { - return { - enclaveSigner: fields.enclaveSigner, - authority: fields.authority, - attestationQueue: fields.attestationQueue, - mrEnclave: fields.mrEnclave, - verificationStatus: fields.verificationStatus, - verificationTimestamp: fields.verificationTimestamp, - validUntil: fields.validUntil, - createdAt: fields.createdAt, - quoteRegistry: fields.quoteRegistry, - registryKey: fields.registryKey, - isOnQueue: fields.isOnQueue, - lastHeartbeat: fields.lastHeartbeat, - bump: fields.bump, - rewardEscrow: fields.rewardEscrow, - stakeWallet: fields.stakeWallet, - ebuf: fields.ebuf, - }; - } - - toJSON(): EnclaveAccountDataJSON { - return { - enclaveSigner: this.enclaveSigner.toString(), - authority: this.authority.toString(), - attestationQueue: this.attestationQueue.toString(), - mrEnclave: this.mrEnclave, - verificationStatus: this.verificationStatus, - verificationTimestamp: this.verificationTimestamp.toString(), - validUntil: this.validUntil.toString(), - createdAt: this.createdAt.toString(), - quoteRegistry: this.quoteRegistry, - registryKey: this.registryKey, - isOnQueue: this.isOnQueue, - lastHeartbeat: this.lastHeartbeat.toString(), - bump: this.bump, - rewardEscrow: this.rewardEscrow.toString(), - stakeWallet: this.stakeWallet.toString(), - ebuf: this.ebuf, - }; - } - - static fromJSON(obj: EnclaveAccountDataJSON): EnclaveAccountData { - return new EnclaveAccountData({ - enclaveSigner: new PublicKey(obj.enclaveSigner), - authority: new PublicKey(obj.authority), - attestationQueue: new PublicKey(obj.attestationQueue), - mrEnclave: obj.mrEnclave, - verificationStatus: obj.verificationStatus, - verificationTimestamp: new BN(obj.verificationTimestamp), - validUntil: new BN(obj.validUntil), - createdAt: new BN(obj.createdAt), - quoteRegistry: obj.quoteRegistry, - registryKey: obj.registryKey, - isOnQueue: obj.isOnQueue, - lastHeartbeat: new BN(obj.lastHeartbeat), - bump: obj.bump, - rewardEscrow: new PublicKey(obj.rewardEscrow), - stakeWallet: new PublicKey(obj.stakeWallet), - ebuf: obj.ebuf, - }); - } - - toEncodable() { - return EnclaveAccountData.toEncodable(this); - } -} diff --git a/javascript/solana.js/src/generated/oracle-program/types/Error.ts b/javascript/solana.js/src/generated/oracle-program/types/Error.ts index f150b4b..bcf73cb 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Error.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Error.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface InvalidPublicKeyJSON { kind: "InvalidPublicKey"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/FieldElementZC.ts b/javascript/solana.js/src/generated/oracle-program/types/FieldElementZC.ts index db30683..0a5756a 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/FieldElementZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/FieldElementZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface FieldElementZCFields { bytes: Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/Hash.ts b/javascript/solana.js/src/generated/oracle-program/types/Hash.ts index 5e0632a..82fc5b7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Hash.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Hash.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface HashFields { /** The bytes used to derive the hash. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/JobInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/JobInitParams.ts index 00f1a3e..a452b88 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/JobInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/JobInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface JobInitParamsFields { name: Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/JobSetDataParams.ts b/javascript/solana.js/src/generated/oracle-program/types/JobSetDataParams.ts index da7de45..91b59dd 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/JobSetDataParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/JobSetDataParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface JobSetDataParamsFields { data: Uint8Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/Lanes.ts b/javascript/solana.js/src/generated/oracle-program/types/Lanes.ts index 4060516..686caf7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Lanes.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Lanes.ts @@ -1,4 +1,4 @@ -import * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/LeaseExtendParams.ts b/javascript/solana.js/src/generated/oracle-program/types/LeaseExtendParams.ts index 041031c..f474623 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/LeaseExtendParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/LeaseExtendParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface LeaseExtendParamsFields { loadAmount: BN; diff --git a/javascript/solana.js/src/generated/oracle-program/types/LeaseInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/LeaseInitParams.ts index 42e875d..b63f9c7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/LeaseInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/LeaseInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface LeaseInitParamsFields { loadAmount: BN; diff --git a/javascript/solana.js/src/generated/oracle-program/types/LeaseSetAuthorityParams.ts b/javascript/solana.js/src/generated/oracle-program/types/LeaseSetAuthorityParams.ts index 9c9428a..af6e7ea 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/LeaseSetAuthorityParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/LeaseSetAuthorityParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface LeaseSetAuthorityParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/LeaseWithdrawParams.ts b/javascript/solana.js/src/generated/oracle-program/types/LeaseWithdrawParams.ts index f9253e4..5e9a801 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/LeaseWithdrawParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/LeaseWithdrawParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface LeaseWithdrawParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleHeartbeatParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleHeartbeatParams.ts index c49640b..884d3ee 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleHeartbeatParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleHeartbeatParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleHeartbeatParamsFields { permissionBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleInitParams.ts index 6a8b541..97e5eb8 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleInitParamsFields { name: Uint8Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleMetrics.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleMetrics.ts index c996125..7139578 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleMetrics.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleMetrics.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleMetricsFields { /** Number of consecutive successful update request. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueInitParams.ts index 0e7f5af..a50cf90 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleQueueInitParamsFields { name: Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetConfigParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetConfigParams.ts index b99ae7a..f041fc6 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetConfigParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetConfigParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleQueueSetConfigParamsFields { name: Array | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetRewardsParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetRewardsParams.ts index f3a2330..6eb8246 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetRewardsParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleQueueSetRewardsParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleQueueSetRewardsParamsFields { rewards: BN; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleResponseType.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleResponseType.ts index 0d3c001..0690d64 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleResponseType.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleResponseType.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface TypeSuccessJSON { kind: "TypeSuccess"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleTeeHeartbeatParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleTeeHeartbeatParams.ts index 2be1ea4..e55c4e3 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleTeeHeartbeatParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleTeeHeartbeatParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleTeeHeartbeatParamsFields { permissionBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/OracleWithdrawParams.ts b/javascript/solana.js/src/generated/oracle-program/types/OracleWithdrawParams.ts index 7a5fc67..9857840 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/OracleWithdrawParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/OracleWithdrawParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface OracleWithdrawParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/PermissionInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/PermissionInitParams.ts index 5570986..24091c1 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/PermissionInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/PermissionInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface PermissionInitParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/PermissionSetParams.ts b/javascript/solana.js/src/generated/oracle-program/types/PermissionSetParams.ts index 3d50be2..f0ebe1a 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/PermissionSetParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/PermissionSetParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface PermissionSetParamsFields { permission: types.SwitchboardPermissionKind; diff --git a/javascript/solana.js/src/generated/oracle-program/types/ProgramConfigParams.ts b/javascript/solana.js/src/generated/oracle-program/types/ProgramConfigParams.ts index c25eb14..5b516e0 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/ProgramConfigParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/ProgramConfigParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface ProgramConfigParamsFields { token: PublicKey; diff --git a/javascript/solana.js/src/generated/oracle-program/types/ProgramInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/ProgramInitParams.ts index 2f83c57..16a9a81 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/ProgramInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/ProgramInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface ProgramInitParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/ProjectivePointZC.ts b/javascript/solana.js/src/generated/oracle-program/types/ProjectivePointZC.ts index 9218298..9d0f8f2 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/ProjectivePointZC.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/ProjectivePointZC.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface ProjectivePointZCFields { x: types.FieldElementZCFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/Scalar.ts b/javascript/solana.js/src/generated/oracle-program/types/Scalar.ts index b2b4388..db10a71 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Scalar.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Scalar.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface ScalarFields { /** diff --git a/javascript/solana.js/src/generated/oracle-program/types/SetBumpsParams.ts b/javascript/solana.js/src/generated/oracle-program/types/SetBumpsParams.ts index bd2d974..e2fc735 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/SetBumpsParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/SetBumpsParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface SetBumpsParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/Shuffle.ts b/javascript/solana.js/src/generated/oracle-program/types/Shuffle.ts index f2b1102..0ca14f2 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/Shuffle.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/Shuffle.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface AAAAJSON { kind: "AAAA"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/SlidingWindowElement.ts b/javascript/solana.js/src/generated/oracle-program/types/SlidingWindowElement.ts index f69a543..9e639e4 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/SlidingWindowElement.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/SlidingWindowElement.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface SlidingWindowElementFields { oracleKey: PublicKey; diff --git a/javascript/solana.js/src/generated/oracle-program/types/SwitchboardPermission.ts b/javascript/solana.js/src/generated/oracle-program/types/SwitchboardPermission.ts index 864fc53..eb98e2c 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/SwitchboardPermission.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/SwitchboardPermission.ts @@ -1,4 +1,4 @@ -import * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import type * as types from "./index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import * as borsh from "@coral-xyz/borsh"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VaultTransferParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VaultTransferParams.ts index 39b42c6..8e34451 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VaultTransferParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VaultTransferParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VaultTransferParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfBuilder.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfBuilder.ts index 1f44d2d..c2b9573 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfBuilder.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfBuilder.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfBuilderFields { /** The OracleAccountData that is producing the randomness. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfCloseParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfCloseParams.ts index 447bf03..e0a99c3 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfCloseParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfCloseParamsFields { stateBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfInitParams.ts index ae8c6e3..0d96fb9 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfInitParamsFields { callback: types.CallbackFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteCloseParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteCloseParams.ts index 1a4c2f1..e4220b8 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteCloseParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteCloseParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfLiteCloseParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteInitParams.ts index c427930..39ac856 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfLiteInitParamsFields { callback: types.CallbackFields | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteProveAndVerifyParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteProveAndVerifyParams.ts index 353eecd..ed5742e 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteProveAndVerifyParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteProveAndVerifyParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfLiteProveAndVerifyParamsFields { nonce: number | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteRequestRandomnessParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteRequestRandomnessParams.ts index bda32ef..26e1aa7 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfLiteRequestRandomnessParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfLiteRequestRandomnessParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfLiteRequestRandomnessParamsFields { callback: types.CallbackFields | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolAddParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolAddParams.ts index 298c613..e2693ac 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolAddParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolAddParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfPoolAddParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolInitParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolInitParams.ts index 78ad451..f962f7e 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolInitParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolInitParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfPoolInitParamsFields { maxRows: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRemoveParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRemoveParams.ts index c454fef..fcf7184 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRemoveParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRemoveParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfPoolRemoveParamsFields {} diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRequestParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRequestParams.ts index 42cdc3a..e7d1586 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRequestParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRequestParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfPoolRequestParamsFields { callback: types.CallbackFields | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRow.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRow.ts index e082292..a2bddee 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRow.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfPoolRow.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfPoolRowFields { timestamp: BN; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfProveAndVerifyParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfProveAndVerifyParams.ts index 1738744..82d46f0 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfProveAndVerifyParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfProveAndVerifyParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfProveAndVerifyParamsFields { nonce: number | null; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfProveParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfProveParams.ts index b0bfb21..814466a 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfProveParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfProveParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfProveParamsFields { proof: Uint8Array; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfRequestRandomnessParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfRequestRandomnessParams.ts index 0fdd0e3..26ead6b 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfRequestRandomnessParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfRequestRandomnessParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfRequestRandomnessParamsFields { permissionBump: number; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfRound.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfRound.ts index 9022c19..10aab1b 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfRound.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfRound.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfRoundFields { /** The alpha bytes used to calculate the VRF proof. */ diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfSetCallbackParams.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfSetCallbackParams.ts index f0ad0ff..1cfcdfa 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfSetCallbackParams.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfSetCallbackParams.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface VrfSetCallbackParamsFields { callback: types.CallbackFields; diff --git a/javascript/solana.js/src/generated/oracle-program/types/VrfStatus.ts b/javascript/solana.js/src/generated/oracle-program/types/VrfStatus.ts index 62e5ca4..741a952 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/VrfStatus.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/VrfStatus.ts @@ -1,9 +1,8 @@ import { SwitchboardProgram } from "../../../SwitchboardProgram.js"; -import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars - -import * as borsh from "@coral-xyz/borsh"; import { PublicKey } from "@solana/web3.js"; // eslint-disable-line @typescript-eslint/no-unused-vars import { BN } from "@switchboard-xyz/common"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as types from "../types/index.js"; // eslint-disable-line @typescript-eslint/no-unused-vars +import * as borsh from "@coral-xyz/borsh"; export interface StatusNoneJSON { kind: "StatusNone"; diff --git a/javascript/solana.js/src/generated/oracle-program/types/index.ts b/javascript/solana.js/src/generated/oracle-program/types/index.ts index d7c4d4c..8138dda 100644 --- a/javascript/solana.js/src/generated/oracle-program/types/index.ts +++ b/javascript/solana.js/src/generated/oracle-program/types/index.ts @@ -1,11 +1,10 @@ import * as AggregatorResolutionMode from "./AggregatorResolutionMode.js"; import * as Error from "./Error.js"; -import * as Lanes from "./Lanes.js"; +import type * as Lanes from "./Lanes.js"; import * as OracleResponseType from "./OracleResponseType.js"; import * as Shuffle from "./Shuffle.js"; import * as SwitchboardPermission from "./SwitchboardPermission.js"; import * as VrfStatus from "./VrfStatus.js"; - export type { AccountMetaBorshFields, AccountMetaBorshJSON, @@ -391,7 +390,6 @@ export type { VrfSetCallbackParamsJSON, } from "./VrfSetCallbackParams.js"; export { VrfSetCallbackParams } from "./VrfSetCallbackParams.js"; - /** * The `Lanes` enum represents a subset of the lanes `A,B,C,D` of a * `FieldElement2625x4`. @@ -409,7 +407,6 @@ export type LanesJSON = | Lanes.ADJSON; export { Shuffle }; - /** * The `Shuffle` enum represents a shuffle of a `FieldElement2625x4`. * @@ -439,9 +436,7 @@ export type ShuffleJSON = | Shuffle.BADCJSON | Shuffle.BACDJSON | Shuffle.ABDCJSON; - export { Error }; - export type ErrorKind = | Error.InvalidPublicKey | Error.SerializationError @@ -452,18 +447,14 @@ export type ErrorJSON = | Error.SerializationErrorJSON | Error.DeserializationErrorJSON | Error.InvalidDataErrorJSON; - export { AggregatorResolutionMode }; - export type AggregatorResolutionModeKind = | AggregatorResolutionMode.ModeRoundResolution | AggregatorResolutionMode.ModeSlidingResolution; export type AggregatorResolutionModeJSON = | AggregatorResolutionMode.ModeRoundResolutionJSON | AggregatorResolutionMode.ModeSlidingResolutionJSON; - export { SwitchboardPermission }; - export type SwitchboardPermissionKind = | SwitchboardPermission.PermitNone | SwitchboardPermission.PermitOracleHeartbeat @@ -474,9 +465,7 @@ export type SwitchboardPermissionJSON = | SwitchboardPermission.PermitOracleHeartbeatJSON | SwitchboardPermission.PermitOracleQueueUsageJSON | SwitchboardPermission.PermitVrfRequestsJSON; - export { OracleResponseType }; - export type OracleResponseTypeKind = | OracleResponseType.TypeSuccess | OracleResponseType.TypeError @@ -487,9 +476,7 @@ export type OracleResponseTypeJSON = | OracleResponseType.TypeErrorJSON | OracleResponseType.TypeDisagreementJSON | OracleResponseType.TypeNoResponseJSON; - export { VrfStatus }; - export type VrfStatusKind = | VrfStatus.StatusNone | VrfStatus.StatusRequesting diff --git a/javascript/solana.js/src/mint.ts b/javascript/solana.js/src/mint.ts index aafe323..32e78c3 100644 --- a/javascript/solana.js/src/mint.ts +++ b/javascript/solana.js/src/mint.ts @@ -2,15 +2,13 @@ import { SwitchboardDecimal } from "./generated/index.js"; import { InsufficientFundsError, NativeMintOnlyError } from "./errors.js"; import { TransactionObject } from "./TransactionObject.js"; -import * as anchor from "@coral-xyz/anchor"; +import type * as anchor from "@coral-xyz/anchor"; import * as spl from "@solana/spl-token"; -import { - Keypair, - PublicKey, - SystemProgram, +import type { TransactionInstruction, TransactionSignature, } from "@solana/web3.js"; +import { Keypair, PublicKey, SystemProgram } from "@solana/web3.js"; import { Big, BN } from "@switchboard-xyz/common"; export class Mint { diff --git a/javascript/solana.js/src/types.ts b/javascript/solana.js/src/types.ts index 868d2a5..ec75826 100644 --- a/javascript/solana.js/src/types.ts +++ b/javascript/solana.js/src/types.ts @@ -1,31 +1,31 @@ -import { - type AggregatorAccount, - type BufferRelayerAccount, - type CrankAccount, - type JobAccount, - type LeaseAccount, - type OracleAccount, - type PermissionAccount, - type ProgramStateAccount, - type QueueAccount, - type SwitchboardAccount, - type SwitchboardAccountData, - type VrfAccount, +import type { + AggregatorAccount, + BufferRelayerAccount, + CrankAccount, + JobAccount, + LeaseAccount, + OracleAccount, + PermissionAccount, + ProgramStateAccount, + QueueAccount, + SwitchboardAccount, + SwitchboardAccountData, + VrfAccount, } from "./accounts/index.js"; -import { - type AggregatorAccountData, - type BufferRelayerAccountData, - type CrankAccountData, - type JobAccountData, - type LeaseAccountData, - type OracleAccountData, - type OracleQueueAccountData, - type PermissionAccountData, - type SbState, - type VrfAccountData, +import type { + AggregatorAccountData, + BufferRelayerAccountData, + CrankAccountData, + JobAccountData, + LeaseAccountData, + OracleAccountData, + OracleQueueAccountData, + PermissionAccountData, + SbState, + VrfAccountData, } from "./generated/index.js"; -import { type OracleJob } from "@switchboard-xyz/common"; +import type { OracleJob } from "@switchboard-xyz/common"; export type RawBuffer = string | Buffer | Uint8Array | number[]; diff --git a/javascript/solana.js/src/utils.ts b/javascript/solana.js/src/utils.ts index 550ce61..42efe95 100644 --- a/javascript/solana.js/src/utils.ts +++ b/javascript/solana.js/src/utils.ts @@ -1,14 +1,16 @@ -import { - type AggregatorAccount, - type CreateQueueFeedParams, - JobAccount, - type QueueAccount, +import type { + AggregatorAccount, + CreateQueueFeedParams, + QueueAccount, } from "./accounts/index.js"; -import { type AggregatorAccountData } from "./generated/index.js"; +import { JobAccount } from "./accounts/index.js"; +import type { AggregatorAccountData } from "./generated/index.js"; import { InvalidCronSchedule } from "./errors.js"; import { TransactionObject } from "./TransactionObject.js"; -import { RawBuffer } from "./types.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 { BN, OracleJob } from "@switchboard-xyz/common"; import { isValidCron } from "cron-validator"; @@ -16,6 +18,29 @@ import fs from "fs"; import os from "os"; import path from "path"; +export function handleOptionalPubkeys( + ixn: TransactionInstruction +): TransactionInstruction { + const programId = ixn.programId; + const data = ixn.data; + const keys = ixn.keys.map((meta: AccountMeta): AccountMeta => { + if (meta.pubkey.equals(programId)) { + return { + isSigner: false, + isWritable: false, + pubkey: programId, + }; + } + + return meta; + }); + return new TransactionInstruction({ + programId, + keys, + data, + }); +} + export function loadKeypair(keypairPath: string): Keypair { const fullPath = keypairPath.startsWith("/") || keypairPath.startsWith("C:") diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34dfb38..e588fb6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - importers: .: @@ -117,9 +113,6 @@ importers: shx: specifier: ^0.3.4 version: 0.3.4 - switchboard-solana: - specifier: workspace:* - version: link:../../../rust/switchboard-solana ts-mocha: specifier: ^9.0.2 version: 9.0.2(mocha@9.2.2) @@ -163,9 +156,6 @@ importers: mocha: specifier: ^9.0.3 version: 9.2.2 - switchboard-solana: - specifier: workspace:* - version: link:../../../rust/switchboard-solana ts-mocha: specifier: ^9.0.2 version: 9.0.2(mocha@9.2.2) @@ -183,15 +173,15 @@ importers: version: 0.28.0 '@solana/spl-token': specifier: ^0.3.6 - version: 0.3.6(@solana/web3.js@1.77.3) + version: 0.3.6(@solana/web3.js@1.78.0) '@solana/web3.js': - specifier: ^1.77.3 - version: 1.77.3 + specifier: ^1.78.0 + version: 1.78.0 '@switchboard-xyz/common': - specifier: ^2.2.4 + specifier: '*' version: 2.2.4 '@switchboard-xyz/oracle': - specifier: ^2.1.13 + specifier: '*' version: 2.1.13 '@switchboard-xyz/solana.js': specifier: workspace:* @@ -206,33 +196,24 @@ importers: '@types/mocha': specifier: ^9.0.0 version: 9.1.1 + '@types/node': + specifier: ^20.4.0 + version: 20.4.0 chai: specifier: ^4.3.4 version: 4.3.7 mocha: specifier: ^9.0.3 version: 9.2.2 - prettier: - specifier: ^2.6.2 - version: 2.7.1 - switchboard-solana: - specifier: workspace:* - version: link:../../../rust/switchboard-solana ts-mocha: specifier: ^10.0.0 version: 10.0.0(mocha@9.2.2) - typescript: - specifier: ^4.3.5 - version: 4.9.4 examples/functions/01_basic_oracle/sgx-function: dependencies: basic-oracle: specifier: workspace:* version: link:.. - switchboard-solana: - specifier: workspace:* - version: link:../../../../rust/switchboard-solana examples/vrf/01_vrf_client: dependencies: @@ -765,15 +746,15 @@ packages: '@commitlint/execute-rule': 17.4.0 '@commitlint/resolve-extends': 17.4.4 '@commitlint/types': 17.4.4 - '@types/node': 18.11.18 + '@types/node': 20.4.0 chalk: 4.1.2 cosmiconfig: 8.1.0 - cosmiconfig-typescript-loader: 4.3.0(@types/node@18.11.18)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@4.9.4) + cosmiconfig-typescript-loader: 4.3.0(@types/node@20.4.0)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@4.9.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1(@types/node@18.11.18)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@20.4.0)(typescript@4.9.4) typescript: 4.9.4 transitivePeerDependencies: - '@swc/core' @@ -884,6 +865,17 @@ packages: buffer-layout: 1.2.2 dev: false + /@coral-xyz/borsh@0.28.0(@solana/web3.js@1.78.0): + resolution: {integrity: sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ==} + engines: {node: '>=10'} + peerDependencies: + '@solana/web3.js': ^1.68.0 + dependencies: + '@solana/web3.js': 1.78.0 + bn.js: 5.2.1 + buffer-layout: 1.2.2 + dev: false + /@cspotcode/source-map-support@0.8.1: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -1371,7 +1363,7 @@ packages: engines: {node: '>= 10'} dependencies: '@solana/buffer-layout': 4.0.0 - '@solana/web3.js': 1.77.3 + '@solana/web3.js': 1.78.0 bigint-buffer: 1.1.5 bignumber.js: 9.1.0 transitivePeerDependencies: @@ -1405,6 +1397,23 @@ packages: - utf-8-validate dev: false + /@solana/spl-token@0.3.6(@solana/web3.js@1.78.0): + resolution: {integrity: sha512-P9pTXjDIRvVbjr3J0mCnSamYqLnICeds7IoH1/Ro2R9OBuOHdp5pqKZoscfZ3UYrgnCWUc1bc9M2m/YPHjw+1g==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.47.4 + dependencies: + '@solana/buffer-layout': 4.0.0 + '@solana/buffer-layout-utils': 0.2.0 + '@solana/web3.js': 1.78.0 + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + /@solana/spl-token@0.3.8(@solana/web3.js@1.77.3): resolution: {integrity: sha512-ogwGDcunP9Lkj+9CODOWMiVJEdRtqHAtX2rWF62KxnnSWtMZtV9rDhTrZFshiyJmxDnRL/1nKE1yJHg4jjs3gg==} engines: {node: '>=16'} @@ -1422,6 +1431,23 @@ packages: - utf-8-validate dev: false + /@solana/spl-token@0.3.8(@solana/web3.js@1.78.0): + resolution: {integrity: sha512-ogwGDcunP9Lkj+9CODOWMiVJEdRtqHAtX2rWF62KxnnSWtMZtV9rDhTrZFshiyJmxDnRL/1nKE1yJHg4jjs3gg==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.47.4 + dependencies: + '@solana/buffer-layout': 4.0.0 + '@solana/buffer-layout-utils': 0.2.0 + '@solana/web3.js': 1.78.0 + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + /@solana/web3.js@1.73.3: resolution: {integrity: sha512-vHRMo589XEIpoujpE2sZZ1aMZvfA1ImKfNxobzEFyMb+H5j6mRRUXfdgWD0qJ0sm11e5BcBC7HPeRXJB+7f3Lg==} dependencies: @@ -1473,11 +1499,36 @@ packages: - utf-8-validate dev: false + /@solana/web3.js@1.78.0: + resolution: {integrity: sha512-CSjCjo+RELJ5puoZALfznN5EF0YvL1V8NQrQYovsdjE1lCV6SqbKAIZD0+9LlqCBoa1ibuUaR7G2SooYzvzmug==} + dependencies: + '@babel/runtime': 7.22.5 + '@noble/curves': 1.1.0 + '@noble/hashes': 1.3.1 + '@solana/buffer-layout': 4.0.0 + agentkeepalive: 4.2.1 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.0 + node-fetch: 2.6.12 + rpc-websockets: 7.5.1 + superstruct: 0.14.2 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + /@switchboard-xyz/common@2.2.0: resolution: {integrity: sha512-ciy3mSPh02e2Zk/54C8AJp7S35Z1rpyy3vyieVBB/k6bKyg0GG4snGgTGjiOAAsk/EQvxORy6S2TIwjbDa4r0g==} engines: {node: '>=12'} dependencies: - '@solana/web3.js': 1.77.3 + '@solana/web3.js': 1.78.0 '@types/big.js': 6.1.6 '@types/bn.js': 5.1.1 big.js: 6.2.1 @@ -1496,7 +1547,7 @@ packages: resolution: {integrity: sha512-T8m7jQYWL6CEjNLeosZ0mld9BaTzkhX2lemCKO46p5oFTExuClcY8C++Dz13dloBd9MZ9GONxxG7sQIyk6b1XQ==} engines: {node: '>=12'} dependencies: - '@solana/web3.js': 1.77.3 + '@solana/web3.js': 1.78.0 '@types/big.js': 6.1.6 '@types/bn.js': 5.1.1 big.js: 6.2.1 @@ -1597,14 +1648,14 @@ packages: /@types/bn.js@5.1.1: resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 /@types/cacheable-request@6.0.3: resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.11.18 + '@types/node': 20.4.0 '@types/responselike': 1.0.0 /@types/chai@4.3.4: @@ -1614,14 +1665,14 @@ packages: /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 dev: false /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.11.18 + '@types/node': 20.4.0 dev: true /@types/http-cache-semantics@4.0.1: @@ -1644,7 +1695,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.3.1 + '@types/node': 20.4.0 /@types/lodash@4.14.191: resolution: {integrity: sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==} @@ -1675,6 +1726,7 @@ packages: /@types/node@18.11.18: resolution: {integrity: sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==} + dev: true /@types/node@20.2.5: resolution: {integrity: sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==} @@ -1682,6 +1734,10 @@ packages: /@types/node@20.3.1: resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} + dev: true + + /@types/node@20.4.0: + resolution: {integrity: sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g==} /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1694,7 +1750,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 /@types/semver@6.2.3: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} @@ -1708,20 +1764,20 @@ packages: resolution: {integrity: sha512-ZA8U81/gldY+rR5zl/7HSHrG2KDfEb3lzG6uCUDhW1DTQE9yC/VBQ45fXnXq8f3CgInfhZmjtdu/WOUlrXRQUg==} dependencies: '@types/glob': 7.2.0 - '@types/node': 18.11.18 + '@types/node': 20.4.0 dev: true /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 dev: false /@types/yauzl@2.10.0: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 optional: true /@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.4): @@ -1736,7 +1792,7 @@ packages: optional: true dependencies: '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@4.9.4) - '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.4) + '@typescript-eslint/parser': 4.33.0(eslint@8.42.0)(typescript@4.9.4) '@typescript-eslint/scope-manager': 4.33.0 debug: 4.3.4(supports-color@8.1.1) eslint: 7.32.0 @@ -1922,26 +1978,6 @@ packages: - typescript dev: true - /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@4.9.4): - resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 4.33.0 - '@typescript-eslint/types': 4.33.0 - '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.4) - debug: 4.3.4(supports-color@8.1.1) - eslint: 7.32.0 - typescript: 4.9.4 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@5.1.3): resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1962,6 +1998,26 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@4.33.0(eslint@8.42.0)(typescript@4.9.4): + resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==} + engines: {node: ^10.12.0 || >=12.0.0} + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 4.33.0 + '@typescript-eslint/types': 4.33.0 + '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.4) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.42.0 + typescript: 4.9.4 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@5.44.0(eslint@8.42.0)(typescript@4.9.4): resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2953,7 +3009,7 @@ packages: through2: 4.0.2 dev: true - /cosmiconfig-typescript-loader@4.3.0(@types/node@18.11.18)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@4.9.4): + /cosmiconfig-typescript-loader@4.3.0(@types/node@20.4.0)(cosmiconfig@8.1.0)(ts-node@10.9.1)(typescript@4.9.4): resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -2962,9 +3018,9 @@ packages: ts-node: '>=10' typescript: '>=3' dependencies: - '@types/node': 18.11.18 + '@types/node': 20.4.0 cosmiconfig: 8.1.0 - ts-node: 10.9.1(@types/node@18.11.18)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@20.4.0)(typescript@4.9.4) typescript: 4.9.4 dev: true @@ -4212,7 +4268,7 @@ packages: typescript: '>=3' dependencies: '@typescript-eslint/eslint-plugin': 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.4) - '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.4) + '@typescript-eslint/parser': 4.33.0(eslint@8.42.0)(typescript@4.9.4) chalk: 4.1.2 eslint: 7.32.0 eslint-config-prettier: 7.2.0(eslint@7.32.0) @@ -5178,6 +5234,18 @@ packages: tslib: 2.5.0 dev: false + /node-fetch@2.6.12: + resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /node-fetch@2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} engines: {node: 4.x || >=6.0.0} @@ -5544,7 +5612,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.3.1 + '@types/node': 20.4.0 long: 5.2.1 dev: false @@ -6336,6 +6404,37 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.1(@types/node@20.4.0)(typescript@4.9.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 20.4.0 + acorn: 8.8.1 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /ts-node@7.0.1: resolution: {integrity: sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==} engines: {node: '>=4.2.0'} @@ -6879,12 +6978,13 @@ packages: file:javascript/solana.js: resolution: {directory: javascript/solana.js, type: directory} name: '@switchboard-xyz/solana.js' + version: 2.4.1 engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: '@coral-xyz/anchor': 0.28.0 - '@coral-xyz/borsh': 0.28.0(@solana/web3.js@1.77.3) - '@solana/spl-token': 0.3.8(@solana/web3.js@1.77.3) - '@solana/web3.js': 1.77.3 + '@coral-xyz/borsh': 0.28.0(@solana/web3.js@1.78.0) + '@solana/spl-token': 0.3.8(@solana/web3.js@1.78.0) + '@solana/web3.js': 1.78.0 '@switchboard-xyz/common': 2.2.4 '@switchboard-xyz/oracle': 2.1.11 cron-validator: 1.3.1 @@ -6896,3 +6996,7 @@ packages: - supports-color - utf-8-validate dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/rust/switchboard-solana/Cargo.lock b/rust/switchboard-solana/Cargo.lock index 300bd96..af10ff2 100644 --- a/rust/switchboard-solana/Cargo.lock +++ b/rust/switchboard-solana/Cargo.lock @@ -12,15 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" -dependencies = [ - "gimli", -] - [[package]] name = "adler" version = "1.0.2" @@ -43,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", "opaque-debug", ] @@ -56,7 +47,7 @@ checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" dependencies = [ "aead", "aes", - "cipher 0.3.0", + "cipher", "ctr", "polyval", "subtle", @@ -81,6 +72,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -111,9 +103,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5e1a413b311b039d29b61d0dbb401c9dbf04f792497ceca87593454bf6d7dd" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" dependencies = [ "anchor-syn", "anyhow", @@ -125,13 +117,13 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca9aeaf633c6e2365fed0525dcac68610be58eee5dc69d3b86fe0b1d4b320b9" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" dependencies = [ "anchor-syn", "anyhow", - "bs58 0.4.0", + "bs58 0.5.0", "proc-macro2 1.0.63", "quote 1.0.29", "rustversion", @@ -140,9 +132,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788e44f9e8501dabeb6f9229da0f3268fb2ae3208912608ffaa056a72031296f" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" dependencies = [ "anchor-syn", "proc-macro2 1.0.63", @@ -151,9 +143,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c4d8c7e4a2605ede6fcdced9690288b2f74e24768619a85229d57e597bc97" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" dependencies = [ "anchor-syn", "proc-macro2 1.0.63", @@ -163,9 +155,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3b07d5c5d87b5edc72428b447b8e9ee1143b83dd1afc6a6b1d352c6a6164d8" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" dependencies = [ "anchor-syn", "anyhow", @@ -176,9 +168,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22ad0445115dbea5869b1d062da49ae125abed9132fc20c33227f25e42dfa6b" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" dependencies = [ "anchor-syn", "anyhow", @@ -189,26 +181,28 @@ dependencies = [ [[package]] name = "anchor-client" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c06e06497b5b4f392845e0d04dde8374fd244fa2832dd0e5c27bfd99cb0342" +checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" dependencies = [ "anchor-lang", "anyhow", + "futures", "regex", "serde", "solana-account-decoder", "solana-client", "solana-sdk", "thiserror", + "tokio", "url", ] [[package]] name = "anchor-derive-accounts" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48daeff6781ba2f02961b0ad211feb9a2de75af345d42c62b1a252fd4dfb0724" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" dependencies = [ "anchor-syn", "anyhow", @@ -219,9 +213,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fe2886f92c4f33ec1b2b8b2b43ca1b9070cf4929e63c7eaaa09a9f2c0d5123" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" dependencies = [ "proc-macro2 1.0.63", "quote 1.0.29", @@ -230,9 +224,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbbe5d1c7c057c6d63b4f2f538a320e4a22111126c9966340c3d9490e2f15ed1" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -245,17 +239,18 @@ dependencies = [ "arrayref", "base64 0.13.1", "bincode", - "borsh 0.9.3", + "borsh 0.10.3", "bytemuck", + "getrandom 0.2.10", "solana-program", "thiserror", ] [[package]] name = "anchor-spl" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cc8066fbd45e0e03edf48342c79265aa34ca76cefeace48ef6c402b6946665" +checksum = "78f860599da1c2354e7234c768783049eb42e2f54509ecfc942d2e0076a2da7b" dependencies = [ "anchor-lang", "solana-program", @@ -266,18 +261,18 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cb31fe143aedb36fc41409ea072aa0b840cbea727e62eb2ff6e7b6cea036ff" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" dependencies = [ "anyhow", - "bs58 0.3.1", + "bs58 0.5.0", "heck", "proc-macro2 1.0.63", "quote 1.0.29", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.7", "syn 1.0.109", "thiserror", ] @@ -312,6 +307,129 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint 0.4.3", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote 1.0.29", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint 0.4.3", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" + [[package]] name = "arrayref" version = "0.3.7" @@ -330,6 +448,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + [[package]] name = "asn1-rs" version = "0.5.2" @@ -376,10 +500,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] -name = "async-compression" -version = "0.4.0" +name = "async-channel" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0122885821398cc923ece939e24d1056a2384ee719432397fa9db87230ff11" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" dependencies = [ "brotli", "flate2", @@ -426,21 +561,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.12.3" @@ -651,18 +771,21 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - [[package]] name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.13.0" @@ -783,16 +906,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "2.34.0" @@ -833,6 +946,28 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "concurrent-queue" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console" version = "0.15.7" @@ -998,7 +1133,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", + "cipher", ] [[package]] @@ -1015,6 +1150,41 @@ dependencies = [ "zeroize", ] +[[package]] +name = "darling" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.63", + "quote 1.0.29", + "strsim 0.10.0", + "syn 2.0.23", +] + +[[package]] +name = "darling_macro" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +dependencies = [ + "darling_core", + "quote 1.0.29", + "syn 2.0.23", +] + [[package]] name = "data-encoding" version = "2.4.0" @@ -1050,6 +1220,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 1.0.109", +] + [[package]] name = "dialoguer" version = "0.10.4" @@ -1082,27 +1263,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "displaydoc" version = "0.2.4" @@ -1201,31 +1361,19 @@ dependencies = [ [[package]] name = "enum-iterator" -version = "0.8.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "0.8.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ - "proc-macro2 1.0.63", - "quote 1.0.29", - "syn 1.0.109", -] - -[[package]] -name = "enum_dispatch" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" -dependencies = [ - "once_cell", "proc-macro2 1.0.63", "quote 1.0.29", "syn 2.0.23", @@ -1412,15 +1560,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1469,10 +1608,15 @@ dependencies = [ ] [[package]] -name = "gimli" -version = "0.27.3" +name = "goblin" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll", +] [[package]] name = "h2" @@ -1493,6 +1637,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.11.2" @@ -1661,16 +1814,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ - "futures-util", "http", "hyper", - "rustls 0.21.3", + "rustls", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", ] [[package]] @@ -1696,6 +1848,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.4.0" @@ -1744,23 +1902,15 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", - "lazy_static", + "instant", "number_prefix", - "regex", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", + "portable-atomic", + "unicode-width", ] [[package]] @@ -1871,16 +2021,6 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libsecp256k1" version = "0.6.0" @@ -1929,12 +2069,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -1974,9 +2108,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] @@ -2025,25 +2159,38 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "log", + "miow", + "ntapi", + "winapi", +] + +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi", ] [[package]] name = "nix" -version = "0.24.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset 0.6.5", + "memoffset 0.7.1", + "pin-utils", + "static_assertions", ] [[package]] @@ -2067,6 +2214,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "ntapi" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" +dependencies = [ + "winapi", +] + [[package]] name = "num" version = "0.2.1" @@ -2182,7 +2338,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -2197,21 +2362,24 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 2.0.23", +] + [[package]] name = "number_prefix" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -[[package]] -name = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" -dependencies = [ - "memchr", -] - [[package]] name = "oid-registry" version = "0.6.1" @@ -2245,6 +2413,17 @@ version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2252,7 +2431,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -2268,6 +2461,12 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "paste" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" + [[package]] name = "pbkdf2" version = "0.4.0" @@ -2339,6 +2538,12 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "polyval" version = "0.5.3" @@ -2351,6 +2556,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2425,17 +2636,16 @@ dependencies = [ [[package]] name = "quinn" -version = "0.8.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" +checksum = "445cbfe2382fa023c4f2f3c7e1c95c03dcc1df2bf23cebcb2b13e1402c4394d1" dependencies = [ "bytes", - "futures-channel", - "futures-util", - "fxhash", + "pin-project-lite", "quinn-proto", "quinn-udp", - "rustls 0.20.8", + "rustc-hash", + "rustls", "thiserror", "tokio", "tracing", @@ -2444,17 +2654,16 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.8.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", - "fxhash", "rand 0.8.5", "ring", - "rustls 0.20.8", + "rustc-hash", + "rustls", "rustls-native-certs", - "rustls-pemfile 0.2.1", "slab", "thiserror", "tinyvec", @@ -2464,16 +2673,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.1.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ - "futures-util", "libc", "quinn-proto", "socket2", - "tokio", "tracing", + "windows-sys 0.42.0", ] [[package]] @@ -2604,9 +2812,9 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", @@ -2632,17 +2840,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regex" version = "1.9.0" @@ -2683,9 +2880,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" dependencies = [ "async-compression", "base64 0.21.2", @@ -2705,13 +2902,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.3", - "rustls-pemfile 1.0.3", + "rustls", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -2767,13 +2964,22 @@ dependencies = [ [[package]] name = "rpassword" -version = "6.0.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +dependencies = [ + "libc", + "rtoolbox", + "winapi", +] + +[[package]] +name = "rtoolbox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "serde", - "serde_json", "winapi", ] @@ -2851,18 +3057,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "rustls" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b19faa85ecb5197342b54f987b142fb3e30d0c90da40f80ef4fa9a726e6676ed" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -2870,20 +3064,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.3", + "rustls-pemfile", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "rustls-pemfile" version = "1.0.3" @@ -2893,16 +3078,6 @@ dependencies = [ "base64 0.21.2", ] -[[package]] -name = "rustls-webpki" -version = "0.101.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.13" @@ -2930,6 +3105,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 2.0.23", +] + [[package]] name = "sct" version = "0.7.0" @@ -3028,15 +3223,25 @@ dependencies = [ ] [[package]] -name = "serde_yaml" -version = "0.8.26" +name = "serde_with" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" dependencies = [ - "indexmap 1.9.3", - "ryu", "serde", - "yaml-rust", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2 1.0.63", + "quote 1.0.29", + "syn 2.0.23", ] [[package]] @@ -3169,12 +3374,12 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec36d5c2ec5469dacc4fd2bdfcaaf4b253a4814d86d88686d50fd407cf7b3330" +checksum = "f63c62ec28eaf2f4ef06f39d549230699068e9b2171a67a8232e11993ecb86dd" dependencies = [ "Inflector", - "base64 0.13.1", + "base64 0.21.2", "bincode", "bs58 0.4.0", "bv", @@ -3185,7 +3390,6 @@ dependencies = [ "solana-address-lookup-table-program", "solana-config-program", "solana-sdk", - "solana-vote-program", "spl-token", "spl-token-2022", "thiserror", @@ -3194,9 +3398,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf23fb5a4ff0e902bf94fbc63ba51b10b1f86c6bca18574b583ec3baf6383a0b" +checksum = "5ddbc426b2e0443c2e58c0ab721c93a788f0e97eb4f25340e4e50dd1e6978027" dependencies = [ "bincode", "bytemuck", @@ -3215,9 +3419,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e6537858df8634c4cf7e9e8a84a9f1967b8983bcb4e4833cad3ae200b7170d" +checksum = "a19777832c5623c5a1b642f35d847acaf7243124e8f4f300dbe9d387b05b4f78" dependencies = [ "chrono", "clap 2.34.0", @@ -3231,81 +3435,44 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.14.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2234deff9765c25fc6189322689d1b702490f4389680dfdef0af582856041844" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - [[package]] name = "solana-client" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e706f894fe68d518c125e27a7186d07a56f5b179d67c8fb2cf719cef8e1ee7cd" +checksum = "c7e3458b0fcf87b14560836a9dc1d0270fe1b4d70425235e91b94a74f4a614f0" dependencies = [ - "async-mutex", "async-trait", - "base64 0.13.1", "bincode", - "bs58 0.4.0", - "bytes", - "clap 2.34.0", - "crossbeam-channel", - "enum_dispatch", "futures", "futures-util", "indexmap 1.9.3", "indicatif", - "itertools", - "jsonrpc-core", - "lazy_static", "log", "quinn", - "quinn-proto", "rand 0.7.3", - "rand_chacha 0.2.2", "rayon", - "reqwest", - "rustls 0.20.8", - "semver", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-faucet", + "solana-connection-cache", "solana-measure", "solana-metrics", - "solana-net-utils", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", "solana-sdk", "solana-streamer", - "solana-transaction-status", - "solana-version", - "solana-vote-program", - "spl-token-2022", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", "thiserror", "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", ] [[package]] name = "solana-config-program" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c2d438fdfa4f5774c70fb0eeb2325caa073c838a229ef6a876c65c8703294" +checksum = "1ac78caf77ffe8cc8c108b2e424f5e710f640777f3d78faf2ac7535008a39f5a" dependencies = [ "bincode", "chrono", @@ -3316,38 +3483,35 @@ dependencies = [ ] [[package]] -name = "solana-faucet" -version = "1.14.16" +name = "solana-connection-cache" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ba3e5e2acc09b2fcb54957d05c0943b194d48f825f879fc2cf5d255e2608b05" +checksum = "964e4b517d80543e9ff0676bb1700f5011e8588795f4e68fb8ab343c87eefad4" dependencies = [ + "async-trait", "bincode", - "byteorder", - "clap 2.34.0", - "crossbeam-channel", + "futures-util", + "indexmap 1.9.3", "log", - "serde", - "serde_derive", - "solana-clap-utils", - "solana-cli-config", - "solana-logger", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", "solana-metrics", "solana-sdk", - "solana-version", - "spl-memo", "thiserror", "tokio", ] [[package]] name = "solana-frozen-abi" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b4953578272ac0fadec245e85e83ae86454611f0c0a7fff7d906835124bdcf" +checksum = "6c272bd949536a92f0fc4d9572bf72b35b3545fc1f6ee031e44f9d075809055d" dependencies = [ - "ahash 0.7.6", + "ahash 0.8.3", "blake3", - "block-buffer 0.9.0", + "block-buffer 0.10.4", "bs58 0.4.0", "bv", "byteorder", @@ -3355,7 +3519,6 @@ dependencies = [ "either", "generic-array", "getrandom 0.1.16", - "hashbrown 0.12.3", "im", "lazy_static", "log", @@ -3375,21 +3538,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57892538250428ad3dc3cbe05f6cd75ad14f4f16734fcb91bc7cd5fbb63d6315" +checksum = "2f84be4b6dd2cc4e8ad5baa54a23018c8936ec32322ebcffd88355631700292a" dependencies = [ "proc-macro2 1.0.63", "quote 1.0.29", "rustc_version", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "solana-logger" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06aa701c49493e93085dd1e800c05475baca15a9d4d527b59794f2ed0b66e055" +checksum = "b3cb934e8c9015e86cd9c7382ea3083578d1c0813a351644cfdabe3009591b03" dependencies = [ "env_logger", "lazy_static", @@ -3398,9 +3561,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7300180957635b33c88bd6844a5dff4f1f5c6352d0861ee7845eab84185aa6a" +checksum = "2a038b70fac9cd5529839efc258e6453f0018d34937a414cd030318916d6dba6" dependencies = [ "log", "solana-sdk", @@ -3408,9 +3571,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2960981c4bbe9177dafe986542ba11a10afcae320f4201aa809cd5b650e202e1" +checksum = "cca14a16eac701e20bda3e103e3d078074a18e83e126f90d918e141379eade8d" dependencies = [ "crossbeam-channel", "gethostname", @@ -3422,9 +3585,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31062ce5ddceb92bdb78df2eaf33e9889c1519e8a8d89baa783e2d08a76cfc62" +checksum = "509c3d5bc7fe8dbcc25b3238d7cd4a0994c39207260b7b5271a3110ea0ac5f75" dependencies = [ "bincode", "clap 3.2.25", @@ -3444,11 +3607,11 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2b84a3d7a24523b9117c0ae4608f1e561ae492638acea2bb2960a0c0c8eb6" +checksum = "3a65308af752a91eddf06c7b7bb5e5d6296ec8cd8de5a1cbebd61f53f45a808c" dependencies = [ - "ahash 0.7.6", + "ahash 0.8.3", "bincode", "bv", "caps", @@ -3471,16 +3634,20 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f99052873619df68913cb8e92e28ff251a5483828925e87fa97ba15a9cbad51" +checksum = "476510cb86b9602a793582788f5e23a9cca11929d3880b7427a67142b1e4a430" dependencies = [ - "base64 0.13.1", + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.2", "bincode", "bitflags", "blake3", - "borsh 0.9.3", - "borsh-derive 0.9.3", + "borsh 0.10.3", "bs58 0.4.0", "bv", "bytemuck", @@ -3495,10 +3662,11 @@ dependencies = [ "libc", "libsecp256k1", "log", - "memoffset 0.6.5", + "memoffset 0.9.0", + "num-bigint 0.4.3", "num-derive", "num-traits", - "parking_lot", + "parking_lot 0.12.1", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -3520,20 +3688,20 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d57d0b6ef85b50f9ad6b9a75fc9d5051dc26f8b1a4ddf03656e3d603e139eb3" +checksum = "8311e581ff6406c84ce8ed5d4f1316cf091f723b4823a1ece3e36be6cfb3d69c" dependencies = [ - "base64 0.13.1", + "base64 0.21.2", "bincode", "eager", "enum-iterator", "itertools", "libc", - "libloading", "log", "num-derive", "num-traits", + "percentage", "rand 0.7.3", "rustc_version", "serde", @@ -3542,14 +3710,68 @@ dependencies = [ "solana-measure", "solana-metrics", "solana-sdk", + "solana_rbpf", "thiserror", ] [[package]] -name = "solana-rayon-threadlimit" -version = "1.14.16" +name = "solana-pubsub-client" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e1d068ba8080ca1e41703c600cc9b263ff7ce26b6811cd83221723ae0d10ae" +checksum = "5274196946dfef625ec905f7834e7d45b8367364f8eaf99e2c754951da6b972d" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b27ad60edef844f182cd7071e653731ec16b3a319524448935a1183f6b99b80" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "441bde92d8befd3a698e54c35bff63a396f1e3e5e85754d85a5308a8f5d0328a" dependencies = [ "lazy_static", "num_cpus", @@ -3557,16 +3779,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661cd486da7419134663f1c3684d71d3fd6d13b8e557da23070f4c920b1d2baa" +checksum = "e1b8820ed78c726c9359248a8fb6456657ce6feca2ff31ffac1286f55bee99e8" dependencies = [ "console", "dialoguer", "log", "num-derive", "num-traits", - "parking_lot", + "parking_lot 0.12.1", "qstring", "semver", "solana-sdk", @@ -3575,16 +3797,77 @@ dependencies = [ ] [[package]] -name = "solana-sdk" -version = "1.14.16" +name = "solana-rpc-client" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb47da3e18cb669f6ace0b40cee0610e278903783e0c9f7fce1e1beb881a1b7" +checksum = "5baeb95820862d14c1391dfda9a3173b0509f1b17ebd1090b3778fac1743ab69" +dependencies = [ + "async-trait", + "base64 0.21.2", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29009927e289fc5ccd19cec05780dc8465eb65e52922087cf769e57d72c0b7b5" +dependencies = [ + "base64 0.21.2", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df466014e9768f4741be00acea0067bde11a2ec1162a12ebf896960990a2e6b8" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-sdk" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "352b70bb14d8968d5484aa73a1aede3acc816f10a0b264c6599108c5dd6b647b" dependencies = [ "assert_matches", - "base64 0.13.1", + "base64 0.21.2", "bincode", "bitflags", - "borsh 0.9.3", + "borsh 0.10.3", "bs58 0.4.0", "bytemuck", "byteorder", @@ -3603,6 +3886,7 @@ dependencies = [ "memmap2", "num-derive", "num-traits", + "num_enum 0.6.1", "pbkdf2 0.11.0", "qstring", "rand 0.7.3", @@ -3613,6 +3897,7 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", + "serde_with", "sha2 0.10.7", "sha3 0.10.8", "solana-frozen-abi", @@ -3627,23 +3912,25 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d41a09b9cecd0a4df63c78a192adee99ebf2d3757c19713a68246e1d9789c7c" +checksum = "e38a884c027b0759d0969efc1253f3b8798f9d5fbef2eb158cdb70763619d2f3" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.63", "quote 1.0.29", "rustversion", - "syn 1.0.109", + "syn 2.0.23", ] [[package]] name = "solana-streamer" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ffb2c6918eda6aa8b18219790b7a4e4d74914aeae97cb1a0e09fdb943b18cc" +checksum = "13b87bd090a462765b6e3196e6c22cc0edebf8942fb4a6de9a807ce3d8d5d436" dependencies = [ + "async-channel", + "bytes", "crossbeam-channel", "futures-util", "histogram", @@ -3656,9 +3943,11 @@ dependencies = [ "percentage", "pkcs8", "quinn", + "quinn-proto", + "quinn-udp", "rand 0.7.3", "rcgen", - "rustls 0.20.8", + "rustls", "solana-metrics", "solana-perf", "solana-sdk", @@ -3668,13 +3957,53 @@ dependencies = [ ] [[package]] -name = "solana-transaction-status" -version = "1.14.16" +name = "solana-thin-client" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1a6ee396d436ae4ee36350043c3cb34ad66b7515f045c1e5006695559d88ac" +checksum = "ab8dc82e52a443249c5b1df3ddd7273306c81fde2c8057cc398e0fbd0fae7a47" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c139e796337646ba4f013a849555f50d35ae7278461d685a429c29f6295f" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-transaction-status" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284227b302a68b0c384f46cb95e5472d39e7c7094d6079c4e5bd2f133f6920ff" dependencies = [ "Inflector", - "base64 0.13.1", + "base64 0.21.2", "bincode", "borsh 0.9.3", "bs58 0.4.0", @@ -3685,10 +4014,7 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-address-lookup-table-program", - "solana-measure", - "solana-metrics", "solana-sdk", - "solana-vote-program", "spl-associated-token-account", "spl-memo", "spl-token", @@ -3697,10 +4023,25 @@ dependencies = [ ] [[package]] -name = "solana-version" -version = "1.14.16" +name = "solana-udp-client" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d177dc97f7facd8fbc3148f3d44a9ff5bbbc72c1db7e2889dc4911ae641cea8a" +checksum = "23aa72c84646a65727b63ff2988147062a792b569591351f06c0e6014ca52de9" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "036b2c0f4b3dfbe48d96c0f5e9be0fadd019bf46327013475bbf3b8ae9870dfe" dependencies = [ "log", "rustc_version", @@ -3714,9 +4055,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6280815d28c90ea8f51c8eb2026258e8693cab5a8456ee7b207a791b20f9c576" +checksum = "85fe8c3382ac0c050c2224037fc8be990f713526e6b136f3a8da9464e2e1a506" dependencies = [ "bincode", "log", @@ -3728,6 +4069,7 @@ dependencies = [ "solana-frozen-abi", "solana-frozen-abi-macro", "solana-metrics", + "solana-program", "solana-program-runtime", "solana-sdk", "thiserror", @@ -3735,17 +4077,15 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.14.16" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab38abd096769f79fd8e3fe8465070f04742395db724606a5263c8ebc215567" +checksum = "02a4c38e1cf77cc046a48d0e515ec3fe654d9c3ba49790523f2d8fd28a5e51d3" dependencies = [ "aes-gcm-siv", - "arrayref", - "base64 0.13.1", + "base64 0.21.2", "bincode", "bytemuck", "byteorder", - "cipher 0.4.4", "curve25519-dalek", "getrandom 0.1.16", "itertools", @@ -3764,6 +4104,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "solana_rbpf" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + [[package]] name = "spin" version = "0.5.2" @@ -3782,9 +4141,9 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" +checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", "borsh 0.9.3", @@ -3815,22 +4174,22 @@ dependencies = [ "bytemuck", "num-derive", "num-traits", - "num_enum", + "num_enum 0.5.11", "solana-program", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" +checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", - "num_enum", + "num_enum 0.5.11", "solana-program", "solana-zk-token-sdk", "spl-memo", @@ -3884,7 +4243,7 @@ dependencies = [ [[package]] name = "switchboard-solana" -version = "0.8.11" +version = "0.9.1" dependencies = [ "anchor-client", "anchor-lang", @@ -4087,33 +4446,33 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" dependencies = [ "autocfg", - "backtrace", "bytes", "libc", + "memchr", "mio", "num_cpus", - "parking_lot", + "once_cell", + "parking_lot 0.11.2", "pin-project-lite", "signal-hook-registry", - "socket2", "tokio-macros", - "windows-sys 0.48.0", + "winapi", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2 1.0.63", "quote 1.0.29", - "syn 2.0.23", + "syn 1.0.109", ] [[package]] @@ -4122,26 +4481,16 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls", "tokio", "webpki", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.3", - "tokio", -] - [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -4156,9 +4505,9 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls 0.20.8", + "rustls", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls", "tungstenite", "webpki", "webpki-roots", @@ -4166,9 +4515,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ "bytes", "futures-core", @@ -4217,6 +4566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4261,7 +4611,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls 0.20.8", + "rustls", "sha-1", "thiserror", "url", @@ -4331,6 +4681,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + [[package]] name = "untrusted" version = "0.7.1" @@ -4382,6 +4741,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "want" version = "0.3.1" @@ -4544,6 +4909,21 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -4721,15 +5101,6 @@ dependencies = [ "time 0.3.22", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yasna" version = "0.5.2" diff --git a/rust/switchboard-solana/Cargo.toml b/rust/switchboard-solana/Cargo.toml index a2a7b0b..1eaf247 100644 --- a/rust/switchboard-solana/Cargo.toml +++ b/rust/switchboard-solana/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "switchboard-solana" -version = "0.8.12" +version = "0.9.1" edition = "2021" description = "A Rust library to interact with Switchboard accounts." readme = "README.md" @@ -21,27 +21,27 @@ no-entrypoint = [] cpi = ["no-entrypoint"] [dependencies] -anchor-spl = "0.27.0" -solana-program = "=1.14.16" -solana-address-lookup-table-program = "=1.14.16" +anchor-spl = "0.28.0" +solana-program = ">= 1.16, < 1.17" +solana-address-lookup-table-program = ">= 1.16, < 1.17" rust_decimal = "^1" bytemuck = "^1" superslice = "1" [target.'cfg(target_os = "solana")'.dependencies] switchboard-common = { version = "0.8.5" } -anchor-lang = { version = "0.27.0" } +anchor-lang = { version = "0.28.0" } [target.'cfg(not(target_os = "solana"))'.dependencies] switchboard-common = { version = "0.8.5", features = ["client"] } -anchor-client = { version = "0.27.0" } -solana-client = "=1.14.16" +anchor-client = { version = "0.28.0" } +solana-client = ">= 1.16, < 1.17" bincode = { version = "^1" } sgx-quote = { version = "0.1.0" } cron = { version = "0.12.0" } chrono = { version = "0.4.25" } hex = "0.4.3" -tokio = "1.29.1" +tokio = "1" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "doc_cfg"] diff --git a/rust/switchboard-solana/package.json b/rust/switchboard-solana/package.json index b5b8a68..cc9143d 100644 --- a/rust/switchboard-solana/package.json +++ b/rust/switchboard-solana/package.json @@ -4,5 +4,6 @@ "build": "cargo build -p switchboard-solana", "lint": "cargo fmt -p switchboard-solana", "test": "cargo test -p switchboard-solana" - } + }, + "version": "null" } diff --git a/rust/switchboard-solana/src/accounts.rs b/rust/switchboard-solana/src/accounts.rs index 91819c0..86ca32f 100644 --- a/rust/switchboard-solana/src/accounts.rs +++ b/rust/switchboard-solana/src/accounts.rs @@ -7,5 +7,5 @@ pub use crate::oracle_program::accounts::{ pub use crate::attestation_program::accounts::{ AttestationPermissionAccountData, AttestationProgramState, AttestationQueueAccountData, - EnclaveAccountData, FunctionAccountData, FunctionRequestAccountData, SwitchboardWallet, + FunctionAccountData, FunctionRequestAccountData, SwitchboardWallet, VerifierAccountData, }; diff --git a/rust/switchboard-solana/src/attestation_program/accounts/function.rs b/rust/switchboard-solana/src/attestation_program/accounts/function.rs index e6e40b8..8164f24 100644 --- a/rust/switchboard-solana/src/attestation_program/accounts/function.rs +++ b/rust/switchboard-solana/src/attestation_program/accounts/function.rs @@ -1,4 +1,3 @@ -use super::EnclaveAccountData; use crate::cfg_client; use crate::prelude::*; use bytemuck::{Pod, Zeroable}; @@ -43,24 +42,37 @@ impl From for FunctionStatus { #[repr(packed)] #[derive(Debug, PartialEq)] pub struct FunctionAccountData { + // Easy Filtering Config /// Whether the function is invoked on a schedule or by request - pub is_scheduled: u8, // keep this up-front for filtering + pub is_scheduled: u8, /// Whether the function has been manually triggered with the function_trigger instruction - pub is_triggered: u8, // keep this up-front for filtering + pub is_triggered: u8, /// The function permissions granted by the attestation_queue.authority - pub permissions: u32, // keep this up-front for filtering - pub status: FunctionStatus, // keep this up-front for filtering + pub permissions: u32, + pub status: FunctionStatus, // Metadata + /// PDA bump. + pub bump: u8, + /// The payer who originally created the function. Cannot change, used to derive PDA. + pub creator_seed: [u8; 32], /// The name of the function for easier identification. pub name: [u8; 64], /// The metadata of the function for easier identification. pub metadata: [u8; 256], /// The Solana slot when the function was created. (PDA) pub created_at_slot: u64, + /// The unix timestamp when the function was created. + pub created_at: i64, /// The unix timestamp when the function config (container, registry, version, or schedule) was changed. pub updated_at: i64, + // Attestation Config + /// The enclave quote + pub enclave: Quote, + /// An array of permitted mr_enclave measurements for the function. + pub mr_enclaves: [[u8; 32]; 32], + // Container Settings /// The off-chain registry to fetch the function container from. pub container_registry: [u8; 64], @@ -68,10 +80,12 @@ pub struct FunctionAccountData { pub container: [u8; 64], /// The version tag of the container to pull. pub version: [u8; 32], + /// The expected schema for the container params. + pub params_schema: [u8; 256], + /// The default params passed to the container during scheduled execution. + pub default_container_params: [u8; 256], - // OFFFSET = 511 - - // Accounts + // Accounts Config /// The authority of the function which is authorized to make account changes. pub authority: Pubkey, /// The address of the AttestationQueueAccountData that will be processing function requests and verifying the function measurements. @@ -81,7 +95,7 @@ pub struct FunctionAccountData { /// The address_lookup_table of the function used to increase the number of accounts we can fit into a function result. pub address_lookup_table: Pubkey, - // Schedule + // Schedule Config /// The cron schedule to run the function on. pub schedule: [u8; 64], /// The unix timestamp when the function was last run. @@ -90,13 +104,14 @@ pub struct FunctionAccountData { pub next_allowed_timestamp: i64, /// The number of times to trigger the function upon the next invocation. pub trigger_count: u64, - // pub schedule_container_params: Vec, + /// Time this function has been sitting in an explicitly triggered state + pub triggered_since: i64, // Permission Settings /// UNUSED. The unix timestamp when the current permissions expire. pub permission_expiration: i64, - // Request Settings + // Requests Config /// Number of requests created for this function. Used to prevent closing when there are live requests. pub num_requests: u64, /// Whether custom requests have been disabled for this function. @@ -110,33 +125,25 @@ pub struct FunctionAccountData { /// The lamports paid to the FunctionAccount escrow on each successful update request. pub requests_fee: u64, - /// An array of permitted mr_enclave measurements for the function. - pub mr_enclaves: [[u8; 32]; 32], - - /// PDA bump. - pub bump: u8, - /// The payer who originally created the function. Cannot change, used to derive PDA. - pub creator_seed: [u8; 32], - + // Token Config /// The SwitchboardWallet that will handle pre-funding rewards paid out to function runners. pub escrow_wallet: Pubkey, /// The escrow_wallet TokenAccount that handles pre-funding rewards paid out to function runners. pub escrow_token_wallet: Pubkey, - /// The SwitchboardWallet that will handle acruing rewards from requests. /// Defaults to the escrow_wallet. pub reward_escrow_wallet: Pubkey, /// The reward_escrow_wallet TokenAccount used to acrue rewards from requests made with custom parameters. pub reward_escrow_token_wallet: Pubkey, - /// The unix timestamp when the function was created. - pub created_at: i64, - - /// Time this function has been sitting in an explicitly triggered state - pub triggered_since: i64, - /// Reserved. - pub _ebuf: [u8; 863], + pub _ebuf: [u8; 1024], +} + +impl Default for FunctionAccountData { + fn default() -> Self { + unsafe { std::mem::zeroed() } + } } impl anchor_lang::AccountDeserialize for FunctionAccountData { @@ -256,24 +263,71 @@ impl FunctionAccountData { )) } - pub fn get_enclave_pda(fn_key: &Pubkey) -> Pubkey { - let (pda_key, _) = Pubkey::find_program_address( - &[QUOTE_SEED, &fn_key.to_bytes()], - &SWITCHBOARD_ATTESTATION_PROGRAM_ID, - ); - pda_key - } + // /// Validate that the provided accounts correspond to the expected function accounts + // /// + // /// # Arguments + // /// + // /// * `function_account_info` - Solana AccountInfo for a FunctionAccountData + // /// * `signer` - Solana AccountInfo for a signer + // pub fn validate_signer2<'a>( + // function_account_info: &AccountInfo<'a>, + // signer: &AccountInfo<'a>, + // ) -> bool { + // let function_loader_result = + // AccountLoader::<'_, FunctionAccountData>::try_from(&function_account_info.clone()); + // if function_loader_result.is_err() { + // return false; + // } + // let func_loader = function_loader_result.unwrap(); + // let func_result = func_loader.load(); + // if func_result.is_err() { + // return false; + // } + // let func = func_result.unwrap(); - pub fn get_escrow_key(fn_key: &Pubkey) -> Pubkey { - let (ata_key, _) = Pubkey::find_program_address( - &[ - &fn_key.to_bytes(), - &anchor_spl::token::ID.to_bytes(), - &anchor_spl::token::spl_token::native_mint::ID.to_bytes(), - ], - &anchor_spl::associated_token::AssociatedToken::id(), - ); - ata_key + // // TODO: validate the seeds and bump + + // // validate the enclaves enclave is not empty + // if func.enclave.mr_enclave == [0u8; 32] { + // return false; + // } + + // // validate the enclaves delegated signer matches + // if func.enclave.enclave_signer != signer.key() { + // return false; + // } + + // // validate the function was verified and it is not expired + // if let Ok(clock) = Clock::get() { + // return func.enclave.is_verified(&clock); + // } + // if func.enclave.verification_status != VerificationStatus::VerificationSuccess as u8 { + // return false; + // } + + // true + // } + + /// Validate that the provided accounts correspond to the expected function accounts + /// + /// # Arguments + /// + /// * `signer` - Solana AccountInfo for a signer + pub fn validate(&self, signer: &AccountInfo) -> anchor_lang::Result { + // TODO: validate the seeds and bump + + // validate the enclaves enclave is not empty + if self.enclave.mr_enclave == [0u8; 32] { + return Ok(false); + } + + // validate the enclaves delegated signer matches + if self.enclave.enclave_signer != signer.key() { + return Ok(false); + } + + // validate the function was verified and it is not expired + Ok(self.enclave.is_verified(&Clock::get()?)) } /// Validate that the provided accounts correspond to the expected function accounts @@ -281,45 +335,31 @@ impl FunctionAccountData { /// # Arguments /// /// * `function_account_info` - Solana AccountInfo for a FunctionAccountData - /// * `enclave_account_info` - Solana AccountInfo for a EnclaveAccountData /// * `signer` - Solana AccountInfo for a signer - pub fn validate_enclave<'a>( + pub fn validate_signer<'a>( function_account_info: &AccountInfo<'a>, - enclave_account_info: &AccountInfo<'a>, signer: &AccountInfo<'a>, ) -> anchor_lang::Result { - // validate function PDA matches the expected derivation - let expected_enclave_key = - EnclaveAccountData::get_pda_pubkey(&function_account_info.key())?; - if enclave_account_info.key() != expected_enclave_key { - return Ok(false); - } - // deserialize accounts and verify the owner + let function_loader = AccountLoader::<'_, FunctionAccountData>::try_from(&function_account_info.clone())?; let func = function_loader.load()?; - let enclave_loader = - AccountLoader::<'_, EnclaveAccountData>::try_from(&enclave_account_info.clone())?; - let enclave = enclave_loader.load()?; + // TODO: validate the seeds and bump // validate the enclaves enclave is not empty - if enclave.mr_enclave == [0u8; 32] { - return Ok(false); - } - - // validate the enclaves measurement is present in FunctionAccount config - if !func.is_valid_enclave(&enclave.mr_enclave) { + if func.enclave.mr_enclave == [0u8; 32] { return Ok(false); } // validate the enclaves delegated signer matches - if enclave.enclave_signer != signer.key() { + if func.enclave.enclave_signer != signer.key() { return Ok(false); } - Ok(true) + // validate the function was verified and it is not expired + Ok(func.enclave.is_verified(&Clock::get()?)) } pub fn is_empty_schedule(&self) -> bool { @@ -354,14 +394,6 @@ impl FunctionAccountData { format!("{}:{}", self.get_container(), self.get_version()) } - pub fn is_valid_enclave(&self, mr_enclave: &[u8; 32]) -> bool { - if *mr_enclave == [0u8; 32] { - return false; - } - - self.mr_enclaves.contains(mr_enclave) - } - cfg_client! { pub fn get_discriminator_filter() -> solana_client::rpc_filter::RpcFilterType { solana_client::rpc_filter::RpcFilterType::Memcmp(solana_client::rpc_filter::Memcmp::new_raw_bytes( @@ -393,7 +425,7 @@ impl FunctionAccountData { pub fn get_queue_filter(queue_pubkey: &Pubkey) -> solana_client::rpc_filter::RpcFilterType { solana_client::rpc_filter::RpcFilterType::Memcmp(solana_client::rpc_filter::Memcmp::new_raw_bytes( - 543, + 2553, queue_pubkey.to_bytes().into(), )) } diff --git a/rust/switchboard-solana/src/attestation_program/accounts/mod.rs b/rust/switchboard-solana/src/attestation_program/accounts/mod.rs index 5eb965d..00fbb5b 100644 --- a/rust/switchboard-solana/src/attestation_program/accounts/mod.rs +++ b/rust/switchboard-solana/src/attestation_program/accounts/mod.rs @@ -1,7 +1,7 @@ pub mod attestation_permission; pub mod attestation_queue; pub mod attestation_state; -pub mod enclave; +pub mod verifier; pub mod function; pub mod function_request; pub mod switchboard_wallet; @@ -9,7 +9,7 @@ pub mod switchboard_wallet; pub use attestation_permission::*; pub use attestation_queue::*; pub use attestation_state::*; -pub use enclave::*; +pub use verifier::*; pub use function::*; pub use function_request::*; pub use switchboard_wallet::*; diff --git a/rust/switchboard-solana/src/attestation_program/accounts/enclave.rs b/rust/switchboard-solana/src/attestation_program/accounts/verifier.rs similarity index 62% rename from rust/switchboard-solana/src/attestation_program/accounts/enclave.rs rename to rust/switchboard-solana/src/attestation_program/accounts/verifier.rs index 9ffca84..a75f0cb 100644 --- a/rust/switchboard-solana/src/attestation_program/accounts/enclave.rs +++ b/rust/switchboard-solana/src/attestation_program/accounts/verifier.rs @@ -3,9 +3,7 @@ use crate::prelude::*; use bytemuck::{Pod, Zeroable}; use std::cell::Ref; -use crate::{QUOTE_SEED, SWITCHBOARD_ATTESTATION_PROGRAM_ID}; - -pub type MrEnclave = [u8; 32]; +use crate::SWITCHBOARD_ATTESTATION_PROGRAM_ID; #[repr(u8)] #[derive(Copy, Clone, Default, Debug, Eq, PartialEq, AnchorSerialize, AnchorDeserialize)] @@ -43,39 +41,27 @@ impl From for VerificationStatus { #[zero_copy(unsafe)] #[repr(packed)] #[derive(Debug)] -pub struct EnclaveAccountData { - /// The address of the signer generated within an enclave. - pub enclave_signer: Pubkey, +pub struct VerifierAccountData { + /// Represents the state of the quote verifiers enclave. + pub enclave: Quote, + + // Accounts Config /// The authority of the EnclaveAccount which is permitted to make account changes. pub authority: Pubkey, /// Queue used for attestation to verify a MRENCLAVE measurement. pub attestation_queue: Pubkey, - /// The quotes MRENCLAVE measurement dictating the contents of the secure enclave. - pub mr_enclave: [u8; 32], - /// The VerificationStatus of the quote. - pub verification_status: u8, - /// The unix timestamp when the quote was last verified. - pub verification_timestamp: i64, - /// The unix timestamp when the quotes verification status expires. - pub valid_until: i64, + // Metadata Config /// The unix timestamp when the quote was created. pub created_at: i64, - // Quote Verifier ONLY fields - /// The off-chain registry where the verifiers quote can be located. - pub quote_registry: [u8; 32], - /// Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. - pub registry_key: [u8; 64], + // Queue Config /// Whether the quote is located on the AttestationQueues buffer. pub is_on_queue: bool, /// The last time the quote heartbeated on-chain. pub last_heartbeat: i64, - // FunctionAccount only fields - /// The PDA bump. Only set for FunctionAccount quotes. - pub bump: u8, - + // Token Config /// 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. pub reward_escrow: Pubkey, @@ -84,16 +70,16 @@ pub struct EnclaveAccountData { pub stake_wallet: Pubkey, /// Reserved. - pub _ebuf: [u8; 928], + pub _ebuf: [u8; 1024], } -impl anchor_lang::AccountDeserialize for EnclaveAccountData { +impl anchor_lang::AccountDeserialize for VerifierAccountData { fn try_deserialize(buf: &mut &[u8]) -> anchor_lang::Result { - if buf.len() < EnclaveAccountData::discriminator().len() { + if buf.len() < VerifierAccountData::discriminator().len() { return Err(anchor_lang::error::ErrorCode::AccountDiscriminatorNotFound.into()); } let given_disc = &buf[..8]; - if EnclaveAccountData::discriminator() != given_disc { + if VerifierAccountData::discriminator() != given_disc { return Err( anchor_lang::error::Error::from(anchor_lang::error::AnchorError { error_name: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.name(), @@ -109,7 +95,7 @@ impl anchor_lang::AccountDeserialize for EnclaveAccountData { )), compared_values: None, }) - .with_account_name("EnclaveAccountData"), + .with_account_name("VerifierAccountData"), ); } Self::try_deserialize_unchecked(buf) @@ -122,23 +108,23 @@ impl anchor_lang::AccountDeserialize for EnclaveAccountData { } } -unsafe impl Pod for EnclaveAccountData {} -unsafe impl Zeroable for EnclaveAccountData {} +unsafe impl Pod for VerifierAccountData {} +unsafe impl Zeroable for VerifierAccountData {} -impl Discriminator for EnclaveAccountData { - const DISCRIMINATOR: [u8; 8] = [90, 162, 39, 88, 77, 157, 156, 165]; +impl Discriminator for VerifierAccountData { + const DISCRIMINATOR: [u8; 8] = [106, 146, 60, 232, 231, 52, 189, 253]; } -impl Owner for EnclaveAccountData { +impl Owner for VerifierAccountData { fn owner() -> Pubkey { SWITCHBOARD_ATTESTATION_PROGRAM_ID } } -impl ZeroCopy for EnclaveAccountData {} +impl ZeroCopy for VerifierAccountData {} -impl EnclaveAccountData { +impl VerifierAccountData { pub fn size() -> usize { - 8 + std::mem::size_of::() + 8 + std::mem::size_of::() } /// Returns the deserialized Switchboard Quote account @@ -150,26 +136,26 @@ impl EnclaveAccountData { /// # Examples /// /// ```ignore - /// use switchboard_solana::EnclaveAccountData; + /// use switchboard_solana::VerifierAccountData; /// - /// let quote_account = EnclaveAccountData::new(quote_account_info)?; + /// let quote_account = VerifierAccountData::new(quote_account_info)?; /// ``` pub fn new<'info>( quote_account_info: &'info AccountInfo<'info>, - ) -> anchor_lang::Result> { + ) -> anchor_lang::Result> { let data = quote_account_info.try_borrow_data()?; - if data.len() < EnclaveAccountData::discriminator().len() { + if data.len() < VerifierAccountData::discriminator().len() { return Err(ErrorCode::AccountDiscriminatorNotFound.into()); } let mut disc_bytes = [0u8; 8]; disc_bytes.copy_from_slice(&data[..8]); - if disc_bytes != EnclaveAccountData::discriminator() { + if disc_bytes != VerifierAccountData::discriminator() { return Err(ErrorCode::AccountDiscriminatorMismatch.into()); } Ok(Ref::map(data, |data| { - bytemuck::from_bytes(&data[8..std::mem::size_of::() + 8]) + bytemuck::from_bytes(&data[8..std::mem::size_of::() + 8]) })) } @@ -182,49 +168,54 @@ impl EnclaveAccountData { /// # Examples /// /// ```ignore - /// use switchboard_solana::EnclaveAccountData; + /// use switchboard_solana::VerifierAccountData; /// - /// let quote_account = EnclaveAccountData::new(quote_account_info.try_borrow_data()?)?; + /// let quote_account = VerifierAccountData::new(quote_account_info.try_borrow_data()?)?; /// ``` - pub fn new_from_bytes(data: &[u8]) -> anchor_lang::Result<&EnclaveAccountData> { - if data.len() < EnclaveAccountData::discriminator().len() { + pub fn new_from_bytes(data: &[u8]) -> anchor_lang::Result<&VerifierAccountData> { + if data.len() < VerifierAccountData::discriminator().len() { return Err(ErrorCode::AccountDiscriminatorNotFound.into()); } let mut disc_bytes = [0u8; 8]; disc_bytes.copy_from_slice(&data[..8]); - if disc_bytes != EnclaveAccountData::discriminator() { + if disc_bytes != VerifierAccountData::discriminator() { return Err(ErrorCode::AccountDiscriminatorMismatch.into()); } Ok(bytemuck::from_bytes( - &data[8..std::mem::size_of::() + 8], + &data[8..std::mem::size_of::() + 8], )) } - pub fn get_pda_pubkey(function_pubkey: &Pubkey) -> anchor_lang::Result { - let (pda_key, _bump) = Pubkey::find_program_address( - &[QUOTE_SEED, function_pubkey.as_ref()], - &SWITCHBOARD_ATTESTATION_PROGRAM_ID, - ); - - Ok(pda_key) + pub fn signer(&self) -> Pubkey { + self.enclave.enclave_signer } - pub fn is_valid(&self, clock: &Clock) -> bool { - if self.verification_status == VerificationStatus::VerificationOverride as u8 { - return true; + pub fn assert_signer(&self, signer: &AccountInfo) -> Result<()> { + if self.enclave.enclave_signer != signer.key() { + return Err(error!(SwitchboardError::InvalidEnclaveSigner)); } - if self.verification_status == VerificationStatus::VerificationPending as u8 { - return false; + + Ok(()) + } + + pub fn is_verified(&self, clock: &Clock) -> bool { + match self.enclave.verification_status.into() { + VerificationStatus::VerificationOverride => true, + VerificationStatus::VerificationSuccess => { + self.enclave.valid_until > clock.unix_timestamp + } + _ => false, } - if self.verification_status == VerificationStatus::VerificationFailure as u8 { - return false; + } + + pub fn verify(&self, clock: &Clock) -> Result<()> { + if !self.is_verified(clock) { + return Err(error!(SwitchboardError::InvalidQuote)); } - if self.valid_until < clock.unix_timestamp { - return false; - } - true + + Ok(()) } cfg_client! { diff --git a/rust/switchboard-solana/src/attestation_program/instructions/function_init.rs b/rust/switchboard-solana/src/attestation_program/instructions/function_init.rs index b07d98e..ec1a76e 100644 --- a/rust/switchboard-solana/src/attestation_program/instructions/function_init.rs +++ b/rust/switchboard-solana/src/attestation_program/instructions/function_init.rs @@ -4,16 +4,14 @@ use crate::prelude::*; #[instruction(params:FunctionInitParams)] pub struct FunctionInit<'info> { #[account( - init, - space = FunctionAccountData::size(), - payer = payer, - seeds = [ - FUNCTION_SEED, - params.creator_seed.unwrap_or(payer.key().to_bytes()).as_ref(), - params.recent_slot.to_le_bytes().as_ref() - ], - bump, - )] + init, + space = FunctionAccountData::size(), + payer = payer, + seeds = [FUNCTION_SEED, + params.creator_seed.unwrap_or(payer.key().to_bytes()).as_ref(), + params.recent_slot.to_le_bytes().as_ref()], + bump, + )] pub function: AccountLoader<'info, FunctionAccountData>, /// CHECK: todo @@ -23,15 +21,6 @@ pub struct FunctionInit<'info> { /// CHECK: pub authority: AccountInfo<'info>, - #[account( - init, - seeds = [QUOTE_SEED, function.key().as_ref()], - space = EnclaveAccountData::size(), - payer = payer, - bump, - )] - pub quote: AccountLoader<'info, EnclaveAccountData>, - pub attestation_queue: AccountLoader<'info, AttestationQueueAccountData>, #[account(mut)] @@ -47,12 +36,6 @@ pub struct FunctionInit<'info> { #[account(mut)] pub token_wallet: AccountInfo<'info>, - #[account( - seeds = [STATE_SEED], - bump = state.load()?.bump - )] - pub state: AccountLoader<'info, AttestationProgramState>, - #[account(address = anchor_spl::token::spl_token::native_mint::ID)] pub mint: Account<'info, Mint>, @@ -64,9 +47,9 @@ pub struct FunctionInit<'info> { /// CHECK: #[account( - constraint = address_lookup_program.executable, - address = solana_address_lookup_table_program::id(), - )] + constraint = address_lookup_program.executable, + address = solana_address_lookup_table_program::id(), + )] pub address_lookup_program: AccountInfo<'info>, } @@ -140,13 +123,11 @@ impl<'info> FunctionInit<'info> { account_infos.extend(self.function.to_account_infos()); account_infos.extend(self.address_lookup_table.to_account_infos()); account_infos.extend(self.authority.to_account_infos()); - account_infos.extend(self.quote.to_account_infos()); account_infos.extend(self.attestation_queue.to_account_infos()); account_infos.extend(self.payer.to_account_infos()); account_infos.extend(self.wallet.to_account_infos()); account_infos.extend(self.wallet_authority.to_account_infos()); account_infos.extend(self.token_wallet.to_account_infos()); - account_infos.extend(self.state.to_account_infos()); account_infos.extend(self.mint.to_account_infos()); account_infos.extend(self.token_program.to_account_infos()); account_infos.extend(self.associated_token_program.to_account_infos()); @@ -161,7 +142,6 @@ impl<'info> FunctionInit<'info> { account_metas.extend(self.function.to_account_metas(None)); account_metas.extend(self.address_lookup_table.to_account_metas(None)); account_metas.extend(self.authority.to_account_metas(None)); - account_metas.extend(self.quote.to_account_metas(None)); account_metas.extend(self.attestation_queue.to_account_metas(None)); account_metas.extend(self.payer.to_account_metas(None)); account_metas.extend(self.wallet.to_account_metas(None)); @@ -171,7 +151,6 @@ impl<'info> FunctionInit<'info> { account_metas.push(AccountMeta::new_readonly(crate::ID, false)); } account_metas.extend(self.token_wallet.to_account_metas(None)); - account_metas.extend(self.state.to_account_metas(None)); account_metas.extend(self.mint.to_account_metas(None)); account_metas.extend(self.token_program.to_account_metas(None)); account_metas.extend(self.associated_token_program.to_account_metas(None)); diff --git a/rust/switchboard-solana/src/attestation_program/instructions/function_set_config.rs b/rust/switchboard-solana/src/attestation_program/instructions/function_set_config.rs index 6d1285e..c9da53d 100644 --- a/rust/switchboard-solana/src/attestation_program/instructions/function_set_config.rs +++ b/rust/switchboard-solana/src/attestation_program/instructions/function_set_config.rs @@ -5,23 +5,14 @@ use crate::prelude::*; pub struct FunctionSetConfig<'info> { #[account( mut, - seeds = [ - FUNCTION_SEED, - function.load()?.creator_seed.as_ref(), - &function.load()?.created_at_slot.to_le_bytes() - ], + seeds = [FUNCTION_SEED, + function.load()?.creator_seed.as_ref(), + &function.load()?.created_at_slot.to_le_bytes()], bump = function.load()?.bump, - has_one = authority @ SwitchboardError::InvalidAuthority + has_one = authority )] pub function: AccountLoader<'info, FunctionAccountData>, - #[account( - mut, - seeds = [QUOTE_SEED, function.key().as_ref()], - bump = quote.load()?.bump, - )] - pub quote: AccountLoader<'info, EnclaveAccountData>, - pub authority: Signer<'info>, } @@ -91,7 +82,6 @@ impl<'info> FunctionSetConfig<'info> { fn to_account_infos(&self) -> Vec> { let mut account_infos = Vec::new(); account_infos.extend(self.function.to_account_infos()); - account_infos.extend(self.quote.to_account_infos()); account_infos.extend(self.authority.to_account_infos()); account_infos } @@ -100,7 +90,6 @@ impl<'info> FunctionSetConfig<'info> { fn to_account_metas(&self, is_signer: Option) -> Vec { let mut account_metas = Vec::new(); account_metas.extend(self.function.to_account_metas(None)); - account_metas.extend(self.quote.to_account_metas(None)); account_metas.extend(self.authority.to_account_metas(None)); account_metas } diff --git a/rust/switchboard-solana/src/attestation_program/instructions/function_verify.rs b/rust/switchboard-solana/src/attestation_program/instructions/function_verify.rs index 1521b31..7ef8313 100644 --- a/rust/switchboard-solana/src/attestation_program/instructions/function_verify.rs +++ b/rust/switchboard-solana/src/attestation_program/instructions/function_verify.rs @@ -4,72 +4,44 @@ use crate::prelude::*; #[instruction(params: FunctionVerifyParams)] // rpc parameters hint pub struct FunctionVerify<'info> { #[account( - mut, - seeds = [ - FUNCTION_SEED, - function.load()?.creator_seed.as_ref(), - &function.load()?.created_at_slot.to_le_bytes() - ], - bump = function.load()?.bump, - has_one = authority, - has_one = attestation_queue, - has_one = escrow_token_wallet, - has_one = escrow_wallet, - )] + mut, + seeds = [FUNCTION_SEED, + function.load()?.creator_seed.as_ref(), + &function.load()?.created_at_slot.to_le_bytes()], + bump = function.load()?.bump, + has_one = attestation_queue, + has_one = escrow_token_wallet, + has_one = escrow_wallet, + )] pub function: AccountLoader<'info, FunctionAccountData>, - /// CHECK: - pub authority: AccountInfo<'info>, - pub function_enclave_signer: Signer<'info>, #[account( - mut, - seeds = [QUOTE_SEED, function.key().as_ref()], - bump = fn_quote.load()?.bump, - has_one = attestation_queue - )] - pub fn_quote: AccountLoader<'info, EnclaveAccountData>, + has_one = attestation_queue, + constraint = verifier.load()?.enclave.enclave_signer == verifier_signer.key(), + )] + pub verifier: AccountLoader<'info, VerifierAccountData>, + + pub verifier_signer: Signer<'info>, #[account( - has_one = attestation_queue, - constraint = verifier_quote.load()?.enclave_signer == verifier_enclave_signer.key(), - )] - pub verifier_quote: AccountLoader<'info, EnclaveAccountData>, - - pub verifier_enclave_signer: Signer<'info>, - - #[account( - seeds = [ - PERMISSION_SEED, - attestation_queue.load()?.authority.as_ref(), - attestation_queue.key().as_ref(), - verifier_quote.key().as_ref() - ], - bump = verifier_permission.load()?.bump, - )] + seeds = [PERMISSION_SEED, + attestation_queue.load()?.authority.as_ref(), + attestation_queue.key().as_ref(), + verifier.key().as_ref()], + bump = verifier_permission.load()?.bump, + )] pub verifier_permission: AccountLoader<'info, AttestationPermissionAccountData>, pub escrow_wallet: Box>, - #[account( - mut, - constraint = escrow_token_wallet.is_native() - )] + #[account(mut, constraint = escrow_token_wallet.is_native())] pub escrow_token_wallet: Box>, - #[account( - mut, - constraint = receiver.is_native() - )] + #[account(mut, constraint = receiver.is_native())] pub receiver: Box>, - #[account( - seeds = [STATE_SEED], - bump = state.load()?.bump - )] - pub state: AccountLoader<'info, AttestationProgramState>, - pub attestation_queue: AccountLoader<'info, AttestationQueueAccountData>, pub token_program: Program<'info, Token>, @@ -150,16 +122,13 @@ impl<'info> FunctionVerify<'info> { fn to_account_infos(&self) -> Vec> { let mut account_infos = Vec::new(); account_infos.extend(self.function.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); account_infos.extend(self.function_enclave_signer.to_account_infos()); - account_infos.extend(self.fn_quote.to_account_infos()); - account_infos.extend(self.verifier_quote.to_account_infos()); - account_infos.extend(self.verifier_enclave_signer.to_account_infos()); + account_infos.extend(self.verifier.to_account_infos()); + account_infos.extend(self.verifier_signer.to_account_infos()); account_infos.extend(self.verifier_permission.to_account_infos()); account_infos.extend(self.escrow_wallet.to_account_infos()); account_infos.extend(self.escrow_token_wallet.to_account_infos()); account_infos.extend(self.receiver.to_account_infos()); - account_infos.extend(self.state.to_account_infos()); account_infos.extend(self.attestation_queue.to_account_infos()); account_infos.extend(self.token_program.to_account_infos()); account_infos @@ -169,21 +138,15 @@ impl<'info> FunctionVerify<'info> { fn to_account_metas(&self, is_signer: Option) -> Vec { let mut account_metas = Vec::new(); account_metas.extend(self.function.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - .extend(self.function_enclave_signer.to_account_metas(None)); - account_metas.extend(self.fn_quote.to_account_metas(None)); - account_metas.extend(self.verifier_quote.to_account_metas(None)); - account_metas - .extend(self.verifier_enclave_signer.to_account_metas(None)); + account_metas.extend(self.function_enclave_signer.to_account_metas(None)); + account_metas.extend(self.verifier.to_account_metas(None)); + account_metas.extend(self.verifier_signer.to_account_metas(None)); account_metas.extend(self.verifier_permission.to_account_metas(None)); account_metas.extend(self.escrow_wallet.to_account_metas(None)); account_metas.extend(self.escrow_token_wallet.to_account_metas(None)); account_metas.extend(self.receiver.to_account_metas(None)); - account_metas.extend(self.state.to_account_metas(None)); account_metas.extend(self.attestation_queue.to_account_metas(None)); account_metas.extend(self.token_program.to_account_metas(None)); account_metas } } - diff --git a/rust/switchboard-solana/src/attestation_program/instructions/request_verify.rs b/rust/switchboard-solana/src/attestation_program/instructions/request_verify.rs index abfb344..9e15b77 100644 --- a/rust/switchboard-solana/src/attestation_program/instructions/request_verify.rs +++ b/rust/switchboard-solana/src/attestation_program/instructions/request_verify.rs @@ -3,45 +3,68 @@ use crate::prelude::*; #[derive(Accounts)] #[instruction(params:FunctionRequestVerifyParams)] pub struct FunctionRequestVerify<'info> { - #[account( - mut, - has_one = function, - has_one = escrow, - )] - pub request: Box>, - pub function_enclave_signer: Signer<'info>, - #[account( - mut, - constraint = escrow.is_native() && escrow.owner == state.key() - )] - pub escrow: Box>, - #[account(mut, has_one = attestation_queue)] - pub function: AccountLoader<'info, FunctionAccountData>, - #[account( - mut, - constraint = escrow.is_native() && escrow.owner == state.key() - )] - pub function_escrow: Option>>, - #[account( - has_one = attestation_queue, - constraint = verifier_quote.load()?.enclave_signer == verifier_enclave_signer.key(), - )] - pub verifier_quote: AccountLoader<'info, EnclaveAccountData>, - pub verifier_enclave_signer: Signer<'info>, - #[account( - seeds = [PERMISSION_SEED, - attestation_queue.load()?.authority.as_ref(), - attestation_queue.key().as_ref(), - verifier_quote.key().as_ref()], - bump = verifier_permission.load()?.bump, - )] - pub verifier_permission: AccountLoader<'info, AttestationPermissionAccountData>, - #[account(mut, seeds = [STATE_SEED], bump = state.load()?.bump)] - pub state: AccountLoader<'info, AttestationProgramState>, - pub attestation_queue: AccountLoader<'info, AttestationQueueAccountData>, - #[account(mut, constraint = receiver.is_native())] - pub receiver: Box>, - pub token_program: Program<'info, anchor_spl::token::Token>, + #[account( + mut, + has_one = function, + has_one = escrow, + )] + pub request: Box>, + + pub function_enclave_signer: Signer<'info>, + + #[account( + mut, + constraint = escrow.is_native() && escrow.owner == state.key() + )] + pub escrow: Box>, + + #[account( + mut, + has_one = attestation_queue, + )] + pub function: AccountLoader<'info, FunctionAccountData>, + + #[account( + mut, + constraint = escrow.is_native() && escrow.owner == state.key() + )] + pub function_escrow: Option>>, + + #[account( + has_one = attestation_queue, + constraint = + verifier_quote.load()?.enclave.enclave_signer == verifier_enclave_signer.key(), + )] + pub verifier_quote: AccountLoader<'info, VerifierAccountData>, + + pub verifier_enclave_signer: Signer<'info>, + + #[account( + seeds = [ + PERMISSION_SEED, + attestation_queue.load()?.authority.as_ref(), + attestation_queue.key().as_ref(), + verifier_quote.key().as_ref() + ], + bump = verifier_permission.load()?.bump, + )] + pub verifier_permission: AccountLoader<'info, AttestationPermissionAccountData>, + + #[account( + seeds = [STATE_SEED], + bump = state.load()?.bump, + )] + pub state: AccountLoader<'info, AttestationProgramState>, + + pub attestation_queue: AccountLoader<'info, AttestationQueueAccountData>, + + #[account( + mut, + constraint = receiver.is_native() + )] + pub receiver: Box>, + + pub token_program: Program<'info, Token>, } #[derive(Clone, AnchorSerialize, AnchorDeserialize)] diff --git a/rust/switchboard-solana/src/attestation_program/mod.rs b/rust/switchboard-solana/src/attestation_program/mod.rs index b1c1966..18efa7a 100644 --- a/rust/switchboard-solana/src/attestation_program/mod.rs +++ b/rust/switchboard-solana/src/attestation_program/mod.rs @@ -3,3 +3,6 @@ pub use accounts::*; pub mod instructions; pub use instructions::*; + +pub mod types; +pub use types::*; diff --git a/rust/switchboard-solana/src/attestation_program/types.rs b/rust/switchboard-solana/src/attestation_program/types.rs new file mode 100644 index 0000000..bb418d8 --- /dev/null +++ b/rust/switchboard-solana/src/attestation_program/types.rs @@ -0,0 +1,50 @@ +use crate::prelude::*; + +pub type MrEnclave = [u8; 32]; + +#[zero_copy(unsafe)] +#[repr(packed)] +#[derive(Debug, PartialEq)] +pub struct Quote { + /// The address of the signer generated within an enclave. + pub enclave_signer: Pubkey, + /// The quotes MRENCLAVE measurement dictating the contents of the secure enclave. + pub mr_enclave: [u8; 32], + /// The VerificationStatus of the quote. + pub verification_status: u8, + /// The unix timestamp when the quote was last verified. + pub verification_timestamp: i64, + /// The unix timestamp when the quotes verification status expires. + pub valid_until: i64, + /// The off-chain registry where the verifiers quote can be located. + pub quote_registry: [u8; 32], + /// Key to lookup the buffer data on IPFS or an alternative decentralized storage solution. + pub registry_key: [u8; 64], + /// Reserved. + pub _ebuf: [u8; 256], +} +impl Default for Quote { + fn default() -> Self { + unsafe { std::mem::zeroed() } + } +} +impl Quote { + pub fn reset_verification(&mut self) -> Result<()> { + if self.verification_status != VerificationStatus::VerificationOverride as u8 { + self.verification_status = VerificationStatus::None.into(); + } + self.enclave_signer = Pubkey::default(); + self.verification_timestamp = 0; + self.valid_until = 0; + + Ok(()) + } + + pub fn is_verified(&self, clock: &Clock) -> bool { + match self.verification_status.into() { + VerificationStatus::VerificationOverride => true, + VerificationStatus::VerificationSuccess => self.valid_until > clock.unix_timestamp, + _ => false, + } + } +} diff --git a/rust/switchboard-solana/src/client/function_runner.rs b/rust/switchboard-solana/src/client/function_runner.rs index e6eacd3..7d61fdb 100644 --- a/rust/switchboard-solana/src/client/function_runner.rs +++ b/rust/switchboard-solana/src/client/function_runner.rs @@ -2,14 +2,14 @@ use crate::prelude::*; use anchor_lang::solana_program::instruction::Instruction; use anchor_lang::solana_program::message::Message; use anchor_lang::solana_program::pubkey::Pubkey; +use hex; use sgx_quote::Quote; use solana_client::rpc_client::RpcClient; use solana_sdk::commitment_config::CommitmentConfig; use solana_sdk::signer::keypair::Keypair; +use std::env; use std::result::Result; use std::sync::Arc; -use hex; -use std::env; use switchboard_common::ChainResultInfo::Solana; use switchboard_common::SOLFunctionResult; @@ -22,9 +22,10 @@ pub struct FunctionRunner { pub function: Pubkey, pub function_data: Box, + pub fn_request_key: Pubkey, pub fn_request_data: Box, - pub quote: Pubkey, + pub payer: Pubkey, pub verifier: Pubkey, pub reward_receiver: Pubkey, @@ -49,20 +50,21 @@ impl FunctionRunner { let signer = signer_to_pubkey(signer_keypair.clone())?; let function = load_env_pubkey("FUNCTION_KEY")?; - let function_data = *bytemuck::try_from_bytes(&hex::decode( - env::var("FUNCTION_DATA").unwrap()).unwrap()).unwrap(); + let function_data = *bytemuck::try_from_bytes( + &hex::decode(env::var("FUNCTION_DATA").unwrap_or_default()).unwrap_or_default(), + ) + .unwrap_or(&Default::default()); + let fn_request_key = load_env_pubkey("FUNCTION_REQUEST_KEY").unwrap_or_default(); - let fn_request_data = FunctionRequestAccountData::try_from_slice(&hex::decode(env::var("FUNCTION_REQUEST_DATA") - .unwrap_or_default()).unwrap_or_default()).unwrap_or_default(); + let fn_request_data = FunctionRequestAccountData::try_from_slice( + &hex::decode(env::var("FUNCTION_REQUEST_DATA").unwrap_or_default()).unwrap_or_default(), + ) + .unwrap_or_default(); + let payer = load_env_pubkey("PAYER")?; let verifier = load_env_pubkey("VERIFIER")?; let reward_receiver = load_env_pubkey("REWARD_RECEIVER")?; - let (quote, _bump) = Pubkey::find_program_address( - &[QUOTE_SEED, function.as_ref()], - &SWITCHBOARD_ATTESTATION_PROGRAM_ID, - ); - Ok(Self { client: Arc::new(client), signer_keypair, @@ -71,7 +73,6 @@ impl FunctionRunner { function_data: Box::new(function_data), fn_request_key, fn_request_data: Box::new(fn_request_data), - quote, payer, verifier, reward_receiver, @@ -104,8 +105,8 @@ impl FunctionRunner { let fn_data: FunctionAccountData = FunctionAccountData::fetch(&self.client, self.function).await?; - let verifier_quote: EnclaveAccountData = - EnclaveAccountData::fetch(&self.client, self.verifier).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?; @@ -135,8 +136,10 @@ impl FunctionRunner { function: self.function, function_enclave_signer: self.signer, verifier_quote: self.verifier, - verifier_enclave_signer: verifier_quote.enclave_signer, - verifier_permission: verifier_permission, + 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, receiver: self.reward_receiver, }; @@ -193,6 +196,8 @@ pub struct FunctionVerifyAccounts { pub verifier_quote: Pubkey, pub verifier_enclave_signer: Pubkey, pub verifier_permission: Pubkey, + pub escrow_wallet: Pubkey, + pub escrow_token_wallet: Pubkey, pub receiver: Pubkey, pub attestation_queue: Pubkey, } @@ -233,11 +238,6 @@ impl ToAccountMetas for FunctionVerifyAccounts { is_signer: true, is_writable: false, }, - AccountMeta { - pubkey: FunctionAccountData::get_enclave_pda(&self.function), - is_signer: false, - is_writable: true, - }, AccountMeta { pubkey: self.verifier_quote, is_signer: false, @@ -254,7 +254,12 @@ impl ToAccountMetas for FunctionVerifyAccounts { is_writable: false, }, AccountMeta { - pubkey: FunctionAccountData::get_escrow_key(&self.function), + pubkey: self.escrow_wallet, + is_signer: false, + is_writable: false, + }, + AccountMeta { + pubkey: self.escrow_token_wallet, is_signer: false, is_writable: true, }, @@ -263,11 +268,6 @@ impl ToAccountMetas for FunctionVerifyAccounts { is_signer: false, is_writable: true, }, - AccountMeta { - pubkey: AttestationProgramState::get_pda(), - is_signer: false, - is_writable: false, - }, AccountMeta { pubkey: self.attestation_queue, is_signer: false, diff --git a/rust/switchboard-solana/src/client/utils.rs b/rust/switchboard-solana/src/client/utils.rs index 4d1ba96..1b59704 100644 --- a/rust/switchboard-solana/src/client/utils.rs +++ b/rust/switchboard-solana/src/client/utils.rs @@ -8,7 +8,7 @@ use std::sync::Arc; use std::time::{SystemTime, UNIX_EPOCH}; pub fn load_env_pubkey(key: &str) -> Result { - Pubkey::from_str(&env::var(key).unwrap()) + Pubkey::from_str(&env::var(key).unwrap_or_default()) .map_err(|_| SwitchboardClientError::EnvVariableMissing(key.to_string())) } diff --git a/rust/switchboard-solana/src/error.rs b/rust/switchboard-solana/src/error.rs index c01ef79..12d296b 100644 --- a/rust/switchboard-solana/src/error.rs +++ b/rust/switchboard-solana/src/error.rs @@ -35,6 +35,12 @@ pub enum SwitchboardError { PdaDerivationError, #[msg("Illegal Operation")] IllegalExecuteAttempt, + #[msg("The provided enclave quote is invalid")] + InvalidQuote, + #[msg("The provided queue address did not match the expected address on-chain")] + InvalidQueue, + #[msg("The provided enclave_signer does not match the expected enclave_signer")] + InvalidEnclaveSigner, } use crate::cfg_client; diff --git a/rust/switchboard-solana/src/seeds.rs b/rust/switchboard-solana/src/seeds.rs index 98767a1..60f97a4 100644 --- a/rust/switchboard-solana/src/seeds.rs +++ b/rust/switchboard-solana/src/seeds.rs @@ -18,6 +18,3 @@ pub const BUFFER_DISCRIMINATOR: &[u8] = b"BUFFERxx"; /// Seed used to derive the FunctionAccountData PDA. pub const FUNCTION_SEED: &[u8] = b"FunctionAccountData"; - -/// Seed used to derive the EnclaveAccountData PDA. -pub const QUOTE_SEED: &[u8] = b"QuoteAccountData"; diff --git a/rust/switchboard-solana/src/types.rs b/rust/switchboard-solana/src/types.rs index ac118ea..1677ed8 100644 --- a/rust/switchboard-solana/src/types.rs +++ b/rust/switchboard-solana/src/types.rs @@ -14,7 +14,7 @@ pub use crate::oracle_program::{ pub use crate::attestation_program::{ FunctionCloseParams, FunctionInitParams, FunctionRequestCloseParams, FunctionRequestInitParams, FunctionRequestVerifyParams, FunctionSetEscrowParams, FunctionStatus, FunctionTriggerParams, - FunctionVerifyParams, MrEnclave, SwitchboardAttestationPermission, VerificationStatus, + FunctionVerifyParams, MrEnclave, Quote, SwitchboardAttestationPermission, VerificationStatus, WalletFundParams, WalletInitParams, };