From 952b574f016dbb7cd07f3a0b2e832357e101452b Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Wed, 31 Jul 2024 09:19:49 -0700 Subject: [PATCH] Reorganize v1.x library into its own maintenance branch (#3012) # Summary On the eve of the release of `@solana/web3.js` 2.0, we're going to move the `1.x` line to a maintenance branch. Legacy tests and build steps will no longer run on mainline PRs or commits, but backports will still be possible by sending PRs for the branch `maintenance/1.x` # Test Plan On the `maintenance/1.x` branch: ```shell pnpm i pnpm test:prettier pnpm compile:typedefs pnpm test:lint pnpm compile:docs pnpm compile:js pnpm test:unit pnpm test:live-with-test-validator:setup pnpm test:live-with-test-validator GITHUB_TOKEN={READONLY_PAT} pnpm publish-packages ``` https://gist.github.com/steveluscher/e7d8f02a2b1337e8fd8caa634a5d3549 --- .changeset/brave-chicken-own.md | 5 - .changeset/breezy-items-reflect.md | 5 - .changeset/calm-camels-decide.md | 5 - .changeset/calm-crabs-tease.md | 11 - .changeset/chatty-flies-end.md | 16 - .changeset/chilled-walls-scream.md | 5 - .changeset/chilled-waves-lay.md | 75 - .changeset/chilly-seas-act.md | 5 - .changeset/config.json | 25 - .changeset/curly-kids-type.md | 5 - .changeset/early-eyes-mix.md | 5 - .changeset/famous-buttons-switch.md | 17 - .changeset/fast-cars-knock.md | 5 - .changeset/forty-queens-explode.md | 5 - .changeset/fuzzy-lizards-end.md | 40 - .changeset/gorgeous-gorillas-sniff.md | 16 - .changeset/green-experts-hang.md | 7 - .changeset/heavy-students-relax.md | 8 - .changeset/honest-cheetahs-care.md | 5 - .changeset/honest-rivers-deny.md | 24 - .changeset/hot-penguins-explain.md | 5 - .changeset/late-mangos-doubt.md | 28 - .changeset/late-planets-breathe.md | 26 - .changeset/lazy-phones-fail.md | 39 - .changeset/little-berries-applaud.md | 5 - .changeset/loud-otters-pull.md | 8 - .changeset/lovely-mice-promise.md | 5 - .changeset/mean-vans-behave.md | 33 - .changeset/metal-bees-lick.md | 6 - .changeset/metal-radios-switch.md | 5 - .changeset/nervous-deers-roll.md | 17 - .changeset/nine-pots-notice.md | 5 - .changeset/odd-beds-punch.md | 8 - .changeset/poor-dogs-crash.md | 5 - .changeset/pre.json | 106 - .changeset/pretty-rocks-argue.md | 22 - .changeset/proud-poems-try.md | 5 - .changeset/purple-forks-rest.md | 5 - .changeset/rare-goats-sell.md | 5 - .changeset/rich-eggs-tease.md | 10 - .changeset/sharp-steaks-admire.md | 6 - .changeset/shiny-birds-pay.md | 11 - .changeset/short-jokes-begin.md | 5 - .changeset/short-toes-perform.md | 5 - .changeset/silly-months-happen.md | 21 - .changeset/sixty-dodos-smile.md | 12 - .changeset/sour-mugs-press.md | 5 - .changeset/stale-turtles-hang.md | 6 - .changeset/strong-pandas-marry.md | 7 - .changeset/tender-turtles-bake.md | 14 - .changeset/thick-masks-lie.md | 30 - .changeset/thick-radios-appear.md | 5 - .changeset/thick-radios-search.md | 7 - .changeset/tidy-wolves-share.md | 40 - .changeset/tricky-fishes-pull.md | 5 - .changeset/two-cougars-try.md | 5 - .changeset/unlucky-pumpkins-itch.md | 5 - .changeset/violet-brooms-report.md | 15 - .changeset/warm-pears-sip.md | 5 - .changeset/wicked-cougars-matter.md | 5 - .changeset/wild-lobsters-kick.md | 7 - .../.eslintignore => .eslintignore | 0 .eslintrc.js | 52 +- .github/ISSUE_TEMPLATE/0_bug.md | 33 - .github/ISSUE_TEMPLATE/1_feature.md | 31 - .github/ISSUE_TEMPLATE/config.yml | 7 - .github/dependabot.yml | 18 - .github/label-actions.yml | 28 - .github/workflows/PULL_REQUEST_TEMPLATE.md | 9 - .../actions/lint-build-and-test/action.yml | 29 + .../workflows/autolock-inactive-threads.yml | 32 - .github/workflows/bundlesize.yml | 39 - .github/workflows/commit-lint.yml | 9 +- .github/workflows/label-actions.yml | 15 - .github/workflows/manage-stale-threads.yml | 39 - .github/workflows/publish-gh-pages.yml | 45 - .github/workflows/publish-legacy-package.yml | 22 +- .github/workflows/publish-packages.yml | 58 - .../workflows/publish-prerelease-packages.yml | 59 - .github/workflows/pull-requests.yml | 38 +- .gitignore | 39 +- .mergify.yml | 63 - .prettierignore | 8 - .../.prettierrc.yaml => .prettierrc.yaml | 0 .../.releaserc.json => .releaserc.json | 4 +- packages/library-legacy/.sgcrc => .sgcrc | 0 .vscode/settings.json | 3 - CONTRIBUTING.md | 33 - README.md | 69 +- .../babel.config.json => babel.config.json | 0 ...mmitlint.config.js => commitlint.config.js | 0 examples/README.md | 25 - examples/deserialize-transaction/LICENSE | 20 - examples/deserialize-transaction/package.json | 24 - .../deserialize-transaction/src/example.ts | 409 -- .../deserialize-transaction/tsconfig.json | 12 - examples/react-app/.eslintrc.cjs | 13 - examples/react-app/.gitignore | 24 - examples/react-app/LICENSE | 20 - examples/react-app/README.md | 44 - examples/react-app/index.html | 13 - examples/react-app/package.json | 37 - examples/react-app/public/solanaLogoMark.svg | 13 - examples/react-app/src/components/Balance.tsx | 55 - .../BaseSignMessageFeaturePanel.tsx | 102 - .../src/components/ConnectWalletMenu.tsx | 96 - .../src/components/ConnectWalletMenuItem.tsx | 103 - .../src/components/DisconnectButton.tsx | 51 - .../react-app/src/components/ErrorDialog.tsx | 38 - .../components/FeatureNotSupportedCallout.tsx | 23 - .../react-app/src/components/FeaturePanel.tsx | 16 - examples/react-app/src/components/Nav.tsx | 60 - .../react-app/src/components/SignInMenu.tsx | 78 - .../src/components/SignInMenuItem.tsx | 41 - ...lanaSignAndSendTransactionFeaturePanel.tsx | 211 - .../SolanaSignMessageFeaturePanel.tsx | 32 - .../UnconnectableWalletMenuItem.tsx | 34 - .../src/components/WalletAccountIcon.tsx | 24 - .../src/components/WalletMenuItemContent.tsx | 25 - .../react-app/src/context/ChainContext.tsx | 77 - examples/react-app/src/context/RpcContext.tsx | 35 - .../context/SelectedWalletAccountContext.tsx | 111 - examples/react-app/src/errors.tsx | 66 - examples/react-app/src/functions/balance.ts | 80 - examples/react-app/src/hooks/useStable.ts | 11 - examples/react-app/src/index.css | 1 - examples/react-app/src/main.tsx | 33 - examples/react-app/src/reset.css | 74 - examples/react-app/src/routes/root.tsx | 78 - examples/react-app/src/storage.ts | 41 - examples/react-app/src/vite-env.d.ts | 1 - examples/react-app/tsconfig.app.json | 27 - examples/react-app/tsconfig.json | 11 - examples/react-app/tsconfig.node.json | 13 - examples/react-app/vite.config.ts | 21 - examples/rpc-custom-api/LICENSE | 20 - examples/rpc-custom-api/package.json | 20 - examples/rpc-custom-api/src/example.ts | 116 - examples/rpc-custom-api/tsconfig.json | 12 - examples/rpc-transport-throttled/LICENSE | 20 - examples/rpc-transport-throttled/package.json | 22 - .../rpc-transport-throttled/src/example.ts | 137 - .../rpc-transport-throttled/tsconfig.json | 12 - examples/transfer-lamports/LICENSE | 20 - examples/transfer-lamports/package.json | 23 - examples/transfer-lamports/src/example.ts | 200 - examples/transfer-lamports/tsconfig.json | 12 - examples/utils/.gitignore | 1 - examples/utils/.prettierignore | 1 - examples/utils/LICENSE | 20 - examples/utils/createLogger.ts | 53 - examples/utils/package.json | 14 - examples/utils/pressAnyKeyPrompt.ts | 10 - examples/utils/tsconfig.declarations.json | 11 - examples/utils/tsconfig.json | 9 - package.json | 197 +- packages/accounts/.gitignore | 1 - packages/accounts/.prettierignore | 1 - packages/accounts/CHANGELOG.md | 83 - packages/accounts/LICENSE | 20 - packages/accounts/README.md | 312 -- packages/accounts/package.json | 84 - packages/accounts/src/__tests__/__setup__.ts | 44 - .../src/__tests__/decode-account-test.ts | 209 - .../src/__tests__/fetch-account-test.ts | 325 -- .../src/__tests__/maybe-account-test.ts | 62 - .../src/__tests__/parse-account-test.ts | 265 - .../__typetests__/decode-account-typetest.ts | 45 - .../__typetests__/fetch-account-typetest.ts | 78 - .../__typetests__/maybe-account-typetest.ts | 24 - .../__typetests__/parse-account-typetest.ts | 49 - packages/accounts/src/account.ts | 22 - packages/accounts/src/decode-account.ts | 75 - packages/accounts/src/fetch-account.ts | 90 - packages/accounts/src/index.ts | 5 - packages/accounts/src/maybe-account.ts | 36 - packages/accounts/src/parse-account.ts | 80 - packages/accounts/src/rpc-api/common.ts | 11 - .../accounts/src/rpc-api/getAccountInfo.ts | 73 - .../src/rpc-api/getMultipleAccounts.ts | 75 - packages/accounts/src/rpc-api/index.ts | 3 - packages/accounts/src/types/global.d.ts | 4 - packages/accounts/tsconfig.declarations.json | 10 - packages/accounts/tsconfig.json | 6 - packages/addresses/.gitignore | 1 - packages/addresses/.npmrc | 1 - packages/addresses/.prettierignore | 1 - packages/addresses/CHANGELOG.md | 102 - packages/addresses/LICENSE | 20 - packages/addresses/README.md | 190 - packages/addresses/package.json | 85 - .../addresses/src/__tests__/address-test.ts | 234 - .../addresses/src/__tests__/coercions-test.ts | 38 - .../addresses/src/__tests__/curve-test.ts | 31 - .../__tests__/program-derived-address-test.ts | 174 - .../src/__tests__/public-key-test.ts | 84 - .../src/__typetests__/coercions-typetests.ts | 3 - packages/addresses/src/address.ts | 107 - packages/addresses/src/curve.ts | 24 - packages/addresses/src/index.ts | 3 - .../addresses/src/program-derived-address.ts | 174 - packages/addresses/src/public-key.ts | 13 - packages/addresses/src/types/global.d.ts | 4 - .../addresses/src/vendor/noble/ed25519.ts | 94 - packages/addresses/tsconfig.declarations.json | 10 - packages/addresses/tsconfig.json | 9 - packages/assertions/.gitignore | 1 - packages/assertions/.npmrc | 1 - packages/assertions/.prettierignore | 1 - packages/assertions/.vscode/settings.json | 3 - packages/assertions/CHANGELOG.md | 72 - packages/assertions/LICENSE | 20 - packages/assertions/README.md | 39 - packages/assertions/package.json | 82 - .../assertions/src/__tests__/crypto-test.ts | 31 - .../src/__tests__/subtle-crypto-test.ts | 265 - packages/assertions/src/crypto.ts | 7 - packages/assertions/src/index.ts | 3 - packages/assertions/src/subtle-crypto.ts | 75 - packages/assertions/src/types/global.d.ts | 4 - .../assertions/tsconfig.declarations.json | 10 - packages/assertions/tsconfig.json | 9 - packages/build-scripts/README.md | 3 - packages/build-scripts/dev-flag.ts | 42 - packages/build-scripts/getBaseConfig.ts | 87 - packages/build-scripts/package.json | 14 - packages/build-scripts/tsconfig.json | 8 - packages/build-scripts/tsup.config.browser.ts | 5 - packages/build-scripts/tsup.config.library.ts | 15 - packages/build-scripts/tsup.config.package.ts | 9 - packages/codecs-core/.gitignore | 1 - packages/codecs-core/.npmrc | 1 - packages/codecs-core/.prettierignore | 1 - packages/codecs-core/CHANGELOG.md | 118 - packages/codecs-core/LICENSE | 20 - packages/codecs-core/README.md | 665 --- packages/codecs-core/package.json | 86 - .../codecs-core/src/__benchmarks__/run.ts | 54 - .../codecs-core/src/__tests__/__setup__.ts | 62 - .../src/__tests__/add-codec-sentinel-test.ts | 78 - .../__tests__/add-codec-size-prefix-test.ts | 55 - .../codecs-core/src/__tests__/bytes-test.ts | 56 - .../codecs-core/src/__tests__/codec-test.ts | 74 - .../src/__tests__/combine-codec.ts | 80 - .../src/__tests__/fix-codec-size-test.ts | 157 - .../src/__tests__/offset-codec-test.ts | 308 -- .../src/__tests__/pad-codec-test.ts | 46 - .../src/__tests__/resize-codec-test.ts | 43 - .../src/__tests__/reverse-codec-test.ts | 128 - .../src/__tests__/transform-codec-test.ts | 178 - .../add-codec-sentinel-typetest.ts | 35 - .../add-codec-size-prefix-typetest.ts | 50 - .../src/__typetests__/codec-typetest.ts | 113 - .../__typetests__/combine-codec-typetest.ts | 49 - .../__typetests__/fix-codec-size-typetest.ts | 33 - .../__typetests__/offset-codec-typetest.ts | 41 - .../src/__typetests__/pad-codec-typetest.ts | 71 - .../__typetests__/resize-codec-typetest.ts | 77 - .../__typetests__/reverse-codec-typetest.ts | 39 - .../__typetests__/transform-codec-typetest.ts | 45 - .../codecs-core/src/add-codec-sentinel.ts | 143 - .../codecs-core/src/add-codec-size-prefix.ts | 118 - packages/codecs-core/src/assertions.ts | 58 - packages/codecs-core/src/bytes.ts | 58 - packages/codecs-core/src/codec.ts | 221 - packages/codecs-core/src/combine-codec.ts | 68 - packages/codecs-core/src/fix-codec-size.ts | 82 - packages/codecs-core/src/index.ts | 13 - packages/codecs-core/src/offset-codec.ts | 88 - packages/codecs-core/src/pad-codec.ts | 65 - .../codecs-core/src/readonly-uint8array.ts | 4 - packages/codecs-core/src/resize-codec.ts | 102 - packages/codecs-core/src/reverse-codec.ts | 81 - packages/codecs-core/src/transform-codec.ts | 118 - packages/codecs-core/src/types/global.d.ts | 4 - .../codecs-core/tsconfig.declarations.json | 10 - packages/codecs-core/tsconfig.json | 9 - packages/codecs-data-structures/.gitignore | 1 - packages/codecs-data-structures/.npmrc | 1 - .../codecs-data-structures/.prettierignore | 1 - packages/codecs-data-structures/CHANGELOG.md | 344 -- packages/codecs-data-structures/LICENSE | 20 - packages/codecs-data-structures/README.md | 728 --- packages/codecs-data-structures/package.json | 87 - .../src/__tests__/__setup__.ts | 3 - .../src/__tests__/array-test.ts | 143 - .../src/__tests__/bit-array-test.ts | 76 - .../src/__tests__/boolean-test.ts | 84 - .../src/__tests__/bytes-test.ts | 57 - .../src/__tests__/constant-test.ts | 46 - .../src/__tests__/discriminated-union-test.ts | 233 - .../src/__tests__/enum-helpers-test.ts | 224 - .../src/__tests__/enum-test.ts | 567 -- .../src/__tests__/hidden-prefix-test.ts | 44 - .../src/__tests__/hidden-suffix-test.ts | 44 - .../src/__tests__/literal-union-test.ts | 133 - .../src/__tests__/map-test.ts | 143 - .../src/__tests__/nullable-test.ts | 420 -- .../src/__tests__/set-test.ts | 119 - .../src/__tests__/struct-test.ts | 91 - .../src/__tests__/tuple-test.ts | 86 - .../src/__tests__/union-test.ts | 147 - .../src/__tests__/unit-test.ts | 21 - .../src/__typetests__/array-typetest.ts | 40 - .../src/__typetests__/bit-array-typetest.ts | 18 - .../src/__typetests__/boolean-typetest.ts | 39 - .../src/__typetests__/bytes-typetest.ts | 18 - .../src/__typetests__/constant-typetest.ts | 24 - .../discriminated-union-typetest.ts | 171 - .../src/__typetests__/enum-typetest.ts | 56 - .../__typetests__/hidden-prefix-typetest.ts | 40 - .../__typetests__/hidden-suffix-typetest.ts | 40 - .../__typetests__/literal-union-typetest.ts | 45 - .../src/__typetests__/map-typetest.ts | 49 - .../src/__typetests__/nullable-typetest.ts | 44 - .../src/__typetests__/set-typetest.ts | 40 - .../src/__typetests__/struct-typetest.ts | 121 - .../src/__typetests__/tuple-typetest.ts | 59 - .../src/__typetests__/union-typetest.ts | 45 - packages/codecs-data-structures/src/array.ts | 180 - .../codecs-data-structures/src/assertions.ts | 16 - .../codecs-data-structures/src/bit-array.ts | 104 - .../codecs-data-structures/src/boolean.ts | 75 - packages/codecs-data-structures/src/bytes.ts | 50 - .../codecs-data-structures/src/constant.ts | 62 - .../src/discriminated-union.ts | 203 - .../src/enum-helpers.ts | 104 - packages/codecs-data-structures/src/enum.ts | 186 - .../src/hidden-prefix.ts | 79 - .../src/hidden-suffix.ts | 79 - packages/codecs-data-structures/src/index.ts | 17 - .../src/literal-union.ts | 134 - packages/codecs-data-structures/src/map.ts | 143 - .../codecs-data-structures/src/nullable.ts | 222 - packages/codecs-data-structures/src/set.ts | 98 - packages/codecs-data-structures/src/struct.ts | 127 - packages/codecs-data-structures/src/tuple.ts | 120 - .../src/types/global.d.ts | 4 - packages/codecs-data-structures/src/union.ts | 129 - packages/codecs-data-structures/src/unit.ts | 36 - packages/codecs-data-structures/src/utils.ts | 32 - .../tsconfig.declarations.json | 10 - packages/codecs-data-structures/tsconfig.json | 9 - packages/codecs-numbers/.gitignore | 1 - packages/codecs-numbers/.npmrc | 1 - packages/codecs-numbers/.prettierignore | 1 - packages/codecs-numbers/CHANGELOG.md | 85 - packages/codecs-numbers/LICENSE | 20 - packages/codecs-numbers/README.md | 133 - packages/codecs-numbers/package.json | 83 - .../codecs-numbers/src/__tests__/__setup__.ts | 61 - .../codecs-numbers/src/__tests__/f32-test.ts | 41 - .../codecs-numbers/src/__tests__/f64-test.ts | 41 - .../codecs-numbers/src/__tests__/i128-test.ts | 53 - .../codecs-numbers/src/__tests__/i16-test.ts | 71 - .../codecs-numbers/src/__tests__/i32-test.ts | 71 - .../codecs-numbers/src/__tests__/i64-test.ts | 53 - .../codecs-numbers/src/__tests__/i8-test.ts | 44 - .../src/__tests__/short-u16-test.ts | 65 - .../codecs-numbers/src/__tests__/u128-test.ts | 52 - .../codecs-numbers/src/__tests__/u16-test.ts | 70 - .../codecs-numbers/src/__tests__/u32-test.ts | 70 - .../codecs-numbers/src/__tests__/u64-test.ts | 52 - .../codecs-numbers/src/__tests__/u8-test.ts | 43 - .../src/__typetests__/codecs.ts | 169 - packages/codecs-numbers/src/assertions.ts | 20 - packages/codecs-numbers/src/common.ts | 38 - packages/codecs-numbers/src/f32.ts | 23 - packages/codecs-numbers/src/f64.ts | 23 - packages/codecs-numbers/src/i128.ts | 36 - packages/codecs-numbers/src/i16.ts | 24 - packages/codecs-numbers/src/i32.ts | 24 - packages/codecs-numbers/src/i64.ts | 24 - packages/codecs-numbers/src/i8.ts | 21 - packages/codecs-numbers/src/index.ts | 15 - packages/codecs-numbers/src/short-u16.ts | 84 - packages/codecs-numbers/src/types/global.d.ts | 4 - packages/codecs-numbers/src/u128.ts | 36 - packages/codecs-numbers/src/u16.ts | 24 - packages/codecs-numbers/src/u32.ts | 24 - packages/codecs-numbers/src/u64.ts | 24 - packages/codecs-numbers/src/u8.ts | 21 - packages/codecs-numbers/src/utils.ts | 73 - .../codecs-numbers/tsconfig.declarations.json | 10 - packages/codecs-numbers/tsconfig.json | 9 - packages/codecs-strings/.gitignore | 1 - packages/codecs-strings/.npmrc | 1 - packages/codecs-strings/.prettierignore | 1 - packages/codecs-strings/CHANGELOG.md | 110 - packages/codecs-strings/LICENSE | 20 - packages/codecs-strings/README.md | 201 - packages/codecs-strings/package.json | 90 - .../codecs-strings/src/__benchmarks__/run.ts | 63 - .../src/__tests__/base10-test.ts | 38 - .../src/__tests__/base16-test.ts | 37 - .../src/__tests__/base58-test.ts | 83 - .../src/__tests__/base64-test.ts | 73 - .../src/__tests__/baseX-reslice-test.ts | 55 - .../src/__tests__/string-test.ts | 110 - .../codecs-strings/src/__tests__/utf8-test.ts | 23 - packages/codecs-strings/src/assertions.ts | 14 - packages/codecs-strings/src/base10.ts | 12 - packages/codecs-strings/src/base16.ts | 81 - packages/codecs-strings/src/base58.ts | 12 - packages/codecs-strings/src/base64.ts | 90 - packages/codecs-strings/src/baseX-reslice.ts | 71 - packages/codecs-strings/src/baseX.ts | 121 - packages/codecs-strings/src/index.ts | 9 - .../codecs-strings/src/null-characters.ts | 7 - packages/codecs-strings/src/types/global.d.ts | 4 - packages/codecs-strings/src/utf8.ts | 38 - .../codecs-strings/tsconfig.declarations.json | 10 - packages/codecs-strings/tsconfig.json | 9 - packages/codecs/.gitignore | 1 - packages/codecs/.prettierignore | 1 - packages/codecs/CHANGELOG.md | 118 - packages/codecs/LICENSE | 20 - packages/codecs/README.md | 101 - packages/codecs/package.json | 81 - packages/codecs/src/index.ts | 5 - packages/codecs/tsconfig.declarations.json | 10 - packages/codecs/tsconfig.json | 6 - packages/compat/.gitignore | 1 - packages/compat/.npmrc | 1 - packages/compat/.prettierignore | 1 - packages/compat/CHANGELOG.md | 79 - packages/compat/LICENSE | 20 - packages/compat/README.md | 49 - packages/compat/package.json | 90 - packages/compat/src/__tests__/address-test.ts | 10 - packages/compat/src/__tests__/keypair-test.ts | 30 - .../compat/src/__tests__/transaction-test.ts | 234 - packages/compat/src/__typetests__/address.ts | 24 - packages/compat/src/__typetests__/keypair.ts | 10 - .../__typetests__/transaction-typetests.ts | 7 - packages/compat/src/address.ts | 11 - packages/compat/src/index.ts | 3 - packages/compat/src/keypair.ts | 14 - packages/compat/src/transaction.ts | 41 - packages/compat/tsconfig.declarations.json | 10 - packages/compat/tsconfig.json | 10 - packages/crypto-impl/.gitignore | 1 - packages/crypto-impl/.prettierignore | 1 - packages/crypto-impl/LICENSE | 20 - packages/crypto-impl/package.json | 47 - packages/crypto-impl/src/index.browser.ts | 1 - packages/crypto-impl/src/index.node.ts | 4 - .../crypto-impl/tsconfig.declarations.json | 11 - packages/crypto-impl/tsconfig.json | 9 - packages/crypto-impl/tsup.config.ts | 16 - packages/errors/.gitignore | 1 - packages/errors/.npmrc | 1 - packages/errors/.prettierignore | 1 - packages/errors/CHANGELOG.md | 181 - packages/errors/LICENSE | 20 - packages/errors/README.md | 90 - packages/errors/bin/cli.mjs | 7 - packages/errors/package.json | 84 - .../__tests__/RPC_INTEGER_OVERFLOW-test.ts | 38 - packages/errors/src/__tests__/context-test.ts | 88 - packages/errors/src/__tests__/error-test.ts | 122 - .../src/__tests__/instruction-error-test.ts | 106 - .../src/__tests__/json-rpc-error-test.ts | 147 - .../src/__tests__/message-formatter-test.ts | 176 - .../src/__tests__/transaction-error-test.ts | 105 - .../src/__typetests__/error-typetest.ts | 62 - packages/errors/src/cli.ts | 60 - packages/errors/src/codes.ts | 542 -- packages/errors/src/context.ts | 615 --- packages/errors/src/error.ts | 55 - packages/errors/src/index.ts | 6 - packages/errors/src/instruction-error.ts | 101 - packages/errors/src/json-rpc-error.ts | 132 - packages/errors/src/message-formatter.ts | 98 - packages/errors/src/messages.ts | 600 --- packages/errors/src/rpc-enum-errors.ts | 53 - packages/errors/src/stack-trace.ts | 5 - packages/errors/src/transaction-error.ts | 94 - packages/errors/src/types/global.d.ts | 4 - packages/errors/tsconfig.declarations.json | 10 - packages/errors/tsconfig.json | 10 - packages/fast-stable-stringify/.gitignore | 1 - .../fast-stable-stringify/.prettierignore | 2 - packages/fast-stable-stringify/CHANGELOG.md | 13 - packages/fast-stable-stringify/LICENSE | 21 - packages/fast-stable-stringify/README.md | 30 - packages/fast-stable-stringify/package.json | 83 - .../src/__tests__/index-test.ts | 204 - .../src/__typetests__/index-typetest.ts | 20 - packages/fast-stable-stringify/src/index.ts | 83 - .../tsconfig.declarations.json | 10 - packages/fast-stable-stringify/tsconfig.json | 9 - packages/fetch-impl/LICENSE | 20 - packages/fetch-impl/package.json | 12 - packages/fetch-impl/src/__benchmarks__/run.ts | 97 - packages/fetch-impl/tsconfig.json | 10 - packages/functional/.gitignore | 1 - packages/functional/.prettierignore | 1 - packages/functional/CHANGELOG.md | 57 - packages/functional/LICENSE | 20 - packages/functional/README.md | 49 - packages/functional/package.json | 76 - .../functional/src/__tests__/pipe-test.ts | 378 -- .../src/__typetests__/pipe-typetest.ts | 313 -- packages/functional/src/index.ts | 1 - packages/functional/src/pipe.ts | 108 - .../functional/tsconfig.declarations.json | 10 - packages/functional/tsconfig.json | 9 - packages/instructions/.gitignore | 1 - packages/instructions/.prettierignore | 1 - packages/instructions/CHANGELOG.md | 68 - packages/instructions/LICENSE | 20 - packages/instructions/README.md | 148 - packages/instructions/package.json | 82 - .../src/__tests__/instruction-test.ts | 167 - .../instructions/src/__tests__/roles-test.ts | 126 - .../src/__typetests__/instruction-typetest.ts | 69 - packages/instructions/src/accounts.ts | 35 - packages/instructions/src/index.ts | 3 - packages/instructions/src/instruction.ts | 84 - packages/instructions/src/roles.ts | 64 - packages/instructions/src/types/global.d.ts | 4 - .../instructions/tsconfig.declarations.json | 10 - packages/instructions/tsconfig.json | 6 - packages/keys/.gitignore | 1 - packages/keys/.npmrc | 1 - packages/keys/.prettierignore | 1 - packages/keys/CHANGELOG.md | 83 - packages/keys/LICENSE | 20 - packages/keys/README.md | 138 - packages/keys/package.json | 89 - packages/keys/src/__benchmarks__/run.ts | 53 - packages/keys/src/__tests__/coercions-test.ts | 38 - packages/keys/src/__tests__/key-pair-test.ts | 88 - .../keys/src/__tests__/private-key-test.ts | 103 - .../keys/src/__tests__/signatures-test.ts | 197 - .../src/__typetests__/key-pair-typetests.ts | 6 - .../__typetests__/private-key-typetests.ts | 6 - .../src/__typetests__/signatures-typetests.ts | 3 - packages/keys/src/index.ts | 3 - packages/keys/src/key-pair.ts | 43 - packages/keys/src/private-key.ts | 50 - packages/keys/src/signatures.ts | 77 - packages/keys/src/types/global.d.ts | 4 - packages/keys/tsconfig.declarations.json | 10 - packages/keys/tsconfig.json | 9 - packages/library-legacy/.eslintrc.js | 48 - packages/library-legacy/.gitignore | 22 - packages/library-legacy/.prettierignore | 2 - packages/library-legacy/LICENSE | 20 - packages/library-legacy/README.md | 155 - packages/library-legacy/package.json | 125 - .../test/__shadow-jest-types.d.ts | 1 - packages/library-legacy/tsconfig.d.json | 15 - packages/library-legacy/tsconfig.json | 20 - packages/library/.gitignore | 1 - packages/library/.prettierignore | 1 - packages/library/CHANGELOG.md | 181 - packages/library/LICENSE | 20 - packages/library/README.md | 1431 ----- packages/library/package.json | 98 - .../src/__tests__/airdrop-internal-test.ts | 114 - .../__tests__/compute-limit-internal-test.ts | 263 - .../decode-transaction-message-test.ts | 352 -- .../send-transaction-internal-test.ts | 330 -- .../src/__typetests__/airdrop-typetests.ts | 62 - ...irm-durable-nonce-transaction-typetests.ts | 69 - .../send-and-confirm-transaction-typetests.ts | 69 - packages/library/src/airdrop-internal.ts | 38 - packages/library/src/airdrop.ts | 54 - .../library/src/compute-limit-internal.ts | 188 - packages/library/src/compute-limit.ts | 31 - .../library/src/decode-transaction-message.ts | 66 - packages/library/src/index.ts | 21 - ...d-and-confirm-durable-nonce-transaction.ts | 70 - .../src/send-and-confirm-transaction.ts | 69 - .../library/src/send-transaction-internal.ts | 133 - .../send-transaction-without-confirming.ts | 25 - packages/library/src/types/global.d.ts | 5 - packages/library/tsconfig.declarations.json | 10 - packages/library/tsconfig.json | 9 - packages/options/.gitignore | 1 - packages/options/.npmrc | 1 - packages/options/.prettierignore | 1 - packages/options/CHANGELOG.md | 158 - packages/options/LICENSE | 20 - packages/options/README.md | 234 - packages/options/package.json | 86 - packages/options/src/__tests__/__setup__.ts | 22 - .../src/__tests__/option-codec-test.ts | 584 -- packages/options/src/__tests__/option-test.ts | 27 - .../unwrap-option-recursively-test.ts | 180 - .../src/__tests__/unwrap-option-test.ts | 36 - .../__typetests__/option-codec-typetest.ts | 48 - packages/options/src/index.ts | 4 - packages/options/src/option-codec.ts | 237 - packages/options/src/option.ts | 63 - packages/options/src/types/global.d.ts | 4 - .../options/src/unwrap-option-recursively.ts | 78 - packages/options/src/unwrap-option.ts | 17 - packages/options/tsconfig.declarations.json | 10 - packages/options/tsconfig.json | 9 - packages/programs/.gitignore | 1 - packages/programs/.prettierignore | 1 - packages/programs/CHANGELOG.md | 71 - packages/programs/LICENSE | 20 - packages/programs/README.md | 42 - packages/programs/package.json | 84 - .../src/__tests__/program-error-test.ts | 103 - .../__typetests__/program-error-typetest.ts | 36 - packages/programs/src/index.ts | 1 - packages/programs/src/program-error.ts | 19 - packages/programs/src/types/global.d.ts | 4 - packages/programs/tsconfig.declarations.json | 10 - packages/programs/tsconfig.json | 6 - packages/react/.eslintrc.cjs | 3 - packages/react/.gitignore | 1 - packages/react/.npmrc | 1 - packages/react/.prettierignore | 1 - packages/react/CHANGELOG.md | 16 - packages/react/LICENSE | 20 - packages/react/README.md | 311 -- packages/react/package.json | 99 - .../src/__tests__/abortable-promise-test.ts | 74 - .../useSignAndSendTransaction-test.ts | 131 - .../react/src/__tests__/useSignIn-test.ts | 177 - .../src/__tests__/useSignMessage-test.ts | 99 - .../src/__tests__/useSignTransaction-test.ts | 131 - .../useWalletAccountMessageSigner-test.ts | 300 -- ...letAccountTransactionSendingSigner-test.ts | 200 - .../useWalletAccountTransactionSigner-test.ts | 196 - .../useSignAndSendTransaction-typetest.ts | 31 - .../src/__typetests__/useSignIn-typetest.ts | 61 - .../useSignTransaction-typetest.ts | 31 - packages/react/src/abortable-promise.ts | 21 - packages/react/src/chain.ts | 7 - packages/react/src/index.ts | 7 - packages/react/src/test-renderer.tsx | 70 - packages/react/src/types/global.d.ts | 4 - .../react/src/useSignAndSendTransaction.ts | 91 - packages/react/src/useSignIn.ts | 83 - packages/react/src/useSignMessage.ts | 52 - packages/react/src/useSignTransaction.ts | 92 - .../src/useWalletAccountMessageSigner.ts | 60 - ...seWalletAccountTransactionSendingSigner.ts | 55 - .../src/useWalletAccountTransactionSigner.ts | 58 - packages/react/tsconfig.declarations.json | 10 - packages/react/tsconfig.json | 10 - packages/rpc-api/.gitignore | 1 - packages/rpc-api/.prettierignore | 1 - packages/rpc-api/CHANGELOG.md | 105 - packages/rpc-api/LICENSE | 20 - packages/rpc-api/README.md | 59 - packages/rpc-api/package.json | 93 - packages/rpc-api/src/__tests__/__setup__.ts | 11 - .../src/__tests__/get-account-info-test.ts | 1193 ----- .../rpc-api/src/__tests__/get-balance-test.ts | 60 - .../__tests__/get-block-commitment-test.ts | 11 - .../rpc-api/src/__tests__/get-block-height.ts | 47 - .../__tests__/get-block-production-test.ts | 87 - .../rpc-api/src/__tests__/get-block-test.ts | 39 - .../src/__tests__/get-block-time-test.ts | 42 - .../__tests__/get-blocks-with-limit-test.ts | 33 - .../src/__tests__/get-cluster-nodes-test.ts | 87 - .../src/__tests__/get-epoch-info-test.ts | 49 - .../src/__tests__/get-epoch-schedule-test.ts | 23 - .../src/__tests__/get-fee-for-message-test.ts | 143 - .../get-first-available-block-test.ts | 18 - .../src/__tests__/get-genesis-hash-test.ts | 41 - .../rpc-api/src/__tests__/get-health-test.ts | 45 - .../get-highest-snapshot-slot-test.ts | 14 - .../src/__tests__/get-identity-test.ts | 46 - .../__tests__/get-inflation-governor-test.ts | 28 - .../src/__tests__/get-inflation-rate-test.ts | 24 - .../__tests__/get-inflation-reward-test.ts | 71 - .../__tests__/get-largest-accounts-test.ts | 112 - .../__tests__/get-latest-blockhash-test.ts | 52 - .../src/__tests__/get-leader-schedule-test.ts | 149 - .../__tests__/get-max-retransmit-slot-test.ts | 18 - .../get-max-shred-insert-slot-test.ts | 18 - ...minimum-balance-for-rent-exemption-test.ts | 22 - .../__tests__/get-multiple-accounts-test.ts | 1292 ----- .../__tests__/get-program-accounts-test.ts | 2293 -------- .../get-recent-performance-samples-test.ts | 10 - .../get-recent-prioritization-fees-test.ts | 92 - .../__tests__/get-signature-statuses-test.ts | 72 - .../get-signatures-for-address-test.ts | 59 - .../src/__tests__/get-slot-leader-test.ts | 80 - .../src/__tests__/get-slot-leaders-test.ts | 81 - .../rpc-api/src/__tests__/get-slot-test.ts | 47 - .../__tests__/get-stake-activation-test.ts | 88 - .../get-stake-minimum-delegation-test.ts | 21 - .../rpc-api/src/__tests__/get-supply-test.ts | 46 - .../get-token-account-balance-test.ts | 56 - .../get-token-accounts-by-delegate-test.ts | 425 -- .../get-token-accounts-by-owner-test.ts | 418 -- .../get-token-largest-accounts-test.ts | 61 - .../src/__tests__/get-token-supply-test.ts | 57 - .../__tests__/get-transaction-count-test.ts | 47 - .../src/__tests__/get-transaction-test.ts | 31 - .../rpc-api/src/__tests__/get-version-test.ts | 54 - .../src/__tests__/get-vote-accounts.ts | 66 - .../src/__tests__/is-blockhash-valid-test.ts | 22 - .../src/__tests__/minimum-ledger-slot-test.ts | 18 - .../src/__tests__/request-airdrop-test.ts | 30 - .../src/__tests__/send-transaction-test.ts | 366 -- .../__tests__/simulate-transaction-test.ts | 832 --- .../src/__typetests__/get-block-type-test.ts | 1261 ----- .../get-leader-schedule-type-test.ts | 35 - .../src/__typetests__/get-supply-type-test.ts | 47 - ...et-token-accounts-by-delegate-type-test.ts | 22 - .../get-token-accounts-by-owner-type-test.ts | 18 - packages/rpc-api/src/getAccountInfo.ts | 69 - packages/rpc-api/src/getBalance.ts | 18 - packages/rpc-api/src/getBlock.ts | 378 -- packages/rpc-api/src/getBlockCommitment.ts | 15 - packages/rpc-api/src/getBlockHeight.ts | 18 - packages/rpc-api/src/getBlockProduction.ts | 48 - packages/rpc-api/src/getBlockTime.ts | 15 - packages/rpc-api/src/getBlocks.ts | 18 - packages/rpc-api/src/getBlocksWithLimit.ts | 21 - packages/rpc-api/src/getClusterNodes.ts | 38 - packages/rpc-api/src/getEpochInfo.ts | 29 - packages/rpc-api/src/getEpochSchedule.ts | 26 - packages/rpc-api/src/getFeeForMessage.ts | 19 - .../rpc-api/src/getFirstAvailableBlock.ts | 15 - packages/rpc-api/src/getGenesisHash.ts | 14 - packages/rpc-api/src/getHealth.ts | 13 - .../rpc-api/src/getHighestSnapshotSlot.ts | 21 - packages/rpc-api/src/getIdentity.ts | 16 - packages/rpc-api/src/getInflationGovernor.ts | 31 - packages/rpc-api/src/getInflationRate.ts | 23 - packages/rpc-api/src/getInflationReward.ts | 40 - packages/rpc-api/src/getLargestAccounts.ts | 26 - packages/rpc-api/src/getLatestBlockhash.ts | 21 - packages/rpc-api/src/getLeaderSchedule.ts | 67 - packages/rpc-api/src/getMaxRetransmitSlot.ts | 15 - packages/rpc-api/src/getMaxShredInsertSlot.ts | 15 - .../src/getMinimumBalanceForRentExemption.ts | 16 - packages/rpc-api/src/getMultipleAccounts.ts | 75 - packages/rpc-api/src/getProgramAccounts.ts | 131 - .../src/getRecentPerformanceSamples.ts | 27 - .../src/getRecentPrioritizationFees.ts | 33 - packages/rpc-api/src/getSignatureStatuses.ts | 68 - .../rpc-api/src/getSignaturesForAddress.ts | 46 - packages/rpc-api/src/getSlot.ts | 16 - packages/rpc-api/src/getSlotLeader.ts | 17 - packages/rpc-api/src/getSlotLeaders.ts | 18 - packages/rpc-api/src/getStakeActivation.ts | 29 - .../rpc-api/src/getStakeMinimumDelegation.ts | 15 - packages/rpc-api/src/getSupply.ts | 49 - .../rpc-api/src/getTokenAccountBalance.ts | 18 - .../rpc-api/src/getTokenAccountsByDelegate.ts | 104 - .../rpc-api/src/getTokenAccountsByOwner.ts | 103 - .../rpc-api/src/getTokenLargestAccounts.ts | 19 - packages/rpc-api/src/getTokenSupply.ts | 18 - packages/rpc-api/src/getTransaction.ts | 252 - packages/rpc-api/src/getTransactionCount.ts | 18 - packages/rpc-api/src/getVersion.ts | 18 - packages/rpc-api/src/getVoteAccounts.ts | 50 - packages/rpc-api/src/index.ts | 298 -- packages/rpc-api/src/isBlockhashValid.ts | 20 - packages/rpc-api/src/minimumLedgerSlot.ts | 12 - packages/rpc-api/src/requestAirdrop.ts | 21 - packages/rpc-api/src/sendTransaction.ts | 52 - packages/rpc-api/src/simulateTransaction.ts | 302 -- packages/rpc-api/src/types/global.d.ts | 4 - packages/rpc-api/tsconfig.declarations.json | 10 - packages/rpc-api/tsconfig.json | 6 - packages/rpc-graphql/.gitignore | 1 - packages/rpc-graphql/.prettierignore | 1 - packages/rpc-graphql/CHANGELOG.md | 70 - packages/rpc-graphql/LICENSE | 20 - packages/rpc-graphql/README.md | 1127 ---- packages/rpc-graphql/package.json | 90 - .../rpc-graphql/src/__tests__/__setup__.ts | 3029 ----------- .../rpc-graphql/src/__tests__/account-test.ts | 2184 -------- .../rpc-graphql/src/__tests__/block-tests.ts | 691 --- .../src/__tests__/program-accounts-test.ts | 620 --- .../src/__tests__/transaction-tests.ts | 3877 -------------- packages/rpc-graphql/src/context.ts | 47 - packages/rpc-graphql/src/index.ts | 65 - .../loaders/__tests__/account-loader-test.ts | 1537 ------ .../loaders/__tests__/block-loader-test.ts | 485 -- .../__tests__/program-accounts-loader-test.ts | 622 --- .../__tests__/transaction-loader-test.ts | 482 -- packages/rpc-graphql/src/loaders/account.ts | 188 - packages/rpc-graphql/src/loaders/block.ts | 82 - packages/rpc-graphql/src/loaders/coalescer.ts | 241 - packages/rpc-graphql/src/loaders/index.ts | 5 - packages/rpc-graphql/src/loaders/loader.ts | 68 - .../src/loaders/program-accounts.ts | 98 - .../rpc-graphql/src/loaders/transaction.ts | 87 - .../__tests__/account-resolver-test.ts | 410 -- .../resolvers/__tests__/block-inputs-test.ts | 140 - .../__tests__/block-resolver-test.ts | 179 - .../program-accounts-resolver-test.ts | 223 - .../__tests__/transaction-resolver-test.ts | 159 - packages/rpc-graphql/src/resolvers/account.ts | 126 - packages/rpc-graphql/src/resolvers/block.ts | 118 - .../src/resolvers/program-accounts.ts | 87 - .../src/resolvers/resolve-info/account.ts | 128 - .../src/resolvers/resolve-info/block.ts | 45 - .../src/resolvers/resolve-info/index.ts | 5 - .../resolve-info/program-accounts.ts | 22 - .../src/resolvers/resolve-info/transaction.ts | 88 - .../src/resolvers/resolve-info/visitor.ts | 86 - .../rpc-graphql/src/resolvers/transaction.ts | 166 - .../src/schema/type-defs/account.ts | 588 -- .../rpc-graphql/src/schema/type-defs/block.ts | 15 - .../rpc-graphql/src/schema/type-defs/index.ts | 15 - .../src/schema/type-defs/instruction.ts | 1646 ------ .../rpc-graphql/src/schema/type-defs/root.ts | 17 - .../src/schema/type-defs/transaction.ts | 76 - .../rpc-graphql/src/schema/type-defs/types.ts | 117 - .../src/schema/type-resolvers/account.ts | 318 -- .../src/schema/type-resolvers/block.ts | 8 - .../src/schema/type-resolvers/index.ts | 24 - .../src/schema/type-resolvers/instruction.ts | 1198 ----- .../src/schema/type-resolvers/root.ts | 15 - .../src/schema/type-resolvers/transaction.ts | 7 - .../src/schema/type-resolvers/types.ts | 100 - packages/rpc-graphql/src/types/global.d.ts | 4 - .../rpc-graphql/tsconfig.declarations.json | 10 - packages/rpc-graphql/tsconfig.json | 10 - packages/rpc-parsed-types/.gitignore | 1 - packages/rpc-parsed-types/.prettierignore | 1 - packages/rpc-parsed-types/CHANGELOG.md | 57 - packages/rpc-parsed-types/LICENSE | 20 - packages/rpc-parsed-types/README.md | 19 - packages/rpc-parsed-types/package.json | 78 - .../address-lookup-table-accounts-test.ts | 19 - .../bpf-upgradeable-loader-accounts-test.ts | 42 - .../src/__typetests__/config-accounts-test.ts | 46 - .../src/__typetests__/nonce-accounts-test.ts | 17 - .../src/__typetests__/stake-accounts-test.ts | 82 - .../src/__typetests__/sysvar-accounts-test.ts | 231 - .../src/__typetests__/token-accounts-test.ts | 77 - .../src/__typetests__/vote-accounts-test.ts | 48 - .../src/address-lookup-table-accounts.ts | 12 - .../src/bpf-upgradeable-loader-accounts.ts | 18 - .../rpc-parsed-types/src/config-accounts.ts | 20 - packages/rpc-parsed-types/src/index.ts | 9 - .../rpc-parsed-types/src/nonce-accounts.ts | 12 - .../rpc-parsed-types/src/rpc-parsed-type.ts | 8 - .../rpc-parsed-types/src/stake-accounts.ts | 33 - .../rpc-parsed-types/src/sysvar-accounts.ts | 79 - .../rpc-parsed-types/src/token-accounts.ts | 40 - .../rpc-parsed-types/src/vote-accounts.ts | 33 - .../tsconfig.declarations.json | 10 - packages/rpc-parsed-types/tsconfig.json | 9 - packages/rpc-spec-types/.gitignore | 1 - packages/rpc-spec-types/.prettierignore | 1 - packages/rpc-spec-types/CHANGELOG.md | 57 - packages/rpc-spec-types/LICENSE | 20 - packages/rpc-spec-types/README.md | 17 - packages/rpc-spec-types/package.json | 76 - .../src/__tests__/rpc-message-test.ts | 18 - packages/rpc-spec-types/src/index.ts | 4 - packages/rpc-spec-types/src/overloads.ts | 704 --- packages/rpc-spec-types/src/rpc-message.ts | 15 - packages/rpc-spec-types/src/rpc-response.ts | 11 - packages/rpc-spec-types/src/type-helpers.ts | 6 - packages/rpc-spec-types/src/types/global.d.ts | 4 - .../rpc-spec-types/tsconfig.declarations.json | 10 - packages/rpc-spec-types/tsconfig.json | 9 - packages/rpc-spec/.gitignore | 1 - packages/rpc-spec/.prettierignore | 1 - packages/rpc-spec/CHANGELOG.md | 73 - packages/rpc-spec/LICENSE | 20 - packages/rpc-spec/README.md | 118 - packages/rpc-spec/package.json | 79 - packages/rpc-spec/src/__tests__/rpc-test.ts | 104 - .../src/__typetests__/rpc-api-typetest.ts | 21 - .../src/__typetests__/rpc-typetest.ts | 13 - packages/rpc-spec/src/index.ts | 4 - packages/rpc-spec/src/rpc-api.ts | 56 - packages/rpc-spec/src/rpc-request.ts | 13 - packages/rpc-spec/src/rpc-transport.ts | 8 - packages/rpc-spec/src/rpc.ts | 79 - packages/rpc-spec/src/types/global.d.ts | 4 - packages/rpc-spec/tsconfig.declarations.json | 10 - packages/rpc-spec/tsconfig.json | 9 - packages/rpc-subscriptions-api/.gitignore | 1 - .../rpc-subscriptions-api/.prettierignore | 1 - packages/rpc-subscriptions-api/CHANGELOG.md | 85 - packages/rpc-subscriptions-api/LICENSE | 20 - packages/rpc-subscriptions-api/README.md | 17 - packages/rpc-subscriptions-api/package.json | 88 - .../src/__tests__/__setup__.ts | 20 - .../__tests__/account-notifications-test.ts | 57 - .../src/__tests__/block-notifications-test.ts | 50 - .../src/__tests__/index-test.ts | 20 - .../src/__tests__/logs-notifications-test.ts | 27 - .../__tests__/program-notifications-test.ts | 61 - .../src/__tests__/root-notifications-test.ts | 4 - .../__tests__/signature-notifications-test.ts | 13 - .../src/__tests__/slot-notifications-test.ts | 27 - .../slots-updates-notifications-test.ts | 32 - .../src/__tests__/vote-notifications-test.ts | 33 - .../account-notifications-type-test.ts | 156 - .../block-notifications-type-test.ts | 1587 ------ .../logs-notifications-type-test.ts | 53 - .../program-notifications-type-test.ts | 239 - .../root-notifications-type-test.ts | 17 - .../signature-notifications-type-test.ts | 66 - .../slot-notifications-type-test.ts | 24 - .../slots-updates-notifications-type-test.ts | 22 - .../vote-notifications-type-test.ts | 25 - .../src/account-notifications.ts | 58 - .../src/block-notifications.ts | 558 -- packages/rpc-subscriptions-api/src/index.ts | 256 - .../src/logs-notifications.ts | 37 - .../src/program-notifications.ts | 84 - .../src/root-notifications.ts | 14 - .../src/signature-notifications.ts | 41 - .../src/slot-notifications.ts | 18 - .../src/slots-updates-notifications.ts | 47 - .../src/vote-notifications.ts | 22 - .../tsconfig.declarations.json | 10 - packages/rpc-subscriptions-api/tsconfig.json | 9 - packages/rpc-subscriptions-spec/.gitignore | 1 - .../rpc-subscriptions-spec/.prettierignore | 1 - packages/rpc-subscriptions-spec/CHANGELOG.md | 71 - packages/rpc-subscriptions-spec/LICENSE | 20 - packages/rpc-subscriptions-spec/README.md | 17 - packages/rpc-subscriptions-spec/package.json | 80 - .../src/__tests__/rpc-subscription-test.ts | 369 -- .../rpc-subscriptions-api-typetest.ts | 21 - .../rpc-subscriptions-typetest.ts | 13 - packages/rpc-subscriptions-spec/src/index.ts | 4 - .../src/rpc-subscriptions-api.ts | 72 - .../src/rpc-subscriptions-request.ts | 14 - .../src/rpc-subscriptions-transport.ts | 14 - .../src/rpc-subscriptions.ts | 192 - .../src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - packages/rpc-subscriptions-spec/tsconfig.json | 9 - .../.gitignore | 1 - .../.prettierignore | 1 - .../CHANGELOG.md | 71 - .../LICENSE | 20 - .../README.md | 17 - .../package.json | 85 - .../src/__mocks__/@solana/ws-impl.ts | 1 - .../__tests__/websocket-connection-test.ts | 251 - .../src/__tests__/websocket-transport-test.ts | 120 - .../src/__typetests__/websocket-typetest.ts | 7 - .../src/index.ts | 1 - .../src/types/global.d.ts | 4 - .../src/websocket-connection.ts | 203 - .../src/websocket-transport.ts | 33 - .../tsconfig.declarations.json | 10 - .../tsconfig.json | 9 - packages/rpc-subscriptions/.gitignore | 1 - packages/rpc-subscriptions/.prettierignore | 1 - packages/rpc-subscriptions/CHANGELOG.md | 90 - packages/rpc-subscriptions/LICENSE | 20 - packages/rpc-subscriptions/README.md | 17 - packages/rpc-subscriptions/package.json | 86 - .../cached-abortable-iterable-test.ts | 293 - .../rpc-integer-overflow-error-test.ts | 64 - .../rpc-subscriptions-autopinger-test.ts | 199 - .../rpc-subscriptions-coalescer-test.ts | 325 -- ...-subscriptions-connection-sharding-test.ts | 95 - .../rpc-subscriptions-clusters-typetest.ts | 236 - .../src/cached-abortable-iterable.ts | 107 - packages/rpc-subscriptions/src/index.ts | 7 - .../src/rpc-default-config.ts | 12 - .../src/rpc-integer-overflow-error.ts | 43 - .../src/rpc-subscriptions-autopinger.ts | 79 - .../src/rpc-subscriptions-clusters.ts | 31 - .../src/rpc-subscriptions-coalescer.ts | 131 - .../rpc-subscriptions-connection-sharding.ts | 37 - .../src/rpc-subscriptions-transport.ts | 44 - .../src/rpc-subscriptions.ts | 62 - .../rpc-subscriptions/src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - packages/rpc-subscriptions/tsconfig.json | 9 - packages/rpc-transformers/.gitignore | 1 - packages/rpc-transformers/.prettierignore | 1 - packages/rpc-transformers/CHANGELOG.md | 78 - packages/rpc-transformers/LICENSE | 20 - packages/rpc-transformers/README.md | 17 - packages/rpc-transformers/package.json | 83 - .../src/__tests__/default-commitment-test.ts | 121 - ...params-transformer-bigint-downcast-test.ts | 21 - ...arams-transformer-integer-overflow-test.ts | 31 - .../src/__tests__/params-transformer-test.ts | 279 - ...response-transformer-bigint-upcast-test.ts | 42 - .../__tests__/response-transformer-test.ts | 64 - .../src/default-commitment.ts | 60 - packages/rpc-transformers/src/index.ts | 9 - .../src/params-transformer-bigint-downcast.ts | 10 - .../params-transformer-integer-overflow.ts | 14 - ...nsformer-options-object-position-config.ts | 50 - .../src/params-transformer.ts | 60 - ...onse-transformer-allowed-numeric-values.ts | 55 - .../src/response-transformer-bigint-upcast.ts | 37 - .../src/response-transformer.ts | 29 - .../rpc-transformers/src/tree-traversal.ts | 38 - .../rpc-transformers/src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - packages/rpc-transformers/tsconfig.json | 9 - packages/rpc-transport-http/.gitignore | 1 - packages/rpc-transport-http/.prettierignore | 1 - packages/rpc-transport-http/CHANGELOG.md | 71 - packages/rpc-transport-http/LICENSE | 20 - packages/rpc-transport-http/README.md | 243 - packages/rpc-transport-http/package.json | 87 - .../src/__benchmarks__/run.ts | 116 - .../__tests__/http-transport-abort-test.ts | 84 - .../http-transport-dispatcher-test.browser.ts | 53 - .../__tests__/http-transport-headers-test.ts | 148 - .../src/__tests__/http-transport-test.ts | 122 - .../__typetests__/http-transport-typetest.ts | 7 - .../src/http-transport-headers.ts | 107 - .../rpc-transport-http/src/http-transport.ts | 71 - packages/rpc-transport-http/src/index.ts | 1 - .../rpc-transport-http/src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - packages/rpc-transport-http/tsconfig.json | 9 - packages/rpc-types/.gitignore | 1 - packages/rpc-types/.prettierignore | 1 - packages/rpc-types/CHANGELOG.md | 104 - packages/rpc-types/LICENSE | 20 - packages/rpc-types/README.md | 158 - packages/rpc-types/package.json | 83 - .../rpc-types/src/__tests__/blockhash-test.ts | 238 - .../rpc-types/src/__tests__/coercions-test.ts | 71 - .../src/__tests__/commitment-test.ts | 11 - .../rpc-types/src/__tests__/lamports-test.ts | 195 - .../src/__tests__/stringified-bigint-test.ts | 49 - .../src/__tests__/stringified-number-test.ts | 41 - .../src/__tests__/unix-timestamp-test.ts | 35 - .../src/__typetests__/coercions-typetests.ts | 9 - .../src/__typetests__/lamports-typetests.ts | 107 - packages/rpc-types/src/account-filters.ts | 18 - packages/rpc-types/src/account-info.ts | 58 - packages/rpc-types/src/blockhash.ts | 105 - packages/rpc-types/src/cluster-url.ts | 14 - packages/rpc-types/src/commitment.ts | 25 - packages/rpc-types/src/encoded-bytes.ts | 7 - packages/rpc-types/src/index.ts | 16 - packages/rpc-types/src/lamports.ts | 93 - packages/rpc-types/src/rpc-api.ts | 6 - packages/rpc-types/src/stringified-bigint.ts | 27 - packages/rpc-types/src/stringified-number.ts | 20 - packages/rpc-types/src/token-amount.ts | 9 - packages/rpc-types/src/token-balance.ts | 15 - packages/rpc-types/src/transaction-error.ts | 101 - packages/rpc-types/src/transaction.ts | 324 -- packages/rpc-types/src/typed-numbers.ts | 30 - packages/rpc-types/src/unix-timestamp.ts | 26 - packages/rpc-types/tsconfig.declarations.json | 10 - packages/rpc-types/tsconfig.json | 9 - packages/rpc/.gitignore | 1 - packages/rpc/.prettierignore | 1 - packages/rpc/CHANGELOG.md | 92 - packages/rpc/LICENSE | 20 - packages/rpc/README.md | 123 - packages/rpc/package.json | 86 - .../rpc-integer-overflow-error-test.ts | 64 - .../__tests__/rpc-integer-overflow-test.ts | 37 - .../__tests__/rpc-request-coalescer-test.ts | 242 - .../rpc-request-deduplication-test.ts | 54 - .../rpc-transport-header-config-test.ts | 53 - .../__typetests__/rpc-clusters-typetest.ts | 177 - packages/rpc/src/index.ts | 7 - packages/rpc/src/rpc-clusters.ts | 33 - packages/rpc/src/rpc-default-config.ts | 10 - .../rpc/src/rpc-integer-overflow-error.ts | 43 - packages/rpc/src/rpc-request-coalescer.ts | 97 - packages/rpc/src/rpc-request-deduplication.ts | 18 - packages/rpc/src/rpc-transport.ts | 43 - packages/rpc/src/rpc.ts | 27 - packages/rpc/src/types/global.d.ts | 5 - packages/rpc/tsconfig.declarations.json | 10 - packages/rpc/tsconfig.json | 9 - packages/signers/.gitignore | 1 - packages/signers/.npmrc | 1 - packages/signers/.prettierignore | 1 - packages/signers/CHANGELOG.md | 91 - packages/signers/LICENSE | 20 - packages/signers/README.md | 572 -- packages/signers/package.json | 92 - packages/signers/src/__tests__/__setup__.ts | 76 - .../src/__tests__/account-signer-meta-test.ts | 89 - .../signers/src/__tests__/add-signers-test.ts | 227 - .../src/__tests__/deduplicate-signers-test.ts | 65 - .../src/__tests__/fee-payer-signer-test.ts | 67 - .../src/__tests__/keypair-signer-test.ts | 213 - .../message-modifying-signer-test.ts | 41 - .../__tests__/message-partial-signer-test.ts | 35 - .../src/__tests__/message-signer-test.ts | 49 - .../signers/src/__tests__/noop-signer-test.ts | 85 - .../src/__tests__/sign-transaction-test.ts | 779 --- .../src/__tests__/signable-message-test.ts | 73 - .../transaction-modifying-signer-test.ts | 41 - .../transaction-partial-signer-test.ts | 41 - .../transaction-sending-signer-test.ts | 41 - .../src/__tests__/transaction-signer-test.ts | 73 - .../transaction-with-single-sending-signer.ts | 106 - .../account-signer-meta-typetest.ts | 34 - .../src/__typetests__/fee-payer-typetest.ts | 41 - .../__typetests__/keypair-signer-typetest.ts | 22 - .../message-modifying-signer-typetest.ts | 24 - .../message-partial-signer-typetest.ts | 20 - .../__typetests__/message-signer-typetest.ts | 20 - .../sign-transaction-typetest.ts | 82 - .../transaction-modifying-signer-typetest.ts | 24 - .../transaction-partial-signer-typetest.ts | 24 - .../transaction-sending-signer-typetest.ts | 24 - .../transaction-signer-typetest.ts | 20 - packages/signers/src/account-signer-meta.ts | 54 - packages/signers/src/add-signers.ts | 43 - packages/signers/src/deduplicate-signers.ts | 22 - packages/signers/src/fee-payer-signer.ts | 37 - packages/signers/src/index.ts | 16 - packages/signers/src/keypair-signer.ts | 75 - .../signers/src/message-modifying-signer.ts | 40 - .../signers/src/message-partial-signer.ts | 36 - packages/signers/src/message-signer.ts | 30 - packages/signers/src/noop-signer.ts | 19 - packages/signers/src/sign-transaction.ts | 282 - packages/signers/src/signable-message.ts | 23 - .../src/transaction-modifying-signer.ts | 36 - .../signers/src/transaction-partial-signer.ts | 36 - .../signers/src/transaction-sending-signer.ts | 37 - packages/signers/src/transaction-signer.ts | 34 - .../transaction-with-single-sending-signer.ts | 53 - packages/signers/src/types.ts | 16 - packages/signers/src/types/global.d.ts | 4 - packages/signers/tsconfig.declarations.json | 10 - packages/signers/tsconfig.json | 9 - packages/sysvars/.gitignore | 1 - packages/sysvars/.npmrc | 1 - packages/sysvars/.prettierignore | 1 - packages/sysvars/CHANGELOG.md | 76 - packages/sysvars/LICENSE | 20 - packages/sysvars/README.md | 93 - packages/sysvars/package.json | 92 - packages/sysvars/src/__tests__/__setup__.ts | 10 - packages/sysvars/src/__tests__/clock-test.ts | 40 - .../src/__tests__/epoch-rewards-test.ts | 19 - .../src/__tests__/epoch-schedule-test.ts | 40 - packages/sysvars/src/__tests__/fees-test.ts | 29 - .../src/__tests__/last-restart-slot-test.ts | 25 - .../src/__tests__/recent-blockhashes-test.ts | 50 - packages/sysvars/src/__tests__/rent-test.ts | 34 - .../sysvars/src/__tests__/slot-hashes-test.ts | 46 - .../src/__tests__/slot-history-test.ts | 43 - .../src/__tests__/stake-history-test.ts | 43 - packages/sysvars/src/__tests__/sysvar-test.ts | 190 - .../src/__typetests__/sysvar-typetest.ts | 135 - packages/sysvars/src/clock.ts | 71 - packages/sysvars/src/epoch-rewards.ts | 83 - packages/sysvars/src/epoch-schedule.ts | 76 - packages/sysvars/src/fees.ts | 61 - packages/sysvars/src/index.ts | 11 - packages/sysvars/src/last-restart-slot.ts | 72 - packages/sysvars/src/recent-blockhashes.ts | 75 - packages/sysvars/src/rent.ts | 67 - packages/sysvars/src/slot-hashes.ts | 67 - packages/sysvars/src/slot-history.ts | 182 - packages/sysvars/src/stake-history.ts | 72 - packages/sysvars/src/sysvar.ts | 75 - packages/sysvars/tsconfig.declarations.json | 10 - packages/sysvars/tsconfig.json | 9 - packages/test-config/browser-environment.ts | 13 - packages/test-config/global.d.ts | 6 - packages/test-config/jest-dev.config.ts | 20 - packages/test-config/jest-lint.config.ts | 13 - packages/test-config/jest-prettier.config.ts | 14 - .../test-config/jest-unit.config.browser.ts | 36 - .../test-config/jest-unit.config.common.ts | 27 - packages/test-config/jest-unit.config.node.ts | 23 - packages/test-config/package.json | 19 - .../setup-define-version-constant.ts | 3 - packages/test-config/setup-dev-mode.ts | 4 - packages/test-config/setup-secure-context.ts | 4 - packages/test-config/setup-text-encoder.ts | 11 - packages/test-config/setup-undici-fetch.ts | 3 - .../test-config/setup-web-buffer-global.ts | 8 - packages/test-config/setup-webcrypto.ts | 13 - packages/test-config/setup-whatwg-fetch.ts | 1 - packages/test-config/test-validator-setup.js | 19 - .../test-config/test-validator-teardown.js | 6 - packages/test-config/tsconfig.json | 5 - packages/test-matchers/package.json | 8 - packages/test-matchers/toBeFrozenObject.ts | 22 - packages/test-matchers/tsconfig.json | 22 - packages/text-encoding-impl/.gitignore | 1 - packages/text-encoding-impl/.prettierignore | 1 - packages/text-encoding-impl/LICENSE | 20 - packages/text-encoding-impl/package.json | 51 - .../text-encoding-impl/src/index.browser.ts | 2 - .../text-encoding-impl/src/index.native.ts | 8 - packages/text-encoding-impl/src/index.node.ts | 2 - .../tsconfig.declarations.json | 11 - packages/text-encoding-impl/tsconfig.json | 9 - packages/text-encoding-impl/tsup.config.ts | 16 - packages/transaction-confirmation/.gitignore | 1 - packages/transaction-confirmation/.npmrc | 1 - .../transaction-confirmation/.prettierignore | 1 - .../transaction-confirmation/CHANGELOG.md | 95 - packages/transaction-confirmation/LICENSE | 20 - packages/transaction-confirmation/README.md | 178 - .../transaction-confirmation/package.json | 93 - .../confirmation-strategy-blockheight-test.ts | 227 - .../confirmation-strategy-nonce-test.ts | 216 - .../confirmation-strategy-racer-test.ts | 95 - .../confirmation-strategy-signature-test.ts | 176 - .../confirmation-strategy-timeout-test.ts | 33 - .../src/__tests__/waiters-test.ts | 439 -- ...irmation-strategy-blockheight-typetests.ts | 57 - .../confirmation-strategy-nonce-typetests.ts | 57 - ...ion-strategy-recent-signature-typetests.ts | 57 - .../src/confirmation-strategy-blockheight.ts | 94 - .../src/confirmation-strategy-nonce.ts | 116 - .../src/confirmation-strategy-racer.ts | 44 - .../confirmation-strategy-recent-signature.ts | 88 - .../src/confirmation-strategy-timeout.ts | 27 - .../transaction-confirmation/src/index.ts | 5 - .../src/types/global.d.ts | 4 - .../transaction-confirmation/src/waiters.ts | 88 - .../tsconfig.declarations.json | 10 - .../transaction-confirmation/tsconfig.json | 9 - packages/transaction-messages/.gitignore | 1 - packages/transaction-messages/.prettierignore | 1 - packages/transaction-messages/CHANGELOG.md | 41 - packages/transaction-messages/LICENSE | 20 - packages/transaction-messages/README.md | 226 - packages/transaction-messages/package.json | 89 - .../src/__tests__/blockhash-test.ts | 147 - .../compress-transaction-message-test.ts | 581 -- .../create-transaction-message-test.ts | 26 - .../src/__tests__/decompile-message-test.ts | 1544 ------ .../src/__tests__/durable-nonce-test.ts | 317 -- .../src/__tests__/fee-payer-test.ts | 46 - .../src/__tests__/instructions-test.ts | 123 - .../src/__typetests__/fee-payer-typetests.ts | 28 - .../transaction-message-typetests.ts | 245 - .../src/addresses-by-lookup-table-address.ts | 3 - .../transaction-messages/src/blockhash.ts | 71 - .../__tests__/address-table-lookup-test.ts | 76 - .../src/codecs/__tests__/header-test.ts | 35 - .../src/codecs/__tests__/instruction-test.ts | 135 - .../src/codecs/__tests__/message-test.ts | 357 -- .../__tests__/transaction-version-test.ts | 55 - .../src/codecs/address-table-lookup.ts | 50 - .../transaction-messages/src/codecs/header.ts | 49 - .../transaction-messages/src/codecs/index.ts | 2 - .../src/codecs/instruction.ts | 82 - .../src/codecs/message.ts | 114 - .../src/codecs/transaction-version.ts | 52 - .../src/compilable-transaction-message.ts | 13 - .../src/compile/__tests__/accounts-test.ts | 563 -- .../__tests__/address-table-lookups-test.ts | 100 - .../src/compile/__tests__/header-test.ts | 82 - .../compile/__tests__/instructions-test.ts | 80 - .../compile/__tests__/lifetime-token-test.ts | 20 - .../src/compile/__tests__/message-test.ts | 113 - .../compile/__tests__/static-accounts-test.ts | 51 - .../src/compile/accounts.ts | 242 - .../src/compile/address-table-lookups.ts | 34 - .../src/compile/header.ts | 34 - .../transaction-messages/src/compile/index.ts | 1 - .../src/compile/instructions.ts | 32 - .../src/compile/lifetime-token.ts | 13 - .../src/compile/message.ts | 48 - .../src/compile/static-accounts.ts | 10 - .../src/compress-transaction-message.ts | 105 - .../src/create-transaction-message.ts | 17 - .../src/decompile-message.ts | 232 - .../transaction-messages/src/durable-nonce.ts | 200 - .../transaction-messages/src/fee-payer.ts | 25 - packages/transaction-messages/src/index.ts | 12 - .../transaction-messages/src/instructions.ts | 35 - .../src/transaction-message.ts | 19 - .../src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - packages/transaction-messages/tsconfig.json | 9 - packages/transactions/.gitignore | 1 - packages/transactions/.prettierignore | 1 - packages/transactions/CHANGELOG.md | 140 - packages/transactions/LICENSE | 20 - packages/transactions/README.md | 94 - packages/transactions/package.json | 89 - .../src/__tests__/compile-transaction-test.ts | 111 - .../src/__tests__/signatures-test.ts | 469 -- .../src/__tests__/wire-transaction-test.ts | 71 - .../compile-transaction-typetests.ts | 75 - .../src/__typetests__/signatures-typetests.ts | 35 - .../__tests__/signatures-encoder-test.ts | 121 - .../__tests__/transaction-codec-test.ts | 355 -- packages/transactions/src/codecs/index.ts | 1 - .../src/codecs/signatures-encoder.ts | 28 - .../src/codecs/transaction-codec.ts | 104 - .../transactions/src/compile-transaction.ts | 64 - packages/transactions/src/index.ts | 6 - packages/transactions/src/lifetime.ts | 25 - packages/transactions/src/signatures.ts | 120 - packages/transactions/src/transaction.ts | 14 - packages/transactions/src/types/global.d.ts | 4 - packages/transactions/src/wire-transaction.ts | 13 - .../transactions/tsconfig.declarations.json | 10 - packages/transactions/tsconfig.json | 9 - packages/tsconfig/README.md | 3 - packages/tsconfig/base.json | 23 - packages/tsconfig/package.json | 8 - .../webcrypto-ed25519-polyfill/.gitignore | 1 - packages/webcrypto-ed25519-polyfill/.npmrc | 1 - .../.prettierignore | 1 - .../webcrypto-ed25519-polyfill/CHANGELOG.md | 57 - packages/webcrypto-ed25519-polyfill/LICENSE | 20 - packages/webcrypto-ed25519-polyfill/README.md | 47 - .../webcrypto-ed25519-polyfill/package.json | 82 - .../src/__tests__/install-test.ts | 634 --- .../src/__tests__/secrets-test.ts | 530 -- .../webcrypto-ed25519-polyfill/src/index.ts | 2 - .../webcrypto-ed25519-polyfill/src/install.ts | 200 - .../webcrypto-ed25519-polyfill/src/secrets.ts | 259 - .../src/types/global.d.ts | 4 - .../tsconfig.declarations.json | 10 - .../webcrypto-ed25519-polyfill/tsconfig.json | 9 - packages/ws-impl/.gitignore | 1 - packages/ws-impl/.prettierignore | 1 - packages/ws-impl/LICENSE | 20 - packages/ws-impl/package.json | 50 - packages/ws-impl/src/index.browser.ts | 1 - packages/ws-impl/src/index.node.ts | 6 - packages/ws-impl/tsconfig.declarations.json | 11 - packages/ws-impl/tsconfig.json | 9 - packages/ws-impl/tsup.config.ts | 16 - patches/jest-runner-prettier@1.0.0.patch | 44 - pnpm-lock.yaml | 4708 ++--------------- pnpm-workspace.yaml | 3 - .../rollup.config.mjs => rollup.config.mjs | 0 ...onfig.types.mjs => rollup.config.types.mjs | 0 ...STRHbngKZWPMfYnZdWTbKiNeuuPcX7yFUpSAc.json | 10 - ...s7SKKuMc89tveBDpzYHwXfeuB2PGAbGaPWc6G.json | 10 - .../address-lookup-table-account.json | 13 - ...pf-upgradeable-loader-program-account.json | 10 - scripts/fixtures/config-stake-account.json | 10 - .../fixtures/config-validator-account.json | 13 - ...lize-transaction-address-lookup-table.json | 13 - ...mple-transfer-lamports-source-account.json | 10 - scripts/fixtures/gpa1.json | 10 - scripts/fixtures/gpa2-1.json | 10 - scripts/fixtures/gpa2-2.json | 10 - scripts/fixtures/nonce-account.json | 13 - ...nsaction-fee-payer-insufficient-funds.json | 10 - .../fixtures/send-transaction-fee-payer.json | 10 - .../spl-token-22-account-mega-token.json | 14 - .../fixtures/spl-token-22-mint-account.json | 13 - .../spl-token-22-mint-mega-token-member.json | 14 - .../spl-token-22-mint-mega-token.json | 14 - ...spl-token-mint-account-with-delegated.json | 14 - .../spl-token-mint-account-with-owner.json | 14 - scripts/fixtures/spl-token-mint-account.json | 13 - .../spl-token-mint-no-token-accounts.json | 14 - .../fixtures/spl-token-multisig-account.json | 13 - .../spl-token-token-account-delegated.json | 14 - .../spl-token-token-account-owner.json | 14 - scripts/fixtures/spl-token-token-account.json | 13 - scripts/fixtures/stake-account.json | 13 - scripts/fixtures/vote-account.json | 13 - .../scripts => scripts}/typegen.sh | 0 .../__forks__/browser/fetch-impl.ts | 0 .../__forks__/react-native/fetch-impl.ts | 0 .../src => src}/account-data.ts | 0 .../library-legacy/src => src}/account.ts | 0 .../library-legacy/src => src}/blockhash.ts | 0 .../src => src}/bpf-loader-deprecated.ts | 0 .../library-legacy/src => src}/bpf-loader.ts | 0 .../library-legacy/src => src}/connection.ts | 0 .../src => src}/epoch-schedule.ts | 0 .../library-legacy/src => src}/errors.ts | 0 .../src => src}/fee-calculator.ts | 0 .../library-legacy/src => src}/fetch-impl.ts | 0 {packages/library-legacy/src => src}/index.ts | 0 .../library-legacy/src => src}/instruction.ts | 0 .../library-legacy/src => src}/keypair.ts | 0 .../library-legacy/src => src}/layout.ts | 0 .../library-legacy/src => src}/loader.ts | 0 .../src => src}/message/account-keys.ts | 0 .../src => src}/message/compiled-keys.ts | 0 .../src => src}/message/index.ts | 0 .../src => src}/message/legacy.ts | 0 .../library-legacy/src => src}/message/v0.ts | 0 .../src => src}/message/versioned.ts | 0 .../src => src}/nonce-account.ts | 0 .../programs/address-lookup-table/index.ts | 0 .../programs/address-lookup-table/state.ts | 0 .../src => src}/programs/compute-budget.ts | 0 .../src => src}/programs/ed25519.ts | 0 .../src => src}/programs/index.ts | 0 .../src => src}/programs/secp256k1.ts | 0 .../src => src}/programs/stake.ts | 0 .../src => src}/programs/system.ts | 0 .../src => src}/programs/vote.ts | 0 .../library-legacy/src => src}/publickey.ts | 0 .../src => src}/rpc-websocket.ts | 0 .../library-legacy/src => src}/sysvar.ts | 0 .../library-legacy/src => src}/timing.ts | 0 .../src => src}/transaction/constants.ts | 0 .../transaction/expiry-custom-errors.ts | 0 .../src => src}/transaction/index.ts | 0 .../src => src}/transaction/legacy.ts | 0 .../src => src}/transaction/message.ts | 0 .../src => src}/transaction/versioned.ts | 0 .../src => src}/utils/assert.ts | 0 .../src => src}/utils/bigint.ts | 0 .../src => src}/utils/borsh-schema.ts | 0 .../src => src}/utils/cluster.ts | 0 .../src => src}/utils/ed25519.ts | 0 .../src => src}/utils/guarded-array-utils.ts | 0 .../library-legacy/src => src}/utils/index.ts | 0 .../src => src}/utils/makeWebsocketUrl.ts | 0 .../src => src}/utils/promise-timeout.ts | 0 .../src => src}/utils/secp256k1.ts | 0 .../utils/send-and-confirm-raw-transaction.ts | 0 .../utils/send-and-confirm-transaction.ts | 0 .../src => src}/utils/shortvec-encoding.ts | 0 .../library-legacy/src => src}/utils/sleep.ts | 0 .../src => src}/utils/to-buffer.ts | 0 .../src => src}/validator-info.ts | 0 .../src => src}/vote-account.ts | 0 .../library-legacy/test => test}/.gitignore | 0 .../test => test}/account.test.ts | 0 .../test => test}/cluster.test.ts | 0 .../connection-subscriptions.test.ts | 0 .../test => test}/connection.test.ts | 0 .../test => test}/epoch-schedule.test.ts | 0 .../fixtures/noop-program/.gitignore | 0 .../fixtures/noop-program/Cargo.toml | 0 .../fixtures/noop-program/build.sh | 0 .../noop-program/solana_sbf_rust_noop.so | Bin .../fixtures/noop-program/src/lib.rs | 0 .../test => test}/guarded-array-utils.test.ts | 0 .../test => test}/keypair.test.ts | 0 .../test => test}/makeWebsocketUrl.test.ts | 0 .../message-tests/account-keys.test.ts | 0 .../message-tests/compiled-keys.test.ts | 0 .../message-tests/legacy.test.ts | 0 .../test => test}/message-tests/v0.test.ts | 0 .../message-tests/versioned.test.ts | 0 .../test => test}/mocks/rpc-http.ts | 0 .../test => test}/mocks/rpc-websocket.ts | 0 .../test => test}/nonce.test.ts | 0 .../address-lookup-table.test.ts | 0 .../program-tests/compute-budget.test.ts | 0 .../program-tests/ed25519.test.ts | 0 .../program-tests/secp256k1.test.ts | 0 .../test => test}/program-tests/stake.test.ts | 0 .../program-tests/system.test.ts | 0 .../test => test}/program-tests/vote.test.ts | 0 .../test => test}/publickey.test.ts | 0 .../test => test}/shortvec-encoding.test.ts | 0 .../test => test}/transaction-payer.test.ts | 0 .../transaction-tests/message.test.ts | 0 .../test => test}/transaction.test.ts | 0 {packages/library-legacy/test => test}/url.ts | 0 .../test => test}/validator-info.test.ts | 0 .../test => test}/websocket.test.ts | 0 tsconfig.d.json | 8 + tsconfig.json | 25 +- turbo.json | 164 - .../typedoc.json => typedoc.json | 0 1470 files changed, 747 insertions(+), 115692 deletions(-) delete mode 100644 .changeset/brave-chicken-own.md delete mode 100644 .changeset/breezy-items-reflect.md delete mode 100644 .changeset/calm-camels-decide.md delete mode 100644 .changeset/calm-crabs-tease.md delete mode 100644 .changeset/chatty-flies-end.md delete mode 100644 .changeset/chilled-walls-scream.md delete mode 100644 .changeset/chilled-waves-lay.md delete mode 100644 .changeset/chilly-seas-act.md delete mode 100644 .changeset/config.json delete mode 100644 .changeset/curly-kids-type.md delete mode 100644 .changeset/early-eyes-mix.md delete mode 100644 .changeset/famous-buttons-switch.md delete mode 100644 .changeset/fast-cars-knock.md delete mode 100644 .changeset/forty-queens-explode.md delete mode 100644 .changeset/fuzzy-lizards-end.md delete mode 100644 .changeset/gorgeous-gorillas-sniff.md delete mode 100644 .changeset/green-experts-hang.md delete mode 100644 .changeset/heavy-students-relax.md delete mode 100644 .changeset/honest-cheetahs-care.md delete mode 100644 .changeset/honest-rivers-deny.md delete mode 100644 .changeset/hot-penguins-explain.md delete mode 100644 .changeset/late-mangos-doubt.md delete mode 100644 .changeset/late-planets-breathe.md delete mode 100644 .changeset/lazy-phones-fail.md delete mode 100644 .changeset/little-berries-applaud.md delete mode 100644 .changeset/loud-otters-pull.md delete mode 100644 .changeset/lovely-mice-promise.md delete mode 100644 .changeset/mean-vans-behave.md delete mode 100644 .changeset/metal-bees-lick.md delete mode 100644 .changeset/metal-radios-switch.md delete mode 100644 .changeset/nervous-deers-roll.md delete mode 100644 .changeset/nine-pots-notice.md delete mode 100644 .changeset/odd-beds-punch.md delete mode 100644 .changeset/poor-dogs-crash.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/pretty-rocks-argue.md delete mode 100644 .changeset/proud-poems-try.md delete mode 100644 .changeset/purple-forks-rest.md delete mode 100644 .changeset/rare-goats-sell.md delete mode 100644 .changeset/rich-eggs-tease.md delete mode 100644 .changeset/sharp-steaks-admire.md delete mode 100644 .changeset/shiny-birds-pay.md delete mode 100644 .changeset/short-jokes-begin.md delete mode 100644 .changeset/short-toes-perform.md delete mode 100644 .changeset/silly-months-happen.md delete mode 100644 .changeset/sixty-dodos-smile.md delete mode 100644 .changeset/sour-mugs-press.md delete mode 100644 .changeset/stale-turtles-hang.md delete mode 100644 .changeset/strong-pandas-marry.md delete mode 100644 .changeset/tender-turtles-bake.md delete mode 100644 .changeset/thick-masks-lie.md delete mode 100644 .changeset/thick-radios-appear.md delete mode 100644 .changeset/thick-radios-search.md delete mode 100644 .changeset/tidy-wolves-share.md delete mode 100644 .changeset/tricky-fishes-pull.md delete mode 100644 .changeset/two-cougars-try.md delete mode 100644 .changeset/unlucky-pumpkins-itch.md delete mode 100644 .changeset/violet-brooms-report.md delete mode 100644 .changeset/warm-pears-sip.md delete mode 100644 .changeset/wicked-cougars-matter.md delete mode 100644 .changeset/wild-lobsters-kick.md rename packages/library-legacy/.eslintignore => .eslintignore (100%) mode change 100755 => 100644 .eslintrc.js delete mode 100644 .github/ISSUE_TEMPLATE/0_bug.md delete mode 100644 .github/ISSUE_TEMPLATE/1_feature.md delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/dependabot.yml delete mode 100644 .github/label-actions.yml delete mode 100644 .github/workflows/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/actions/lint-build-and-test/action.yml delete mode 100644 .github/workflows/autolock-inactive-threads.yml delete mode 100644 .github/workflows/bundlesize.yml delete mode 100644 .github/workflows/label-actions.yml delete mode 100644 .github/workflows/manage-stale-threads.yml delete mode 100644 .github/workflows/publish-gh-pages.yml delete mode 100644 .github/workflows/publish-packages.yml delete mode 100644 .github/workflows/publish-prerelease-packages.yml mode change 100755 => 100644 .gitignore delete mode 100644 .mergify.yml rename packages/library-legacy/.prettierrc.yaml => .prettierrc.yaml (100%) rename packages/library-legacy/.releaserc.json => .releaserc.json (60%) rename packages/library-legacy/.sgcrc => .sgcrc (100%) delete mode 100644 .vscode/settings.json delete mode 100644 CONTRIBUTING.md rename packages/library-legacy/babel.config.json => babel.config.json (100%) rename packages/library-legacy/commitlint.config.js => commitlint.config.js (100%) delete mode 100644 examples/README.md delete mode 100644 examples/deserialize-transaction/LICENSE delete mode 100644 examples/deserialize-transaction/package.json delete mode 100644 examples/deserialize-transaction/src/example.ts delete mode 100644 examples/deserialize-transaction/tsconfig.json delete mode 100644 examples/react-app/.eslintrc.cjs delete mode 100644 examples/react-app/.gitignore delete mode 100644 examples/react-app/LICENSE delete mode 100644 examples/react-app/README.md delete mode 100644 examples/react-app/index.html delete mode 100644 examples/react-app/package.json delete mode 100644 examples/react-app/public/solanaLogoMark.svg delete mode 100644 examples/react-app/src/components/Balance.tsx delete mode 100644 examples/react-app/src/components/BaseSignMessageFeaturePanel.tsx delete mode 100644 examples/react-app/src/components/ConnectWalletMenu.tsx delete mode 100644 examples/react-app/src/components/ConnectWalletMenuItem.tsx delete mode 100644 examples/react-app/src/components/DisconnectButton.tsx delete mode 100644 examples/react-app/src/components/ErrorDialog.tsx delete mode 100644 examples/react-app/src/components/FeatureNotSupportedCallout.tsx delete mode 100644 examples/react-app/src/components/FeaturePanel.tsx delete mode 100644 examples/react-app/src/components/Nav.tsx delete mode 100644 examples/react-app/src/components/SignInMenu.tsx delete mode 100644 examples/react-app/src/components/SignInMenuItem.tsx delete mode 100644 examples/react-app/src/components/SolanaSignAndSendTransactionFeaturePanel.tsx delete mode 100644 examples/react-app/src/components/SolanaSignMessageFeaturePanel.tsx delete mode 100644 examples/react-app/src/components/UnconnectableWalletMenuItem.tsx delete mode 100644 examples/react-app/src/components/WalletAccountIcon.tsx delete mode 100644 examples/react-app/src/components/WalletMenuItemContent.tsx delete mode 100644 examples/react-app/src/context/ChainContext.tsx delete mode 100644 examples/react-app/src/context/RpcContext.tsx delete mode 100644 examples/react-app/src/context/SelectedWalletAccountContext.tsx delete mode 100644 examples/react-app/src/errors.tsx delete mode 100644 examples/react-app/src/functions/balance.ts delete mode 100644 examples/react-app/src/hooks/useStable.ts delete mode 100644 examples/react-app/src/index.css delete mode 100644 examples/react-app/src/main.tsx delete mode 100644 examples/react-app/src/reset.css delete mode 100644 examples/react-app/src/routes/root.tsx delete mode 100644 examples/react-app/src/storage.ts delete mode 100644 examples/react-app/src/vite-env.d.ts delete mode 100644 examples/react-app/tsconfig.app.json delete mode 100644 examples/react-app/tsconfig.json delete mode 100644 examples/react-app/tsconfig.node.json delete mode 100644 examples/react-app/vite.config.ts delete mode 100644 examples/rpc-custom-api/LICENSE delete mode 100644 examples/rpc-custom-api/package.json delete mode 100644 examples/rpc-custom-api/src/example.ts delete mode 100644 examples/rpc-custom-api/tsconfig.json delete mode 100644 examples/rpc-transport-throttled/LICENSE delete mode 100644 examples/rpc-transport-throttled/package.json delete mode 100644 examples/rpc-transport-throttled/src/example.ts delete mode 100644 examples/rpc-transport-throttled/tsconfig.json delete mode 100644 examples/transfer-lamports/LICENSE delete mode 100644 examples/transfer-lamports/package.json delete mode 100644 examples/transfer-lamports/src/example.ts delete mode 100644 examples/transfer-lamports/tsconfig.json delete mode 100644 examples/utils/.gitignore delete mode 100644 examples/utils/.prettierignore delete mode 100644 examples/utils/LICENSE delete mode 100644 examples/utils/createLogger.ts delete mode 100644 examples/utils/package.json delete mode 100644 examples/utils/pressAnyKeyPrompt.ts delete mode 100644 examples/utils/tsconfig.declarations.json delete mode 100644 examples/utils/tsconfig.json delete mode 100644 packages/accounts/.gitignore delete mode 100644 packages/accounts/.prettierignore delete mode 100644 packages/accounts/CHANGELOG.md delete mode 100644 packages/accounts/LICENSE delete mode 100644 packages/accounts/README.md delete mode 100644 packages/accounts/package.json delete mode 100644 packages/accounts/src/__tests__/__setup__.ts delete mode 100644 packages/accounts/src/__tests__/decode-account-test.ts delete mode 100644 packages/accounts/src/__tests__/fetch-account-test.ts delete mode 100644 packages/accounts/src/__tests__/maybe-account-test.ts delete mode 100644 packages/accounts/src/__tests__/parse-account-test.ts delete mode 100644 packages/accounts/src/__typetests__/decode-account-typetest.ts delete mode 100644 packages/accounts/src/__typetests__/fetch-account-typetest.ts delete mode 100644 packages/accounts/src/__typetests__/maybe-account-typetest.ts delete mode 100644 packages/accounts/src/__typetests__/parse-account-typetest.ts delete mode 100644 packages/accounts/src/account.ts delete mode 100644 packages/accounts/src/decode-account.ts delete mode 100644 packages/accounts/src/fetch-account.ts delete mode 100644 packages/accounts/src/index.ts delete mode 100644 packages/accounts/src/maybe-account.ts delete mode 100644 packages/accounts/src/parse-account.ts delete mode 100644 packages/accounts/src/rpc-api/common.ts delete mode 100644 packages/accounts/src/rpc-api/getAccountInfo.ts delete mode 100644 packages/accounts/src/rpc-api/getMultipleAccounts.ts delete mode 100644 packages/accounts/src/rpc-api/index.ts delete mode 100644 packages/accounts/src/types/global.d.ts delete mode 100644 packages/accounts/tsconfig.declarations.json delete mode 100644 packages/accounts/tsconfig.json delete mode 100644 packages/addresses/.gitignore delete mode 100644 packages/addresses/.npmrc delete mode 100644 packages/addresses/.prettierignore delete mode 100644 packages/addresses/CHANGELOG.md delete mode 100644 packages/addresses/LICENSE delete mode 100644 packages/addresses/README.md delete mode 100644 packages/addresses/package.json delete mode 100644 packages/addresses/src/__tests__/address-test.ts delete mode 100644 packages/addresses/src/__tests__/coercions-test.ts delete mode 100644 packages/addresses/src/__tests__/curve-test.ts delete mode 100644 packages/addresses/src/__tests__/program-derived-address-test.ts delete mode 100644 packages/addresses/src/__tests__/public-key-test.ts delete mode 100644 packages/addresses/src/__typetests__/coercions-typetests.ts delete mode 100644 packages/addresses/src/address.ts delete mode 100644 packages/addresses/src/curve.ts delete mode 100644 packages/addresses/src/index.ts delete mode 100644 packages/addresses/src/program-derived-address.ts delete mode 100644 packages/addresses/src/public-key.ts delete mode 100644 packages/addresses/src/types/global.d.ts delete mode 100644 packages/addresses/src/vendor/noble/ed25519.ts delete mode 100644 packages/addresses/tsconfig.declarations.json delete mode 100644 packages/addresses/tsconfig.json delete mode 100644 packages/assertions/.gitignore delete mode 100644 packages/assertions/.npmrc delete mode 100644 packages/assertions/.prettierignore delete mode 100644 packages/assertions/.vscode/settings.json delete mode 100644 packages/assertions/CHANGELOG.md delete mode 100644 packages/assertions/LICENSE delete mode 100644 packages/assertions/README.md delete mode 100644 packages/assertions/package.json delete mode 100644 packages/assertions/src/__tests__/crypto-test.ts delete mode 100644 packages/assertions/src/__tests__/subtle-crypto-test.ts delete mode 100644 packages/assertions/src/crypto.ts delete mode 100644 packages/assertions/src/index.ts delete mode 100644 packages/assertions/src/subtle-crypto.ts delete mode 100644 packages/assertions/src/types/global.d.ts delete mode 100644 packages/assertions/tsconfig.declarations.json delete mode 100644 packages/assertions/tsconfig.json delete mode 100644 packages/build-scripts/README.md delete mode 100644 packages/build-scripts/dev-flag.ts delete mode 100644 packages/build-scripts/getBaseConfig.ts delete mode 100644 packages/build-scripts/package.json delete mode 100644 packages/build-scripts/tsconfig.json delete mode 100644 packages/build-scripts/tsup.config.browser.ts delete mode 100644 packages/build-scripts/tsup.config.library.ts delete mode 100644 packages/build-scripts/tsup.config.package.ts delete mode 100644 packages/codecs-core/.gitignore delete mode 100644 packages/codecs-core/.npmrc delete mode 100644 packages/codecs-core/.prettierignore delete mode 100644 packages/codecs-core/CHANGELOG.md delete mode 100644 packages/codecs-core/LICENSE delete mode 100644 packages/codecs-core/README.md delete mode 100644 packages/codecs-core/package.json delete mode 100755 packages/codecs-core/src/__benchmarks__/run.ts delete mode 100644 packages/codecs-core/src/__tests__/__setup__.ts delete mode 100644 packages/codecs-core/src/__tests__/add-codec-sentinel-test.ts delete mode 100644 packages/codecs-core/src/__tests__/add-codec-size-prefix-test.ts delete mode 100644 packages/codecs-core/src/__tests__/bytes-test.ts delete mode 100644 packages/codecs-core/src/__tests__/codec-test.ts delete mode 100644 packages/codecs-core/src/__tests__/combine-codec.ts delete mode 100644 packages/codecs-core/src/__tests__/fix-codec-size-test.ts delete mode 100644 packages/codecs-core/src/__tests__/offset-codec-test.ts delete mode 100644 packages/codecs-core/src/__tests__/pad-codec-test.ts delete mode 100644 packages/codecs-core/src/__tests__/resize-codec-test.ts delete mode 100644 packages/codecs-core/src/__tests__/reverse-codec-test.ts delete mode 100644 packages/codecs-core/src/__tests__/transform-codec-test.ts delete mode 100644 packages/codecs-core/src/__typetests__/add-codec-sentinel-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/add-codec-size-prefix-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/combine-codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/fix-codec-size-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/offset-codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/pad-codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/resize-codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/reverse-codec-typetest.ts delete mode 100644 packages/codecs-core/src/__typetests__/transform-codec-typetest.ts delete mode 100644 packages/codecs-core/src/add-codec-sentinel.ts delete mode 100644 packages/codecs-core/src/add-codec-size-prefix.ts delete mode 100644 packages/codecs-core/src/assertions.ts delete mode 100644 packages/codecs-core/src/bytes.ts delete mode 100644 packages/codecs-core/src/codec.ts delete mode 100644 packages/codecs-core/src/combine-codec.ts delete mode 100644 packages/codecs-core/src/fix-codec-size.ts delete mode 100644 packages/codecs-core/src/index.ts delete mode 100644 packages/codecs-core/src/offset-codec.ts delete mode 100644 packages/codecs-core/src/pad-codec.ts delete mode 100644 packages/codecs-core/src/readonly-uint8array.ts delete mode 100644 packages/codecs-core/src/resize-codec.ts delete mode 100644 packages/codecs-core/src/reverse-codec.ts delete mode 100644 packages/codecs-core/src/transform-codec.ts delete mode 100644 packages/codecs-core/src/types/global.d.ts delete mode 100644 packages/codecs-core/tsconfig.declarations.json delete mode 100644 packages/codecs-core/tsconfig.json delete mode 100644 packages/codecs-data-structures/.gitignore delete mode 100644 packages/codecs-data-structures/.npmrc delete mode 100644 packages/codecs-data-structures/.prettierignore delete mode 100644 packages/codecs-data-structures/CHANGELOG.md delete mode 100644 packages/codecs-data-structures/LICENSE delete mode 100644 packages/codecs-data-structures/README.md delete mode 100644 packages/codecs-data-structures/package.json delete mode 100644 packages/codecs-data-structures/src/__tests__/__setup__.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/array-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/bit-array-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/boolean-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/bytes-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/constant-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/discriminated-union-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/enum-helpers-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/enum-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/hidden-prefix-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/hidden-suffix-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/literal-union-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/map-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/nullable-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/set-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/struct-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/tuple-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/union-test.ts delete mode 100644 packages/codecs-data-structures/src/__tests__/unit-test.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/array-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/bit-array-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/boolean-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/bytes-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/constant-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/discriminated-union-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/enum-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/hidden-prefix-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/hidden-suffix-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/literal-union-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/map-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/nullable-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/set-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/struct-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/tuple-typetest.ts delete mode 100644 packages/codecs-data-structures/src/__typetests__/union-typetest.ts delete mode 100644 packages/codecs-data-structures/src/array.ts delete mode 100644 packages/codecs-data-structures/src/assertions.ts delete mode 100644 packages/codecs-data-structures/src/bit-array.ts delete mode 100644 packages/codecs-data-structures/src/boolean.ts delete mode 100644 packages/codecs-data-structures/src/bytes.ts delete mode 100644 packages/codecs-data-structures/src/constant.ts delete mode 100644 packages/codecs-data-structures/src/discriminated-union.ts delete mode 100644 packages/codecs-data-structures/src/enum-helpers.ts delete mode 100644 packages/codecs-data-structures/src/enum.ts delete mode 100644 packages/codecs-data-structures/src/hidden-prefix.ts delete mode 100644 packages/codecs-data-structures/src/hidden-suffix.ts delete mode 100644 packages/codecs-data-structures/src/index.ts delete mode 100644 packages/codecs-data-structures/src/literal-union.ts delete mode 100644 packages/codecs-data-structures/src/map.ts delete mode 100644 packages/codecs-data-structures/src/nullable.ts delete mode 100644 packages/codecs-data-structures/src/set.ts delete mode 100644 packages/codecs-data-structures/src/struct.ts delete mode 100644 packages/codecs-data-structures/src/tuple.ts delete mode 100644 packages/codecs-data-structures/src/types/global.d.ts delete mode 100644 packages/codecs-data-structures/src/union.ts delete mode 100644 packages/codecs-data-structures/src/unit.ts delete mode 100644 packages/codecs-data-structures/src/utils.ts delete mode 100644 packages/codecs-data-structures/tsconfig.declarations.json delete mode 100644 packages/codecs-data-structures/tsconfig.json delete mode 100644 packages/codecs-numbers/.gitignore delete mode 100644 packages/codecs-numbers/.npmrc delete mode 100644 packages/codecs-numbers/.prettierignore delete mode 100644 packages/codecs-numbers/CHANGELOG.md delete mode 100644 packages/codecs-numbers/LICENSE delete mode 100644 packages/codecs-numbers/README.md delete mode 100644 packages/codecs-numbers/package.json delete mode 100644 packages/codecs-numbers/src/__tests__/__setup__.ts delete mode 100644 packages/codecs-numbers/src/__tests__/f32-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/f64-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/i128-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/i16-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/i32-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/i64-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/i8-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/short-u16-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/u128-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/u16-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/u32-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/u64-test.ts delete mode 100644 packages/codecs-numbers/src/__tests__/u8-test.ts delete mode 100644 packages/codecs-numbers/src/__typetests__/codecs.ts delete mode 100644 packages/codecs-numbers/src/assertions.ts delete mode 100644 packages/codecs-numbers/src/common.ts delete mode 100644 packages/codecs-numbers/src/f32.ts delete mode 100644 packages/codecs-numbers/src/f64.ts delete mode 100644 packages/codecs-numbers/src/i128.ts delete mode 100644 packages/codecs-numbers/src/i16.ts delete mode 100644 packages/codecs-numbers/src/i32.ts delete mode 100644 packages/codecs-numbers/src/i64.ts delete mode 100644 packages/codecs-numbers/src/i8.ts delete mode 100644 packages/codecs-numbers/src/index.ts delete mode 100644 packages/codecs-numbers/src/short-u16.ts delete mode 100644 packages/codecs-numbers/src/types/global.d.ts delete mode 100644 packages/codecs-numbers/src/u128.ts delete mode 100644 packages/codecs-numbers/src/u16.ts delete mode 100644 packages/codecs-numbers/src/u32.ts delete mode 100644 packages/codecs-numbers/src/u64.ts delete mode 100644 packages/codecs-numbers/src/u8.ts delete mode 100644 packages/codecs-numbers/src/utils.ts delete mode 100644 packages/codecs-numbers/tsconfig.declarations.json delete mode 100644 packages/codecs-numbers/tsconfig.json delete mode 100644 packages/codecs-strings/.gitignore delete mode 100644 packages/codecs-strings/.npmrc delete mode 100644 packages/codecs-strings/.prettierignore delete mode 100644 packages/codecs-strings/CHANGELOG.md delete mode 100644 packages/codecs-strings/LICENSE delete mode 100644 packages/codecs-strings/README.md delete mode 100644 packages/codecs-strings/package.json delete mode 100755 packages/codecs-strings/src/__benchmarks__/run.ts delete mode 100644 packages/codecs-strings/src/__tests__/base10-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/base16-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/base58-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/base64-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/baseX-reslice-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/string-test.ts delete mode 100644 packages/codecs-strings/src/__tests__/utf8-test.ts delete mode 100644 packages/codecs-strings/src/assertions.ts delete mode 100644 packages/codecs-strings/src/base10.ts delete mode 100644 packages/codecs-strings/src/base16.ts delete mode 100644 packages/codecs-strings/src/base58.ts delete mode 100644 packages/codecs-strings/src/base64.ts delete mode 100644 packages/codecs-strings/src/baseX-reslice.ts delete mode 100644 packages/codecs-strings/src/baseX.ts delete mode 100644 packages/codecs-strings/src/index.ts delete mode 100644 packages/codecs-strings/src/null-characters.ts delete mode 100644 packages/codecs-strings/src/types/global.d.ts delete mode 100644 packages/codecs-strings/src/utf8.ts delete mode 100644 packages/codecs-strings/tsconfig.declarations.json delete mode 100644 packages/codecs-strings/tsconfig.json delete mode 100644 packages/codecs/.gitignore delete mode 100644 packages/codecs/.prettierignore delete mode 100644 packages/codecs/CHANGELOG.md delete mode 100644 packages/codecs/LICENSE delete mode 100644 packages/codecs/README.md delete mode 100644 packages/codecs/package.json delete mode 100644 packages/codecs/src/index.ts delete mode 100644 packages/codecs/tsconfig.declarations.json delete mode 100644 packages/codecs/tsconfig.json delete mode 100644 packages/compat/.gitignore delete mode 100644 packages/compat/.npmrc delete mode 100644 packages/compat/.prettierignore delete mode 100644 packages/compat/CHANGELOG.md delete mode 100644 packages/compat/LICENSE delete mode 100644 packages/compat/README.md delete mode 100644 packages/compat/package.json delete mode 100644 packages/compat/src/__tests__/address-test.ts delete mode 100644 packages/compat/src/__tests__/keypair-test.ts delete mode 100644 packages/compat/src/__tests__/transaction-test.ts delete mode 100644 packages/compat/src/__typetests__/address.ts delete mode 100644 packages/compat/src/__typetests__/keypair.ts delete mode 100644 packages/compat/src/__typetests__/transaction-typetests.ts delete mode 100644 packages/compat/src/address.ts delete mode 100644 packages/compat/src/index.ts delete mode 100644 packages/compat/src/keypair.ts delete mode 100644 packages/compat/src/transaction.ts delete mode 100644 packages/compat/tsconfig.declarations.json delete mode 100644 packages/compat/tsconfig.json delete mode 100644 packages/crypto-impl/.gitignore delete mode 100644 packages/crypto-impl/.prettierignore delete mode 100644 packages/crypto-impl/LICENSE delete mode 100644 packages/crypto-impl/package.json delete mode 100644 packages/crypto-impl/src/index.browser.ts delete mode 100644 packages/crypto-impl/src/index.node.ts delete mode 100644 packages/crypto-impl/tsconfig.declarations.json delete mode 100644 packages/crypto-impl/tsconfig.json delete mode 100644 packages/crypto-impl/tsup.config.ts delete mode 100644 packages/errors/.gitignore delete mode 100644 packages/errors/.npmrc delete mode 100644 packages/errors/.prettierignore delete mode 100644 packages/errors/CHANGELOG.md delete mode 100644 packages/errors/LICENSE delete mode 100644 packages/errors/README.md delete mode 100755 packages/errors/bin/cli.mjs delete mode 100644 packages/errors/package.json delete mode 100644 packages/errors/src/__tests__/RPC_INTEGER_OVERFLOW-test.ts delete mode 100644 packages/errors/src/__tests__/context-test.ts delete mode 100644 packages/errors/src/__tests__/error-test.ts delete mode 100644 packages/errors/src/__tests__/instruction-error-test.ts delete mode 100644 packages/errors/src/__tests__/json-rpc-error-test.ts delete mode 100644 packages/errors/src/__tests__/message-formatter-test.ts delete mode 100644 packages/errors/src/__tests__/transaction-error-test.ts delete mode 100644 packages/errors/src/__typetests__/error-typetest.ts delete mode 100755 packages/errors/src/cli.ts delete mode 100644 packages/errors/src/codes.ts delete mode 100644 packages/errors/src/context.ts delete mode 100644 packages/errors/src/error.ts delete mode 100644 packages/errors/src/index.ts delete mode 100644 packages/errors/src/instruction-error.ts delete mode 100644 packages/errors/src/json-rpc-error.ts delete mode 100644 packages/errors/src/message-formatter.ts delete mode 100644 packages/errors/src/messages.ts delete mode 100644 packages/errors/src/rpc-enum-errors.ts delete mode 100644 packages/errors/src/stack-trace.ts delete mode 100644 packages/errors/src/transaction-error.ts delete mode 100644 packages/errors/src/types/global.d.ts delete mode 100644 packages/errors/tsconfig.declarations.json delete mode 100644 packages/errors/tsconfig.json delete mode 100644 packages/fast-stable-stringify/.gitignore delete mode 100644 packages/fast-stable-stringify/.prettierignore delete mode 100644 packages/fast-stable-stringify/CHANGELOG.md delete mode 100644 packages/fast-stable-stringify/LICENSE delete mode 100644 packages/fast-stable-stringify/README.md delete mode 100644 packages/fast-stable-stringify/package.json delete mode 100644 packages/fast-stable-stringify/src/__tests__/index-test.ts delete mode 100644 packages/fast-stable-stringify/src/__typetests__/index-typetest.ts delete mode 100644 packages/fast-stable-stringify/src/index.ts delete mode 100644 packages/fast-stable-stringify/tsconfig.declarations.json delete mode 100644 packages/fast-stable-stringify/tsconfig.json delete mode 100644 packages/fetch-impl/LICENSE delete mode 100644 packages/fetch-impl/package.json delete mode 100755 packages/fetch-impl/src/__benchmarks__/run.ts delete mode 100644 packages/fetch-impl/tsconfig.json delete mode 100644 packages/functional/.gitignore delete mode 100644 packages/functional/.prettierignore delete mode 100644 packages/functional/CHANGELOG.md delete mode 100644 packages/functional/LICENSE delete mode 100644 packages/functional/README.md delete mode 100644 packages/functional/package.json delete mode 100644 packages/functional/src/__tests__/pipe-test.ts delete mode 100644 packages/functional/src/__typetests__/pipe-typetest.ts delete mode 100644 packages/functional/src/index.ts delete mode 100644 packages/functional/src/pipe.ts delete mode 100644 packages/functional/tsconfig.declarations.json delete mode 100644 packages/functional/tsconfig.json delete mode 100644 packages/instructions/.gitignore delete mode 100644 packages/instructions/.prettierignore delete mode 100644 packages/instructions/CHANGELOG.md delete mode 100644 packages/instructions/LICENSE delete mode 100644 packages/instructions/README.md delete mode 100644 packages/instructions/package.json delete mode 100644 packages/instructions/src/__tests__/instruction-test.ts delete mode 100644 packages/instructions/src/__tests__/roles-test.ts delete mode 100644 packages/instructions/src/__typetests__/instruction-typetest.ts delete mode 100644 packages/instructions/src/accounts.ts delete mode 100644 packages/instructions/src/index.ts delete mode 100644 packages/instructions/src/instruction.ts delete mode 100644 packages/instructions/src/roles.ts delete mode 100644 packages/instructions/src/types/global.d.ts delete mode 100644 packages/instructions/tsconfig.declarations.json delete mode 100644 packages/instructions/tsconfig.json delete mode 100644 packages/keys/.gitignore delete mode 100644 packages/keys/.npmrc delete mode 100644 packages/keys/.prettierignore delete mode 100644 packages/keys/CHANGELOG.md delete mode 100644 packages/keys/LICENSE delete mode 100644 packages/keys/README.md delete mode 100644 packages/keys/package.json delete mode 100755 packages/keys/src/__benchmarks__/run.ts delete mode 100644 packages/keys/src/__tests__/coercions-test.ts delete mode 100644 packages/keys/src/__tests__/key-pair-test.ts delete mode 100644 packages/keys/src/__tests__/private-key-test.ts delete mode 100644 packages/keys/src/__tests__/signatures-test.ts delete mode 100644 packages/keys/src/__typetests__/key-pair-typetests.ts delete mode 100644 packages/keys/src/__typetests__/private-key-typetests.ts delete mode 100644 packages/keys/src/__typetests__/signatures-typetests.ts delete mode 100644 packages/keys/src/index.ts delete mode 100644 packages/keys/src/key-pair.ts delete mode 100644 packages/keys/src/private-key.ts delete mode 100644 packages/keys/src/signatures.ts delete mode 100644 packages/keys/src/types/global.d.ts delete mode 100644 packages/keys/tsconfig.declarations.json delete mode 100644 packages/keys/tsconfig.json delete mode 100644 packages/library-legacy/.eslintrc.js delete mode 100644 packages/library-legacy/.gitignore delete mode 100644 packages/library-legacy/.prettierignore delete mode 100644 packages/library-legacy/LICENSE delete mode 100644 packages/library-legacy/README.md delete mode 100644 packages/library-legacy/package.json delete mode 100644 packages/library-legacy/test/__shadow-jest-types.d.ts delete mode 100644 packages/library-legacy/tsconfig.d.json delete mode 100755 packages/library-legacy/tsconfig.json delete mode 100644 packages/library/.gitignore delete mode 100644 packages/library/.prettierignore delete mode 100644 packages/library/CHANGELOG.md delete mode 100644 packages/library/LICENSE delete mode 100644 packages/library/README.md delete mode 100644 packages/library/package.json delete mode 100644 packages/library/src/__tests__/airdrop-internal-test.ts delete mode 100644 packages/library/src/__tests__/compute-limit-internal-test.ts delete mode 100644 packages/library/src/__tests__/decode-transaction-message-test.ts delete mode 100644 packages/library/src/__tests__/send-transaction-internal-test.ts delete mode 100644 packages/library/src/__typetests__/airdrop-typetests.ts delete mode 100644 packages/library/src/__typetests__/send-and-confirm-durable-nonce-transaction-typetests.ts delete mode 100644 packages/library/src/__typetests__/send-and-confirm-transaction-typetests.ts delete mode 100644 packages/library/src/airdrop-internal.ts delete mode 100644 packages/library/src/airdrop.ts delete mode 100644 packages/library/src/compute-limit-internal.ts delete mode 100644 packages/library/src/compute-limit.ts delete mode 100644 packages/library/src/decode-transaction-message.ts delete mode 100644 packages/library/src/index.ts delete mode 100644 packages/library/src/send-and-confirm-durable-nonce-transaction.ts delete mode 100644 packages/library/src/send-and-confirm-transaction.ts delete mode 100644 packages/library/src/send-transaction-internal.ts delete mode 100644 packages/library/src/send-transaction-without-confirming.ts delete mode 100644 packages/library/src/types/global.d.ts delete mode 100644 packages/library/tsconfig.declarations.json delete mode 100644 packages/library/tsconfig.json delete mode 100644 packages/options/.gitignore delete mode 100644 packages/options/.npmrc delete mode 100644 packages/options/.prettierignore delete mode 100644 packages/options/CHANGELOG.md delete mode 100644 packages/options/LICENSE delete mode 100644 packages/options/README.md delete mode 100644 packages/options/package.json delete mode 100644 packages/options/src/__tests__/__setup__.ts delete mode 100644 packages/options/src/__tests__/option-codec-test.ts delete mode 100644 packages/options/src/__tests__/option-test.ts delete mode 100644 packages/options/src/__tests__/unwrap-option-recursively-test.ts delete mode 100644 packages/options/src/__tests__/unwrap-option-test.ts delete mode 100644 packages/options/src/__typetests__/option-codec-typetest.ts delete mode 100644 packages/options/src/index.ts delete mode 100644 packages/options/src/option-codec.ts delete mode 100644 packages/options/src/option.ts delete mode 100644 packages/options/src/types/global.d.ts delete mode 100644 packages/options/src/unwrap-option-recursively.ts delete mode 100644 packages/options/src/unwrap-option.ts delete mode 100644 packages/options/tsconfig.declarations.json delete mode 100644 packages/options/tsconfig.json delete mode 100644 packages/programs/.gitignore delete mode 100644 packages/programs/.prettierignore delete mode 100644 packages/programs/CHANGELOG.md delete mode 100644 packages/programs/LICENSE delete mode 100644 packages/programs/README.md delete mode 100644 packages/programs/package.json delete mode 100644 packages/programs/src/__tests__/program-error-test.ts delete mode 100644 packages/programs/src/__typetests__/program-error-typetest.ts delete mode 100644 packages/programs/src/index.ts delete mode 100644 packages/programs/src/program-error.ts delete mode 100644 packages/programs/src/types/global.d.ts delete mode 100644 packages/programs/tsconfig.declarations.json delete mode 100644 packages/programs/tsconfig.json delete mode 100644 packages/react/.eslintrc.cjs delete mode 100644 packages/react/.gitignore delete mode 100644 packages/react/.npmrc delete mode 100644 packages/react/.prettierignore delete mode 100644 packages/react/CHANGELOG.md delete mode 100644 packages/react/LICENSE delete mode 100644 packages/react/README.md delete mode 100644 packages/react/package.json delete mode 100644 packages/react/src/__tests__/abortable-promise-test.ts delete mode 100644 packages/react/src/__tests__/useSignAndSendTransaction-test.ts delete mode 100644 packages/react/src/__tests__/useSignIn-test.ts delete mode 100644 packages/react/src/__tests__/useSignMessage-test.ts delete mode 100644 packages/react/src/__tests__/useSignTransaction-test.ts delete mode 100644 packages/react/src/__tests__/useWalletAccountMessageSigner-test.ts delete mode 100644 packages/react/src/__tests__/useWalletAccountTransactionSendingSigner-test.ts delete mode 100644 packages/react/src/__tests__/useWalletAccountTransactionSigner-test.ts delete mode 100644 packages/react/src/__typetests__/useSignAndSendTransaction-typetest.ts delete mode 100644 packages/react/src/__typetests__/useSignIn-typetest.ts delete mode 100644 packages/react/src/__typetests__/useSignTransaction-typetest.ts delete mode 100644 packages/react/src/abortable-promise.ts delete mode 100644 packages/react/src/chain.ts delete mode 100644 packages/react/src/index.ts delete mode 100644 packages/react/src/test-renderer.tsx delete mode 100644 packages/react/src/types/global.d.ts delete mode 100644 packages/react/src/useSignAndSendTransaction.ts delete mode 100644 packages/react/src/useSignIn.ts delete mode 100644 packages/react/src/useSignMessage.ts delete mode 100644 packages/react/src/useSignTransaction.ts delete mode 100644 packages/react/src/useWalletAccountMessageSigner.ts delete mode 100644 packages/react/src/useWalletAccountTransactionSendingSigner.ts delete mode 100644 packages/react/src/useWalletAccountTransactionSigner.ts delete mode 100644 packages/react/tsconfig.declarations.json delete mode 100644 packages/react/tsconfig.json delete mode 100644 packages/rpc-api/.gitignore delete mode 100644 packages/rpc-api/.prettierignore delete mode 100644 packages/rpc-api/CHANGELOG.md delete mode 100644 packages/rpc-api/LICENSE delete mode 100644 packages/rpc-api/README.md delete mode 100644 packages/rpc-api/package.json delete mode 100644 packages/rpc-api/src/__tests__/__setup__.ts delete mode 100644 packages/rpc-api/src/__tests__/get-account-info-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-balance-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-block-commitment-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-block-height.ts delete mode 100644 packages/rpc-api/src/__tests__/get-block-production-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-block-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-block-time-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-blocks-with-limit-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-cluster-nodes-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-epoch-info-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-epoch-schedule-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-fee-for-message-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-first-available-block-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-genesis-hash-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-health-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-highest-snapshot-slot-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-identity-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-inflation-governor-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-inflation-rate-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-inflation-reward-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-largest-accounts-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-latest-blockhash-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-leader-schedule-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-max-retransmit-slot-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-max-shred-insert-slot-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-minimum-balance-for-rent-exemption-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-multiple-accounts-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-program-accounts-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-recent-performance-samples-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-recent-prioritization-fees-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-signature-statuses-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-signatures-for-address-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-slot-leader-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-slot-leaders-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-slot-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-stake-activation-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-stake-minimum-delegation-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-supply-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-token-account-balance-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-token-accounts-by-delegate-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-token-accounts-by-owner-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-token-largest-accounts-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-token-supply-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-transaction-count-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-transaction-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-version-test.ts delete mode 100644 packages/rpc-api/src/__tests__/get-vote-accounts.ts delete mode 100644 packages/rpc-api/src/__tests__/is-blockhash-valid-test.ts delete mode 100644 packages/rpc-api/src/__tests__/minimum-ledger-slot-test.ts delete mode 100644 packages/rpc-api/src/__tests__/request-airdrop-test.ts delete mode 100644 packages/rpc-api/src/__tests__/send-transaction-test.ts delete mode 100644 packages/rpc-api/src/__tests__/simulate-transaction-test.ts delete mode 100644 packages/rpc-api/src/__typetests__/get-block-type-test.ts delete mode 100644 packages/rpc-api/src/__typetests__/get-leader-schedule-type-test.ts delete mode 100644 packages/rpc-api/src/__typetests__/get-supply-type-test.ts delete mode 100644 packages/rpc-api/src/__typetests__/get-token-accounts-by-delegate-type-test.ts delete mode 100644 packages/rpc-api/src/__typetests__/get-token-accounts-by-owner-type-test.ts delete mode 100644 packages/rpc-api/src/getAccountInfo.ts delete mode 100644 packages/rpc-api/src/getBalance.ts delete mode 100644 packages/rpc-api/src/getBlock.ts delete mode 100644 packages/rpc-api/src/getBlockCommitment.ts delete mode 100644 packages/rpc-api/src/getBlockHeight.ts delete mode 100644 packages/rpc-api/src/getBlockProduction.ts delete mode 100644 packages/rpc-api/src/getBlockTime.ts delete mode 100644 packages/rpc-api/src/getBlocks.ts delete mode 100644 packages/rpc-api/src/getBlocksWithLimit.ts delete mode 100644 packages/rpc-api/src/getClusterNodes.ts delete mode 100644 packages/rpc-api/src/getEpochInfo.ts delete mode 100644 packages/rpc-api/src/getEpochSchedule.ts delete mode 100644 packages/rpc-api/src/getFeeForMessage.ts delete mode 100644 packages/rpc-api/src/getFirstAvailableBlock.ts delete mode 100644 packages/rpc-api/src/getGenesisHash.ts delete mode 100644 packages/rpc-api/src/getHealth.ts delete mode 100644 packages/rpc-api/src/getHighestSnapshotSlot.ts delete mode 100644 packages/rpc-api/src/getIdentity.ts delete mode 100644 packages/rpc-api/src/getInflationGovernor.ts delete mode 100644 packages/rpc-api/src/getInflationRate.ts delete mode 100644 packages/rpc-api/src/getInflationReward.ts delete mode 100644 packages/rpc-api/src/getLargestAccounts.ts delete mode 100644 packages/rpc-api/src/getLatestBlockhash.ts delete mode 100644 packages/rpc-api/src/getLeaderSchedule.ts delete mode 100644 packages/rpc-api/src/getMaxRetransmitSlot.ts delete mode 100644 packages/rpc-api/src/getMaxShredInsertSlot.ts delete mode 100644 packages/rpc-api/src/getMinimumBalanceForRentExemption.ts delete mode 100644 packages/rpc-api/src/getMultipleAccounts.ts delete mode 100644 packages/rpc-api/src/getProgramAccounts.ts delete mode 100644 packages/rpc-api/src/getRecentPerformanceSamples.ts delete mode 100644 packages/rpc-api/src/getRecentPrioritizationFees.ts delete mode 100644 packages/rpc-api/src/getSignatureStatuses.ts delete mode 100644 packages/rpc-api/src/getSignaturesForAddress.ts delete mode 100644 packages/rpc-api/src/getSlot.ts delete mode 100644 packages/rpc-api/src/getSlotLeader.ts delete mode 100644 packages/rpc-api/src/getSlotLeaders.ts delete mode 100644 packages/rpc-api/src/getStakeActivation.ts delete mode 100644 packages/rpc-api/src/getStakeMinimumDelegation.ts delete mode 100644 packages/rpc-api/src/getSupply.ts delete mode 100644 packages/rpc-api/src/getTokenAccountBalance.ts delete mode 100644 packages/rpc-api/src/getTokenAccountsByDelegate.ts delete mode 100644 packages/rpc-api/src/getTokenAccountsByOwner.ts delete mode 100644 packages/rpc-api/src/getTokenLargestAccounts.ts delete mode 100644 packages/rpc-api/src/getTokenSupply.ts delete mode 100644 packages/rpc-api/src/getTransaction.ts delete mode 100644 packages/rpc-api/src/getTransactionCount.ts delete mode 100644 packages/rpc-api/src/getVersion.ts delete mode 100644 packages/rpc-api/src/getVoteAccounts.ts delete mode 100644 packages/rpc-api/src/index.ts delete mode 100644 packages/rpc-api/src/isBlockhashValid.ts delete mode 100644 packages/rpc-api/src/minimumLedgerSlot.ts delete mode 100644 packages/rpc-api/src/requestAirdrop.ts delete mode 100644 packages/rpc-api/src/sendTransaction.ts delete mode 100644 packages/rpc-api/src/simulateTransaction.ts delete mode 100644 packages/rpc-api/src/types/global.d.ts delete mode 100644 packages/rpc-api/tsconfig.declarations.json delete mode 100644 packages/rpc-api/tsconfig.json delete mode 100644 packages/rpc-graphql/.gitignore delete mode 100644 packages/rpc-graphql/.prettierignore delete mode 100644 packages/rpc-graphql/CHANGELOG.md delete mode 100644 packages/rpc-graphql/LICENSE delete mode 100644 packages/rpc-graphql/README.md delete mode 100644 packages/rpc-graphql/package.json delete mode 100644 packages/rpc-graphql/src/__tests__/__setup__.ts delete mode 100644 packages/rpc-graphql/src/__tests__/account-test.ts delete mode 100644 packages/rpc-graphql/src/__tests__/block-tests.ts delete mode 100644 packages/rpc-graphql/src/__tests__/program-accounts-test.ts delete mode 100644 packages/rpc-graphql/src/__tests__/transaction-tests.ts delete mode 100644 packages/rpc-graphql/src/context.ts delete mode 100644 packages/rpc-graphql/src/index.ts delete mode 100644 packages/rpc-graphql/src/loaders/__tests__/account-loader-test.ts delete mode 100644 packages/rpc-graphql/src/loaders/__tests__/block-loader-test.ts delete mode 100644 packages/rpc-graphql/src/loaders/__tests__/program-accounts-loader-test.ts delete mode 100644 packages/rpc-graphql/src/loaders/__tests__/transaction-loader-test.ts delete mode 100644 packages/rpc-graphql/src/loaders/account.ts delete mode 100644 packages/rpc-graphql/src/loaders/block.ts delete mode 100644 packages/rpc-graphql/src/loaders/coalescer.ts delete mode 100644 packages/rpc-graphql/src/loaders/index.ts delete mode 100644 packages/rpc-graphql/src/loaders/loader.ts delete mode 100644 packages/rpc-graphql/src/loaders/program-accounts.ts delete mode 100644 packages/rpc-graphql/src/loaders/transaction.ts delete mode 100644 packages/rpc-graphql/src/resolvers/__tests__/account-resolver-test.ts delete mode 100644 packages/rpc-graphql/src/resolvers/__tests__/block-inputs-test.ts delete mode 100644 packages/rpc-graphql/src/resolvers/__tests__/block-resolver-test.ts delete mode 100644 packages/rpc-graphql/src/resolvers/__tests__/program-accounts-resolver-test.ts delete mode 100644 packages/rpc-graphql/src/resolvers/__tests__/transaction-resolver-test.ts delete mode 100644 packages/rpc-graphql/src/resolvers/account.ts delete mode 100644 packages/rpc-graphql/src/resolvers/block.ts delete mode 100644 packages/rpc-graphql/src/resolvers/program-accounts.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/account.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/block.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/index.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/program-accounts.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/transaction.ts delete mode 100644 packages/rpc-graphql/src/resolvers/resolve-info/visitor.ts delete mode 100644 packages/rpc-graphql/src/resolvers/transaction.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/account.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/block.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/index.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/instruction.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/root.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/transaction.ts delete mode 100644 packages/rpc-graphql/src/schema/type-defs/types.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/account.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/block.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/index.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/instruction.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/root.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/transaction.ts delete mode 100644 packages/rpc-graphql/src/schema/type-resolvers/types.ts delete mode 100644 packages/rpc-graphql/src/types/global.d.ts delete mode 100644 packages/rpc-graphql/tsconfig.declarations.json delete mode 100644 packages/rpc-graphql/tsconfig.json delete mode 100644 packages/rpc-parsed-types/.gitignore delete mode 100644 packages/rpc-parsed-types/.prettierignore delete mode 100644 packages/rpc-parsed-types/CHANGELOG.md delete mode 100644 packages/rpc-parsed-types/LICENSE delete mode 100644 packages/rpc-parsed-types/README.md delete mode 100644 packages/rpc-parsed-types/package.json delete mode 100644 packages/rpc-parsed-types/src/__typetests__/address-lookup-table-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/bpf-upgradeable-loader-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/config-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/nonce-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/stake-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/sysvar-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/token-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/__typetests__/vote-accounts-test.ts delete mode 100644 packages/rpc-parsed-types/src/address-lookup-table-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/bpf-upgradeable-loader-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/config-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/index.ts delete mode 100644 packages/rpc-parsed-types/src/nonce-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/rpc-parsed-type.ts delete mode 100644 packages/rpc-parsed-types/src/stake-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/sysvar-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/token-accounts.ts delete mode 100644 packages/rpc-parsed-types/src/vote-accounts.ts delete mode 100644 packages/rpc-parsed-types/tsconfig.declarations.json delete mode 100644 packages/rpc-parsed-types/tsconfig.json delete mode 100644 packages/rpc-spec-types/.gitignore delete mode 100644 packages/rpc-spec-types/.prettierignore delete mode 100644 packages/rpc-spec-types/CHANGELOG.md delete mode 100644 packages/rpc-spec-types/LICENSE delete mode 100644 packages/rpc-spec-types/README.md delete mode 100644 packages/rpc-spec-types/package.json delete mode 100644 packages/rpc-spec-types/src/__tests__/rpc-message-test.ts delete mode 100644 packages/rpc-spec-types/src/index.ts delete mode 100644 packages/rpc-spec-types/src/overloads.ts delete mode 100644 packages/rpc-spec-types/src/rpc-message.ts delete mode 100644 packages/rpc-spec-types/src/rpc-response.ts delete mode 100644 packages/rpc-spec-types/src/type-helpers.ts delete mode 100644 packages/rpc-spec-types/src/types/global.d.ts delete mode 100644 packages/rpc-spec-types/tsconfig.declarations.json delete mode 100644 packages/rpc-spec-types/tsconfig.json delete mode 100644 packages/rpc-spec/.gitignore delete mode 100644 packages/rpc-spec/.prettierignore delete mode 100644 packages/rpc-spec/CHANGELOG.md delete mode 100644 packages/rpc-spec/LICENSE delete mode 100644 packages/rpc-spec/README.md delete mode 100644 packages/rpc-spec/package.json delete mode 100644 packages/rpc-spec/src/__tests__/rpc-test.ts delete mode 100644 packages/rpc-spec/src/__typetests__/rpc-api-typetest.ts delete mode 100644 packages/rpc-spec/src/__typetests__/rpc-typetest.ts delete mode 100644 packages/rpc-spec/src/index.ts delete mode 100644 packages/rpc-spec/src/rpc-api.ts delete mode 100644 packages/rpc-spec/src/rpc-request.ts delete mode 100644 packages/rpc-spec/src/rpc-transport.ts delete mode 100644 packages/rpc-spec/src/rpc.ts delete mode 100644 packages/rpc-spec/src/types/global.d.ts delete mode 100644 packages/rpc-spec/tsconfig.declarations.json delete mode 100644 packages/rpc-spec/tsconfig.json delete mode 100644 packages/rpc-subscriptions-api/.gitignore delete mode 100644 packages/rpc-subscriptions-api/.prettierignore delete mode 100644 packages/rpc-subscriptions-api/CHANGELOG.md delete mode 100644 packages/rpc-subscriptions-api/LICENSE delete mode 100644 packages/rpc-subscriptions-api/README.md delete mode 100644 packages/rpc-subscriptions-api/package.json delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/__setup__.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/account-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/block-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/index-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/logs-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/program-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/root-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/signature-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/slot-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/slots-updates-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__tests__/vote-notifications-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/account-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/block-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/logs-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/program-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/root-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/signature-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/slot-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/slots-updates-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/__typetests__/vote-notifications-type-test.ts delete mode 100644 packages/rpc-subscriptions-api/src/account-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/block-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/index.ts delete mode 100644 packages/rpc-subscriptions-api/src/logs-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/program-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/root-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/signature-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/slot-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/slots-updates-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/src/vote-notifications.ts delete mode 100644 packages/rpc-subscriptions-api/tsconfig.declarations.json delete mode 100644 packages/rpc-subscriptions-api/tsconfig.json delete mode 100644 packages/rpc-subscriptions-spec/.gitignore delete mode 100644 packages/rpc-subscriptions-spec/.prettierignore delete mode 100644 packages/rpc-subscriptions-spec/CHANGELOG.md delete mode 100644 packages/rpc-subscriptions-spec/LICENSE delete mode 100644 packages/rpc-subscriptions-spec/README.md delete mode 100644 packages/rpc-subscriptions-spec/package.json delete mode 100644 packages/rpc-subscriptions-spec/src/__tests__/rpc-subscription-test.ts delete mode 100644 packages/rpc-subscriptions-spec/src/__typetests__/rpc-subscriptions-api-typetest.ts delete mode 100644 packages/rpc-subscriptions-spec/src/__typetests__/rpc-subscriptions-typetest.ts delete mode 100644 packages/rpc-subscriptions-spec/src/index.ts delete mode 100644 packages/rpc-subscriptions-spec/src/rpc-subscriptions-api.ts delete mode 100644 packages/rpc-subscriptions-spec/src/rpc-subscriptions-request.ts delete mode 100644 packages/rpc-subscriptions-spec/src/rpc-subscriptions-transport.ts delete mode 100644 packages/rpc-subscriptions-spec/src/rpc-subscriptions.ts delete mode 100644 packages/rpc-subscriptions-spec/src/types/global.d.ts delete mode 100644 packages/rpc-subscriptions-spec/tsconfig.declarations.json delete mode 100644 packages/rpc-subscriptions-spec/tsconfig.json delete mode 100644 packages/rpc-subscriptions-transport-websocket/.gitignore delete mode 100644 packages/rpc-subscriptions-transport-websocket/.prettierignore delete mode 100644 packages/rpc-subscriptions-transport-websocket/CHANGELOG.md delete mode 100644 packages/rpc-subscriptions-transport-websocket/LICENSE delete mode 100644 packages/rpc-subscriptions-transport-websocket/README.md delete mode 100644 packages/rpc-subscriptions-transport-websocket/package.json delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/__mocks__/@solana/ws-impl.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/__tests__/websocket-connection-test.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/__tests__/websocket-transport-test.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/__typetests__/websocket-typetest.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/index.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/types/global.d.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/websocket-connection.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/src/websocket-transport.ts delete mode 100644 packages/rpc-subscriptions-transport-websocket/tsconfig.declarations.json delete mode 100644 packages/rpc-subscriptions-transport-websocket/tsconfig.json delete mode 100644 packages/rpc-subscriptions/.gitignore delete mode 100644 packages/rpc-subscriptions/.prettierignore delete mode 100644 packages/rpc-subscriptions/CHANGELOG.md delete mode 100644 packages/rpc-subscriptions/LICENSE delete mode 100644 packages/rpc-subscriptions/README.md delete mode 100644 packages/rpc-subscriptions/package.json delete mode 100644 packages/rpc-subscriptions/src/__tests__/cached-abortable-iterable-test.ts delete mode 100644 packages/rpc-subscriptions/src/__tests__/rpc-integer-overflow-error-test.ts delete mode 100644 packages/rpc-subscriptions/src/__tests__/rpc-subscriptions-autopinger-test.ts delete mode 100644 packages/rpc-subscriptions/src/__tests__/rpc-subscriptions-coalescer-test.ts delete mode 100644 packages/rpc-subscriptions/src/__tests__/rpc-subscriptions-connection-sharding-test.ts delete mode 100644 packages/rpc-subscriptions/src/__typetests__/rpc-subscriptions-clusters-typetest.ts delete mode 100644 packages/rpc-subscriptions/src/cached-abortable-iterable.ts delete mode 100644 packages/rpc-subscriptions/src/index.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-default-config.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-integer-overflow-error.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions-autopinger.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions-clusters.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions-coalescer.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions-connection-sharding.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions-transport.ts delete mode 100644 packages/rpc-subscriptions/src/rpc-subscriptions.ts delete mode 100644 packages/rpc-subscriptions/src/types/global.d.ts delete mode 100644 packages/rpc-subscriptions/tsconfig.declarations.json delete mode 100644 packages/rpc-subscriptions/tsconfig.json delete mode 100644 packages/rpc-transformers/.gitignore delete mode 100644 packages/rpc-transformers/.prettierignore delete mode 100644 packages/rpc-transformers/CHANGELOG.md delete mode 100644 packages/rpc-transformers/LICENSE delete mode 100644 packages/rpc-transformers/README.md delete mode 100644 packages/rpc-transformers/package.json delete mode 100644 packages/rpc-transformers/src/__tests__/default-commitment-test.ts delete mode 100644 packages/rpc-transformers/src/__tests__/params-transformer-bigint-downcast-test.ts delete mode 100644 packages/rpc-transformers/src/__tests__/params-transformer-integer-overflow-test.ts delete mode 100644 packages/rpc-transformers/src/__tests__/params-transformer-test.ts delete mode 100644 packages/rpc-transformers/src/__tests__/response-transformer-bigint-upcast-test.ts delete mode 100644 packages/rpc-transformers/src/__tests__/response-transformer-test.ts delete mode 100644 packages/rpc-transformers/src/default-commitment.ts delete mode 100644 packages/rpc-transformers/src/index.ts delete mode 100644 packages/rpc-transformers/src/params-transformer-bigint-downcast.ts delete mode 100644 packages/rpc-transformers/src/params-transformer-integer-overflow.ts delete mode 100644 packages/rpc-transformers/src/params-transformer-options-object-position-config.ts delete mode 100644 packages/rpc-transformers/src/params-transformer.ts delete mode 100644 packages/rpc-transformers/src/response-transformer-allowed-numeric-values.ts delete mode 100644 packages/rpc-transformers/src/response-transformer-bigint-upcast.ts delete mode 100644 packages/rpc-transformers/src/response-transformer.ts delete mode 100644 packages/rpc-transformers/src/tree-traversal.ts delete mode 100644 packages/rpc-transformers/src/types/global.d.ts delete mode 100644 packages/rpc-transformers/tsconfig.declarations.json delete mode 100644 packages/rpc-transformers/tsconfig.json delete mode 100644 packages/rpc-transport-http/.gitignore delete mode 100644 packages/rpc-transport-http/.prettierignore delete mode 100644 packages/rpc-transport-http/CHANGELOG.md delete mode 100644 packages/rpc-transport-http/LICENSE delete mode 100644 packages/rpc-transport-http/README.md delete mode 100644 packages/rpc-transport-http/package.json delete mode 100755 packages/rpc-transport-http/src/__benchmarks__/run.ts delete mode 100644 packages/rpc-transport-http/src/__tests__/http-transport-abort-test.ts delete mode 100644 packages/rpc-transport-http/src/__tests__/http-transport-dispatcher-test.browser.ts delete mode 100644 packages/rpc-transport-http/src/__tests__/http-transport-headers-test.ts delete mode 100644 packages/rpc-transport-http/src/__tests__/http-transport-test.ts delete mode 100644 packages/rpc-transport-http/src/__typetests__/http-transport-typetest.ts delete mode 100644 packages/rpc-transport-http/src/http-transport-headers.ts delete mode 100644 packages/rpc-transport-http/src/http-transport.ts delete mode 100644 packages/rpc-transport-http/src/index.ts delete mode 100644 packages/rpc-transport-http/src/types/global.d.ts delete mode 100644 packages/rpc-transport-http/tsconfig.declarations.json delete mode 100644 packages/rpc-transport-http/tsconfig.json delete mode 100644 packages/rpc-types/.gitignore delete mode 100644 packages/rpc-types/.prettierignore delete mode 100644 packages/rpc-types/CHANGELOG.md delete mode 100644 packages/rpc-types/LICENSE delete mode 100644 packages/rpc-types/README.md delete mode 100644 packages/rpc-types/package.json delete mode 100644 packages/rpc-types/src/__tests__/blockhash-test.ts delete mode 100644 packages/rpc-types/src/__tests__/coercions-test.ts delete mode 100644 packages/rpc-types/src/__tests__/commitment-test.ts delete mode 100644 packages/rpc-types/src/__tests__/lamports-test.ts delete mode 100644 packages/rpc-types/src/__tests__/stringified-bigint-test.ts delete mode 100644 packages/rpc-types/src/__tests__/stringified-number-test.ts delete mode 100644 packages/rpc-types/src/__tests__/unix-timestamp-test.ts delete mode 100644 packages/rpc-types/src/__typetests__/coercions-typetests.ts delete mode 100644 packages/rpc-types/src/__typetests__/lamports-typetests.ts delete mode 100644 packages/rpc-types/src/account-filters.ts delete mode 100644 packages/rpc-types/src/account-info.ts delete mode 100644 packages/rpc-types/src/blockhash.ts delete mode 100644 packages/rpc-types/src/cluster-url.ts delete mode 100644 packages/rpc-types/src/commitment.ts delete mode 100644 packages/rpc-types/src/encoded-bytes.ts delete mode 100644 packages/rpc-types/src/index.ts delete mode 100644 packages/rpc-types/src/lamports.ts delete mode 100644 packages/rpc-types/src/rpc-api.ts delete mode 100644 packages/rpc-types/src/stringified-bigint.ts delete mode 100644 packages/rpc-types/src/stringified-number.ts delete mode 100644 packages/rpc-types/src/token-amount.ts delete mode 100644 packages/rpc-types/src/token-balance.ts delete mode 100644 packages/rpc-types/src/transaction-error.ts delete mode 100644 packages/rpc-types/src/transaction.ts delete mode 100644 packages/rpc-types/src/typed-numbers.ts delete mode 100644 packages/rpc-types/src/unix-timestamp.ts delete mode 100644 packages/rpc-types/tsconfig.declarations.json delete mode 100644 packages/rpc-types/tsconfig.json delete mode 100644 packages/rpc/.gitignore delete mode 100644 packages/rpc/.prettierignore delete mode 100644 packages/rpc/CHANGELOG.md delete mode 100644 packages/rpc/LICENSE delete mode 100644 packages/rpc/README.md delete mode 100644 packages/rpc/package.json delete mode 100644 packages/rpc/src/__tests__/rpc-integer-overflow-error-test.ts delete mode 100644 packages/rpc/src/__tests__/rpc-integer-overflow-test.ts delete mode 100644 packages/rpc/src/__tests__/rpc-request-coalescer-test.ts delete mode 100644 packages/rpc/src/__tests__/rpc-request-deduplication-test.ts delete mode 100644 packages/rpc/src/__tests__/rpc-transport-header-config-test.ts delete mode 100644 packages/rpc/src/__typetests__/rpc-clusters-typetest.ts delete mode 100644 packages/rpc/src/index.ts delete mode 100644 packages/rpc/src/rpc-clusters.ts delete mode 100644 packages/rpc/src/rpc-default-config.ts delete mode 100644 packages/rpc/src/rpc-integer-overflow-error.ts delete mode 100644 packages/rpc/src/rpc-request-coalescer.ts delete mode 100644 packages/rpc/src/rpc-request-deduplication.ts delete mode 100644 packages/rpc/src/rpc-transport.ts delete mode 100644 packages/rpc/src/rpc.ts delete mode 100644 packages/rpc/src/types/global.d.ts delete mode 100644 packages/rpc/tsconfig.declarations.json delete mode 100644 packages/rpc/tsconfig.json delete mode 100644 packages/signers/.gitignore delete mode 100644 packages/signers/.npmrc delete mode 100644 packages/signers/.prettierignore delete mode 100644 packages/signers/CHANGELOG.md delete mode 100644 packages/signers/LICENSE delete mode 100644 packages/signers/README.md delete mode 100644 packages/signers/package.json delete mode 100644 packages/signers/src/__tests__/__setup__.ts delete mode 100644 packages/signers/src/__tests__/account-signer-meta-test.ts delete mode 100644 packages/signers/src/__tests__/add-signers-test.ts delete mode 100644 packages/signers/src/__tests__/deduplicate-signers-test.ts delete mode 100644 packages/signers/src/__tests__/fee-payer-signer-test.ts delete mode 100644 packages/signers/src/__tests__/keypair-signer-test.ts delete mode 100644 packages/signers/src/__tests__/message-modifying-signer-test.ts delete mode 100644 packages/signers/src/__tests__/message-partial-signer-test.ts delete mode 100644 packages/signers/src/__tests__/message-signer-test.ts delete mode 100644 packages/signers/src/__tests__/noop-signer-test.ts delete mode 100644 packages/signers/src/__tests__/sign-transaction-test.ts delete mode 100644 packages/signers/src/__tests__/signable-message-test.ts delete mode 100644 packages/signers/src/__tests__/transaction-modifying-signer-test.ts delete mode 100644 packages/signers/src/__tests__/transaction-partial-signer-test.ts delete mode 100644 packages/signers/src/__tests__/transaction-sending-signer-test.ts delete mode 100644 packages/signers/src/__tests__/transaction-signer-test.ts delete mode 100644 packages/signers/src/__tests__/transaction-with-single-sending-signer.ts delete mode 100644 packages/signers/src/__typetests__/account-signer-meta-typetest.ts delete mode 100644 packages/signers/src/__typetests__/fee-payer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/keypair-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/message-modifying-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/message-partial-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/message-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/sign-transaction-typetest.ts delete mode 100644 packages/signers/src/__typetests__/transaction-modifying-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/transaction-partial-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/transaction-sending-signer-typetest.ts delete mode 100644 packages/signers/src/__typetests__/transaction-signer-typetest.ts delete mode 100644 packages/signers/src/account-signer-meta.ts delete mode 100644 packages/signers/src/add-signers.ts delete mode 100644 packages/signers/src/deduplicate-signers.ts delete mode 100644 packages/signers/src/fee-payer-signer.ts delete mode 100644 packages/signers/src/index.ts delete mode 100644 packages/signers/src/keypair-signer.ts delete mode 100644 packages/signers/src/message-modifying-signer.ts delete mode 100644 packages/signers/src/message-partial-signer.ts delete mode 100644 packages/signers/src/message-signer.ts delete mode 100644 packages/signers/src/noop-signer.ts delete mode 100644 packages/signers/src/sign-transaction.ts delete mode 100644 packages/signers/src/signable-message.ts delete mode 100644 packages/signers/src/transaction-modifying-signer.ts delete mode 100644 packages/signers/src/transaction-partial-signer.ts delete mode 100644 packages/signers/src/transaction-sending-signer.ts delete mode 100644 packages/signers/src/transaction-signer.ts delete mode 100644 packages/signers/src/transaction-with-single-sending-signer.ts delete mode 100644 packages/signers/src/types.ts delete mode 100644 packages/signers/src/types/global.d.ts delete mode 100644 packages/signers/tsconfig.declarations.json delete mode 100644 packages/signers/tsconfig.json delete mode 100644 packages/sysvars/.gitignore delete mode 100644 packages/sysvars/.npmrc delete mode 100644 packages/sysvars/.prettierignore delete mode 100644 packages/sysvars/CHANGELOG.md delete mode 100644 packages/sysvars/LICENSE delete mode 100644 packages/sysvars/README.md delete mode 100644 packages/sysvars/package.json delete mode 100644 packages/sysvars/src/__tests__/__setup__.ts delete mode 100644 packages/sysvars/src/__tests__/clock-test.ts delete mode 100644 packages/sysvars/src/__tests__/epoch-rewards-test.ts delete mode 100644 packages/sysvars/src/__tests__/epoch-schedule-test.ts delete mode 100644 packages/sysvars/src/__tests__/fees-test.ts delete mode 100644 packages/sysvars/src/__tests__/last-restart-slot-test.ts delete mode 100644 packages/sysvars/src/__tests__/recent-blockhashes-test.ts delete mode 100644 packages/sysvars/src/__tests__/rent-test.ts delete mode 100644 packages/sysvars/src/__tests__/slot-hashes-test.ts delete mode 100644 packages/sysvars/src/__tests__/slot-history-test.ts delete mode 100644 packages/sysvars/src/__tests__/stake-history-test.ts delete mode 100644 packages/sysvars/src/__tests__/sysvar-test.ts delete mode 100644 packages/sysvars/src/__typetests__/sysvar-typetest.ts delete mode 100644 packages/sysvars/src/clock.ts delete mode 100644 packages/sysvars/src/epoch-rewards.ts delete mode 100644 packages/sysvars/src/epoch-schedule.ts delete mode 100644 packages/sysvars/src/fees.ts delete mode 100644 packages/sysvars/src/index.ts delete mode 100644 packages/sysvars/src/last-restart-slot.ts delete mode 100644 packages/sysvars/src/recent-blockhashes.ts delete mode 100644 packages/sysvars/src/rent.ts delete mode 100644 packages/sysvars/src/slot-hashes.ts delete mode 100644 packages/sysvars/src/slot-history.ts delete mode 100644 packages/sysvars/src/stake-history.ts delete mode 100644 packages/sysvars/src/sysvar.ts delete mode 100644 packages/sysvars/tsconfig.declarations.json delete mode 100644 packages/sysvars/tsconfig.json delete mode 100644 packages/test-config/browser-environment.ts delete mode 100644 packages/test-config/global.d.ts delete mode 100644 packages/test-config/jest-dev.config.ts delete mode 100644 packages/test-config/jest-lint.config.ts delete mode 100644 packages/test-config/jest-prettier.config.ts delete mode 100644 packages/test-config/jest-unit.config.browser.ts delete mode 100644 packages/test-config/jest-unit.config.common.ts delete mode 100644 packages/test-config/jest-unit.config.node.ts delete mode 100644 packages/test-config/package.json delete mode 100644 packages/test-config/setup-define-version-constant.ts delete mode 100644 packages/test-config/setup-dev-mode.ts delete mode 100644 packages/test-config/setup-secure-context.ts delete mode 100644 packages/test-config/setup-text-encoder.ts delete mode 100644 packages/test-config/setup-undici-fetch.ts delete mode 100644 packages/test-config/setup-web-buffer-global.ts delete mode 100644 packages/test-config/setup-webcrypto.ts delete mode 100644 packages/test-config/setup-whatwg-fetch.ts delete mode 100644 packages/test-config/test-validator-setup.js delete mode 100644 packages/test-config/test-validator-teardown.js delete mode 100644 packages/test-config/tsconfig.json delete mode 100644 packages/test-matchers/package.json delete mode 100644 packages/test-matchers/toBeFrozenObject.ts delete mode 100644 packages/test-matchers/tsconfig.json delete mode 100644 packages/text-encoding-impl/.gitignore delete mode 100644 packages/text-encoding-impl/.prettierignore delete mode 100644 packages/text-encoding-impl/LICENSE delete mode 100644 packages/text-encoding-impl/package.json delete mode 100644 packages/text-encoding-impl/src/index.browser.ts delete mode 100644 packages/text-encoding-impl/src/index.native.ts delete mode 100644 packages/text-encoding-impl/src/index.node.ts delete mode 100644 packages/text-encoding-impl/tsconfig.declarations.json delete mode 100644 packages/text-encoding-impl/tsconfig.json delete mode 100644 packages/text-encoding-impl/tsup.config.ts delete mode 100644 packages/transaction-confirmation/.gitignore delete mode 100644 packages/transaction-confirmation/.npmrc delete mode 100644 packages/transaction-confirmation/.prettierignore delete mode 100644 packages/transaction-confirmation/CHANGELOG.md delete mode 100644 packages/transaction-confirmation/LICENSE delete mode 100644 packages/transaction-confirmation/README.md delete mode 100644 packages/transaction-confirmation/package.json delete mode 100644 packages/transaction-confirmation/src/__tests__/confirmation-strategy-blockheight-test.ts delete mode 100644 packages/transaction-confirmation/src/__tests__/confirmation-strategy-nonce-test.ts delete mode 100644 packages/transaction-confirmation/src/__tests__/confirmation-strategy-racer-test.ts delete mode 100644 packages/transaction-confirmation/src/__tests__/confirmation-strategy-signature-test.ts delete mode 100644 packages/transaction-confirmation/src/__tests__/confirmation-strategy-timeout-test.ts delete mode 100644 packages/transaction-confirmation/src/__tests__/waiters-test.ts delete mode 100644 packages/transaction-confirmation/src/__typetests__/confirmation-strategy-blockheight-typetests.ts delete mode 100644 packages/transaction-confirmation/src/__typetests__/confirmation-strategy-nonce-typetests.ts delete mode 100644 packages/transaction-confirmation/src/__typetests__/confirmation-strategy-recent-signature-typetests.ts delete mode 100644 packages/transaction-confirmation/src/confirmation-strategy-blockheight.ts delete mode 100644 packages/transaction-confirmation/src/confirmation-strategy-nonce.ts delete mode 100644 packages/transaction-confirmation/src/confirmation-strategy-racer.ts delete mode 100644 packages/transaction-confirmation/src/confirmation-strategy-recent-signature.ts delete mode 100644 packages/transaction-confirmation/src/confirmation-strategy-timeout.ts delete mode 100644 packages/transaction-confirmation/src/index.ts delete mode 100644 packages/transaction-confirmation/src/types/global.d.ts delete mode 100644 packages/transaction-confirmation/src/waiters.ts delete mode 100644 packages/transaction-confirmation/tsconfig.declarations.json delete mode 100644 packages/transaction-confirmation/tsconfig.json delete mode 100644 packages/transaction-messages/.gitignore delete mode 100644 packages/transaction-messages/.prettierignore delete mode 100644 packages/transaction-messages/CHANGELOG.md delete mode 100644 packages/transaction-messages/LICENSE delete mode 100644 packages/transaction-messages/README.md delete mode 100644 packages/transaction-messages/package.json delete mode 100644 packages/transaction-messages/src/__tests__/blockhash-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/compress-transaction-message-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/create-transaction-message-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/decompile-message-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/durable-nonce-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/fee-payer-test.ts delete mode 100644 packages/transaction-messages/src/__tests__/instructions-test.ts delete mode 100644 packages/transaction-messages/src/__typetests__/fee-payer-typetests.ts delete mode 100644 packages/transaction-messages/src/__typetests__/transaction-message-typetests.ts delete mode 100644 packages/transaction-messages/src/addresses-by-lookup-table-address.ts delete mode 100644 packages/transaction-messages/src/blockhash.ts delete mode 100644 packages/transaction-messages/src/codecs/__tests__/address-table-lookup-test.ts delete mode 100644 packages/transaction-messages/src/codecs/__tests__/header-test.ts delete mode 100644 packages/transaction-messages/src/codecs/__tests__/instruction-test.ts delete mode 100644 packages/transaction-messages/src/codecs/__tests__/message-test.ts delete mode 100644 packages/transaction-messages/src/codecs/__tests__/transaction-version-test.ts delete mode 100644 packages/transaction-messages/src/codecs/address-table-lookup.ts delete mode 100644 packages/transaction-messages/src/codecs/header.ts delete mode 100644 packages/transaction-messages/src/codecs/index.ts delete mode 100644 packages/transaction-messages/src/codecs/instruction.ts delete mode 100644 packages/transaction-messages/src/codecs/message.ts delete mode 100644 packages/transaction-messages/src/codecs/transaction-version.ts delete mode 100644 packages/transaction-messages/src/compilable-transaction-message.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/accounts-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/address-table-lookups-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/header-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/instructions-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/lifetime-token-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/message-test.ts delete mode 100644 packages/transaction-messages/src/compile/__tests__/static-accounts-test.ts delete mode 100644 packages/transaction-messages/src/compile/accounts.ts delete mode 100644 packages/transaction-messages/src/compile/address-table-lookups.ts delete mode 100644 packages/transaction-messages/src/compile/header.ts delete mode 100644 packages/transaction-messages/src/compile/index.ts delete mode 100644 packages/transaction-messages/src/compile/instructions.ts delete mode 100644 packages/transaction-messages/src/compile/lifetime-token.ts delete mode 100644 packages/transaction-messages/src/compile/message.ts delete mode 100644 packages/transaction-messages/src/compile/static-accounts.ts delete mode 100644 packages/transaction-messages/src/compress-transaction-message.ts delete mode 100644 packages/transaction-messages/src/create-transaction-message.ts delete mode 100644 packages/transaction-messages/src/decompile-message.ts delete mode 100644 packages/transaction-messages/src/durable-nonce.ts delete mode 100644 packages/transaction-messages/src/fee-payer.ts delete mode 100644 packages/transaction-messages/src/index.ts delete mode 100644 packages/transaction-messages/src/instructions.ts delete mode 100644 packages/transaction-messages/src/transaction-message.ts delete mode 100644 packages/transaction-messages/src/types/global.d.ts delete mode 100644 packages/transaction-messages/tsconfig.declarations.json delete mode 100644 packages/transaction-messages/tsconfig.json delete mode 100644 packages/transactions/.gitignore delete mode 100644 packages/transactions/.prettierignore delete mode 100644 packages/transactions/CHANGELOG.md delete mode 100644 packages/transactions/LICENSE delete mode 100644 packages/transactions/README.md delete mode 100644 packages/transactions/package.json delete mode 100644 packages/transactions/src/__tests__/compile-transaction-test.ts delete mode 100644 packages/transactions/src/__tests__/signatures-test.ts delete mode 100644 packages/transactions/src/__tests__/wire-transaction-test.ts delete mode 100644 packages/transactions/src/__typetests__/compile-transaction-typetests.ts delete mode 100644 packages/transactions/src/__typetests__/signatures-typetests.ts delete mode 100644 packages/transactions/src/codecs/__tests__/signatures-encoder-test.ts delete mode 100644 packages/transactions/src/codecs/__tests__/transaction-codec-test.ts delete mode 100644 packages/transactions/src/codecs/index.ts delete mode 100644 packages/transactions/src/codecs/signatures-encoder.ts delete mode 100644 packages/transactions/src/codecs/transaction-codec.ts delete mode 100644 packages/transactions/src/compile-transaction.ts delete mode 100644 packages/transactions/src/index.ts delete mode 100644 packages/transactions/src/lifetime.ts delete mode 100644 packages/transactions/src/signatures.ts delete mode 100644 packages/transactions/src/transaction.ts delete mode 100644 packages/transactions/src/types/global.d.ts delete mode 100644 packages/transactions/src/wire-transaction.ts delete mode 100644 packages/transactions/tsconfig.declarations.json delete mode 100644 packages/transactions/tsconfig.json delete mode 100755 packages/tsconfig/README.md delete mode 100755 packages/tsconfig/base.json delete mode 100755 packages/tsconfig/package.json delete mode 100644 packages/webcrypto-ed25519-polyfill/.gitignore delete mode 100644 packages/webcrypto-ed25519-polyfill/.npmrc delete mode 100644 packages/webcrypto-ed25519-polyfill/.prettierignore delete mode 100644 packages/webcrypto-ed25519-polyfill/CHANGELOG.md delete mode 100644 packages/webcrypto-ed25519-polyfill/LICENSE delete mode 100644 packages/webcrypto-ed25519-polyfill/README.md delete mode 100644 packages/webcrypto-ed25519-polyfill/package.json delete mode 100644 packages/webcrypto-ed25519-polyfill/src/__tests__/install-test.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/src/__tests__/secrets-test.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/src/index.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/src/install.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/src/secrets.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/src/types/global.d.ts delete mode 100644 packages/webcrypto-ed25519-polyfill/tsconfig.declarations.json delete mode 100644 packages/webcrypto-ed25519-polyfill/tsconfig.json delete mode 100644 packages/ws-impl/.gitignore delete mode 100644 packages/ws-impl/.prettierignore delete mode 100644 packages/ws-impl/LICENSE delete mode 100644 packages/ws-impl/package.json delete mode 100644 packages/ws-impl/src/index.browser.ts delete mode 100644 packages/ws-impl/src/index.node.ts delete mode 100644 packages/ws-impl/tsconfig.declarations.json delete mode 100644 packages/ws-impl/tsconfig.json delete mode 100644 packages/ws-impl/tsup.config.ts delete mode 100644 patches/jest-runner-prettier@1.0.0.patch delete mode 100755 pnpm-workspace.yaml rename packages/library-legacy/rollup.config.mjs => rollup.config.mjs (100%) rename packages/library-legacy/rollup.config.types.mjs => rollup.config.types.mjs (100%) delete mode 100644 scripts/fixtures/4nTLDQiSTRHbngKZWPMfYnZdWTbKiNeuuPcX7yFUpSAc.json delete mode 100644 scripts/fixtures/GQE2yjns7SKKuMc89tveBDpzYHwXfeuB2PGAbGaPWc6G.json delete mode 100644 scripts/fixtures/address-lookup-table-account.json delete mode 100644 scripts/fixtures/bpf-upgradeable-loader-program-account.json delete mode 100644 scripts/fixtures/config-stake-account.json delete mode 100644 scripts/fixtures/config-validator-account.json delete mode 100644 scripts/fixtures/example-deserialize-transaction-address-lookup-table.json delete mode 100644 scripts/fixtures/example-transfer-lamports-source-account.json delete mode 100644 scripts/fixtures/gpa1.json delete mode 100644 scripts/fixtures/gpa2-1.json delete mode 100644 scripts/fixtures/gpa2-2.json delete mode 100644 scripts/fixtures/nonce-account.json delete mode 100644 scripts/fixtures/send-transaction-fee-payer-insufficient-funds.json delete mode 100644 scripts/fixtures/send-transaction-fee-payer.json delete mode 100644 scripts/fixtures/spl-token-22-account-mega-token.json delete mode 100644 scripts/fixtures/spl-token-22-mint-account.json delete mode 100644 scripts/fixtures/spl-token-22-mint-mega-token-member.json delete mode 100644 scripts/fixtures/spl-token-22-mint-mega-token.json delete mode 100644 scripts/fixtures/spl-token-mint-account-with-delegated.json delete mode 100644 scripts/fixtures/spl-token-mint-account-with-owner.json delete mode 100644 scripts/fixtures/spl-token-mint-account.json delete mode 100644 scripts/fixtures/spl-token-mint-no-token-accounts.json delete mode 100644 scripts/fixtures/spl-token-multisig-account.json delete mode 100644 scripts/fixtures/spl-token-token-account-delegated.json delete mode 100644 scripts/fixtures/spl-token-token-account-owner.json delete mode 100644 scripts/fixtures/spl-token-token-account.json delete mode 100644 scripts/fixtures/stake-account.json delete mode 100644 scripts/fixtures/vote-account.json rename {packages/library-legacy/scripts => scripts}/typegen.sh (100%) rename {packages/library-legacy/src => src}/__forks__/browser/fetch-impl.ts (100%) rename {packages/library-legacy/src => src}/__forks__/react-native/fetch-impl.ts (100%) rename {packages/library-legacy/src => src}/account-data.ts (100%) rename {packages/library-legacy/src => src}/account.ts (100%) rename {packages/library-legacy/src => src}/blockhash.ts (100%) rename {packages/library-legacy/src => src}/bpf-loader-deprecated.ts (100%) rename {packages/library-legacy/src => src}/bpf-loader.ts (100%) rename {packages/library-legacy/src => src}/connection.ts (100%) rename {packages/library-legacy/src => src}/epoch-schedule.ts (100%) rename {packages/library-legacy/src => src}/errors.ts (100%) rename {packages/library-legacy/src => src}/fee-calculator.ts (100%) rename {packages/library-legacy/src => src}/fetch-impl.ts (100%) rename {packages/library-legacy/src => src}/index.ts (100%) rename {packages/library-legacy/src => src}/instruction.ts (100%) rename {packages/library-legacy/src => src}/keypair.ts (100%) rename {packages/library-legacy/src => src}/layout.ts (100%) rename {packages/library-legacy/src => src}/loader.ts (100%) rename {packages/library-legacy/src => src}/message/account-keys.ts (100%) rename {packages/library-legacy/src => src}/message/compiled-keys.ts (100%) rename {packages/library-legacy/src => src}/message/index.ts (100%) rename {packages/library-legacy/src => src}/message/legacy.ts (100%) rename {packages/library-legacy/src => src}/message/v0.ts (100%) rename {packages/library-legacy/src => src}/message/versioned.ts (100%) rename {packages/library-legacy/src => src}/nonce-account.ts (100%) rename {packages/library-legacy/src => src}/programs/address-lookup-table/index.ts (100%) rename {packages/library-legacy/src => src}/programs/address-lookup-table/state.ts (100%) rename {packages/library-legacy/src => src}/programs/compute-budget.ts (100%) rename {packages/library-legacy/src => src}/programs/ed25519.ts (100%) rename {packages/library-legacy/src => src}/programs/index.ts (100%) rename {packages/library-legacy/src => src}/programs/secp256k1.ts (100%) rename {packages/library-legacy/src => src}/programs/stake.ts (100%) rename {packages/library-legacy/src => src}/programs/system.ts (100%) rename {packages/library-legacy/src => src}/programs/vote.ts (100%) rename {packages/library-legacy/src => src}/publickey.ts (100%) rename {packages/library-legacy/src => src}/rpc-websocket.ts (100%) rename {packages/library-legacy/src => src}/sysvar.ts (100%) rename {packages/library-legacy/src => src}/timing.ts (100%) rename {packages/library-legacy/src => src}/transaction/constants.ts (100%) rename {packages/library-legacy/src => src}/transaction/expiry-custom-errors.ts (100%) rename {packages/library-legacy/src => src}/transaction/index.ts (100%) rename {packages/library-legacy/src => src}/transaction/legacy.ts (100%) rename {packages/library-legacy/src => src}/transaction/message.ts (100%) rename {packages/library-legacy/src => src}/transaction/versioned.ts (100%) rename {packages/library-legacy/src => src}/utils/assert.ts (100%) rename {packages/library-legacy/src => src}/utils/bigint.ts (100%) rename {packages/library-legacy/src => src}/utils/borsh-schema.ts (100%) rename {packages/library-legacy/src => src}/utils/cluster.ts (100%) rename {packages/library-legacy/src => src}/utils/ed25519.ts (100%) rename {packages/library-legacy/src => src}/utils/guarded-array-utils.ts (100%) rename {packages/library-legacy/src => src}/utils/index.ts (100%) rename {packages/library-legacy/src => src}/utils/makeWebsocketUrl.ts (100%) rename {packages/library-legacy/src => src}/utils/promise-timeout.ts (100%) rename {packages/library-legacy/src => src}/utils/secp256k1.ts (100%) rename {packages/library-legacy/src => src}/utils/send-and-confirm-raw-transaction.ts (100%) rename {packages/library-legacy/src => src}/utils/send-and-confirm-transaction.ts (100%) rename {packages/library-legacy/src => src}/utils/shortvec-encoding.ts (100%) rename {packages/library-legacy/src => src}/utils/sleep.ts (100%) rename {packages/library-legacy/src => src}/utils/to-buffer.ts (100%) rename {packages/library-legacy/src => src}/validator-info.ts (100%) rename {packages/library-legacy/src => src}/vote-account.ts (100%) rename {packages/library-legacy/test => test}/.gitignore (100%) rename {packages/library-legacy/test => test}/account.test.ts (100%) rename {packages/library-legacy/test => test}/cluster.test.ts (100%) rename {packages/library-legacy/test => test}/connection-subscriptions.test.ts (100%) rename {packages/library-legacy/test => test}/connection.test.ts (100%) rename {packages/library-legacy/test => test}/epoch-schedule.test.ts (100%) rename {packages/library-legacy/test => test}/fixtures/noop-program/.gitignore (100%) rename {packages/library-legacy/test => test}/fixtures/noop-program/Cargo.toml (100%) rename {packages/library-legacy/test => test}/fixtures/noop-program/build.sh (100%) rename {packages/library-legacy/test => test}/fixtures/noop-program/solana_sbf_rust_noop.so (100%) rename {packages/library-legacy/test => test}/fixtures/noop-program/src/lib.rs (100%) rename {packages/library-legacy/test => test}/guarded-array-utils.test.ts (100%) rename {packages/library-legacy/test => test}/keypair.test.ts (100%) rename {packages/library-legacy/test => test}/makeWebsocketUrl.test.ts (100%) rename {packages/library-legacy/test => test}/message-tests/account-keys.test.ts (100%) rename {packages/library-legacy/test => test}/message-tests/compiled-keys.test.ts (100%) rename {packages/library-legacy/test => test}/message-tests/legacy.test.ts (100%) rename {packages/library-legacy/test => test}/message-tests/v0.test.ts (100%) rename {packages/library-legacy/test => test}/message-tests/versioned.test.ts (100%) rename {packages/library-legacy/test => test}/mocks/rpc-http.ts (100%) rename {packages/library-legacy/test => test}/mocks/rpc-websocket.ts (100%) rename {packages/library-legacy/test => test}/nonce.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/address-lookup-table.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/compute-budget.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/ed25519.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/secp256k1.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/stake.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/system.test.ts (100%) rename {packages/library-legacy/test => test}/program-tests/vote.test.ts (100%) rename {packages/library-legacy/test => test}/publickey.test.ts (100%) rename {packages/library-legacy/test => test}/shortvec-encoding.test.ts (100%) rename {packages/library-legacy/test => test}/transaction-payer.test.ts (100%) rename {packages/library-legacy/test => test}/transaction-tests/message.test.ts (100%) rename {packages/library-legacy/test => test}/transaction.test.ts (100%) rename {packages/library-legacy/test => test}/url.ts (100%) rename {packages/library-legacy/test => test}/validator-info.test.ts (100%) rename {packages/library-legacy/test => test}/websocket.test.ts (100%) create mode 100644 tsconfig.d.json mode change 100644 => 100755 tsconfig.json delete mode 100644 turbo.json rename packages/library-legacy/typedoc.json => typedoc.json (100%) diff --git a/.changeset/brave-chicken-own.md b/.changeset/brave-chicken-own.md deleted file mode 100644 index bca1c52b1349..000000000000 --- a/.changeset/brave-chicken-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/fast-stable-stringify": patch ---- - -Added TypeScript types to `@solana/fast-stable-stringify` diff --git a/.changeset/breezy-items-reflect.md b/.changeset/breezy-items-reflect.md deleted file mode 100644 index 8c03f90dcd5c..000000000000 --- a/.changeset/breezy-items-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/errors': patch ---- - -Fixed a bug that prevented the production error decoder from decoding negative error codes diff --git a/.changeset/calm-camels-decide.md b/.changeset/calm-camels-decide.md deleted file mode 100644 index dd60d52e71e7..000000000000 --- a/.changeset/calm-camels-decide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-api': patch ---- - -The `simulateTransaction` RPC method now accepts an `innerInstructions` param. When `true`, the simulation result will include an array of inner instructions, if any. diff --git a/.changeset/calm-crabs-tease.md b/.changeset/calm-crabs-tease.md deleted file mode 100644 index 61c59d831356..000000000000 --- a/.changeset/calm-crabs-tease.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-strings': patch -'@solana/transactions': patch -'@solana/codecs-core': patch -'@solana/addresses': patch -'@solana/rpc-types': patch -'@solana/options': patch ---- - -Renamed `mapCodec` to `transformCodec` diff --git a/.changeset/chatty-flies-end.md b/.changeset/chatty-flies-end.md deleted file mode 100644 index ada57be3cba8..000000000000 --- a/.changeset/chatty-flies-end.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-strings': patch -'@solana/codecs-core': patch ---- - -Added a new `addCodecSizePrefix` primitive - -```ts -const codec = addCodecSizePrefix(getBase58Codec(), getU32Codec()); - -codec.encode('hello world'); -// 0x0b00000068656c6c6f20776f726c64 -// | └-- Our encoded base-58 string. -// └-- Our encoded u32 size prefix. -``` diff --git a/.changeset/chilled-walls-scream.md b/.changeset/chilled-walls-scream.md deleted file mode 100644 index e487e31679d0..000000000000 --- a/.changeset/chilled-walls-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc': patch ---- - -Fixed a bug where the RPC would fail to throw errors in the event that you configured it with an `AbortSignal` diff --git a/.changeset/chilled-waves-lay.md b/.changeset/chilled-waves-lay.md deleted file mode 100644 index 94ca1677c26d..000000000000 --- a/.changeset/chilled-waves-lay.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -'@solana/web3.js-experimental': major ---- - -This version of the `@solana/web3.js` Technology Preview fixes a bug with the default RPC transport, adds a utility that you can use to get an estimate of a transaction message's compute unit cost, and introduces `@solana/react` hooks for interacting with Wallet Standard wallets. - -To install the fourth Technology Preview: - -```shell -npm install --save @solana/web3.js@tp4 -``` - -For an example of how to use the new `@solana/react` package to interact with wallets in a React application, see the example application in [`examples/react-app`](https://github.com/solana-labs/solana-web3.js/tree/master/examples/react-app#readme). We hope to see similar wallet-connection packages patterned off `@solana/react` for other application frameworks soon. - -Try a demo of Technology Preview 4 in your browser at [CodeSandbox](https://codesandbox.io/p/sandbox/solana-javascript-sdk-technology-preview-4-h8cz4v?file=%2Fsrc%2Findex.ts%3A21%2C8). - -- [#2858](https://github.com/solana-labs/solana-web3.js/pull/2858) [`22a34aa`](https://github.com/solana-labs/solana-web3.js/commit/22a34aa08d1be7e9b43ccfea94a99eaa2694e491) Thanks [@steveluscher](https://github.com/steveluscher)! - Transaction signers' methods now take `minContextSlot` as an option. This is important for signers that simulate transactions, like wallets. They might be interested in knowing the slot at which the transaction was prepared, lest they run simulation at too early a slot. - -- [#2852](https://github.com/solana-labs/solana-web3.js/pull/2852) [`cec9048`](https://github.com/solana-labs/solana-web3.js/commit/cec9048b2f83535df7e499db5488c336981dfb5a) Thanks [@lorisleiva](https://github.com/lorisleiva)! - The `signAndSendTransactionMessageWithSigners` function now automatically asserts that the provided transaction message contains a single sending signer and fails otherwise. - -- [#2707](https://github.com/solana-labs/solana-web3.js/pull/2707) [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Allow creating keypairs and keys from ReadonlyUint8Array - -- [#2715](https://github.com/solana-labs/solana-web3.js/pull/2715) [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Consolidated `getNullableCodec` and `getOptionCodec` with their `Zeroable` counterparts and added more configurations - - Namely, the `prefix` option can now be set to `null` and the `fixed` option was replaced with the `noneValue` option which can be set to `"zeroes"` for `Zeroable` codecs or a custom byte array for custom representations of none values. This means the `getZeroableNullableCodec` and `getZeroableOptionCodec` functions were removed in favor of the new options. - - ```ts - // Before. - getZeroableNullableCodec(getU16Codec()); - - // After. - getNullableCodec(getU16Codec(), { noneValue: 'zeroes', prefix: null }); - ``` - - Additionally, it is now possible to create nullable codecs that have no `prefix` nor `noneValue`. In this case, the existence of the nullable item is indicated by the presence of any remaining bytes left to decode. - - ```ts - const codec = getNullableCodec(getU16Codec(), { prefix: null }); - codec.encode(42); // 0x2a00 - codec.encode(null); // Encodes nothing. - codec.decode(new Uint8Array([42, 0])); // 42 - codec.decode(new Uint8Array([])); // null - ``` - - Also note that it is now possible for custom `noneValue` byte arrays to be of any length — previously, it had to match the fixed-size of the nullable item. - - Here is a recap of all supported scenarios, using a `u16` codec as an example: - - | `encode(42)` / `encode(null)` | No `noneValue` (default) | `noneValue: "zeroes"` | Custom `noneValue` (`0xff`) | - | ----------------------------- | ------------------------ | --------------------------- | --------------------------- | - | `u8` prefix (default) | `0x012a00` / `0x00` | `0x012a00` / `0x000000` | `0x012a00` / `0x00ff` | - | Custom `prefix` (`u16`) | `0x01002a00` / `0x0000` | `0x01002a00` / `0x00000000` | `0x01002a00` / `0x0000ff` | - | No `prefix` | `0x2a00` / `0x` | `0x2a00` / `0x0000` | `0x2a00` / `0xff` | - - Reciprocal changes were made with `getOptionCodec`. - -- [#2785](https://github.com/solana-labs/solana-web3.js/pull/2785) [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df) Thanks [@steveluscher](https://github.com/steveluscher)! - The development mode error message printer no longer fatals on Safari < 16.4. - -- [#2867](https://github.com/solana-labs/solana-web3.js/pull/2867) [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418) Thanks [@steveluscher](https://github.com/steveluscher)! - The `innerInstructions` property of JSON-RPC errors used snake case rather than camelCase for `stackHeight` and `programId`. This has been corrected. - -- [#2728](https://github.com/solana-labs/solana-web3.js/pull/2728) [`f1e9ac2`](https://github.com/solana-labs/solana-web3.js/commit/f1e9ac2af579e4fbfb5550cbdbd971a87a4e4432) Thanks [@joncinque](https://github.com/joncinque)! - Simulate with the maximum quantity of compute units (1.4M) instead of `u32::MAX` - -- [#2703](https://github.com/solana-labs/solana-web3.js/pull/2703) [`0908628`](https://github.com/solana-labs/solana-web3.js/commit/09086289a230aa1b780c1035408b48243ab960f2) Thanks [@steveluscher](https://github.com/steveluscher)! - Created a utility function to estimate the compute unit consumption of a transaction message - -- [#2795](https://github.com/solana-labs/solana-web3.js/pull/2795) [`ce876d9`](https://github.com/solana-labs/solana-web3.js/commit/ce876d99f04d539292abd810acd77a319c52f50d) Thanks [@steveluscher](https://github.com/steveluscher)! - Added React hooks to which you can pass a Wallet Standard `UiWalletAccount` and obtain a `MessageModifyingSigner`, `TransactionModifyingSigner`, or `TransactionSendingSigner` for use in constructing, signing, and sending Solana transactions and messages - -- [#2772](https://github.com/solana-labs/solana-web3.js/pull/2772) [`8fe4551`](https://github.com/solana-labs/solana-web3.js/commit/8fe4551217a3ad8bfdcd1609ac7b23e8fd044c72) Thanks [@steveluscher](https://github.com/steveluscher)! - Added a series of React hooks to which you can pass a Wallet Standard `UiWalletAccount` to extract its `signMessage`, `signTransaction`, and `signAndSendTransaction` features - -- [#2819](https://github.com/solana-labs/solana-web3.js/pull/2819) [`7ee47ae`](https://github.com/solana-labs/solana-web3.js/commit/7ee47ae24ad73b429ee863342f300a6f6c49e3d2) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a bug where coalesced RPC calls could end up aborted even though there were still interested consumers. This would happen if the consumer count fell to zero, then rose above zero again, in the same runloop. - -- [#2868](https://github.com/solana-labs/solana-web3.js/pull/2868) [`91fb1f3`](https://github.com/solana-labs/solana-web3.js/commit/91fb1f39bb174cf1e899a21365153a7b3bbf3571) Thanks [@steveluscher](https://github.com/steveluscher)! - The `simulateTransaction` RPC method now accepts an `innerInstructions` param. When `true`, the simulation result will include an array of inner instructions, if any. - -- [#2866](https://github.com/solana-labs/solana-web3.js/pull/2866) [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677) Thanks [@steveluscher](https://github.com/steveluscher)! - The `TransactionInstruction` RPC type now has `stackHeight` - -- [#2751](https://github.com/solana-labs/solana-web3.js/pull/2751) [`6340744`](https://github.com/solana-labs/solana-web3.js/commit/6340744e5cf0ea91ae677f381d5a187638a19597) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Allow Rpc Request params to be any type, instead of requiring an array diff --git a/.changeset/chilly-seas-act.md b/.changeset/chilly-seas-act.md deleted file mode 100644 index b64541ae3039..000000000000 --- a/.changeset/chilly-seas-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/web3.js-experimental": patch ---- - -Simulate with the maximum quantity of compute units (1.4M) instead of `u32::MAX` diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index f7f5d0ac92f6..000000000000 --- a/.changeset/config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", - "access": "public", - "baseBranch": "master", - "bumpVersionsWithWorkspaceProtocolOnly": true, - "changelog": [ - "@changesets/changelog-github", - { - "repo": "solana-labs/solana-web3.js" - } - ], - "commit": false, - "fixed": [["@solana/!({*-impl,build-scripts,test-*,tsconfig})"]], - "ignore": ["@solana/web3.js"], - "linked": [], - "snapshot": { - "prereleaseTemplate": "{tag}.4.{datetime}.{commit}", - "useCalculatedVersion": true - }, - "privatePackages": { - "version": false, - "tag": false - }, - "updateInternalDependencies": "patch" -} diff --git a/.changeset/curly-kids-type.md b/.changeset/curly-kids-type.md deleted file mode 100644 index 191740c148d6..000000000000 --- a/.changeset/curly-kids-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/react': patch ---- - -Added React hooks to which you can pass a Wallet Standard `UiWalletAccount` and obtain a `MessageModifyingSigner`, `TransactionModifyingSigner`, or `TransactionSendingSigner` for use in constructing, signing, and sending Solana transactions and messages diff --git a/.changeset/early-eyes-mix.md b/.changeset/early-eyes-mix.md deleted file mode 100644 index 4f2678bccb0b..000000000000 --- a/.changeset/early-eyes-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc': patch ---- - -Fixed a bug where coalesced RPC calls could end up aborted even though there were still interested consumers. This would happen if the consumer count fell to zero, then rose above zero again, in the same runloop. diff --git a/.changeset/famous-buttons-switch.md b/.changeset/famous-buttons-switch.md deleted file mode 100644 index ad7f982eb2ca..000000000000 --- a/.changeset/famous-buttons-switch.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@solana/codecs-numbers': patch ---- - -Used capitalised variant names for `Endian` enum - -This makes the enum more consistent with other enums in the library. - -```ts -// Before. -Endian.BIG; -Endian.LITTLE; - -// After. -Endian.Big; -Endian.Little; -``` \ No newline at end of file diff --git a/.changeset/fast-cars-knock.md b/.changeset/fast-cars-knock.md deleted file mode 100644 index a929f42677eb..000000000000 --- a/.changeset/fast-cars-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-api': patch ---- - -Fixed a TypeScript error where the return value of `simulateTransaction` claimed there was an `accounts` property at the top level when it is in fact `value.accounts` diff --git a/.changeset/forty-queens-explode.md b/.changeset/forty-queens-explode.md deleted file mode 100644 index 7a75ce331391..000000000000 --- a/.changeset/forty-queens-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/transaction-messages': patch ---- - -Add a function to replace accounts in a transaction message using lookup tables diff --git a/.changeset/fuzzy-lizards-end.md b/.changeset/fuzzy-lizards-end.md deleted file mode 100644 index 5c4690d5bd84..000000000000 --- a/.changeset/fuzzy-lizards-end.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -'@solana/react': minor ---- - -Added a `useSignIn` hook that, given a `UiWallet` or `UiWalletAccount`, returns a function that you can call to trigger a wallet's [‘Sign In With Solana’](https://phantom.app/learn/developers/sign-in-with-solana) feature. - -#### Example - -```tsx -import { useSignIn } from '@solana/react'; - -function SignInButton({ wallet }) { - const csrfToken = useCsrfToken(); - const signIn = useSignIn(wallet); - return ( - - ); -} -``` diff --git a/.changeset/gorgeous-gorillas-sniff.md b/.changeset/gorgeous-gorillas-sniff.md deleted file mode 100644 index 66113e79a0dc..000000000000 --- a/.changeset/gorgeous-gorillas-sniff.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@solana/codecs-core': patch -'@solana/errors': patch ---- - -Added new `addCodecSentinel` primitive - -The `addCodecSentinel` function provides a new way of delimiting the size of a codec. It allows us to add a sentinel to the end of the encoded data and to read until that sentinel is found when decoding. It accepts any codec and a `Uint8Array` sentinel responsible for delimiting the encoded data. - -```ts -const codec = addCodecSentinel(getUtf8Codec(), new Uint8Array([255, 255])); -codec.encode('hello'); -// 0x68656c6c6fffff -// | └-- Our sentinel. -// └-- Our encoded string. -``` \ No newline at end of file diff --git a/.changeset/green-experts-hang.md b/.changeset/green-experts-hang.md deleted file mode 100644 index 6e0420a56a8e..000000000000 --- a/.changeset/green-experts-hang.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -Improve `getTupleCodec` type inferences and performance - -The tuple codec now infers its encoded/decoded type from the provided codec array and uses the new `DrainOuterGeneric` helper to reduce the number of TypeScript instantiations. diff --git a/.changeset/heavy-students-relax.md b/.changeset/heavy-students-relax.md deleted file mode 100644 index 41d014438a08..000000000000 --- a/.changeset/heavy-students-relax.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -Use `DrainOuterGeneric` helper on codec type mappings - -This significantly reduces the number of TypeScript instantiations on object mappings, -which increases TypeScript performance and prevents "Type instantiation is excessively deep and possibly infinite" errors. diff --git a/.changeset/honest-cheetahs-care.md b/.changeset/honest-cheetahs-care.md deleted file mode 100644 index 87204669ce00..000000000000 --- a/.changeset/honest-cheetahs-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/codecs-strings": patch ---- - -Converting a base16 string to a byte buffer is now between 2-3x faster (Thanks @tibi77!) diff --git a/.changeset/honest-rivers-deny.md b/.changeset/honest-rivers-deny.md deleted file mode 100644 index 680b8cde0160..000000000000 --- a/.changeset/honest-rivers-deny.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-core': patch -'@solana/errors': patch ---- - -Added new `containsBytes` and `getConstantCodec` helpers - -The `containsBytes` helper checks if a `Uint8Array` contains another `Uint8Array` at a given offset. - -```ts -containsBytes(new Uint8Array([1, 2, 3, 4]), new Uint8Array([2, 3]), 1); // true -containsBytes(new Uint8Array([1, 2, 3, 4]), new Uint8Array([2, 3]), 2); // false -``` - -The `getConstantCodec` function accepts any `Uint8Array` and returns a `Codec`. When encoding, it will set the provided `Uint8Array` as-is. When decoding, it will assert that the next bytes contain the provided `Uint8Array` and move the offset forward. - -```ts -const codec = getConstantCodec(new Uint8Array([1, 2, 3])); - -codec.encode(undefined); // 0x010203 -codec.decode(new Uint8Array([1, 2, 3])); // undefined -codec.decode(new Uint8Array([1, 2, 4])); // Throws an error. -``` \ No newline at end of file diff --git a/.changeset/hot-penguins-explain.md b/.changeset/hot-penguins-explain.md deleted file mode 100644 index e688cd7455fa..000000000000 --- a/.changeset/hot-penguins-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/react': patch ---- - -Added a series of React hooks to which you can pass a Wallet Standard `UiWalletAccount` to extract its `signMessage`, `signTransaction`, and `signAndSendTransaction` features diff --git a/.changeset/late-mangos-doubt.md b/.changeset/late-mangos-doubt.md deleted file mode 100644 index 3cf768559442..000000000000 --- a/.changeset/late-mangos-doubt.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -DataEnum codecs can now use numbers or symbols as discriminator values - -```ts -const codec = getDataEnumCodec([ - [1, getStructCodec([[['one', u32]]])] - [2, getStructCodec([[['two', u32]]])] -]); - -codec.encode({ __kind: 1, one: 42 }); -codec.encode({ __kind: 2, two: 42 }); -``` - -This means you can also use enum values as discriminators, like so: - -```ts -enum Event { Click, KeyPress } -const codec = getDataEnumCodec([ - [Event.Click, getStructCodec([[['x', u32], ['y', u32]]])], - [Event.KeyPress, getStructCodec([[['key', u32]]])] -]); - -codec.encode({ __kind: Event.Click, x: 1, y: 2 }); -codec.encode({ __kind: Event.KeyPress, key: 3 }); -``` diff --git a/.changeset/late-planets-breathe.md b/.changeset/late-planets-breathe.md deleted file mode 100644 index e1d0d8228345..000000000000 --- a/.changeset/late-planets-breathe.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-strings': patch -'@solana/transactions': patch -'@solana/addresses': patch -'@solana/rpc-types': patch ---- - -Removed `getStringCodec` in favour of `fixCodecSize` and `addCodecSizePrefix` - -The `getStringCodec` function now always returns a `VariableSizeCodec` that uses as many bytes as necessary to encode and/or decode strings. In order to fix or prefix the size of a `getStringCodec`, you may now use the `fixCodecSize` or `prefixCodecSide` accordingly. Here are some examples: - -```ts -// Before. -getStringCodec({ size: 'variable' }); // Variable. -getStringCodec({ encoding: getUtf8Codec(), size: 'variable' }); // Variable (equivalent). -getStringCodec({ size: 5 }); // Fixed. -getStringCodec({ encoding: getUtf8Codec(), size: 5 }); // Fixed (equivalent). -getStringCodec(); // Prefixed. -getStringCodec({ encoding: getUtf8Codec(), size: getU32Codec() }); // Prefixed (equivalent). - -// After. -getUtf8Codec(); // Variable. -fixCodecSize(getUtf8Codec(), 5); // Fixed. -addCodecSizePrefix(getUtf8Codec(), getU32Codec()); // Prefixed. -``` diff --git a/.changeset/lazy-phones-fail.md b/.changeset/lazy-phones-fail.md deleted file mode 100644 index fcc7593fd7f2..000000000000 --- a/.changeset/lazy-phones-fail.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -"@solana/codecs-data-structures": patch -"@solana/options": patch -"@solana/codecs": patch ---- - -Consolidated `getNullableCodec` and `getOptionCodec` with their `Zeroable` counterparts and added more configurations - -Namely, the `prefix` option can now be set to `null` and the `fixed` option was replaced with the `noneValue` option which can be set to `"zeroes"` for `Zeroable` codecs or a custom byte array for custom representations of none values. This means the `getZeroableNullableCodec` and `getZeroableOptionCodec` functions were removed in favor of the new options. - -```ts -// Before. -getZeroableNullableCodec(getU16Codec()); - -// After. -getNullableCodec(getU16Codec(), { noneValue: 'zeroes', prefix: null }); -``` - -Additionally, it is now possible to create nullable codecs that have no `prefix` nor `noneValue`. In this case, the existence of the nullable item is indicated by the presence of any remaining bytes left to decode. - -```ts -const codec = getNullableCodec(getU16Codec(), { prefix: null }); -codec.encode(42); // 0x2a00 -codec.encode(null); // Encodes nothing. -codec.decode(new Uint8Array([42, 0])); // 42 -codec.decode(new Uint8Array([])); // null -``` - -Also note that it is now possible for custom `noneValue` byte arrays to be of any length — previously, it had to match the fixed-size of the nullable item. - -Here is a recap of all supported scenarios, using a `u16` codec as an example: - -| `encode(42)` / `encode(null)` | No `noneValue` (default) | `noneValue: "zeroes"` | Custom `noneValue` (`0xff`) | -| ----------------------------- | ------------------------ | --------------------------- | --------------------------- | -| `u8` prefix (default) | `0x012a00` / `0x00` | `0x012a00` / `0x000000` | `0x012a00` / `0x00ff` | -| Custom `prefix` (`u16`) | `0x01002a00` / `0x0000` | `0x01002a00` / `0x00000000` | `0x01002a00` / `0x0000ff` | -| No `prefix` | `0x2a00` / `0x` | `0x2a00` / `0x0000` | `0x2a00` / `0xff` | - -Reciprocal changes were made with `getOptionCodec`. diff --git a/.changeset/little-berries-applaud.md b/.changeset/little-berries-applaud.md deleted file mode 100644 index bb652575ee7b..000000000000 --- a/.changeset/little-berries-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/programs": patch ---- - -Remove program types and `resolveTransactionError` helper diff --git a/.changeset/loud-otters-pull.md b/.changeset/loud-otters-pull.md deleted file mode 100644 index 3fdfd03bec0f..000000000000 --- a/.changeset/loud-otters-pull.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-core': patch -'@solana/codecs': patch -'@solana/errors': patch ---- - -`getScalarEnumCodec` is now called `getEnumCodec` diff --git a/.changeset/lovely-mice-promise.md b/.changeset/lovely-mice-promise.md deleted file mode 100644 index d5abde538c3d..000000000000 --- a/.changeset/lovely-mice-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/programs": patch ---- - -Add `isProgramError` helper function to `@solana/programs` diff --git a/.changeset/mean-vans-behave.md b/.changeset/mean-vans-behave.md deleted file mode 100644 index 4a2305e2f36a..000000000000 --- a/.changeset/mean-vans-behave.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/errors': patch ---- - -Added `useValuesAsDiscriminators` option to `getEnumCodec` - -When dealing with numerical enums that have explicit values, you may now use the `useValuesAsDiscriminators` option to encode the value of the enum variant instead of its index. - -```ts -enum Numbers { - One, - Five = 5, - Six, - Nine = 9, -} - -const codec = getEnumCodec(Numbers, { useValuesAsDiscriminators: true }); -codec.encode(Direction.One); // 0x00 -codec.encode(Direction.Five); // 0x05 -codec.encode(Direction.Six); // 0x06 -codec.encode(Direction.Nine); // 0x09 -``` - -Note that when using the `useValuesAsDiscriminators` option on an enum that contains a lexical value, an error will be thrown. - -```ts -enum Lexical { - One, - Two = 'two', -} -getEnumCodec(Lexical, { useValuesAsDiscriminators: true }); // Throws an error. -``` \ No newline at end of file diff --git a/.changeset/metal-bees-lick.md b/.changeset/metal-bees-lick.md deleted file mode 100644 index 40b158dbaf4c..000000000000 --- a/.changeset/metal-bees-lick.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-transformers': patch -'@solana/rpc-spec': patch ---- - -Refactor rpc-spec to remove requirement for transports to implement parts of JSON RPC spec diff --git a/.changeset/metal-radios-switch.md b/.changeset/metal-radios-switch.md deleted file mode 100644 index bf3d91b822a8..000000000000 --- a/.changeset/metal-radios-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/errors": patch ---- - -The encoded `SolanaError` context that is thrown in production is now base64-encoded for compatibility with more terminal shells diff --git a/.changeset/nervous-deers-roll.md b/.changeset/nervous-deers-roll.md deleted file mode 100644 index f41032e9afce..000000000000 --- a/.changeset/nervous-deers-roll.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/errors': patch ---- - -Added a new `getUnionCodec` helper that can be used to encode/decode any TypeScript union. - -```ts -const codec: Codec = getUnionCodec( - [getU16Codec(), getBooleanCodec()], - value => (typeof value === 'number' ? 0 : 1), - (bytes, offset) => (bytes.slice(offset).length > 1 ? 0 : 1), -); - -codec.encode(42); // 0x2a00 -codec.encode(true); // 0x01 -``` diff --git a/.changeset/nine-pots-notice.md b/.changeset/nine-pots-notice.md deleted file mode 100644 index dde975697b20..000000000000 --- a/.changeset/nine-pots-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/transaction-confirmation": patch ---- - -Changes `createRecentSignatureConfirmationPromiseFactory` to enforce `rpc` and `rpcSubscriptions` to have matching clusters, changing the function signature to accept an object rather than two parameters. diff --git a/.changeset/odd-beds-punch.md b/.changeset/odd-beds-punch.md deleted file mode 100644 index 55d8bc16a720..000000000000 --- a/.changeset/odd-beds-punch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-core': patch -'@solana/codecs': patch -'@solana/errors': patch ---- - -`getDataEnumCodec` is now called `getDiscriminatedUnionCodec` diff --git a/.changeset/poor-dogs-crash.md b/.changeset/poor-dogs-crash.md deleted file mode 100644 index 2f201e078dc3..000000000000 --- a/.changeset/poor-dogs-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/transaction-confirmation": patch ---- - -Changes `createNonceInvalidationPromiseFactory` to enforce `rpc` and `rpcSubscriptions` to have matching clusters, changing the function signature to accept an object rather than two parameters. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 3860dfb93390..000000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "mode": "pre", - "tag": "preview", - "initialVersions": { - "@solana/accounts": "2.0.0-preview.3", - "@solana/addresses": "2.0.0-preview.3", - "@solana/assertions": "2.0.0-preview.3", - "@solana/codecs": "2.0.0-preview.3", - "@solana/codecs-core": "2.0.0-preview.3", - "@solana/codecs-data-structures": "2.0.0-preview.3", - "@solana/codecs-numbers": "2.0.0-preview.3", - "@solana/codecs-strings": "2.0.0-preview.3", - "@solana/compat": "2.0.0-preview.3", - "@solana/errors": "2.0.0-preview.3", - "@solana/fast-stable-stringify": "2.0.0-preview.3", - "@solana/functional": "2.0.0-preview.3", - "@solana/instructions": "2.0.0-preview.3", - "@solana/keys": "2.0.0-preview.3", - "@solana/web3.js-experimental": "2.0.0-preview.3", - "@solana/web3.js": "0.0.0-development", - "@solana/options": "2.0.0-preview.3", - "@solana/programs": "2.0.0-preview.3", - "@solana/react": "2.0.0-preview.3", - "@solana/rpc": "2.0.0-preview.3", - "@solana/rpc-api": "2.0.0-preview.3", - "@solana/rpc-graphql": "2.0.0-preview.3", - "@solana/rpc-parsed-types": "2.0.0-preview.3", - "@solana/rpc-spec": "2.0.0-preview.3", - "@solana/rpc-spec-types": "2.0.0-preview.3", - "@solana/rpc-subscriptions": "2.0.0-preview.3", - "@solana/rpc-subscriptions-api": "2.0.0-preview.3", - "@solana/rpc-subscriptions-spec": "2.0.0-preview.3", - "@solana/rpc-subscriptions-transport-websocket": "2.0.0-preview.3", - "@solana/rpc-transformers": "2.0.0-preview.3", - "@solana/rpc-transport-http": "2.0.0-preview.3", - "@solana/rpc-types": "2.0.0-preview.3", - "@solana/signers": "2.0.0-preview.3", - "@solana/sysvars": "2.0.0-preview.3", - "@solana/transaction-confirmation": "2.0.0-preview.3", - "@solana/transaction-messages": "2.0.0-preview.3", - "@solana/transactions": "2.0.0-preview.3", - "@solana/webcrypto-ed25519-polyfill": "2.0.0-preview.3", - "@solana/build-scripts": "0.0.0", - "@solana/crypto-impl": "0.0.0", - "@solana/test-config": "0.0.0", - "@solana/test-matchers": "0.0.0", - "@solana/text-encoding-impl": "0.0.0", - "@solana/tsconfig": "0.0.0", - "@solana/ws-impl": "0.0.0", - "@solana/fetch-impl": "0.0.0" - }, - "changesets": [ - "brave-chicken-own", - "breezy-items-reflect", - "calm-camels-decide", - "calm-crabs-tease", - "chatty-flies-end", - "chilled-waves-lay", - "chilly-seas-act", - "curly-kids-type", - "early-eyes-mix", - "famous-buttons-switch", - "fast-cars-knock", - "gorgeous-gorillas-sniff", - "green-experts-hang", - "heavy-students-relax", - "honest-cheetahs-care", - "honest-rivers-deny", - "hot-penguins-explain", - "late-mangos-doubt", - "late-planets-breathe", - "lazy-phones-fail", - "little-berries-applaud", - "loud-otters-pull", - "lovely-mice-promise", - "mean-vans-behave", - "metal-radios-switch", - "nervous-deers-roll", - "nine-pots-notice", - "odd-beds-punch", - "poor-dogs-crash", - "pretty-rocks-argue", - "proud-poems-try", - "purple-forks-rest", - "sharp-steaks-admire", - "shiny-birds-pay", - "short-jokes-begin", - "short-toes-perform", - "silly-months-happen", - "sixty-dodos-smile", - "sour-mugs-press", - "stale-turtles-hang", - "strong-pandas-marry", - "tender-turtles-bake", - "thick-masks-lie", - "thick-radios-appear", - "thick-radios-search", - "tidy-wolves-share", - "tricky-fishes-pull", - "two-cougars-try", - "unlucky-pumpkins-itch", - "violet-brooms-report", - "wicked-cougars-matter", - "wild-lobsters-kick" - ] -} diff --git a/.changeset/pretty-rocks-argue.md b/.changeset/pretty-rocks-argue.md deleted file mode 100644 index 2a1d1acd6b58..000000000000 --- a/.changeset/pretty-rocks-argue.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -Added new `getHiddenPrefixCodec` and `getHiddenSuffixCodec` helpers - -These functions allow us to respectively prepend or append a list of hidden `Codec` to a given codec. When encoding, the hidden codecs will be encoded before or after the main codec and the offset will be moved accordingly. When decoding, the hidden codecs will be decoded but only the result of the main codec will be returned. This is particularly helpful when creating data structures that include constant values that should not be included in the final type. - -```ts -const codec: Codec = getHiddenPrefixCodec(getU16Codec(), [ - getConstantCodec(new Uint8Array([1, 2, 3])), - getConstantCodec(new Uint8Array([4, 5, 6])), -]); - -codec.encode(42); -// 0x0102030405062a00 -// | | └-- Our main u16 codec (value = 42). -// | └-- Our second hidden prefix codec. -// └-- Our first hidden prefix codec. - -codec.decode(new Uint8Array([1, 2, 3, 4, 5, 6, 42, 0])); // 42 -``` \ No newline at end of file diff --git a/.changeset/proud-poems-try.md b/.changeset/proud-poems-try.md deleted file mode 100644 index 002060379211..000000000000 --- a/.changeset/proud-poems-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/errors": patch ---- - -The development mode error message printer no longer fatals on Safari < 16.4. diff --git a/.changeset/purple-forks-rest.md b/.changeset/purple-forks-rest.md deleted file mode 100644 index cd5a00ab0e61..000000000000 --- a/.changeset/purple-forks-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/options": patch ---- - -Fix missing export of Zeroable Option codecs diff --git a/.changeset/rare-goats-sell.md b/.changeset/rare-goats-sell.md deleted file mode 100644 index e1c66ad0679a..000000000000 --- a/.changeset/rare-goats-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/web3.js-experimental': patch ---- - -Fixed the type of `config` on `getComputeUnitEstimateForTransactionMessage`. It is now optional and does not include `transactionMessage`. diff --git a/.changeset/rich-eggs-tease.md b/.changeset/rich-eggs-tease.md deleted file mode 100644 index 426fdc325635..000000000000 --- a/.changeset/rich-eggs-tease.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@solana/errors': patch -'@solana/rpc': patch -'@solana/rpc-subscriptions': patch -'@solana/rpc-subscriptions-transport-websocket': patch -'@solana/rpc-transport-http': patch -'@solana/webcrypto-ed25519-polyfill': patch ---- - -`__DEV__` mode will now be the default if you don't set `process.env.NODE_ENV` at all. This means fewer people ‘accidentally’ finding themselves in production mode with minified error messages. diff --git a/.changeset/sharp-steaks-admire.md b/.changeset/sharp-steaks-admire.md deleted file mode 100644 index ae5ab59ee633..000000000000 --- a/.changeset/sharp-steaks-admire.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-types': patch -'@solana/rpc-api': patch ---- - -The `TransactionInstruction` RPC type now has `stackHeight` diff --git a/.changeset/shiny-birds-pay.md b/.changeset/shiny-birds-pay.md deleted file mode 100644 index 6e18351981d4..000000000000 --- a/.changeset/shiny-birds-pay.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/codecs-strings': patch -'@solana/codecs-core': patch -'@solana/addresses': patch -'@solana/rpc-types': patch -'@solana/options': patch -'@solana/rpc-api': patch ---- - -Renamed `fixCodec` to `fixCodecSize` diff --git a/.changeset/short-jokes-begin.md b/.changeset/short-jokes-begin.md deleted file mode 100644 index d4d688f6c90f..000000000000 --- a/.changeset/short-jokes-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/signers': patch ---- - -The `signAndSendTransactionMessageWithSigners` function now automatically asserts that the provided transaction message contains a single sending signer and fails otherwise. diff --git a/.changeset/short-toes-perform.md b/.changeset/short-toes-perform.md deleted file mode 100644 index 505df5d57e71..000000000000 --- a/.changeset/short-toes-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -The `getBooleanCodec` function now accepts variable-size number codecs diff --git a/.changeset/silly-months-happen.md b/.changeset/silly-months-happen.md deleted file mode 100644 index 5ae4583c17ff..000000000000 --- a/.changeset/silly-months-happen.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/transactions': patch -'@solana/options': patch ---- - -Removed the size option of `getBytesCodec` - -The `getBytesCodec` function now always returns a `VariableSizeCodec` that uses as many bytes as necessary to encode and/or decode byte arrays. In order to fix or prefix the size of a `getBytesCodec`, you may now use the `fixCodecSize` or `prefixCodecSide` accordingly. Here are some examples: - -```ts -// Before. -getBytesCodec(); // Variable. -getBytesCodec({ size: 5 }); // Fixed. -getBytesCodec({ size: getU16Codec() }); // Prefixed. - -// After. -getBytesCodec(); // Variable. -fixCodecSize(getBytesCodec(), 5); // Fixed. -addCodecSizePrefix(getBytesCodec(), getU16Codec()); // Prefixed. -``` diff --git a/.changeset/sixty-dodos-smile.md b/.changeset/sixty-dodos-smile.md deleted file mode 100644 index 04d50f0ded04..000000000000 --- a/.changeset/sixty-dodos-smile.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@solana/transaction-messages": patch -"@solana/transactions": patch ---- - -Refactor transactions, to separate constructing transaction messages from signing/sending compiled transactions - -A transaction message contains a transaction version and an array of transaction instructions. It may also have a fee payer and a lifetime. Transaction messages can be built up incrementally, for example by adding instructions or a fee payer. - -Transactions represent a compiled transaction message (serialized to an immutable byte array) and a map of signatures for each required signer of the transaction message. These signatures are only valid for the byte array stored in the transaction. Transactions can be signed by updating this map of signatures, and when they have a valid signature for all required signers they can be landed on the network. - -Note that this change essentially splits the previous `@solana/transactions` API in two, with functionality for creating/modifying transaction messages moved to `@solana/transaction-messages`. \ No newline at end of file diff --git a/.changeset/sour-mugs-press.md b/.changeset/sour-mugs-press.md deleted file mode 100644 index 89a2e654ae1b..000000000000 --- a/.changeset/sour-mugs-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/errors': patch ---- - -The `innerInstructions` property of JSON-RPC errors used snake case rather than camelCase for `stackHeight` and `programId`. This has been corrected. diff --git a/.changeset/stale-turtles-hang.md b/.changeset/stale-turtles-hang.md deleted file mode 100644 index f3744b7e1663..000000000000 --- a/.changeset/stale-turtles-hang.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@solana/signers": patch -"@solana/keys": patch ---- - -Allow creating keypairs and keys from ReadonlyUint8Array diff --git a/.changeset/strong-pandas-marry.md b/.changeset/strong-pandas-marry.md deleted file mode 100644 index d01ba1df7b6d..000000000000 --- a/.changeset/strong-pandas-marry.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@solana/web3.js-experimental": patch -"@solana/rpc-subscriptions": patch -"@solana/rpc": patch ---- - -Replaced `fast-stable-stringify` with our fork diff --git a/.changeset/tender-turtles-bake.md b/.changeset/tender-turtles-bake.md deleted file mode 100644 index c9cf685aff1c..000000000000 --- a/.changeset/tender-turtles-bake.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/errors': patch ---- - -Added a new `getLiteralUnionCodec` - -```ts -const codec = getLiteralUnionCodec(['left', 'right', 'up', 'down']); -// ^? FixedSizeCodec<"left" | "right" | "up" | "down"> - -const bytes = codec.encode('left'); // 0x00 -const value = codec.decode(bytes); // 'left' -``` \ No newline at end of file diff --git a/.changeset/thick-masks-lie.md b/.changeset/thick-masks-lie.md deleted file mode 100644 index 464305120929..000000000000 --- a/.changeset/thick-masks-lie.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'@solana/codecs-data-structures': patch -'@solana/options': patch -'@solana/errors': patch ---- - -Added new `getZeroableNullableCodec` and `getZeroableOptionCodec` functions - -These functions rely on a zero value to represent `None` or `null` values as opposed to using a boolean prefix. - -```ts -const codec = getZeroableNullableCodec(getU16Codec()); -codec.encode(42); // 0x2a00 -codec.encode(null); // 0x0000 -codec.decode(new Uint8Array([42, 0])); // 42 -codec.encode(new Uint8Array([0, 0])); // null -``` - -Both functions can also be provided with a custom definition of the zero value using the `zeroValue` option. - -```ts -const codec = getZeroableNullableCodec(getU16Codec(), { - zeroValue: new Uint8Array([255, 255]), -}); -codec.encode(42); // 0x2a00 -codec.encode(null); // 0xfffff -codec.encode(new Uint8Array([0, 0])); // 0 -codec.decode(new Uint8Array([42, 0])); // 42 -codec.decode(new Uint8Array([255, 255])); // null -``` diff --git a/.changeset/thick-radios-appear.md b/.changeset/thick-radios-appear.md deleted file mode 100644 index 577d763a47fd..000000000000 --- a/.changeset/thick-radios-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/transaction-messages": patch ---- - -Freeze the instructions and lifetimeConstraint fields within transaction messages diff --git a/.changeset/thick-radios-search.md b/.changeset/thick-radios-search.md deleted file mode 100644 index b9c504112dfb..000000000000 --- a/.changeset/thick-radios-search.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@solana/assertions": patch -"@solana/errors": patch -"@solana/keys": patch ---- - -`createKeyPairFromBytes()` now validates that the public key imported is the one that would be derived from the private key imported diff --git a/.changeset/tidy-wolves-share.md b/.changeset/tidy-wolves-share.md deleted file mode 100644 index 2059739aa6b4..000000000000 --- a/.changeset/tidy-wolves-share.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -"@solana/rpc-subscriptions-transport-websocket": patch -"@solana/webcrypto-ed25519-polyfill": patch -"@solana/transaction-confirmation": patch -"@solana/codecs-data-structures": patch -"@solana/rpc-subscriptions-spec": patch -"@solana/fast-stable-stringify": patch -"@solana/rpc-subscriptions-api": patch -"@solana/transaction-messages": patch -"@solana/rpc-transport-http": patch -"@solana/rpc-subscriptions": patch -"@solana/rpc-parsed-types": patch -"@solana/rpc-transformers": patch -"@solana/codecs-numbers": patch -"@solana/codecs-strings": patch -"@solana/rpc-spec-types": patch -"@solana/instructions": patch -"@solana/transactions": patch -"@solana/codecs-core": patch -"@solana/rpc-graphql": patch -"@solana/assertions": patch -"@solana/functional": patch -"@solana/addresses": patch -"@solana/rpc-types": patch -"@solana/accounts": patch -"@solana/programs": patch -"@solana/rpc-spec": patch -"@solana/web3.js-experimental": patch -"@solana/options": patch -"@solana/rpc-api": patch -"@solana/signers": patch -"@solana/sysvars": patch -"@solana/codecs": patch -"@solana/compat": patch -"@solana/errors": patch -"@solana/keys": patch -"@solana/rpc": patch ---- - -Use commonjs package type diff --git a/.changeset/tricky-fishes-pull.md b/.changeset/tricky-fishes-pull.md deleted file mode 100644 index c59d499d2eee..000000000000 --- a/.changeset/tricky-fishes-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-transformers': patch ---- - -Improve transaction sending reliability for those who skip preflight (simulation) when calling `sendTransaction` diff --git a/.changeset/two-cougars-try.md b/.changeset/two-cougars-try.md deleted file mode 100644 index a2cebe28ac0e..000000000000 --- a/.changeset/two-cougars-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/web3.js-experimental": patch ---- - -Created a utility function to estimate the compute unit consumption of a transaction message diff --git a/.changeset/unlucky-pumpkins-itch.md b/.changeset/unlucky-pumpkins-itch.md deleted file mode 100644 index 70fd2e5ed8d1..000000000000 --- a/.changeset/unlucky-pumpkins-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/rpc-spec": patch ---- - -Allow Rpc Request params to be any type, instead of requiring an array diff --git a/.changeset/violet-brooms-report.md b/.changeset/violet-brooms-report.md deleted file mode 100644 index e9da8d046036..000000000000 --- a/.changeset/violet-brooms-report.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@solana/codecs-data-structures': patch ---- - -DataEnum codecs now support custom discriminator properties - -```ts -const codec = getDataEnumCodec([ - ['click', getStructCodec([[['x', u32], ['y', u32]]])], - ['keyPress', getStructCodec([[['key', u32]]])] -], { discriminator: 'event' }); - -codec.encode({ event: 'click', x: 1, y: 2 }); -codec.encode({ event: 'keyPress', key: 3 }); -``` diff --git a/.changeset/warm-pears-sip.md b/.changeset/warm-pears-sip.md deleted file mode 100644 index ed46719107f3..000000000000 --- a/.changeset/warm-pears-sip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/programs': patch ---- - -Tighten return type of isProgramError diff --git a/.changeset/wicked-cougars-matter.md b/.changeset/wicked-cougars-matter.md deleted file mode 100644 index 14c52fd7366d..000000000000 --- a/.changeset/wicked-cougars-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/signers': minor ---- - -Transaction signers' methods now take `minContextSlot` as an option. This is important for signers that simulate transactions, like wallets. They might be interested in knowing the slot at which the transaction was prepared, lest they run simulation at too early a slot. diff --git a/.changeset/wild-lobsters-kick.md b/.changeset/wild-lobsters-kick.md deleted file mode 100644 index 6aa14f789a6e..000000000000 --- a/.changeset/wild-lobsters-kick.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@solana/addresses": patch -"@solana/assertions": patch -"@solana/keys": patch ---- - -`SubtleCrypto` assertion methods that can make their assertions synchronously are now synchronous, for performance. diff --git a/packages/library-legacy/.eslintignore b/.eslintignore similarity index 100% rename from packages/library-legacy/.eslintignore rename to .eslintignore diff --git a/.eslintrc.js b/.eslintrc.js old mode 100755 new mode 100644 index c7c9c9ceb96f..e618d12f5ce8 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,48 @@ module.exports = { - extends: ['turbo', '@solana/eslint-config-solana', '@solana/eslint-config-solana/jest'], - root: true, - rules: { - 'jest/expect-expect': [ - 'error', - { assertFunctionNames: ['expect', 'expectNewPreOffset', 'expectNewPostOffset'] }, + env: { + browser: true, + es6: true, + node: true, + mocha: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:import/errors', + 'plugin:import/warnings', + 'plugin:import/typescript', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + sourceType: 'module', + ecmaVersion: 8, + }, + plugins: ['@typescript-eslint'], + root: true, + rules: { + '@typescript-eslint/no-unused-vars': ['error'], + 'import/first': ['error'], + 'import/no-commonjs': ['error'], + 'import/order': [ + 'error', + { + groups: [ + ['internal', 'external', 'builtin'], + ['index', 'sibling', 'parent'], ], - }, + 'newlines-between': 'always', + }, + ], + 'linebreak-style': ['error', 'unix'], + 'no-console': [0], + 'no-trailing-spaces': ['error'], + 'no-undef': 'off', + 'no-unused-vars': 'off', + quotes: [ + 'error', + 'single', + {avoidEscape: true, allowTemplateLiterals: true}, + ], + 'require-await': ['error'], + semi: ['error', 'always'], + }, }; diff --git a/.github/ISSUE_TEMPLATE/0_bug.md b/.github/ISSUE_TEMPLATE/0_bug.md deleted file mode 100644 index 486894e82d45..000000000000 --- a/.github/ISSUE_TEMPLATE/0_bug.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Report a Bug -about: Help us reproduce a bug you've found so that we can fix it -title: '' -labels: ['bug'] -assignees: '' ---- - - - -## Overview - - - -## Steps to reproduce - - - -## Description of bug - - diff --git a/.github/ISSUE_TEMPLATE/1_feature.md b/.github/ISSUE_TEMPLATE/1_feature.md deleted file mode 100644 index 570e146b0416..000000000000 --- a/.github/ISSUE_TEMPLATE/1_feature.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Suggest a Feature -about: Propose an idea for how to make this library better. -title: '' -labels: ['enhancement'] -assignees: '' ---- - - - -## Motivation - - - -## Example use case - - - -## Details - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index d061b0bc53df..000000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,7 +0,0 @@ -contact_links: - - about: 'Have a question about using this software, or about Solana in general? Post it on the Solana Stack Exchange.' - name: Ask a Question - url: 'https://solana.stackexchange.com/questions/ask' - - about: 'Start or join a discussion on the Solana Tech Discord.' - name: Start a Discussion - url: 'https://solana.com/discord' diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 9607c75facae..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,18 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: 'npm' - directory: '/' - schedule: - interval: daily - time: '01:00' - timezone: America/Los_Angeles - labels: - - 'automerge' - commit-message: - prefix: 'chore:' - open-pull-requests-limit: 3 diff --git a/.github/label-actions.yml b/.github/label-actions.yml deleted file mode 100644 index c89e5aee4e94..000000000000 --- a/.github/label-actions.yml +++ /dev/null @@ -1,28 +0,0 @@ -question: - issues: - # Post a comment, `{issue-author}` is an optional placeholder - comment: > - Hi @{issue-author}, - - - Thanks for your question! - - - We want to make sure to keep signal strong in the GitHub issue tracker – to make sure - that it remains the best place to track issues that affect the development of the Solana - JavaScript SDK itself. - - - Questions like yours deserve a purpose-built Q&A forum. Unless there exists evidence that - this is a bug with the Solana JavaScript SDK itself, please post your question to the Solana - Stack Exchange using this link: https://solana.stackexchange.com/questions/ask - - - --- - - _This - [automated message](https://github.com/solana-labs/solana-web3.js/blob/master/.github/label-actions.yml) - is a result of having added the ‘question’ tag_. - - # Close the issue - close: true diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 795d3c346e6a..000000000000 --- a/.github/workflows/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -#### Problem - - - -#### Summary of Changes - - - -Fixes # \ No newline at end of file diff --git a/.github/workflows/actions/lint-build-and-test/action.yml b/.github/workflows/actions/lint-build-and-test/action.yml new file mode 100644 index 000000000000..d97b63a0aa7e --- /dev/null +++ b/.github/workflows/actions/lint-build-and-test/action.yml @@ -0,0 +1,29 @@ +name: Lint, Build, and Test +description: Generates type definitions, bundles the code, runs all tests, and enforces code style. + +runs: + using: composite + steps: + - name: Enforce Code Formatting + shell: bash + run: pnpm test:prettier + + - name: Compile Types + shell: bash + run: pnpm compile:typedefs + + - name: Enforce Lint + shell: bash + run: pnpm test:lint + + - name: Compile JavaScript + shell: bash + run: pnpm compile:js + + - name: Run Unit Tests + shell: bash + run: pnpm test:unit + + - name: Run Integration Tests + shell: bash + run: pnpm test:live-with-test-validator diff --git a/.github/workflows/autolock-inactive-threads.yml b/.github/workflows/autolock-inactive-threads.yml deleted file mode 100644 index d25a7acfeda5..000000000000 --- a/.github/workflows/autolock-inactive-threads.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: 'Lock inactive threads' - -on: - # Chosen to be just before London wakes up and way past San Francisco's bedtime. - schedule: - - cron: '0 8 * * 1-5' # This is in UTC. - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - -concurrency: - group: lock - -jobs: - action: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v4 - with: - github-token: ${{ github.token }} - issue-inactive-days: '7' - issue-lock-reason: 'resolved' - issue-comment: > - Because there has been no activity on this issue for 7 days since it was closed, it has - been automatically locked. Please open a new issue if it requires a follow up. - pr-inactive-days: '14' - pr-lock-reason: 'resolved' - pr-comment: > - Because there has been no activity on this PR for 14 days since it was merged, it has - been automatically locked. Please open a new issue if it requires a follow up. diff --git a/.github/workflows/bundlesize.yml b/.github/workflows/bundlesize.yml deleted file mode 100644 index 7a9ee535f05b..000000000000 --- a/.github/workflows/bundlesize.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Analyze Library Bundle Size - -on: - workflow_run: - workflows: - - Pull requests - types: - - completed - -jobs: - compare-bundle-size: - name: Compare Bundle Size - runs-on: ubuntu-latest - - if: > - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - - steps: - - name: Install package manager - uses: pnpm/action-setup@v3 - with: - version: 9.1.0 - run_install: false - - - name: Download Experimental Library Bundle - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: library-dist - - - name: Run Bundlewatch - run: pnpm dlx bundlewatch - env: - BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} - CI_BRANCH: ${{ github.ref }} - CI_BRANCH_BASE: refs/heads/master - CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 9039bff22852..df823258b318 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -1,10 +1,11 @@ -name: Commit lint (legacy) +name: Commitlint (v1.x) on: pull_request: - branches: [master] + branches: + - maintenance/v1.x paths: - - ./packages/library-legacy/ + - ./src/ jobs: web3-commit-lint: @@ -35,6 +36,6 @@ jobs: - name: Check that commit message conforms to Semantic Release format if: ${{ github.event_name == 'pull_request' }} - run: bash commitlint.sh ./packages/library-legacy/ + run: bash commitlint.sh ./src/ env: COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/label-actions.yml b/.github/workflows/label-actions.yml deleted file mode 100644 index 45b36ac48543..000000000000 --- a/.github/workflows/label-actions.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'Issue Label Actions' - -on: - issues: - types: [labeled, unlabeled] - -permissions: - contents: read - issues: write - -jobs: - action: - runs-on: ubuntu-latest - steps: - - uses: dessant/label-actions@v2 diff --git a/.github/workflows/manage-stale-threads.yml b/.github/workflows/manage-stale-threads.yml deleted file mode 100644 index ff802edc9d54..000000000000 --- a/.github/workflows/manage-stale-threads.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: 'Manage stale issues and PRs' -on: - # Chosen to be just before London wakes up and way past San Francisco's bedtime. - schedule: - - cron: '0 8 * * 1-5' # This is in UTC. - # Do a dry-run (debug-only: true) whenever this workflow itself is changed. - pull_request: - paths: - - .github/workflows/manage-stale-threads.yml - types: - - opened - - synchronize - -permissions: - issues: write - pull-requests: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v6 - with: - ascending: true # Spend API operations budget on older, more-likely-to-get-closed issues first - close-issue-message: '' # Leave no comment when closing - close-pr-message: '' # Leave no comment when closing - days-before-issue-stale: 365 - days-before-pr-stale: 14 - days-before-close: 7 - debug-only: ${{ github.event_name == 'pull_request' }} # Dry-run when true. - exempt-all-milestones: true # Milestones can sometimes last a month, so exempt issues attached to a milestone. - exempt-issue-labels: blocked,do-not-close,feature-gate,security - exempt-pr-labels: blocked,do-not-close,feature-gate,security - # No actual changes get made in debug-only mode, so we can raise the operations ceiling. - operations-per-run: ${{ github.event_name == 'pull_request' && 1000 || 900}} - stale-issue-label: stale - stale-issue-message: '' # Leave no comment when marking as stale - stale-pr-label: stale - stale-pr-message: '' # Leave no comment when marking as stale diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml deleted file mode 100644 index 3f7074bf1e93..000000000000 --- a/.github/workflows/publish-gh-pages.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Publish GitHub Pages - -on: - workflow_dispatch: - branches: - - master - push: - branches: - - master - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - -jobs: - compile-github-pages-and-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Compile - run: pnpm turbo run compile:ghpages --concurrency=95.84% - env: - REACT_EXAMPLE_APP_BASE_PATH: /solana-web3.js/example/ - - - name: Assemble deploy directory - run: | - mkdir -p .ghpages-deploy - cp -r ./packages/library-legacy/doc/* .ghpages-deploy - cp -r ./examples/react-app/dist/ .ghpages-deploy/example/ - - - name: Deploy to Github Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: .ghpages-deploy diff --git a/.github/workflows/publish-legacy-package.yml b/.github/workflows/publish-legacy-package.yml index 486b5bdb425d..d507f2b4243e 100644 --- a/.github/workflows/publish-legacy-package.yml +++ b/.github/workflows/publish-legacy-package.yml @@ -1,21 +1,12 @@ -name: Publish Legacy Package +name: Publish v1.x Package on: workflow_dispatch: branches: - - master + - maintenance/v1.x push: branches: - - master - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + - maintenance/v1.x jobs: build-and-publish-to-npm: @@ -37,8 +28,11 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Build, Test, and Publish (force) - run: pnpm turbo run publish-packages-legacy --concurrency=95.84% --filter=@solana/web3.js --force=true + - name: Lint, Build, and Test + uses: ./.github/workflows/actions/lint-build-and-test + + - name: Publish + run: pnpm publish-packages env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml deleted file mode 100644 index 72e50e017f2c..000000000000 --- a/.github/workflows/publish-packages.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Publish Packages - -on: - workflow_dispatch: - branches: - - master - push: - branches: - - master - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - -jobs: - build-and-publish-to-npm: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Setup Solana Test Validator - id: start-test-validator - uses: ./.github/workflows/actions/setup-validator - - - name: Configure NPM token - run: | - pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Create Changesets Pull Request or Trigger an NPM Publish - id: changesets - uses: changesets/action@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Choose Build Step - id: build-step-decider - run: echo "step-name=${{ steps.changesets.outputs.hasChangesets == 'false' && 'publish-packages --concurrency=95.84%' || 'build' }}" >> $GITHUB_OUTPUT - - - name: Run Build Step (force) - run: pnpm turbo ${{ steps.build-step-decider.outputs.step-name }} --filter=!\@solana/web3.js --force=true - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Stop Test Validator - if: always() && steps.start-test-validator.outcome == 'success' - run: kill ${{ steps.start-test-validator.outputs.pid }} diff --git a/.github/workflows/publish-prerelease-packages.yml b/.github/workflows/publish-prerelease-packages.yml deleted file mode 100644 index ba4b7ae43b9c..000000000000 --- a/.github/workflows/publish-prerelease-packages.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Publish Package Snapshots - -on: - workflow_dispatch: - branches: - - master - push: - branches: - - master - -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - -jobs: - build-and-publish-snapshots-to-npm: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Dependencies - uses: ./.github/workflows/actions/install-dependencies - - - name: Setup Solana Test Validator - id: start-test-validator - uses: ./.github/workflows/actions/setup-validator - - - name: Run Build Step (force) - run: pnpm turbo build --filter=\!@solana/web3.js --force=true - - - name: Configure NPM token - run: | - pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Publish Snapshots - run: | - pnpm changeset pre exit - find packages/* -maxdepth 0 -type d -print0 | \ - xargs -t0 -n 1 -I {} \ - sh -c 'cd {} && pnpm pkg delete devDependencies' - pnpm changeset version --snapshot preview - pnpm turbo publish-packages --concurrency=95.84% --filter=\!@solana/web3.js - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - PUBLISH_TAG: experimental - - - name: Stop Test Validator - if: always() && steps.start-test-validator.outcome == 'success' - run: kill ${{ steps.start-test-validator.outputs.pid }} diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 9e0fb4abbf51..fe9e6b13435c 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -3,23 +3,7 @@ name: Pull requests on: pull_request: -env: - # Among other things, opts out of Turborepo telemetry - # See https://consoledonottrack.com/ - DO_NOT_TRACK: '1' - # Enables Turborepo Remote Caching. - TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - jobs: - # Needed for grouping check-web3 strategies into one check for mergify - all-web3-checks: - runs-on: ubuntu-latest - needs: build-and-test - steps: - - run: echo "Done" - build-and-test: runs-on: ubuntu-latest @@ -29,7 +13,7 @@ jobs: - 'current' - 'lts/*' - name: Build & Test on Node ${{ matrix.node }} + name: Lint, Build, and Test on Node ${{ matrix.node }} steps: - name: Checkout uses: actions/checkout@v4 @@ -43,21 +27,15 @@ jobs: id: start-test-validator uses: ./.github/workflows/actions/setup-validator - - name: Build & Test - run: pnpm build + - name: Lint, Build, and Test + uses: ./.github/workflows/actions/lint-build-and-test - - name: Build GitHub Pages - run: pnpm turbo run compile:ghpages --concurrency=95.84% + - name: Build Docs + description: > + We run this step in the context of PRs to make sure that the change does not prevent the + docs from being built + run: pnpm compile:docs - name: Stop Test Validator if: always() && steps.start-test-validator.outcome == 'success' run: kill ${{ steps.start-test-validator.outputs.pid }} - - - name: Upload Experimental Library Bundle - if: matrix.node == 'current' - uses: actions/upload-artifact@v4 - with: - name: library-dist - path: | - ./packages/library/dist/ - ./packages/library/package.json diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index a5b4892e4a97..aa49e8f7a7df --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,22 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -node_modules -.pnp -.pnp.js - -# misc +# IDE & OS specific .DS_Store -*.pem +.idea -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* +# Validator +.agave +test-ledger/ -# turbo -.turbo +# Logs +logs +*.log -# Sapling SCM -.sl +# Dependencies +node_modules/ -# `solana-test-validator` -.agave/ -test-ledger/ +# VIM swap files +*.sw* -# GitHub Pages deploy directory -.ghpages-deploy \ No newline at end of file +# Build artifacts +declarations/ +doc/ +lib/ diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index 99e5c1f2a285..000000000000 --- a/.mergify.yml +++ /dev/null @@ -1,63 +0,0 @@ -pull_request_rules: - - name: Add community label to outside contributions - conditions: - - author≠@core-contributors - - author≠@spl-maintainers - - author≠@spl-triage - - author≠@spl-write - - author≠mergify[bot] - - author≠dependabot[bot] - - author≠github-actions[bot] - actions: - label: - add: - - community - - name: Request review of community contributions from community PR subscribers - conditions: - - author≠@core-contributors - - author≠@spl-maintainers - - author≠@spl-triage - - author≠@spl-write - - author≠mergify[bot] - - author≠dependabot[bot] - - author≠github-actions[bot] - # Only request reviews from the PR subscribers group if no one - # has reviewed the community PR yet. These checks only match - # reviewers with admin, write or maintain permission on the repository. - - '#approved-reviews-by=0' - - '#commented-reviews-by=0' - - '#changes-requested-reviews-by=0' - - '#review-requested=0' - actions: - request_reviews: - teams: - - '@solana-labs/community-pr-subscribers' - - name: Automatic merge (squash) on CI success - conditions: - - and: - - status-success=all-web3-checks - - or: - - -files~=^packages/library-legacy/ - - status-success="Validate commit message" - - label=automerge - - label!=no-automerge - actions: - merge: - method: squash - - name: Remove automerge label on CI failure - conditions: - - label=automerge - - '#status-failure!=0' - actions: - label: - remove: - - automerge - comment: - message: Automerge label removed due to a CI failure - -commands_restrictions: - # The author of copied PRs is the Mergify user. - # Restrict `copy` access to Core Contributors - copy: - conditions: - - author=@core-contributors diff --git a/.prettierignore b/.prettierignore index c90ff417d40e..5fcad2e715fa 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,10 +1,2 @@ -.changeset/ -.github/workflows/PULL_REQUEST_TEMPLATE.md - declarations/ -dist/ -doc/ lib/ - -pnpm-lock.yaml -pnpm-workspace.yaml \ No newline at end of file diff --git a/packages/library-legacy/.prettierrc.yaml b/.prettierrc.yaml similarity index 100% rename from packages/library-legacy/.prettierrc.yaml rename to .prettierrc.yaml diff --git a/packages/library-legacy/.releaserc.json b/.releaserc.json similarity index 60% rename from packages/library-legacy/.releaserc.json rename to .releaserc.json index 909539489747..6db40c783f46 100644 --- a/packages/library-legacy/.releaserc.json +++ b/.releaserc.json @@ -1,5 +1,7 @@ { - "commitPaths": ["."], + "$schema": "https://json.schemastore.org/semantic-release.json", + "branches": ["maintenance/v1.x"], + "commitPaths": ["./src/"], "repositoryUrl": "git@github.com:solana-labs/solana-web3.js.git", "preset": "conventionalcommits", "presetConfig": { diff --git a/packages/library-legacy/.sgcrc b/.sgcrc similarity index 100% rename from packages/library-legacy/.sgcrc rename to .sgcrc diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 983a43f4fae4..000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "editor.defaultFormatter": "esbenp.prettier-vscode" -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index d37a09ba7484..000000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -✨ Thanks for contributing to **solana-web3.js**! ✨ - -As a contributor, here are the guidelines we would like you to follow: - -- Ensure `npm run build` passes before submitting a Pull Request -- Features and bug fixes should be covered by new test cases -- Commits follow the [Angular commit convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) - -## Creating releases - -We use [semantic-release](https://github.com/semantic-release/semantic-release) -to release new versions automatically from the `master` branch: - -- Commits of type `fix` will trigger bugfix releases, think `0.0.1` -- Commits of type `feat` will trigger feature releases, think `0.1.0` -- Commits with `BREAKING CHANGE` in body or footer will trigger breaking releases, think `1.0.0` - -All other commit types will trigger no new release. - -## Reference - -### Static Analysis - -eslint and TypeScript are used. - -### Testing Framework - -https://mochajs.org/ - -### API Documentation - -TypeDoc is used to document the public API. See -https://typedoc.org/ for details. diff --git a/README.md b/README.md index dd50df138198..dfbc84e0aba4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ [semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg [semantic-release-url]: https://github.com/semantic-release/semantic-release -# Solana JavaScript SDK +> [!NOTE] This is the maintenance branch for the 1.x line of `@solana/web3.js`. The current development branch can be found [here](https://github.com/solana-labs/solana-web3.js). + +# Solana JavaScript SDK (v1.x) Use this to interact with accounts and programs on the Solana network through the Solana [JSON RPC API](https://solana.com/docs/rpc). @@ -36,8 +38,8 @@ $ npm install --save @solana/web3.js ## Documentation and examples -- [The Solana Cookbook](https://solanacookbook.com/) has extensive task-based documentation using this library. -- For more detail on individual functions, see the [latest API Documentation](https://solana-labs.github.io/solana-web3.js) +- [The Solana Cookbook](https://solanacookbook.com/) has extensive task-based documentation using this library. +- For more detail on individual functions, see the [latest API Documentation](https://solana-labs.github.io/solana-web3.js) ## Getting help @@ -45,46 +47,30 @@ Have a question or a problem? Check the [Solana Stack Exchange](https://solana.s Include: -- A detailed description of what you're trying to achieve -- Source code, if possible -- The text of any errors you encountered, with stacktraces if available +- A detailed description of what you're trying to achieve +- Source code, if possible +- The text of any errors you encountered, with stacktraces if available ## Compatibility This library requires a JavaScript runtime that supports [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) and the [exponentiation operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation). Both are supported in the following runtimes: -- Browsers, by [release date](https://caniuse.com/bigint): - - Chrome: May 2018 - - Firefox: July 2019 - - Safari: September 2020 - - Mobile Safari: September 2020 - - Edge: January 2020 - - Opera: June 2018 - - Samsung Internet: April 2019 -- Runtimes, [by version](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt): - - Deno: >=1.0 - - Node: >=10.4.0 -- React Native: - - \>=0.7.0 using the [Hermes](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) engine ([integration guide](https://solanacookbook.com/integrations/react-native.html#how-to-use-solana-web3-js-in-a-react-native-app)): +- Browsers, by [release date](https://caniuse.com/bigint): + - Chrome: May 2018 + - Firefox: July 2019 + - Safari: September 2020 + - Mobile Safari: September 2020 + - Edge: January 2020 + - Opera: June 2018 + - Samsung Internet: April 2019 +- Runtimes, [by version](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt): + - Deno: >=1.0 + - Node: >=10.4.0 +- React Native: + - \>=0.7.0 using the [Hermes](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) engine ([integration guide](https://solanacookbook.com/integrations/react-native.html#how-to-use-solana-web3-js-in-a-react-native-app)): ## Development environment setup -### Installing node modules - -To install the modules locally, use `pnpm`. - -If you don't have `pnpm` installed: - -```shell -$ npm install pnpm -``` - -To install the node modules: - -```shell -$ pnpm install -``` - ### Testing #### Unit tests @@ -112,19 +98,6 @@ $ cd packages/library-legacy $ npm run test:live-with-test-validator ``` -### Speed up build times with remote caching - -Cache build artifacts remotely so that you, others, and the CI server can take advantage of each others' build efforts. - -1. Log the Turborepo CLI into the Solana Vercel account - ```shell - pnpm turbo login - ``` -2. Link the repository to the remote cache - ```shell - pnpm turbo link - ``` - ## Contributing If you found a bug or would like to request a feature, please [file an issue](https://github.com/solana-labs/solana-web3.js/issues/new). If, based on the discussion on an issue you would like to offer a code change, please make a [pull request](https://github.com/solana-labs/solana-web3.js/compare). If neither of these describes what you would like to contribute, read the [getting help](#getting-help) section above. diff --git a/packages/library-legacy/babel.config.json b/babel.config.json similarity index 100% rename from packages/library-legacy/babel.config.json rename to babel.config.json diff --git a/packages/library-legacy/commitlint.config.js b/commitlint.config.js similarity index 100% rename from packages/library-legacy/commitlint.config.js rename to commitlint.config.js diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index f5aab66af44a..000000000000 --- a/examples/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Examples - -These examples pertain to the 2.0 line of `@solana/web3.js`. Follow these steps to run them. - -## One-time setup - -Start by installing all dependencies. - -```shell -pnpm install -``` - -Most examples use a local test Solana validator. Install one by running the following command in the root of this monorepo. - -```shell -pnpm test:live-with-test-validator:setup -``` - -## Run an example - -In the directory of a given example, run its start script. - -```shell -pnpm start -``` diff --git a/examples/deserialize-transaction/LICENSE b/examples/deserialize-transaction/LICENSE deleted file mode 100644 index ec09953d3c23..000000000000 --- a/examples/deserialize-transaction/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2023 Solana Labs, Inc - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/examples/deserialize-transaction/package.json b/examples/deserialize-transaction/package.json deleted file mode 100644 index fb1e44b865c1..000000000000 --- a/examples/deserialize-transaction/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@solana/example-deserialize-transaction", - "private": true, - "type": "module", - "scripts": { - "prestart": "turbo --output-logs=errors-only compile:js compile:typedefs", - "run:example": "tsx src/example.ts", - "start": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health run:example", - "style:fix": "pnpm eslint --fix src/* && pnpm prettier --log-level warn --ignore-unknown --write ./*", - "test:lint": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent --testMatch 'src/**/*.{ts,tsx}'", - "test:prettier": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent", - "test:typecheck": "tsc" - }, - "dependencies": { - "@solana-program/memo": "^0.4.0", - "@solana-program/system": "^0.4.0", - "@solana/example-utils": "workspace:*", - "@solana/web3.js": "workspace:@solana/web3.js-experimental@*" - }, - "devDependencies": { - "start-server-and-test": "^2.0.4", - "tsx": "^4.16.2" - } -} diff --git a/examples/deserialize-transaction/src/example.ts b/examples/deserialize-transaction/src/example.ts deleted file mode 100644 index f8f282675fdf..000000000000 --- a/examples/deserialize-transaction/src/example.ts +++ /dev/null @@ -1,409 +0,0 @@ -/** - * EXAMPLE - * Deserialize and inspect a transaction with @solana/web3.js. - * - * Before running any of the examples in this monorepo, make sure to set up a test validator by - * running `pnpm test:live-with-test-validator:setup` in the root directory. - * - * To run this example, execute `pnpm start` in this directory. - */ -import { createLogger } from '@solana/example-utils/createLogger.js'; -import { - Address, - appendTransactionMessageInstructions, - assertAccountDecoded, - assertAccountExists, - assertIsInstructionWithAccounts, - assertIsInstructionWithData, - compressTransactionMessageUsingAddressLookupTables, - createKeyPairSignerFromBytes, - createSolanaRpc, - createTransactionMessage, - decodeTransactionMessage, - fetchJsonParsedAccount, - getAddressEncoder, - getBase64EncodedWireTransaction, - getBase64Encoder, - getCompiledTransactionMessageDecoder, - getTransactionDecoder, - lamports, - partiallySignTransactionMessageWithSigners, - pipe, - setTransactionMessageFeePayer, - setTransactionMessageLifetimeUsingBlockhash, - verifySignature, -} from '@solana/web3.js'; -import { getAddMemoInstruction, MEMO_PROGRAM_ADDRESS, parseAddMemoInstruction } from '@solana-program/memo'; -import { - getTransferSolInstruction, - identifySystemInstruction, - parseTransferSolInstruction, - SystemInstruction, -} from '@solana-program/system'; - -const log = createLogger('Deserialize'); - -/** - * SETUP: LOOKUP TABLE ADDRESS - * Our fixtures include a lookup table, which we're going to use for this transaction - * This is the address of the lookup table account from `scripts/fixtures/example-deserialize-transaction-address-lookup-table.json` - */ -const LOOKUP_TABLE_ADDRESS = 'DUbh3qSh4Vvxa52LGtCBCcuvAEMh62FLNkupnsBjhrCc' as Address; -log.info({ address: LOOKUP_TABLE_ADDRESS }, '[setup] Setting lookup table address'); - -/** - * SETUP: RPC CONNECTION - * While in this example we won't send the transaction, we will use the remote procedure call (RPC) server to: - * - fetch the blockhash for the transaction lifetime - * - fetch the address lookup table used in the transaction - * - * This example uses your local test validator which must be running before you run this script. - */ -const rpc = createSolanaRpc('http://127.0.0.1:8899'); - -/** - * SETUP: TRANSACTION LIFETIME - * We will fetch the latest blockhash, which we will use as the transaction's lifetime - * See `examples/transfer-lamports` for more detail on transaction lifetime - */ -const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); -log.info(latestBlockhash, '[setup] Got a blockhash'); - -/** - * SETUP: CREATE A TRANSACTION MESSAGE - * We create a transaction that sends lamports from a source account to a destination account, - * where the destination account is in the lookup table. - * We will then serialize this transaction, and then explore how to deserialize and inspect it. - * See the `transfer-lamports` example for more detailed documentation on creating, signing and sending a transaction. - */ -const SOURCE_ACCOUNT_SIGNER = await createKeyPairSignerFromBytes( - /** - * These are the bytes that we saved at the time this account's key pair was originally - * generated. Here, they are inlined into the source code, but you can also imagine them being - * loaded from disk or, better yet, read from an environment variable. - */ - new Uint8Array( - // prettier-ignore - [2, 194, 94, 194, 31, 15, 34, 248, 159, 9, 59, 156, 194, 152, 79, 148, 81, 17, 63, 53, 245, 175, 37, 0, 134, 90, 111, 236, 245, 160, 3, 50, 196, 59, 123, 60, 59, 151, 65, 255, 27, 247, 241, 230, 52, 54, 143, 136, 108, 160, 7, 128, 4, 14, 232, 119, 234, 61, 47, 158, 9, 241, 48, 140], - ), // Address: ED1WqT2hWJLSZtj4TtTdoovmpMrr7zpkUdbfxmcJR1Fq -); -log.info({ address: SOURCE_ACCOUNT_SIGNER.address }, '[setup] Loaded key pair for source account'); - -// This is the first address in the lookup table -const DESTINATION_ADDRESS = 'F1Vc6AGoxXLwGB7QV8f4So3C5d8SXEk3KKGHxKGEJ8qn' as Address; -log.info({ address: DESTINATION_ADDRESS }, '[setup] Setting destination address'); - -/** - * This is an arbitrary address that we set as the fee payer - * In this example we won't send the transaction so it doesn't matter if this account is funded - */ -const FEE_PAYER_ADDRESS = '9xaf9RQvmr47tcKZ2y8KdpcSn6KyymGU6PZAFC9AKjPd' as Address; -log.info({ address: FEE_PAYER_ADDRESS }, '[setup] Setting fee payer address'); - -const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayer(FEE_PAYER_ADDRESS, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - tx => - appendTransactionMessageInstructions( - [ - getTransferSolInstruction({ - amount: lamports(12345678n), - destination: DESTINATION_ADDRESS, - source: SOURCE_ACCOUNT_SIGNER, - }), - getAddMemoInstruction({ - memo: 'hello from @solana/web3.js', - }), - ], - tx, - ), -); -log.info('[setup] Created the transaction message'); - -/** - * SETUP: COMPRESS WITH LOOKUP TABLE - * As the destination of our transfer SOL instruction is in our lookup table, we can use the - * lookup table to compress the transaction. - * - * This will modify the accounts referred to in the transaction, so that where possible they - * refer to an index of an address lookup table instead of an address directly. This makes the - * transaction smaller when it is compiled, particularly if many addresses can use a lookup table. - */ - -// The only data from the lookup table we need is its addresses -type LookupTableData = { - addresses: Address[]; -}; - -// We fetch the JSON parsed representation of the lookup table from the RPC -const lookupTableAccount = await fetchJsonParsedAccount(rpc, LOOKUP_TABLE_ADDRESS); -assertAccountDecoded(lookupTableAccount); -assertAccountExists(lookupTableAccount); - -const transactionMessageWithLookupTables = compressTransactionMessageUsingAddressLookupTables(transactionMessage, { - [LOOKUP_TABLE_ADDRESS]: lookupTableAccount.data.addresses, -}); -log.info(`[setup] Compressed the transaction message using lookup table ${LOOKUP_TABLE_ADDRESS}`); - -/** - * SETUP: PARTIALLY SIGN THE TRANSACTION - * A Solana transaction can have multiple signers that must sign before it is sent to the network. - * In our case the fee payer and the source account would both need to sign the transaction - * We used a signer for the source account, so it will sign it when we call `signTransactionMessageWithSigners` - * But we only used an address for the fee payer, and we don't have its private key to sign the transaction - * So we will use `partiallySignTransactionMessageWithSigners` to get a transaction that has been signed by - * the source account, but not by the fee payer. - */ -const signedTransaction = await partiallySignTransactionMessageWithSigners(transactionMessageWithLookupTables); -log.info(`[setup] Partially signed the transaction with a signature from ${SOURCE_ACCOUNT_SIGNER.address}`); - -/** - * SETUP: ENCODE THE TRANSACTION AS BASE64 - * This is a common format to send a transaction between different systems - * If you wanted to convert it to a byte array instead, you could do this: - * - * ```ts - * const transactionEncoder = getTransactionEncoder(); - * const transactionBytes = transactionEncoder.encode(signedTransaction); - * ``` - */ -const base64EncodedTransaction = getBase64EncodedWireTransaction(signedTransaction); -log.info(`[setup] Encoded the transaction as base64: ${base64EncodedTransaction.slice(0, 64)}...`); - -/** - * SETUP COMPLETE - * At this point, imagine we've received `base64EncodedTransaction` as input and don't know anything about it - * Let's use web3js to decode and inspect it - */ - -/** - * STEP 1: DECODE TO TRANSACTION - * @solana/web3.js has encoders/decoders for many Solana data structures and common data formats, - * including both base64 strings and our `Transaction` data structure - * To convert between these, we first encode to a byte array, and then decode to the - * desired data structure. - * In our case we first encode the `base64EncodedTransaction` to a byte array, and then - * decode to a `Transaction`. - * If we had instead received a byte array `transactionBytes` then we would just skip - * the base64 encode step - */ -const base64Encoder = getBase64Encoder(); -const transactionBytes = base64Encoder.encode(base64EncodedTransaction); - -const transactionDecoder = getTransactionDecoder(); -const decodedTransaction = transactionDecoder.decode(transactionBytes); -log.info('[step 1] Decoded the transaction'); - -/** - * First let's inspect the signatures on our decoded transaction - * `signatures` is a map from `Address` to `SignatureBytes | null` - * If the address has signed the transaction then we can access their signature - * If not then `null` will be stored - */ - -for (const [address, maybeSignature] of Object.entries(decodedTransaction.signatures)) { - if (maybeSignature) { - log.info(`[step 1] ${address} has signed the transaction`); - } else { - log.info(`[step 1] ${address} is required to sign the transaction but hasn't yet`); - } -} - -// Now we know that we have a signature for `ED1WqT2hWJLSZtj4TtTdoovmpMrr7zpkUdbfxmcJR1Fq` -// Let's verify that it's correct -const signedByAddress = 'ED1WqT2hWJLSZtj4TtTdoovmpMrr7zpkUdbfxmcJR1Fq' as Address; -const signedBySignature = decodedTransaction.signatures[signedByAddress]!; -// We encode the source address to bytes -const sourceAddressBytes = getAddressEncoder().encode(signedByAddress); -// Then we create a public Ed25519 key with those bytes -// This is a SubtleCrypto CryptoKey object that we create with role `verify` -const signedByPublicKey = await crypto.subtle.importKey('raw', sourceAddressBytes, 'Ed25519', true, ['verify']); -// Now we can verify the signature using that key -const verifiedSignature = await verifySignature(signedByPublicKey, signedBySignature, decodedTransaction.messageBytes); -log.info( - `[step 1] The signature for ${signedByAddress} is ${verifiedSignature ? 'valid' : 'not valid'} for the transaction`, -); - -/** - * STEP 2: DECODE TO COMPILED TRANSACTION MESSAGE - * We verified the signature is valid for the `messageBytes` field of the Transaction. This is a byte array - * representing the compiled version of the `TransactionMessage`. If we decode this we can see some information - * about the transaction. Let's do that next. - */ - -// Again we have a decoder to convert from bytes to a Solana data structure, in this case the `CompiledTransactionMessage` -const compiledTransactionMessageDecoder = getCompiledTransactionMessageDecoder(); -const compiledTransactionMessage = compiledTransactionMessageDecoder.decode(decodedTransaction.messageBytes); - -// This gives us the data stucture `CompiledTransactionMessage`. This is the format that transactions are -// compiled to before the entire transaction is encoded to base64 to be sent to the Solana network. - -// Let's inspect some fields of `compiledTransactionMessage` -// We can see its version: -log.info(`[step 2] The transaction is version ${compiledTransactionMessage.version}`); - -// We can see the lifetime token, though we don't have enough context yet to know if it's a blockhash or a durable nonce -log.info( - `[step 2] We can see the transaction lifetime token, but we don't know if it's a blockhash or durable nonce: ${compiledTransactionMessage.lifetimeToken}`, -); - -// We can see the static accounts: -log.info(compiledTransactionMessage.staticAccounts, '[step 2] Static accounts of the transaction'); - -// Note that the destination address (F1Vc6AGoxXLwGB7QV8f4So3C5d8SXEk3KKGHxKGEJ8qn) is not here, as it comes from the lookup table - -// The `addressLookupTables` field is only included for non-legacy transactions -// Here we tell Typescript to narrow the type to exclude legacy transactions -if (compiledTransactionMessage.version === 'legacy') { - throw new Error('We used version: 0'); -} - -// Now we can view address lookup tables: -log.info(compiledTransactionMessage.addressTableLookups, '[step 2] Address lookup tables for the transaction'); - -// We see that the transaction uses our address lookup table. - -// Let's look at a compiled instruction -log.info( - { ...compiledTransactionMessage.instructions[0], data: '(removed for brevity)' }, - '[step 2] The first instruction of the compiled transaction message', -); - -/** - * This is the SOL transfer instruction - * The program account index is 2, which matches the system program (1111...) in our static accounts - * The first account index is 1, which matches the signer we used as the source address - * But the second account index is 4, which is outside our array of static accounts. - * We need to resolve the lookup table in order to know what address this actually is - */ - -/** - * STEP 3: DECOMPILING THE TRANSACTION MESSAGE - * Let's decompile the transaction message into a structure that is easier to inspect and parse - * To decompile this transaction message, we need to know the addresses in this lookup table - * If we already have the addresses in this lookup table fetched, then we can pass them to - * `decompileTransactionMessage` without fetching them again. Like so: - * - * ```ts - * const decompiledTransactionMessage = decompileTransactionMessage(compiledTransactionMessage, { - * addressesByLookupTableAddress: { - * [LOOKUP_TABLE_ADDRESS]: lookupTableAccount.data.addresses, - * }, - * }); - * ``` - * - * But let's pretend that we don't already have that data fetched, we've just received the - * transaction and need to decode it. We will use `decodeTransactionMessage` instead - * - * This will use the RPC to fetch the address lookup table data for us, and then use it to - * decompile the transaction message. - */ - -const decodedTransactionMessage = await decodeTransactionMessage(compiledTransactionMessage, rpc); - -// This is our `TransactionMessage` structure, which is much easier to understand and parse -// This is the same data structure that was created before we first signed the transaction - -// We can see the fee payer: -log.info(`[step 3] The transaction fee payer is ${decodedTransactionMessage.feePayer}`); - -// And the lifetime constraint: -log.info(decodedTransactionMessage.lifetimeConstraint, '[step 3] The transaction lifetime constraint'); - -/** - * Here we can see that the lifetime constraint is actually a blockhash - * The `decompileTransactionMessage` call inspects the transaction and can distinguish - * between blockhash and nonce for us - * We can also narrow this type with typescript - */ -if ('blockhash' in decodedTransactionMessage.lifetimeConstraint) { - log.info(`[step 3] The transaction blockhash is ${decodedTransactionMessage.lifetimeConstraint.blockhash}`); -} - -/** - * Note that the `lastValidBlockHeight` won't necessarily match that used when the transaction - * was first created. This is not encoded into the transaction, so we can't decode it back out - * By default `decodeTransactionMessage` and `decompileTransactionMessage` will fetch the current - * `lastValidBlockHeight` and use that - * But if you know the correct value, you can pass it like so: - * - * ```ts - * const decodedTransactionMessage = await decodeTransactionMessage(compiledTransactionMessage, rpc, { - * lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - * }) - * ``` - */ - -// We can also view the decompiled instructions here -log.info( - { ...decodedTransactionMessage.instructions[0], data: '(removed for brevity)' }, - '[step 3] The first decoded instruction', -); - -/** - * We can see the programAddress is `11111111111111111111111111111111` - * We no longer need to look this up in a list of accounts from an index - * - * We also see the address of each account - * For the second account, we have its address, as well as the lookup table it comes from - * Decompiling the transaction message unpacks all the lookup accounts for us - */ - -// We removed the data array for brevity when we logged the instructions, but let's take a look at it now -log.info(decodedTransactionMessage.instructions[0].data, '[step 3] The data bytes of the first instruction'); - -// This is opaque, it's just a byte array, but it encodes exactly what the instruction is actually doing -// Let's look next at how we can make sense of it - -/** - * STEP 4: PARSING THE INSTRUCTIONS - * To understand what is actually happening in each instruction, we need to decode the data field - * We will do this by using the generated `@solana-program/system` client, which can decode data - * from the @solana/web3.js instruction data structure for the System program - * We know from the program address (11111111111111111111111111111111) that the first instruction - * is to the system program - * You can generate such a client for any Solana program using Kinobi - * See https://github.com/kinobi-so/kinobi for more information on Kinobi - */ - -const firstInstruction = decodedTransactionMessage.instructions[0]; -// Narrow the type, the `identifySystemInstruction` requires data to identify an instruction -assertIsInstructionWithData(firstInstruction); -const identifiedInstruction = identifySystemInstruction(firstInstruction); - -// We can compare the `identifiedInstruction` to the enum values, like this -if (identifiedInstruction === SystemInstruction.TransferSol) { - log.info('[step 4] The first instruction calls the TransferSol instruction of the system program'); - // Narrow the type again, the instruction must have accounts to be parsed as a transfer SOL instruction - assertIsInstructionWithAccounts(firstInstruction); - const parsedFirstInstruction = parseTransferSolInstruction(firstInstruction); - log.info(parsedFirstInstruction, '[step 4] The parsed Transfer SOL instruction'); - - // This gives us an understanding of what exactly is happening in the instruction - // We can see the source address, the destination address, and the amount of lamports - const { accounts, data } = parsedFirstInstruction; - log.info( - `[step 4] In the first instruction, ${accounts.source.address} transfers ${data.amount.toLocaleString()} lamports to ${accounts.destination.address}`, - ); -} - -// Now let's do the same with the second instruction -const secondInstruction = decodedTransactionMessage.instructions[1]; -log.info(`[step 4] The second instruction calls the ${secondInstruction.programAddress} program`); - -// We know that the second instruction is to the memo program, but we can also programmatically check this -// Each generated client exposes its program address as a constant -if (secondInstruction.programAddress === MEMO_PROGRAM_ADDRESS) { - log.info(`[step 4] The second instruction calls the memo program`); -} - -// The memo program only has one instruction, so there is no `identify` function -// We know it's always an addMemo instruction - -assertIsInstructionWithData(secondInstruction); -const parsedSecondInstruction = parseAddMemoInstruction(secondInstruction); -log.info(parsedSecondInstruction, '[step 4] The parsed Add Memo instruction'); -log.info(`[step 4] The second instruction adds a memo with message "${parsedSecondInstruction.data.memo}"`); - -// We've now parsed both instructions, and we know exactly what the transaction does diff --git a/examples/deserialize-transaction/tsconfig.json b/examples/deserialize-transaction/tsconfig.json deleted file mode 100644 index 8253ef5c6d44..000000000000 --- a/examples/deserialize-transaction/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "compilerOptions": { - "module": "NodeNext", - "moduleResolution": "NodeNext", - "noEmit": true, - "target": "ESNext" - }, - "display": "@solana/example-deserialize-transaction", - "extends": "../../packages/tsconfig/base.json", - "include": ["src"] -} diff --git a/examples/react-app/.eslintrc.cjs b/examples/react-app/.eslintrc.cjs deleted file mode 100644 index 5b642ca092f9..000000000000 --- a/examples/react-app/.eslintrc.cjs +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: ['../../.eslintrc.js', '@solana/eslint-config-solana/react'], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { - project: './tsconfig.app.json', - }, - plugins: ['react-refresh'], - rules: { - 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], - }, -}; diff --git a/examples/react-app/.gitignore b/examples/react-app/.gitignore deleted file mode 100644 index a547bf36d8d1..000000000000 --- a/examples/react-app/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/examples/react-app/LICENSE b/examples/react-app/LICENSE deleted file mode 100644 index ec09953d3c23..000000000000 --- a/examples/react-app/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2023 Solana Labs, Inc - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/examples/react-app/README.md b/examples/react-app/README.md deleted file mode 100644 index 003e0a70af28..000000000000 --- a/examples/react-app/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# @solana/example-react-app - -This is an example of how to use `@solana/web3.js` and `@solana/react` to build a React web application. - -The latest version of this code is automatically deployed to https://solana-labs.github.io/solana-web3.js/example/ - -## Features - -- Connects to browser wallets that support the Wallet Standard; one or more at a time -- Fetches and subscribes to the balance of the selected wallet -- Allows you to sign an arbitrary message using a wallet account -- Allows you to make a transfer from the selected wallet to any other connected wallet - -## Developing - -Start a server in development mode. - -```shell -pnpm install -pnpm turbo compile:js compile:typedefs -pnpm dev -``` - -Press o + Enter to open the app in a browser. Edits to the source code will automatically reload the app. - -## Building for deployment - -Build a static bundle and HTML for deployment to a webserver. - -```shell -pnpm install -pnpm turbo build -``` - -The contents of the `dist/` directory can now be uploaded to a webserver. - -## Enabling Mainnet-Beta - -Access to this cluster is typically blocked by [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) rules, so it is disabled in the example app by default. To enable it, start the server or compile the application with the `REACT_EXAMPLE_APP_ENABLE_MAINNET` environment variable set to `"true"`. - -```shell -REACT_EXAMPLE_APP_ENABLE_MAINNET=true pnpm dev -REACT_EXAMPLE_APP_ENABLE_MAINNET=true pnpm build -``` diff --git a/examples/react-app/index.html b/examples/react-app/index.html deleted file mode 100644 index 5993061c2c52..000000000000 --- a/examples/react-app/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Solana React Example App - - -
- - - diff --git a/examples/react-app/package.json b/examples/react-app/package.json deleted file mode 100644 index 7018b776c2d4..000000000000 --- a/examples/react-app/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@solana/example-react-app", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "compile:js": "vite build", - "preview": "vite preview", - "style:fix": "pnpm eslint --fix src/* && pnpm prettier --log-level warn --ignore-unknown --write ./*", - "test:lint": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent --testMatch 'src/**/*.{ts,tsx}'", - "test:prettier": "TERM_OVERRIDE=\"${TURBO_HASH:+dumb}\" TERM=${TERM_OVERRIDE:-$TERM} jest -c ../../node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent", - "test:typecheck": "tsc" - }, - "dependencies": { - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/themes": "^3.0.5", - "@solana-program/system": "^0.4.0", - "@solana/react": "workspace:*", - "@solana/web3.js": "workspace:@solana/web3.js-experimental@*", - "@wallet-standard/core": "pre", - "@wallet-standard/react": "pre", - "react": "^18.3.0", - "react-dom": "^18.3.0", - "react-error-boundary": "^4.0.13", - "swr": "^2.2.5" - }, - "devDependencies": { - "@solana/wallet-standard-features": "^1.2.0", - "@types/react": "^18.3", - "@types/react-dom": "^18.3", - "@vitejs/plugin-react-swc": "^3.7.0", - "eslint-plugin-react-refresh": "^0.4.9", - "vite": "^5.3.5" - } -} diff --git a/examples/react-app/public/solanaLogoMark.svg b/examples/react-app/public/solanaLogoMark.svg deleted file mode 100644 index ed6f34d95f7e..000000000000 --- a/examples/react-app/public/solanaLogoMark.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/react-app/src/components/Balance.tsx b/examples/react-app/src/components/Balance.tsx deleted file mode 100644 index 16b615b43edb..000000000000 --- a/examples/react-app/src/components/Balance.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { Text, Tooltip } from '@radix-ui/themes'; -import { address } from '@solana/web3.js'; -import type { UiWalletAccount } from '@wallet-standard/react'; -import { useContext, useMemo } from 'react'; -import useSWRSubscription from 'swr/subscription'; - -import { ChainContext } from '../context/ChainContext'; -import { RpcContext } from '../context/RpcContext'; -import { getErrorMessage } from '../errors'; -import { balanceSubscribe } from '../functions/balance'; -import { ErrorDialog } from './ErrorDialog'; - -type Props = Readonly<{ - account: UiWalletAccount; -}>; - -const seenErrors = new WeakSet(); - -export function Balance({ account }: Props) { - const { chain } = useContext(ChainContext); - const { rpc, rpcSubscriptions } = useContext(RpcContext); - const subscribe = useMemo(() => balanceSubscribe.bind(null, rpc, rpcSubscriptions), [rpc, rpcSubscriptions]); - const { data: lamports, error } = useSWRSubscription({ address: address(account.address), chain }, subscribe); - if (error && !seenErrors.has(error)) { - return ( - <> - { - seenErrors.add(error); - }} - title="Failed to fetch account balance" - /> - - - - - - - ); - } else if (lamports == null) { - return ; - } else { - const formattedSolValue = new Intl.NumberFormat(undefined, { maximumFractionDigits: 5 }).format( - // @ts-expect-error This format string is 100% allowed now. - `${lamports}E-9`, - ); - return {`${formattedSolValue} \u25CE`}; - } -} diff --git a/examples/react-app/src/components/BaseSignMessageFeaturePanel.tsx b/examples/react-app/src/components/BaseSignMessageFeaturePanel.tsx deleted file mode 100644 index 3c324c1a15d6..000000000000 --- a/examples/react-app/src/components/BaseSignMessageFeaturePanel.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { Pencil1Icon } from '@radix-ui/react-icons'; -import { Blockquote, Box, Button, Code, DataList, Dialog, Flex, TextField } from '@radix-ui/themes'; -import { getBase64Decoder } from '@solana/web3.js'; -import type { ReadonlyUint8Array } from '@wallet-standard/core'; -import type { SyntheticEvent } from 'react'; -import { useRef, useState } from 'react'; - -import { ErrorDialog } from '../components/ErrorDialog'; - -type Props = Readonly<{ - signMessage(message: ReadonlyUint8Array): Promise; -}>; - -export function BaseSignMessageFeaturePanel({ signMessage }: Props) { - const { current: NO_ERROR } = useRef(Symbol()); - const [isSigningMessage, setIsSigningMessage] = useState(false); - const [error, setError] = useState(NO_ERROR); - const [lastSignature, setLastSignature] = useState(); - const [text, setText] = useState(); - return ( - -
{ - e.preventDefault(); - setError(NO_ERROR); - setIsSigningMessage(true); - try { - const signature = await signMessage(new TextEncoder().encode(text)); - setLastSignature(signature); - } catch (e) { - setLastSignature(undefined); - setError(e); - } finally { - setIsSigningMessage(false); - } - }} - > - - ) => setText(e.currentTarget.value)} - value={text} - > - - - - - - { - if (!open) { - setLastSignature(undefined); - } - }} - > - - - - {lastSignature ? ( - { - e.stopPropagation(); - }} - > - You Signed a Message! - - - Message - -
{text}
-
-
- - Signature - - {getBase64Decoder().decode(lastSignature)} - - -
- - - - - -
- ) : null} -
- {error !== NO_ERROR ? ( - setError(NO_ERROR)} title="Failed to sign message" /> - ) : null} - -
- ); -} diff --git a/examples/react-app/src/components/ConnectWalletMenu.tsx b/examples/react-app/src/components/ConnectWalletMenu.tsx deleted file mode 100644 index 038809feb248..000000000000 --- a/examples/react-app/src/components/ConnectWalletMenu.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { Button, Callout, DropdownMenu } from '@radix-ui/themes'; -import { StandardConnect, StandardDisconnect } from '@wallet-standard/core'; -import type { UiWallet } from '@wallet-standard/react'; -import { uiWalletAccountBelongsToUiWallet, useWallets } from '@wallet-standard/react'; -import { useContext, useRef, useState } from 'react'; -import { ErrorBoundary } from 'react-error-boundary'; - -import { SelectedWalletAccountContext } from '../context/SelectedWalletAccountContext'; -import { ConnectWalletMenuItem } from './ConnectWalletMenuItem'; -import { ErrorDialog } from './ErrorDialog'; -import { UnconnectableWalletMenuItem } from './UnconnectableWalletMenuItem'; -import { WalletAccountIcon } from './WalletAccountIcon'; - -type Props = Readonly<{ - children: React.ReactNode; -}>; - -export function ConnectWalletMenu({ children }: Props) { - const { current: NO_ERROR } = useRef(Symbol()); - const wallets = useWallets(); - const [selectedWalletAccount, setSelectedWalletAccount] = useContext(SelectedWalletAccountContext); - const [error, setError] = useState(NO_ERROR); - const [forceClose, setForceClose] = useState(false); - function renderItem(wallet: UiWallet) { - return ( - } - key={`wallet:${wallet.name}`} - > - { - setSelectedWalletAccount(account); - setForceClose(true); - }} - onDisconnect={wallet => { - if (selectedWalletAccount && uiWalletAccountBelongsToUiWallet(selectedWalletAccount, wallet)) { - setSelectedWalletAccount(undefined); - } - }} - onError={setError} - wallet={wallet} - /> - - ); - } - const walletsThatSupportStandardConnect = []; - const unconnectableWallets = []; - for (const wallet of wallets) { - if (wallet.features.includes(StandardConnect) && wallet.features.includes(StandardDisconnect)) { - walletsThatSupportStandardConnect.push(wallet); - } else { - unconnectableWallets.push(wallet); - } - } - return ( - <> - - - - - - {wallets.length === 0 ? ( - - - - - This browser has no wallets installed. - - ) : ( - <> - {walletsThatSupportStandardConnect.map(renderItem)} - {unconnectableWallets.length ? ( - <> - - {unconnectableWallets.map(renderItem)} - - ) : null} - - )} - - - {error !== NO_ERROR ? setError(NO_ERROR)} /> : null} - - ); -} diff --git a/examples/react-app/src/components/ConnectWalletMenuItem.tsx b/examples/react-app/src/components/ConnectWalletMenuItem.tsx deleted file mode 100644 index c2ab1cfed24d..000000000000 --- a/examples/react-app/src/components/ConnectWalletMenuItem.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; -import { DropdownMenu, ThickChevronRightIcon } from '@radix-ui/themes'; -import type { UiWallet, UiWalletAccount } from '@wallet-standard/react'; -import { uiWalletAccountsAreSame, useConnect, useDisconnect } from '@wallet-standard/react'; -import { useCallback, useContext } from 'react'; - -import { SelectedWalletAccountContext } from '../context/SelectedWalletAccountContext'; -import { WalletMenuItemContent } from './WalletMenuItemContent'; - -type Props = Readonly<{ - onAccountSelect(account: UiWalletAccount | undefined): void; - onDisconnect(wallet: UiWallet): void; - onError(err: unknown): void; - wallet: UiWallet; -}>; - -export function ConnectWalletMenuItem({ onAccountSelect, onDisconnect, onError, wallet }: Props) { - const [isConnecting, connect] = useConnect(wallet); - const [isDisconnecting, disconnect] = useDisconnect(wallet); - const isPending = isConnecting || isDisconnecting; - const isConnected = wallet.accounts.length > 0; - const [selectedWalletAccount] = useContext(SelectedWalletAccountContext); - const handleConnectClick = useCallback(async () => { - try { - const existingAccounts = [...wallet.accounts]; - const nextAccounts = await connect(); - // Try to choose the first never-before-seen account. - for (const nextAccount of nextAccounts) { - if (!existingAccounts.some(existingAccount => uiWalletAccountsAreSame(nextAccount, existingAccount))) { - onAccountSelect(nextAccount); - return; - } - } - // Failing that, choose the first account in the list. - if (nextAccounts[0]) { - onAccountSelect(nextAccounts[0]); - } - } catch (e) { - onError(e); - } - }, [connect, onAccountSelect, onError, wallet.accounts]); - return ( - - - - {isConnected ? ( -
- -
- ) : null} -
- - Accounts - - {wallet.accounts.map(account => ( - { - onAccountSelect(account); - }} - > - {account.address.slice(0, 8)}… - - ))} - - - { - e.preventDefault(); - await handleConnectClick(); - }} - > - Connect More - - { - e.preventDefault(); - try { - await disconnect(); - onDisconnect(wallet); - } catch (e) { - onError(e); - } - }} - > - Disconnect - - -
- ); -} diff --git a/examples/react-app/src/components/DisconnectButton.tsx b/examples/react-app/src/components/DisconnectButton.tsx deleted file mode 100644 index b01b33d05ef4..000000000000 --- a/examples/react-app/src/components/DisconnectButton.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { ExclamationTriangleIcon, ExitIcon } from '@radix-ui/react-icons'; -import { Button, Tooltip } from '@radix-ui/themes'; -import type { UiWallet } from '@wallet-standard/react'; -import { useDisconnect } from '@wallet-standard/react'; -import { useState } from 'react'; - -import { NO_ERROR } from '../errors'; - -type Props = Readonly<{ - wallet: UiWallet; -}>; - -export function DisconnectButton({ - wallet, - ...buttonProps -}: Omit, 'color' | 'loading' | 'onClick'> & Props) { - const [isDisconnecting, disconnect] = useDisconnect(wallet); - const [lastError, setLastError] = useState(NO_ERROR); - return ( - - Error:{' '} - {lastError && typeof lastError === 'object' && 'message' in lastError - ? lastError.message - : String(lastError)} - - } - open={lastError !== NO_ERROR} - side="left" - > - - - ); -} diff --git a/examples/react-app/src/components/ErrorDialog.tsx b/examples/react-app/src/components/ErrorDialog.tsx deleted file mode 100644 index 9fce582b8966..000000000000 --- a/examples/react-app/src/components/ErrorDialog.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { AlertDialog, Blockquote, Button, Flex } from '@radix-ui/themes'; -import { useState } from 'react'; - -import { getErrorMessage } from '../errors'; - -type Props = Readonly<{ - error: unknown; - onClose?(): false | void; - title?: string; -}>; - -export function ErrorDialog({ error, onClose, title }: Props) { - const [isOpen, setIsOpen] = useState(true); - return ( - { - if (!open) { - if (!onClose || onClose() !== false) { - setIsOpen(false); - } - } - }} - > - - {title ?? 'We encountered the following error'} - -
{getErrorMessage(error, 'Unknown')}
-
- - - - - -
-
- ); -} diff --git a/examples/react-app/src/components/FeatureNotSupportedCallout.tsx b/examples/react-app/src/components/FeatureNotSupportedCallout.tsx deleted file mode 100644 index 2a4bda067737..000000000000 --- a/examples/react-app/src/components/FeatureNotSupportedCallout.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { Callout } from '@radix-ui/themes'; -import React from 'react'; -import type { FallbackProps } from 'react-error-boundary'; - -import { getErrorMessage } from '../errors'; - -interface Props extends Callout.RootProps, FallbackProps {} - -export function FeatureNotSupportedCallout({ - error, - resetErrorBoundary: _, - ...rootProps -}: Props): React.ReactElement { - return ( - - - - - {getErrorMessage(error, 'This account does not support this feature')} - - ); -} diff --git a/examples/react-app/src/components/FeaturePanel.tsx b/examples/react-app/src/components/FeaturePanel.tsx deleted file mode 100644 index 9ccacc4ae950..000000000000 --- a/examples/react-app/src/components/FeaturePanel.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { DataList } from '@radix-ui/themes'; -import React from 'react'; - -type Props = Readonly<{ - children: React.ReactNode; - label: React.ReactNode; -}>; - -export function FeaturePanel({ children, label }: Props) { - return ( - - {label} - {children} - - ); -} diff --git a/examples/react-app/src/components/Nav.tsx b/examples/react-app/src/components/Nav.tsx deleted file mode 100644 index 0301e1e85f4d..000000000000 --- a/examples/react-app/src/components/Nav.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { Badge, Box, DropdownMenu, Flex, Heading } from '@radix-ui/themes'; -import { useContext } from 'react'; - -import { ChainContext } from '../context/ChainContext'; -import { ConnectWalletMenu } from './ConnectWalletMenu'; -import { SignInMenu } from './SignInMenu'; - -export function Nav() { - const { displayName: currentChainName, chain, setChain } = useContext(ChainContext); - const currentChainBadge = ( - - {currentChainName} - - ); - return ( - - - - - Solana React App{' '} - {setChain ? ( - - {currentChainBadge} - - { - setChain(value as 'solana:${string}'); - }} - value={chain} - > - {process.env.REACT_EXAMPLE_APP_ENABLE_MAINNET === 'true' ? ( - - Mainnet Beta - - ) : null} - Devnet - Testnet - - - - ) : ( - currentChainBadge - )} - - - Connect Wallet - Sign In - - - ); -} diff --git a/examples/react-app/src/components/SignInMenu.tsx b/examples/react-app/src/components/SignInMenu.tsx deleted file mode 100644 index f1fc8c063222..000000000000 --- a/examples/react-app/src/components/SignInMenu.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { Button, Callout, DropdownMenu } from '@radix-ui/themes'; -import { SolanaSignIn } from '@solana/wallet-standard-features'; -import type { UiWallet } from '@wallet-standard/react'; -import { useWallets } from '@wallet-standard/react'; -import { useContext, useRef, useState } from 'react'; -import { ErrorBoundary } from 'react-error-boundary'; - -import { SelectedWalletAccountContext } from '../context/SelectedWalletAccountContext'; -import { ErrorDialog } from './ErrorDialog'; -import { SignInMenuItem } from './SignInMenuItem'; -import { UnconnectableWalletMenuItem } from './UnconnectableWalletMenuItem'; - -type Props = Readonly<{ - children: React.ReactNode; -}>; - -export function SignInMenu({ children }: Props) { - const { current: NO_ERROR } = useRef(Symbol()); - const wallets = useWallets(); - const [_, setSelectedWalletAccount] = useContext(SelectedWalletAccountContext); - const [error, setError] = useState(NO_ERROR); - const [forceClose, setForceClose] = useState(false); - function renderItem(wallet: UiWallet) { - return ( - } - key={`wallet:${wallet.name}`} - > - { - setSelectedWalletAccount(account); - setForceClose(true); - }} - onError={setError} - wallet={wallet} - /> - - ); - } - const walletsThatSupportSignInWithSolana = []; - for (const wallet of wallets) { - if (wallet.features.includes(SolanaSignIn)) { - walletsThatSupportSignInWithSolana.push(wallet); - } - } - return ( - <> - - - - - - {walletsThatSupportSignInWithSolana.length === 0 ? ( - - - - - - This browser has no wallets installed that support{' '} - - Sign In With Solana - - . - - - ) : ( - walletsThatSupportSignInWithSolana.map(renderItem) - )} - - - {error !== NO_ERROR ? setError(NO_ERROR)} /> : null} - - ); -} diff --git a/examples/react-app/src/components/SignInMenuItem.tsx b/examples/react-app/src/components/SignInMenuItem.tsx deleted file mode 100644 index 886c5e63e464..000000000000 --- a/examples/react-app/src/components/SignInMenuItem.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { DropdownMenu } from '@radix-ui/themes'; -import { useSignIn } from '@solana/react'; -import type { UiWallet, UiWalletAccount } from '@wallet-standard/react'; -import React, { useCallback, useState } from 'react'; - -import { WalletMenuItemContent } from './WalletMenuItemContent'; - -type Props = Readonly<{ - onError(err: unknown): void; - onSignIn(account: UiWalletAccount | undefined): void; - wallet: UiWallet; -}>; - -export function SignInMenuItem({ onSignIn, onError, wallet }: Props) { - const signIn = useSignIn(wallet); - const [isSigningIn, setIsSigningIn] = useState(false); - const handleSignInClick = useCallback( - async (e: React.MouseEvent) => { - e.preventDefault(); - try { - setIsSigningIn(true); - try { - const { account } = await signIn({ - statement: 'You will enjoy being signed in.', - }); - onSignIn(account); - } finally { - setIsSigningIn(false); - } - } catch (e) { - onError(e); - } - }, - [signIn, onSignIn, onError], - ); - return ( - - - - ); -} diff --git a/examples/react-app/src/components/SolanaSignAndSendTransactionFeaturePanel.tsx b/examples/react-app/src/components/SolanaSignAndSendTransactionFeaturePanel.tsx deleted file mode 100644 index 8e208d4b4d7e..000000000000 --- a/examples/react-app/src/components/SolanaSignAndSendTransactionFeaturePanel.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import { Blockquote, Box, Button, Dialog, Flex, Link, Select, Text, TextField } from '@radix-ui/themes'; -import { useWalletAccountTransactionSendingSigner } from '@solana/react'; -import { - address, - appendTransactionMessageInstruction, - assertIsTransactionMessageWithSingleSendingSigner, - createTransactionMessage, - getBase58Decoder, - lamports, - pipe, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - signAndSendTransactionMessageWithSigners, -} from '@solana/web3.js'; -import { getTransferSolInstruction } from '@solana-program/system'; -import { getUiWalletAccountStorageKey, type UiWalletAccount, useWallets } from '@wallet-standard/react'; -import type { SyntheticEvent } from 'react'; -import { useContext, useId, useMemo, useRef, useState } from 'react'; -import { useSWRConfig } from 'swr'; - -import { ChainContext } from '../context/ChainContext'; -import { RpcContext } from '../context/RpcContext'; -import { ErrorDialog } from './ErrorDialog'; -import { WalletMenuItemContent } from './WalletMenuItemContent'; - -type Props = Readonly<{ - account: UiWalletAccount; -}>; - -function solStringToLamports(solQuantityString: string) { - if (Number.isNaN(parseFloat(solQuantityString))) { - throw new Error('Could not parse token quantity: ' + String(solQuantityString)); - } - const numDecimals = BigInt(solQuantityString.split('.')[1]?.length ?? 0); - const bigIntLamports = BigInt(solQuantityString.replace('.', '')) * 10n ** (9n - numDecimals); - return lamports(bigIntLamports); -} - -export function SolanaSignAndSendTransactionFeaturePanel({ account }: Props) { - const { mutate } = useSWRConfig(); - const { current: NO_ERROR } = useRef(Symbol()); - const { rpc } = useContext(RpcContext); - const wallets = useWallets(); - const [isSendingTransaction, setIsSendingTransaction] = useState(false); - const [error, setError] = useState(NO_ERROR); - const [lastSignature, setLastSignature] = useState(); - const [solQuantityString, setSolQuantityString] = useState(''); - const [recipientAccountStorageKey, setRecipientAccountStorageKey] = useState(); - const recipientAccount = useMemo(() => { - if (recipientAccountStorageKey) { - for (const wallet of wallets) { - for (const account of wallet.accounts) { - if (getUiWalletAccountStorageKey(account) === recipientAccountStorageKey) { - return account; - } - } - } - } - }, [recipientAccountStorageKey, wallets]); - const { chain: currentChain, solanaExplorerClusterName } = useContext(ChainContext); - const transactionSendingSigner = useWalletAccountTransactionSendingSigner(account, currentChain); - const lamportsInputId = useId(); - const recipientSelectId = useId(); - return ( - -
{ - e.preventDefault(); - setError(NO_ERROR); - setIsSendingTransaction(true); - try { - const amount = solStringToLamports(solQuantityString); - if (!recipientAccount) { - throw new Error('The address of the recipient could not be found'); - } - const { value: latestBlockhash } = await rpc - .getLatestBlockhash({ commitment: 'confirmed' }) - .send(); - const message = pipe( - createTransactionMessage({ version: 0 }), - m => setTransactionMessageFeePayerSigner(transactionSendingSigner, m), - m => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m), - m => - appendTransactionMessageInstruction( - getTransferSolInstruction({ - amount, - destination: address(recipientAccount.address), - source: transactionSendingSigner, - }), - m, - ), - ); - assertIsTransactionMessageWithSingleSendingSigner(message); - const signature = await signAndSendTransactionMessageWithSigners(message); - mutate({ address: transactionSendingSigner.address, chain: currentChain }); - mutate({ address: recipientAccount.address, chain: currentChain }); - setLastSignature(signature); - setSolQuantityString(''); - } catch (e) { - setLastSignature(undefined); - setError(e); - } finally { - setIsSendingTransaction(false); - } - }} - > - - - - ) => - setSolQuantityString(e.currentTarget.value) - } - style={{ width: 'auto' }} - type="number" - value={solQuantityString} - > - {'\u25ce'} - - - - - To Account - - - - - - {wallets.flatMap(wallet => - wallet.accounts - .filter(({ chains }) => chains.includes(currentChain)) - .map(account => { - const key = getUiWalletAccountStorageKey(account); - return ( - - - {account.address} - - - ); - }), - )} - - - - - { - if (!open) { - setLastSignature(undefined); - } - }} - > - - - - {lastSignature ? ( - { - e.stopPropagation(); - }} - > - You transferred tokens! - - Signature: -
{getBase58Decoder().decode(lastSignature)}
- - - View this transaction - {' '} - on Explorer - -
- - - - - -
- ) : null} -
- {error !== NO_ERROR ? ( - setError(NO_ERROR)} title="Transfer failed" /> - ) : null} - -
- ); -} diff --git a/examples/react-app/src/components/SolanaSignMessageFeaturePanel.tsx b/examples/react-app/src/components/SolanaSignMessageFeaturePanel.tsx deleted file mode 100644 index f074f92aef60..000000000000 --- a/examples/react-app/src/components/SolanaSignMessageFeaturePanel.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useWalletAccountMessageSigner } from '@solana/react'; -import type { Address } from '@solana/web3.js'; -import type { ReadonlyUint8Array } from '@wallet-standard/core'; -import type { UiWalletAccount } from '@wallet-standard/react'; -import { useCallback } from 'react'; - -import { BaseSignMessageFeaturePanel } from './BaseSignMessageFeaturePanel'; - -type Props = Readonly<{ - account: UiWalletAccount; -}>; - -export function SolanaSignMessageFeaturePanel({ account }: Props) { - const messageSigner = useWalletAccountMessageSigner(account); - const signMessage = useCallback( - async (message: ReadonlyUint8Array) => { - const [result] = await messageSigner.modifyAndSignMessages([ - { - content: message as Uint8Array, - signatures: {}, - }, - ]); - const signature = result?.signatures[account.address as Address]; - if (!signature) { - throw new Error(); - } - return signature as ReadonlyUint8Array; - }, - [account.address, messageSigner], - ); - return ; -} diff --git a/examples/react-app/src/components/UnconnectableWalletMenuItem.tsx b/examples/react-app/src/components/UnconnectableWalletMenuItem.tsx deleted file mode 100644 index 746ed24256c8..000000000000 --- a/examples/react-app/src/components/UnconnectableWalletMenuItem.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { Box, DropdownMenu, Text } from '@radix-ui/themes'; -import type { UiWallet } from '@wallet-standard/react'; -import { useState } from 'react'; - -import { ErrorDialog } from './ErrorDialog'; -import { WalletMenuItemContent } from './WalletMenuItemContent'; - -type Props = Readonly<{ - error: unknown; - wallet: UiWallet; -}>; - -export function UnconnectableWalletMenuItem({ error, wallet }: Props) { - const [dialogIsOpen, setDialogIsOpen] = useState(false); - return ( - <> - setDialogIsOpen(true)}> - - {wallet.name} - - - - - - {dialogIsOpen ? ( - setDialogIsOpen(false)} title="Unconnectable wallet" /> - ) : null} - - ); -} diff --git a/examples/react-app/src/components/WalletAccountIcon.tsx b/examples/react-app/src/components/WalletAccountIcon.tsx deleted file mode 100644 index d3f8e6952d3c..000000000000 --- a/examples/react-app/src/components/WalletAccountIcon.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import type { UiWalletAccount } from '@wallet-standard/react'; -import { uiWalletAccountBelongsToUiWallet,useWallets } from '@wallet-standard/react'; -import React from 'react'; - -type Props = React.ComponentProps<'img'> & - Readonly<{ - account: UiWalletAccount; - }>; - -export function WalletAccountIcon({ account, ...imgProps }: Props) { - const wallets = useWallets(); - let icon; - if (account.icon) { - icon = account.icon; - } else { - for (const wallet of wallets) { - if (uiWalletAccountBelongsToUiWallet(account, wallet)) { - icon = wallet.icon; - break; - } - } - } - return icon ? : null; -} diff --git a/examples/react-app/src/components/WalletMenuItemContent.tsx b/examples/react-app/src/components/WalletMenuItemContent.tsx deleted file mode 100644 index 3cb0d475d5e9..000000000000 --- a/examples/react-app/src/components/WalletMenuItemContent.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Avatar, Flex, Spinner, Text } from '@radix-ui/themes'; -import type { UiWallet } from '@wallet-standard/react'; -import React from 'react'; - -type Props = Readonly<{ - children?: React.ReactNode; - loading?: boolean; - wallet: UiWallet; -}>; - -export function WalletMenuItemContent({ children, loading, wallet }: Props) { - return ( - - - {wallet.name.slice(0, 1)}} - radius="none" - src={wallet.icon} - style={{ height: 18, width: 18 }} - /> - - {children ?? wallet.name} - - ); -} diff --git a/examples/react-app/src/context/ChainContext.tsx b/examples/react-app/src/context/ChainContext.tsx deleted file mode 100644 index ddb1ba9cbdd4..000000000000 --- a/examples/react-app/src/context/ChainContext.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import type { ClusterUrl } from '@solana/web3.js'; -import { devnet, mainnet, testnet } from '@solana/web3.js'; -import React, { createContext, useMemo, useState } from 'react'; - -import { localStorage } from '../storage'; - -const STORAGE_KEY = 'solana-example-react-app:selected-chain'; - -type Context = Readonly<{ - chain: `solana:${string}`; - displayName: string; - setChain?(chain: 'solana:${string}'): void; - solanaExplorerClusterName: 'devnet' | 'mainnet-beta' | 'testnet'; - solanaRpcSubscriptionsUrl: ClusterUrl; - solanaRpcUrl: ClusterUrl; -}>; - -const DEFAULT_CHAIN_CONFIG = Object.freeze({ - chain: 'solana:devnet', - displayName: 'Devnet', - solanaExplorerClusterName: 'devnet', - solanaRpcSubscriptionsUrl: devnet('wss://api.devnet.solana.com'), - solanaRpcUrl: devnet('https://api.devnet.solana.com'), -}); - -export const ChainContext = createContext(DEFAULT_CHAIN_CONFIG); - -export function ChainContextProvider({ children }: { children: React.ReactNode }) { - const [chain, setChain] = useState(() => localStorage.getItem(STORAGE_KEY) ?? 'solana:devnet'); - const contextValue = useMemo(() => { - switch (chain) { - // @ts-expect-error Intentional fall through - case 'solana:mainnet': - if (process.env.REACT_EXAMPLE_APP_ENABLE_MAINNET === 'true') { - return { - chain: 'solana:mainnet', - displayName: 'Mainnet Beta', - solanaExplorerClusterName: 'mainnet-beta', - solanaRpcSubscriptionsUrl: mainnet('wss://api.mainnet-beta.solana.com'), - solanaRpcUrl: mainnet('https://api.mainnet-beta.solana.com'), - }; - } - // falls through - case 'solana:testnet': - return { - chain: 'solana:testnet', - displayName: 'Testnet', - solanaExplorerClusterName: 'testnet', - solanaRpcSubscriptionsUrl: testnet('wss://api.testnet.solana.com'), - solanaRpcUrl: testnet('https://api.testnet.solana.com'), - }; - case 'solana:devnet': - default: - if (chain !== 'solana:devnet') { - localStorage.removeItem(STORAGE_KEY); - console.error(`Unrecognized chain \`${chain}\``); - } - return DEFAULT_CHAIN_CONFIG; - } - }, [chain]); - return ( - ({ - ...contextValue, - setChain(chain) { - localStorage.setItem(STORAGE_KEY, chain); - setChain(chain); - }, - }), - [contextValue], - )} - > - {children} - - ); -} diff --git a/examples/react-app/src/context/RpcContext.tsx b/examples/react-app/src/context/RpcContext.tsx deleted file mode 100644 index dec8c44b9dbd..000000000000 --- a/examples/react-app/src/context/RpcContext.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import type { Rpc, RpcSubscriptions, SolanaRpcApiMainnet, SolanaRpcSubscriptionsApi } from '@solana/web3.js'; -import { createSolanaRpc, createSolanaRpcSubscriptions, devnet } from '@solana/web3.js'; -import type { ReactNode } from 'react'; -import { createContext, useContext, useMemo } from 'react'; - -import { ChainContext } from './ChainContext'; - -export const RpcContext = createContext<{ - rpc: Rpc; // Limit the API to only those methods found on Mainnet (ie. not `requestAirdrop`) - rpcSubscriptions: RpcSubscriptions; -}>({ - rpc: createSolanaRpc(devnet('https://api.devnet.solana.com')), - rpcSubscriptions: createSolanaRpcSubscriptions(devnet('wss://api.devnet.solana.com')), -}); - -type Props = Readonly<{ - children: ReactNode; -}>; - -export function RpcContextProvider({ children }: Props) { - const { solanaRpcSubscriptionsUrl, solanaRpcUrl } = useContext(ChainContext); - return ( - ({ - rpc: createSolanaRpc(solanaRpcUrl), - rpcSubscriptions: createSolanaRpcSubscriptions(solanaRpcSubscriptionsUrl), - }), - [solanaRpcSubscriptionsUrl, solanaRpcUrl], - )} - > - {children} - - ); -} diff --git a/examples/react-app/src/context/SelectedWalletAccountContext.tsx b/examples/react-app/src/context/SelectedWalletAccountContext.tsx deleted file mode 100644 index de021271ecfb..000000000000 --- a/examples/react-app/src/context/SelectedWalletAccountContext.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import type { UiWallet, UiWalletAccount } from '@wallet-standard/react'; -import { - getUiWalletAccountStorageKey, - uiWalletAccountBelongsToUiWallet, - uiWalletAccountsAreSame, - useWallets, -} from '@wallet-standard/react'; -import { createContext, useEffect, useMemo, useState } from 'react'; - -import { localStorage } from '../storage'; - -type State = UiWalletAccount | undefined; - -const STORAGE_KEY = 'solana-wallet-standard-example-react:selected-wallet-and-address'; - -export const SelectedWalletAccountContext = createContext< - readonly [selectedWalletAccount: State, setSelectedWalletAccount: React.Dispatch>] ->([ - undefined /* selectedWalletAccount */, - function setSelectedWalletAccount() { - /* empty */ - }, -]); - -let wasSetterInvoked = false; -function getSavedWalletAccount(wallets: readonly UiWallet[]): UiWalletAccount | undefined { - if (wasSetterInvoked) { - // After the user makes an explicit choice of wallet, stop trying to auto-select the - // saved wallet, if and when it appears. - return; - } - const savedWalletNameAndAddress = localStorage.getItem(STORAGE_KEY); - if (!savedWalletNameAndAddress || typeof savedWalletNameAndAddress !== 'string') { - return; - } - const [savedWalletName, savedAccountAddress] = savedWalletNameAndAddress.split(':'); - if (!savedWalletName || !savedAccountAddress) { - return; - } - for (const wallet of wallets) { - if (wallet.name === savedWalletName) { - for (const account of wallet.accounts) { - if (account.address === savedAccountAddress) { - return account; - } - } - } - } -} - -/** - * Saves the selected wallet account's storage key to the browser's local storage. In future - * sessions it will try to return that same wallet account, or at least one from the same brand of - * wallet if the wallet from which it came is still in the Wallet Standard registry. - */ -export function SelectedWalletAccountContextProvider({ children }: { children: React.ReactNode }) { - const wallets = useWallets(); - const [selectedWalletAccount, setSelectedWalletAccountInternal] = useState(() => - getSavedWalletAccount(wallets), - ); - const setSelectedWalletAccount: React.Dispatch> = setStateAction => { - setSelectedWalletAccountInternal(prevSelectedWalletAccount => { - wasSetterInvoked = true; - const nextWalletAccount = - typeof setStateAction === 'function' ? setStateAction(prevSelectedWalletAccount) : setStateAction; - const accountKey = nextWalletAccount ? getUiWalletAccountStorageKey(nextWalletAccount) : undefined; - if (accountKey) { - localStorage.setItem(STORAGE_KEY, accountKey); - } else { - localStorage.removeItem(STORAGE_KEY); - } - return nextWalletAccount; - }); - }; - useEffect(() => { - const savedWalletAccount = getSavedWalletAccount(wallets); - if (savedWalletAccount) { - setSelectedWalletAccountInternal(savedWalletAccount); - } - }, [wallets]); - const walletAccount = useMemo(() => { - if (selectedWalletAccount) { - for (const uiWallet of wallets) { - for (const uiWalletAccount of uiWallet.accounts) { - if (uiWalletAccountsAreSame(selectedWalletAccount, uiWalletAccount)) { - return uiWalletAccount; - } - } - if (uiWalletAccountBelongsToUiWallet(selectedWalletAccount, uiWallet) && uiWallet.accounts[0]) { - // If the selected account belongs to this connected wallet, at least, then - // select one of its accounts. - return uiWallet.accounts[0]; - } - } - } - }, [selectedWalletAccount, wallets]); - useEffect(() => { - // If there is a selected wallet account but the wallet to which it belongs has since - // disconnected, clear the selected wallet. - if (selectedWalletAccount && !walletAccount) { - setSelectedWalletAccountInternal(undefined); - } - }, [selectedWalletAccount, walletAccount]); - return ( - [walletAccount, setSelectedWalletAccount], [walletAccount])} - > - {children} - - ); -} diff --git a/examples/react-app/src/errors.tsx b/examples/react-app/src/errors.tsx deleted file mode 100644 index fe2d6e059577..000000000000 --- a/examples/react-app/src/errors.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { Code, Flex, Text } from '@radix-ui/themes'; -import { - isWalletStandardError, - WALLET_STANDARD_ERROR__FEATURES__WALLET_ACCOUNT_CHAIN_UNSUPPORTED, - WALLET_STANDARD_ERROR__FEATURES__WALLET_ACCOUNT_FEATURE_UNIMPLEMENTED, - WALLET_STANDARD_ERROR__FEATURES__WALLET_FEATURE_UNIMPLEMENTED, -} from '@wallet-standard/core'; -import React from 'react'; - -export const NO_ERROR = Symbol(); - -export function getErrorMessage(err: unknown, fallbackMessage: React.ReactNode): React.ReactNode { - if (isWalletStandardError(err, WALLET_STANDARD_ERROR__FEATURES__WALLET_ACCOUNT_FEATURE_UNIMPLEMENTED)) { - return ( - <> - This account does not support the {err.context.featureName} feature - - ); - } else if (isWalletStandardError(err, WALLET_STANDARD_ERROR__FEATURES__WALLET_FEATURE_UNIMPLEMENTED)) { - return ( - - - The wallet '{err.context.walletName}' ( - {err.context.supportedChains.sort().map((chain, ii, { length }) => ( - - {chain} - {ii === length - 1 ? null : ', '} - - ))} - ) does not support the {err.context.featureName} feature. - - - Features supported: -
    - {err.context.supportedFeatures.sort().map(featureName => ( -
  • - {featureName} -
  • - ))} -
-
-
- ); - } else if (isWalletStandardError(err, WALLET_STANDARD_ERROR__FEATURES__WALLET_ACCOUNT_CHAIN_UNSUPPORTED)) { - return ( - - - This account does not support the chain {err.context.chain}. - - - Chains supported: -
    - {err.context.supportedChains.sort().map(chain => ( -
  • - {chain} -
  • - ))} -
-
-
- ); - } else if (err && typeof err === 'object' && 'message' in err) { - return String(err.message); - } - return fallbackMessage; -} diff --git a/examples/react-app/src/functions/balance.ts b/examples/react-app/src/functions/balance.ts deleted file mode 100644 index cc7ffe6c44c5..000000000000 --- a/examples/react-app/src/functions/balance.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - AccountNotificationsApi, - Address, - GetBalanceApi, - LamportsUnsafeBeyond2Pow53Minus1, - Rpc, - RpcSubscriptions, -} from '@solana/web3.js'; -import { SWRSubscription } from 'swr/subscription'; - -const EXPLICIT_ABORT_TOKEN = Symbol(); - -/** - * This is an example of a strategy to fetch some account data and to keep it up to date over time. - * It's implemented as an SWR subscription function (https://swr.vercel.app/docs/subscription) but - * the approach is generalizable. - * - * 1. Fetch the current account state and publish it to the consumer - * 2. Subscribe to account data notifications and publish them to the consumer - * - * At all points in time, check that the update you received -- no matter from where -- is from a - * higher slot (ie. is newer) than the last one you published to the consumer. - */ -export function balanceSubscribe( - rpc: Rpc, - rpcSubscriptions: RpcSubscriptions, - ...subscriptionArgs: Parameters> -) { - const [{ address }, { next }] = subscriptionArgs; - const abortController = new AbortController(); - // Keep track of the slot of the last-published update. - let lastUpdateSlot = -1n; - // Fetch the current balance of this account. - rpc.getBalance(address, { commitment: 'confirmed' }) - .send({ abortSignal: abortController.signal }) - .then(({ context: { slot }, value: lamports }) => { - if (slot < lastUpdateSlot) { - // The last-published update (ie. from the subscription) is newer than this one. - return; - } - lastUpdateSlot = slot; - next(null /* err */, lamports /* data */); - }) - .catch(e => { - if (e !== EXPLICIT_ABORT_TOKEN) { - next(e /* err */); - } - }); - // Subscribe for updates to that balance. - rpcSubscriptions - .accountNotifications(address) - .subscribe({ abortSignal: abortController.signal }) - .then(async accountInfoNotifications => { - try { - for await (const { - context: { slot }, - value: { lamports }, - } of accountInfoNotifications) { - if (slot < lastUpdateSlot) { - // The last-published update (ie. from the initial fetch) is newer than this - // one. - continue; - } - lastUpdateSlot = slot; - next(null /* err */, lamports /* data */); - } - } catch (e) { - next(e /* err */); - } - }) - .catch(e => { - if (e !== EXPLICIT_ABORT_TOKEN) { - next(e /* err */); - } - }); - // Return a cleanup callback that aborts the RPC call/subscription. - return () => { - abortController.abort(EXPLICIT_ABORT_TOKEN); - }; -} diff --git a/examples/react-app/src/hooks/useStable.ts b/examples/react-app/src/hooks/useStable.ts deleted file mode 100644 index 9b905e0f57a5..000000000000 --- a/examples/react-app/src/hooks/useStable.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { useRef } from 'react'; - -const UNRESOLVED = Symbol(); - -export function useStable(getValue: () => T): T { - const ref = useRef(UNRESOLVED); - if (ref.current === UNRESOLVED) { - ref.current = getValue(); - } - return ref.current; -} diff --git a/examples/react-app/src/index.css b/examples/react-app/src/index.css deleted file mode 100644 index 7d94e52fafeb..000000000000 --- a/examples/react-app/src/index.css +++ /dev/null @@ -1 +0,0 @@ -@import './reset.css'; diff --git a/examples/react-app/src/main.tsx b/examples/react-app/src/main.tsx deleted file mode 100644 index f160bad144f7..000000000000 --- a/examples/react-app/src/main.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import './index.css'; -import '@radix-ui/themes/styles.css'; - -import { Flex, Section, Theme } from '@radix-ui/themes'; -import { StrictMode } from 'react'; -import { createRoot } from 'react-dom/client'; - -import { Nav } from './components/Nav.tsx'; -import { ChainContextProvider } from './context/ChainContext.tsx'; -import { RpcContextProvider } from './context/RpcContext.tsx'; -import { SelectedWalletAccountContextProvider } from './context/SelectedWalletAccountContext.tsx'; -import Root from './routes/root.tsx'; - -const rootNode = document.getElementById('root')!; -const root = createRoot(rootNode); -root.render( - - - - - - -