From 630683bb81614f13bd0415574e702990ebe3b87c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:19:12 -0800 Subject: [PATCH] Version Packages (#3531) Co-authored-by: github-actions[bot] --- .changeset/beige-files-travel.md | 6 - .changeset/brave-chicken-own.md | 5 - .changeset/breezy-items-reflect.md | 5 - .changeset/bright-snakes-search.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/clever-ties-fix.md | 5 - .changeset/cool-bears-taste.md | 22 -- .changeset/curly-kids-type.md | 5 - .changeset/curvy-stingrays-attend.md | 11 - .changeset/dry-glasses-roll.md | 5 - .changeset/early-eyes-mix.md | 5 - .changeset/fair-brooms-build.md | 5 - .changeset/fair-moles-collect.md | 5 - .changeset/famous-buttons-switch.md | 17 -- .changeset/fast-cars-knock.md | 5 - .changeset/five-sloths-greet.md | 5 - .changeset/flat-ways-love.md | 5 - .changeset/forty-bananas-bow.md | 5 - .changeset/forty-queens-explode.md | 5 - .changeset/forty-ravens-train.md | 5 - .changeset/funny-weeks-smash.md | 7 - .changeset/fuzzy-lizards-end.md | 40 --- .changeset/giant-coins-complain.md | 7 - .changeset/giant-seals-mix.md | 6 - .changeset/gorgeous-foxes-type.md | 8 - .changeset/gorgeous-gorillas-sniff.md | 16 - .changeset/green-eels-applaud.md | 8 - .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/late-ravens-cross.md | 5 - .changeset/lazy-phones-fail.md | 39 --- .changeset/light-bugs-compare.md | 5 - .changeset/light-owls-own.md | 5 - .changeset/little-berries-applaud.md | 5 - .changeset/little-zebras-guess.md | 5 - .changeset/loud-hotels-prove.md | 6 - .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/metal-spoons-matter.md | 8 - .changeset/nasty-buckets-hear.md | 43 --- .changeset/neat-cows-shop.md | 5 - .changeset/nervous-deers-roll.md | 17 -- .changeset/nine-owls-roll.md | 11 - .changeset/nine-pots-notice.md | 5 - .changeset/odd-beds-punch.md | 8 - .changeset/olive-shrimps-lick.md | 5 - .changeset/orange-squids-think.md | 5 - .changeset/plenty-eyes-kick.md | 5 - .changeset/plenty-plums-drop.md | 6 - .changeset/poor-dogs-crash.md | 5 - .changeset/popular-buttons-repair.md | 6 - .changeset/pre.json | 171 ----------- .changeset/pretty-rocks-argue.md | 22 -- .changeset/pretty-worms-taste.md | 5 - .changeset/proud-poems-try.md | 5 - .changeset/purple-forks-rest.md | 5 - .changeset/quiet-hornets-look.md | 5 - .changeset/rare-goats-sell.md | 5 - .changeset/red-moose-flash.md | 5 - .changeset/rich-eggs-tease.md | 10 - .changeset/rotten-sloths-raise.md | 5 - .changeset/shaggy-seas-end.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/silent-cooks-marry.md | 5 - .changeset/silly-months-happen.md | 21 -- .changeset/silly-wombats-switch.md | 7 - .changeset/silver-otters-doubt.md | 5 - .changeset/six-olives-hang.md | 5 - .changeset/sixty-dodos-smile.md | 12 - .changeset/sixty-months-relate.md | 5 - .changeset/slow-dragons-add.md | 5 - .changeset/small-cougars-smoke.md | 5 - .changeset/sour-mugs-press.md | 5 - .changeset/stale-turtles-hang.md | 6 - .changeset/strange-oranges-hang.md | 5 - .changeset/strong-pandas-marry.md | 7 - .changeset/stupid-tomatoes-reflect.md | 8 - .changeset/sweet-cobras-explode.md | 5 - .changeset/swift-clocks-occur.md | 5 - .changeset/tasty-cups-think.md | 7 - .changeset/ten-buckets-search.md | 5 - .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/tricky-walls-doubt.md | 5 - .changeset/two-cougars-try.md | 5 - .changeset/unlucky-jars-travel.md | 42 --- .changeset/unlucky-pumpkins-itch.md | 5 - .changeset/violet-brooms-report.md | 15 - .changeset/violet-eggs-whisper.md | 5 - .changeset/warm-dolls-yell.md | 5 - .changeset/warm-lizards-report.md | 5 - .changeset/warm-pears-sip.md | 5 - .changeset/weak-peaches-fly.md | 5 - .changeset/wet-colts-exist.md | 7 - .changeset/wicked-cougars-matter.md | 5 - .changeset/wicked-toys-hear.md | 14 - .changeset/wild-beers-hang.md | 12 - .changeset/wild-lobsters-kick.md | 7 - packages/accounts/CHANGELOG.md | 20 ++ packages/accounts/package.json | 2 +- packages/addresses/CHANGELOG.md | 43 +++ packages/addresses/package.json | 2 +- packages/assertions/CHANGELOG.md | 19 ++ packages/assertions/package.json | 2 +- packages/codecs-core/CHANGELOG.md | 63 ++++ packages/codecs-core/package.json | 2 +- packages/codecs-data-structures/CHANGELOG.md | 285 ++++++++++++++++++ packages/codecs-data-structures/package.json | 2 +- packages/codecs-numbers/CHANGELOG.md | 28 ++ packages/codecs-numbers/package.json | 2 +- packages/codecs-strings/CHANGELOG.md | 51 ++++ packages/codecs-strings/package.json | 2 +- packages/codecs/CHANGELOG.md | 55 ++++ packages/codecs/package.json | 2 +- packages/compat/CHANGELOG.md | 17 ++ packages/compat/package.json | 2 +- packages/errors/CHANGELOG.md | 138 +++++++++ packages/errors/package.json | 2 +- packages/fast-stable-stringify/CHANGELOG.md | 12 + packages/fast-stable-stringify/package.json | 2 +- packages/functional/CHANGELOG.md | 10 + packages/functional/package.json | 2 +- packages/instructions/CHANGELOG.md | 13 + packages/instructions/package.json | 2 +- packages/keys/CHANGELOG.md | 43 +++ packages/keys/package.json | 2 +- packages/library/CHANGELOG.md | 116 +++++++ packages/library/package.json | 2 +- packages/options/CHANGELOG.md | 98 ++++++ packages/options/package.json | 2 +- packages/programs/CHANGELOG.md | 20 ++ packages/programs/package.json | 2 +- packages/promises/CHANGELOG.md | 12 + packages/promises/package.json | 2 +- packages/react/CHANGELOG.md | 59 ++++ packages/react/package.json | 2 +- packages/rpc-api/CHANGELOG.md | 51 ++++ packages/rpc-api/package.json | 2 +- packages/rpc-graphql/CHANGELOG.md | 20 ++ packages/rpc-graphql/package.json | 2 +- packages/rpc-parsed-types/CHANGELOG.md | 12 + packages/rpc-parsed-types/package.json | 2 +- packages/rpc-spec-types/CHANGELOG.md | 30 ++ packages/rpc-spec-types/package.json | 2 +- packages/rpc-spec/CHANGELOG.md | 65 ++++ packages/rpc-spec/package.json | 2 +- packages/rpc-subscriptions-api/CHANGELOG.md | 45 +++ packages/rpc-subscriptions-api/package.json | 2 +- .../CHANGELOG.md | 24 ++ .../package.json | 2 +- packages/rpc-subscriptions-spec/CHANGELOG.md | 46 +++ packages/rpc-subscriptions-spec/package.json | 2 +- packages/rpc-subscriptions/CHANGELOG.md | 57 ++++ packages/rpc-subscriptions/package.json | 2 +- packages/rpc-transformers/CHANGELOG.md | 46 +++ packages/rpc-transformers/package.json | 2 +- packages/rpc-transport-http/CHANGELOG.md | 35 +++ packages/rpc-transport-http/package.json | 2 +- packages/rpc-types/CHANGELOG.md | 48 +++ packages/rpc-types/package.json | 2 +- packages/rpc/CHANGELOG.md | 47 +++ packages/rpc/package.json | 2 +- packages/signers/CHANGELOG.md | 33 ++ packages/signers/package.json | 2 +- packages/subscribable/CHANGELOG.md | 11 + packages/subscribable/package.json | 2 +- packages/sysvars/CHANGELOG.md | 18 ++ packages/sysvars/package.json | 2 +- .../transaction-confirmation/CHANGELOG.md | 30 ++ .../transaction-confirmation/package.json | 2 +- packages/transaction-messages/CHANGELOG.md | 34 +++ packages/transaction-messages/package.json | 2 +- packages/transactions/CHANGELOG.md | 68 +++++ packages/transactions/package.json | 2 +- .../webcrypto-ed25519-polyfill/CHANGELOG.md | 16 + .../webcrypto-ed25519-polyfill/package.json | 2 +- 196 files changed, 1877 insertions(+), 1379 deletions(-) delete mode 100644 .changeset/beige-files-travel.md delete mode 100644 .changeset/brave-chicken-own.md delete mode 100644 .changeset/breezy-items-reflect.md delete mode 100644 .changeset/bright-snakes-search.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/clever-ties-fix.md delete mode 100644 .changeset/cool-bears-taste.md delete mode 100644 .changeset/curly-kids-type.md delete mode 100644 .changeset/curvy-stingrays-attend.md delete mode 100644 .changeset/dry-glasses-roll.md delete mode 100644 .changeset/early-eyes-mix.md delete mode 100644 .changeset/fair-brooms-build.md delete mode 100644 .changeset/fair-moles-collect.md delete mode 100644 .changeset/famous-buttons-switch.md delete mode 100644 .changeset/fast-cars-knock.md delete mode 100644 .changeset/five-sloths-greet.md delete mode 100644 .changeset/flat-ways-love.md delete mode 100644 .changeset/forty-bananas-bow.md delete mode 100644 .changeset/forty-queens-explode.md delete mode 100644 .changeset/forty-ravens-train.md delete mode 100644 .changeset/funny-weeks-smash.md delete mode 100644 .changeset/fuzzy-lizards-end.md delete mode 100644 .changeset/giant-coins-complain.md delete mode 100644 .changeset/giant-seals-mix.md delete mode 100644 .changeset/gorgeous-foxes-type.md delete mode 100644 .changeset/gorgeous-gorillas-sniff.md delete mode 100644 .changeset/green-eels-applaud.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/late-ravens-cross.md delete mode 100644 .changeset/lazy-phones-fail.md delete mode 100644 .changeset/light-bugs-compare.md delete mode 100644 .changeset/light-owls-own.md delete mode 100644 .changeset/little-berries-applaud.md delete mode 100644 .changeset/little-zebras-guess.md delete mode 100644 .changeset/loud-hotels-prove.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/metal-spoons-matter.md delete mode 100644 .changeset/nasty-buckets-hear.md delete mode 100644 .changeset/neat-cows-shop.md delete mode 100644 .changeset/nervous-deers-roll.md delete mode 100644 .changeset/nine-owls-roll.md delete mode 100644 .changeset/nine-pots-notice.md delete mode 100644 .changeset/odd-beds-punch.md delete mode 100644 .changeset/olive-shrimps-lick.md delete mode 100644 .changeset/orange-squids-think.md delete mode 100644 .changeset/plenty-eyes-kick.md delete mode 100644 .changeset/plenty-plums-drop.md delete mode 100644 .changeset/poor-dogs-crash.md delete mode 100644 .changeset/popular-buttons-repair.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/pretty-rocks-argue.md delete mode 100644 .changeset/pretty-worms-taste.md delete mode 100644 .changeset/proud-poems-try.md delete mode 100644 .changeset/purple-forks-rest.md delete mode 100644 .changeset/quiet-hornets-look.md delete mode 100644 .changeset/rare-goats-sell.md delete mode 100644 .changeset/red-moose-flash.md delete mode 100644 .changeset/rich-eggs-tease.md delete mode 100644 .changeset/rotten-sloths-raise.md delete mode 100644 .changeset/shaggy-seas-end.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/silent-cooks-marry.md delete mode 100644 .changeset/silly-months-happen.md delete mode 100644 .changeset/silly-wombats-switch.md delete mode 100644 .changeset/silver-otters-doubt.md delete mode 100644 .changeset/six-olives-hang.md delete mode 100644 .changeset/sixty-dodos-smile.md delete mode 100644 .changeset/sixty-months-relate.md delete mode 100644 .changeset/slow-dragons-add.md delete mode 100644 .changeset/small-cougars-smoke.md delete mode 100644 .changeset/sour-mugs-press.md delete mode 100644 .changeset/stale-turtles-hang.md delete mode 100644 .changeset/strange-oranges-hang.md delete mode 100644 .changeset/strong-pandas-marry.md delete mode 100644 .changeset/stupid-tomatoes-reflect.md delete mode 100644 .changeset/sweet-cobras-explode.md delete mode 100644 .changeset/swift-clocks-occur.md delete mode 100644 .changeset/tasty-cups-think.md delete mode 100644 .changeset/ten-buckets-search.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/tricky-walls-doubt.md delete mode 100644 .changeset/two-cougars-try.md delete mode 100644 .changeset/unlucky-jars-travel.md delete mode 100644 .changeset/unlucky-pumpkins-itch.md delete mode 100644 .changeset/violet-brooms-report.md delete mode 100644 .changeset/violet-eggs-whisper.md delete mode 100644 .changeset/warm-dolls-yell.md delete mode 100644 .changeset/warm-lizards-report.md delete mode 100644 .changeset/warm-pears-sip.md delete mode 100644 .changeset/weak-peaches-fly.md delete mode 100644 .changeset/wet-colts-exist.md delete mode 100644 .changeset/wicked-cougars-matter.md delete mode 100644 .changeset/wicked-toys-hear.md delete mode 100644 .changeset/wild-beers-hang.md delete mode 100644 .changeset/wild-lobsters-kick.md diff --git a/.changeset/beige-files-travel.md b/.changeset/beige-files-travel.md deleted file mode 100644 index 7f2c58d976a8..000000000000 --- a/.changeset/beige-files-travel.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch -'@solana/rpc-subscriptions-api': patch ---- - -Clean up SolanaRpcSubscriptionsApi: no longer extend RpcApiSubscriptionsMethods 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/bright-snakes-search.md b/.changeset/bright-snakes-search.md deleted file mode 100644 index 2e1ec51ff8de..000000000000 --- a/.changeset/bright-snakes-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Add new `isJsonRpcPayload` helper method 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 4fad8c93ed22..000000000000 --- a/.changeset/chilled-waves-lay.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -'@solana/web3.js': 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 6ca3b818d6fa..000000000000 --- a/.changeset/chilly-seas-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/web3.js": patch ---- - -Simulate with the maximum quantity of compute units (1.4M) instead of `u32::MAX` diff --git a/.changeset/clever-ties-fix.md b/.changeset/clever-ties-fix.md deleted file mode 100644 index 38c991ec2c0f..000000000000 --- a/.changeset/clever-ties-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/addresses': patch ---- - -`isAddress()` no longer throws despite that the input might be unparseable as a base-58 string. Now, it correctly, simply, returns `false`. diff --git a/.changeset/cool-bears-taste.md b/.changeset/cool-bears-taste.md deleted file mode 100644 index cc9980604179..000000000000 --- a/.changeset/cool-bears-taste.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch -'@solana/rpc-subscriptions-api': patch -'@solana/rpc-transport-http': patch -'@solana/rpc-subscriptions': patch -'@solana/rpc-transformers': patch -'@solana/rpc-spec-types': patch -'@solana/rpc-spec': patch -'@solana/web3.js': patch -'@solana/rpc': patch ---- - -Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages - -This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. - -See the following PRs for more details: -- [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) -- [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) -- [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) -- [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) -- [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) 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/curvy-stingrays-attend.md b/.changeset/curvy-stingrays-attend.md deleted file mode 100644 index 2151b354f0df..000000000000 --- a/.changeset/curvy-stingrays-attend.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@solana/keys': patch ---- - -Add a `createKeyPairFromPrivateKeyBytes` helper that creates a keypair from the 32-byte private key bytes. - -```ts -import { createKeyPairFromPrivateKeyBytes } from '@solana/keys'; - -const { privateKey, publicKey } = await createKeyPairFromPrivateKeyBytes(new Uint8Array([...])); -``` diff --git a/.changeset/dry-glasses-roll.md b/.changeset/dry-glasses-roll.md deleted file mode 100644 index c36beea7ff86..000000000000 --- a/.changeset/dry-glasses-roll.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/signers': patch ---- - -Add a `createKeyPairSignerFromPrivateKeyBytes` helper that compose `createKeyPairFromPrivateKeyBytes` and `createSignerFromKeyPair`. 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/fair-brooms-build.md b/.changeset/fair-brooms-build.md deleted file mode 100644 index 234d377194ad..000000000000 --- a/.changeset/fair-brooms-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Rename `RpcRequest` type to `RpcApiRequestPlan` to make room for new `RpcRequest` type diff --git a/.changeset/fair-moles-collect.md b/.changeset/fair-moles-collect.md deleted file mode 100644 index d77ff6e54685..000000000000 --- a/.changeset/fair-moles-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-types': patch ---- - -Remove `U64` and `I64` types in favour of `bigint` 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/five-sloths-greet.md b/.changeset/five-sloths-greet.md deleted file mode 100644 index b69888c89084..000000000000 --- a/.changeset/five-sloths-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/webcrypto-ed25519-polyfill': patch ---- - -Add support for exporting keys as JWK diff --git a/.changeset/flat-ways-love.md b/.changeset/flat-ways-love.md deleted file mode 100644 index e5b9d546201c..000000000000 --- a/.changeset/flat-ways-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Rename `RpcApiRequestPlan` to `RpcPlan` to stay consistent with the `RpcSusbscriptionsPlan` of the RPC Subscription architecture. diff --git a/.changeset/forty-bananas-bow.md b/.changeset/forty-bananas-bow.md deleted file mode 100644 index 8520295b3219..000000000000 --- a/.changeset/forty-bananas-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/transaction-confirmation': patch ---- - -Fixed a bug that could result in the transaction confirmer claiming that the blockheight had been exceeded, when the fact of the matter was that the confirmation was aborted by an `AbortSignal` 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/forty-ravens-train.md b/.changeset/forty-ravens-train.md deleted file mode 100644 index 613752a33d22..000000000000 --- a/.changeset/forty-ravens-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-transport-http': patch ---- - -Add new `createHttpTransportForSolanaRpc` function that creates a new HTTP transport specific to the Solana RPC API. This transport uses custom JSON parsing and stringifying strategies on both the request and response of Solana RPC API requests in order to prevents loss of precision for large integers. diff --git a/.changeset/funny-weeks-smash.md b/.changeset/funny-weeks-smash.md deleted file mode 100644 index 4972aa0a8445..000000000000 --- a/.changeset/funny-weeks-smash.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/rpc-subscriptions': patch -'@solana/rpc-spec-types': patch -'@solana/rpc-spec': patch ---- - -Fixed a bug where the subcription server's response would not be detected, because of a mismatch in the format of the `id`. Now all RPC message ids are strings, for avoidance of doubt. 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/giant-coins-complain.md b/.changeset/giant-coins-complain.md deleted file mode 100644 index 08edcee4e44b..000000000000 --- a/.changeset/giant-coins-complain.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/rpc': patch -'@solana/rpc-subscriptions': patch -'@solana/rpc-transformers': patch ---- - -Change first argument of `onIntegerOverflow` handler from `methodName: string` to `request: RpcRequest` diff --git a/.changeset/giant-seals-mix.md b/.changeset/giant-seals-mix.md deleted file mode 100644 index ca9f52324a69..000000000000 --- a/.changeset/giant-seals-mix.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-spec-types': patch -'@solana/rpc-spec': patch ---- - -Move RpcRequest and RpcResponse types to rpc-spec-types diff --git a/.changeset/gorgeous-foxes-type.md b/.changeset/gorgeous-foxes-type.md deleted file mode 100644 index e50915adfd5c..000000000000 --- a/.changeset/gorgeous-foxes-type.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch -'@solana/rpc-spec-types': patch -'@solana/rpc-spec': patch -'@solana/rpc-api': patch ---- - -Rename `RpcResponse` type to `RpcResponseData` to make room for a new `RpcResponse` type 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-eels-applaud.md b/.changeset/green-eels-applaud.md deleted file mode 100644 index 48b3ccf92232..000000000000 --- a/.changeset/green-eels-applaud.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/rpc-graphql': patch -'@solana/accounts': patch -'@solana/rpc-spec': patch -'@solana/rpc-api': patch ---- - -Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export 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/late-ravens-cross.md b/.changeset/late-ravens-cross.md deleted file mode 100644 index 34794db4c9cc..000000000000 --- a/.changeset/late-ravens-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch ---- - -Add `transformChannelInboundMessages` and `transformChannelOutboundMessages` helper functions to transform incoming and outgoing messages on a given channel. 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/light-bugs-compare.md b/.changeset/light-bugs-compare.md deleted file mode 100644 index 6ae264a9c0d7..000000000000 --- a/.changeset/light-bugs-compare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Add new `RpcRequest` and `RpcResponse` types with `RpcRequestTransformer` and `RpcResponseTransformer` functions diff --git a/.changeset/light-owls-own.md b/.changeset/light-owls-own.md deleted file mode 100644 index 36d4c8ab87b1..000000000000 --- a/.changeset/light-owls-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-transformers': patch ---- - -Add `getThrowSolanaErrorResponseTransformer`, `getResultResponseTransformer`, `getBigIntUpcastResponseTransformer` and `getTreeWalkerResponseTransformer` helpers 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/little-zebras-guess.md b/.changeset/little-zebras-guess.md deleted file mode 100644 index 477d04518eec..000000000000 --- a/.changeset/little-zebras-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-api': patch ---- - -Correct type of replacementBlockhash in simulateTransaction diff --git a/.changeset/loud-hotels-prove.md b/.changeset/loud-hotels-prove.md deleted file mode 100644 index e40a642aa915..000000000000 --- a/.changeset/loud-hotels-prove.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-types': patch -'@solana/rpc-api': patch ---- - -Remove `UnsafeBeyond2Pow53Minus1` type suffixes 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/metal-spoons-matter.md b/.changeset/metal-spoons-matter.md deleted file mode 100644 index 8b46ae8bd4b4..000000000000 --- a/.changeset/metal-spoons-matter.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/rpc-subscriptions-api': patch -'@solana/rpc-transformers': patch -'@solana/rpc-spec': patch -'@solana/rpc-api': patch ---- - -Make `RpcApi` use new `RpcRequestTransformer` and `RpcResponseTransformer` diff --git a/.changeset/nasty-buckets-hear.md b/.changeset/nasty-buckets-hear.md deleted file mode 100644 index 42f2a529bae3..000000000000 --- a/.changeset/nasty-buckets-hear.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -'@solana/rpc-subscriptions-channel-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/subscribable': 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/promises': patch -'@solana/rpc-spec': patch -'@solana/web3.js': patch -'@solana/options': patch -'@solana/rpc-api': patch -'@solana/signers': patch -'@solana/sysvars': patch -'@solana/codecs': patch -'@solana/compat': patch -'@solana/errors': patch -'@solana/react': patch -'@solana/keys': patch -'@solana/rpc': patch ---- - -Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 diff --git a/.changeset/neat-cows-shop.md b/.changeset/neat-cows-shop.md deleted file mode 100644 index b781c5dd7c18..000000000000 --- a/.changeset/neat-cows-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/subscribable': patch ---- - -Creates a package for working with subscribable data sources like event targets. From an `EventTarget` or object which conforms to the `EventEmitter` interface you can now create a more ergonomic `DataPublisher` (object with an `on` method that vends an unsubscribe function) or an abortable `AsyncIterable`. 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-owls-roll.md b/.changeset/nine-owls-roll.md deleted file mode 100644 index cc8d93b75e4a..000000000000 --- a/.changeset/nine-owls-roll.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Redesign the `RpcPlan` by using a plan executor function. - -This change replaces the `payload` and `responseTransformer` attributes of the `RpcPlan` type (returned by the RPC API) in favour of a new `execute` function that accepts an `RpcTransport` and an optional `AbortSignal` and return an `RpcResponse`. That way, the RPC API is able to completely wrap the RPC Transport layer and can do things like: not calling the transport at all for caching purposes or calling the transport multiple times for retries or even for aggregating responses from multiple RPC calls. - -See the following PRs for more details: -- [PR #3430](https://github.com/solana-labs/solana-web3.js/pull/3430) -- [PR #3431](https://github.com/solana-labs/solana-web3.js/pull/3431) 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/olive-shrimps-lick.md b/.changeset/olive-shrimps-lick.md deleted file mode 100644 index 1e406374e87e..000000000000 --- a/.changeset/olive-shrimps-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/assertions': patch ---- - -Fixed a bug where calls to `isEd25519CurveSupported()` might have resulted in uncaught rejections bubbling up through the app, in cases where Ed25519 is not supported diff --git a/.changeset/orange-squids-think.md b/.changeset/orange-squids-think.md deleted file mode 100644 index 54b45cd25a03..000000000000 --- a/.changeset/orange-squids-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-subscriptions': patch ---- - -Adds a channel creator function called `createDefaultSolanaRpcSubscriptionsChannelCreator`. This function works similarly to `createDefaultRpcSubscriptionsChannelCreator` but with some Solana-specific defaults. For instance, it safely handles `BigInt` values in JSON messages since Solana RPC servers accept and return integers larger than `Number.MAX_SAFE_INTEGER`. diff --git a/.changeset/plenty-eyes-kick.md b/.changeset/plenty-eyes-kick.md deleted file mode 100644 index 97fa9b231cb3..000000000000 --- a/.changeset/plenty-eyes-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-api': patch ---- - -PerformanceSample return type field numNonVoteTransaction corrected to numNonVoteTransactions diff --git a/.changeset/plenty-plums-drop.md b/.changeset/plenty-plums-drop.md deleted file mode 100644 index f4d84c686a6a..000000000000 --- a/.changeset/plenty-plums-drop.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/transaction-confirmation': patch -'@solana/rpc-subscriptions': patch ---- - -Fixed a memory leak with transaction confirmation and subscriptions 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/popular-buttons-repair.md b/.changeset/popular-buttons-repair.md deleted file mode 100644 index 6089841bb49b..000000000000 --- a/.changeset/popular-buttons-repair.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@solana/rpc-transformers': patch -'@solana/rpc-api': patch ---- - -Add `getIntegerOverflowRequestTransformer`, `getBigIntDowncastRequestTransformer` and `getTreeWalkerRequestTransformer` helpers diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index c17a618a9073..000000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "mode": "exit", - "tag": "rc", - "initialVersions": { - "@solana/accounts": "2.0.0-rc", - "@solana/addresses": "2.0.0-rc", - "@solana/assertions": "2.0.0-rc", - "@solana/codecs": "2.0.0-rc", - "@solana/codecs-core": "2.0.0-rc", - "@solana/codecs-data-structures": "2.0.0-rc", - "@solana/codecs-numbers": "2.0.0-rc", - "@solana/codecs-strings": "2.0.0-rc", - "@solana/compat": "2.0.0-rc", - "@solana/errors": "2.0.0-rc", - "@solana/fast-stable-stringify": "2.0.0-rc", - "@solana/functional": "2.0.0-rc", - "@solana/instructions": "2.0.0-rc", - "@solana/keys": "2.0.0-rc", - "@solana/web3.js": "2.0.0-rc", - "@solana/options": "2.0.0-rc", - "@solana/programs": "2.0.0-rc", - "@solana/react": "2.0.0-rc", - "@solana/rpc": "2.0.0-rc", - "@solana/rpc-api": "2.0.0-rc", - "@solana/rpc-graphql": "2.0.0-rc", - "@solana/rpc-parsed-types": "2.0.0-rc", - "@solana/rpc-spec": "2.0.0-rc", - "@solana/rpc-spec-types": "2.0.0-rc", - "@solana/rpc-subscriptions": "2.0.0-rc", - "@solana/rpc-subscriptions-api": "2.0.0-rc", - "@solana/rpc-subscriptions-spec": "2.0.0-rc", - "@solana/rpc-subscriptions-channel-websocket": "2.0.0-rc", - "@solana/rpc-transformers": "2.0.0-rc", - "@solana/rpc-transport-http": "2.0.0-rc", - "@solana/rpc-types": "2.0.0-rc", - "@solana/signers": "2.0.0-rc", - "@solana/sysvars": "2.0.0-rc", - "@solana/transaction-confirmation": "2.0.0-rc", - "@solana/transaction-messages": "2.0.0-rc", - "@solana/transactions": "2.0.0-rc", - "@solana/webcrypto-ed25519-polyfill": "2.0.0-rc", - "@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", - "@solana/promises": "2.0.0-rc.0", - "@solana/subscribable": "2.0.0-rc.1" - }, - "changesets": [ - "beige-files-travel", - "brave-chicken-own", - "breezy-items-reflect", - "bright-snakes-search", - "calm-camels-decide", - "calm-crabs-tease", - "chatty-flies-end", - "chilled-walls-scream", - "chilled-waves-lay", - "chilly-seas-act", - "clever-ties-fix", - "cool-bears-taste", - "curly-kids-type", - "curvy-stingrays-attend", - "dry-glasses-roll", - "early-eyes-mix", - "fair-brooms-build", - "fair-moles-collect", - "famous-buttons-switch", - "fast-cars-knock", - "five-sloths-greet", - "flat-ways-love", - "forty-bananas-bow", - "forty-queens-explode", - "forty-ravens-train", - "funny-weeks-smash", - "fuzzy-lizards-end", - "giant-coins-complain", - "giant-seals-mix", - "gorgeous-foxes-type", - "gorgeous-gorillas-sniff", - "green-eels-applaud", - "green-experts-hang", - "heavy-students-relax", - "honest-cheetahs-care", - "honest-rivers-deny", - "hot-penguins-explain", - "late-mangos-doubt", - "late-planets-breathe", - "late-ravens-cross", - "lazy-phones-fail", - "light-bugs-compare", - "light-owls-own", - "little-berries-applaud", - "little-zebras-guess", - "loud-hotels-prove", - "loud-otters-pull", - "lovely-mice-promise", - "mean-vans-behave", - "metal-bees-lick", - "metal-radios-switch", - "metal-spoons-matter", - "neat-cows-shop", - "nervous-deers-roll", - "nine-owls-roll", - "nine-pots-notice", - "odd-beds-punch", - "olive-shrimps-lick", - "orange-squids-think", - "plenty-eyes-kick", - "plenty-plums-drop", - "poor-dogs-crash", - "popular-buttons-repair", - "pretty-rocks-argue", - "pretty-worms-taste", - "proud-poems-try", - "purple-forks-rest", - "quiet-hornets-look", - "rare-goats-sell", - "red-moose-flash", - "rich-eggs-tease", - "rotten-sloths-raise", - "shaggy-seas-end", - "sharp-steaks-admire", - "shiny-birds-pay", - "short-jokes-begin", - "short-toes-perform", - "silent-cooks-marry", - "silly-months-happen", - "silly-wombats-switch", - "silver-otters-doubt", - "six-olives-hang", - "sixty-dodos-smile", - "sixty-months-relate", - "slow-dragons-add", - "small-cougars-smoke", - "sour-mugs-press", - "stale-turtles-hang", - "strange-oranges-hang", - "strong-pandas-marry", - "stupid-tomatoes-reflect", - "sweet-cobras-explode", - "swift-clocks-occur", - "tasty-cups-think", - "ten-buckets-search", - "tender-turtles-bake", - "thick-masks-lie", - "thick-radios-appear", - "thick-radios-search", - "tidy-wolves-share", - "tricky-fishes-pull", - "tricky-walls-doubt", - "two-cougars-try", - "unlucky-jars-travel", - "unlucky-pumpkins-itch", - "violet-brooms-report", - "violet-eggs-whisper", - "warm-dolls-yell", - "warm-lizards-report", - "warm-pears-sip", - "weak-peaches-fly", - "wet-colts-exist", - "wicked-cougars-matter", - "wicked-toys-hear", - "wild-beers-hang", - "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/pretty-worms-taste.md b/.changeset/pretty-worms-taste.md deleted file mode 100644 index 2715077f2a4b..000000000000 --- a/.changeset/pretty-worms-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-transformers': patch ---- - -Add `getDefaultCommitmentRequestTransformer` helper 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/quiet-hornets-look.md b/.changeset/quiet-hornets-look.md deleted file mode 100644 index cb689718d809..000000000000 --- a/.changeset/quiet-hornets-look.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/webcrypto-ed25519-polyfill': patch ---- - -Add support for importing JWK keys diff --git a/.changeset/rare-goats-sell.md b/.changeset/rare-goats-sell.md deleted file mode 100644 index 1f43c8be0d8a..000000000000 --- a/.changeset/rare-goats-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/web3.js': patch ---- - -Fixed the type of `config` on `getComputeUnitEstimateForTransactionMessage`. It is now optional and does not include `transactionMessage`. diff --git a/.changeset/red-moose-flash.md b/.changeset/red-moose-flash.md deleted file mode 100644 index 09c7f25493c6..000000000000 --- a/.changeset/red-moose-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/transaction-messages': patch ---- - -Change `feePayer` type of transaction messages from `Address` to `{ address: Address }` diff --git a/.changeset/rich-eggs-tease.md b/.changeset/rich-eggs-tease.md deleted file mode 100644 index eff8d2359ebb..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-channel-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/rotten-sloths-raise.md b/.changeset/rotten-sloths-raise.md deleted file mode 100644 index 675638026acc..000000000000 --- a/.changeset/rotten-sloths-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-subscriptions': patch ---- - -Add a \`getRpcSubscriptionsChannelWithBigIntJSONSerialization\` helper function that parses and stringifies JSON messages with support for \`BigInt\` values. Any integer value is parsed as a \`BigInt\` in order to safely handle numbers that exceed the JavaScript \`Number.MAX_SAFE_INTEGER\` value. diff --git a/.changeset/shaggy-seas-end.md b/.changeset/shaggy-seas-end.md deleted file mode 100644 index 027bf09d5992..000000000000 --- a/.changeset/shaggy-seas-end.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@solana/rpc-subscriptions-api': patch -'@solana/rpc-parsed-types': patch -'@solana/rpc-types': patch -'@solana/rpc-api': patch -'@solana/sysvars': patch -'@solana/errors': patch ---- - -Change unix timestamp type to bigint with an unsafe label 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/silent-cooks-marry.md b/.changeset/silent-cooks-marry.md deleted file mode 100644 index 77971c1731ae..000000000000 --- a/.changeset/silent-cooks-marry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/promises': patch ---- - -Created a helper that you can use to race two or more promises without having to worry about them leaking memory 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/silly-wombats-switch.md b/.changeset/silly-wombats-switch.md deleted file mode 100644 index 74bdbc11ef1f..000000000000 --- a/.changeset/silly-wombats-switch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch -'@solana/rpc-subscriptions-api': patch -'@solana/rpc-subscriptions': patch ---- - -Replace subscriptionConfigurationHash with RpcRequest in RpcSubscriptionPlan diff --git a/.changeset/silver-otters-doubt.md b/.changeset/silver-otters-doubt.md deleted file mode 100644 index 2c8f4f5f755c..000000000000 --- a/.changeset/silver-otters-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/errors': patch ---- - -Accept bigints in RPC error factories, fixing functions such as `isProgramError` diff --git a/.changeset/six-olives-hang.md b/.changeset/six-olives-hang.md deleted file mode 100644 index 8ed72f509196..000000000000 --- a/.changeset/six-olives-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc': patch ---- - -Enabled Brotli, gzip, and Deflate compression by default when running in Node.js, where compression headers are not added by the runtime like they are in browsers 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/sixty-months-relate.md b/.changeset/sixty-months-relate.md deleted file mode 100644 index 69fabc276f15..000000000000 --- a/.changeset/sixty-months-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-graphql': minor ---- - -Update program accounts filters for `programAccounts` query diff --git a/.changeset/slow-dragons-add.md b/.changeset/slow-dragons-add.md deleted file mode 100644 index fdf3fe6cef0a..000000000000 --- a/.changeset/slow-dragons-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-transport-http': patch ---- - -Add `fromJson` and `toJson` options to the HTTP transport diff --git a/.changeset/small-cougars-smoke.md b/.changeset/small-cougars-smoke.md deleted file mode 100644 index efb8cf8c244c..000000000000 --- a/.changeset/small-cougars-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Make API plans return payloads 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/strange-oranges-hang.md b/.changeset/strange-oranges-hang.md deleted file mode 100644 index 6df3cd8ee435..000000000000 --- a/.changeset/strange-oranges-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/web3.js': patch ---- - -Rename decodeTransactionMessage to decompileTransactionMessageFetchingLookupTables diff --git a/.changeset/strong-pandas-marry.md b/.changeset/strong-pandas-marry.md deleted file mode 100644 index e6fed7165adf..000000000000 --- a/.changeset/strong-pandas-marry.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@solana/web3.js": patch -"@solana/rpc-subscriptions": patch -"@solana/rpc": patch ---- - -Replaced `fast-stable-stringify` with our fork diff --git a/.changeset/stupid-tomatoes-reflect.md b/.changeset/stupid-tomatoes-reflect.md deleted file mode 100644 index 15df294204a7..000000000000 --- a/.changeset/stupid-tomatoes-reflect.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@solana/rpc-transport-http': patch -'@solana/rpc-spec': patch -'@solana/rpc-api': patch -'@solana/rpc': patch ---- - -Make `RpcTransport` return new `RpcReponse` type instead of parsed JSON data diff --git a/.changeset/sweet-cobras-explode.md b/.changeset/sweet-cobras-explode.md deleted file mode 100644 index aad5dd0ca72b..000000000000 --- a/.changeset/sweet-cobras-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/promises': patch ---- - -Created a package for dealing with JavaScript Promises, and copied the implementation of `getAbortablePromise` into it diff --git a/.changeset/swift-clocks-occur.md b/.changeset/swift-clocks-occur.md deleted file mode 100644 index 821a11560b8a..000000000000 --- a/.changeset/swift-clocks-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/web3.js': patch ---- - -Throw an error if a transaction fails when being simulated to estimate CUs diff --git a/.changeset/tasty-cups-think.md b/.changeset/tasty-cups-think.md deleted file mode 100644 index c59203532e93..000000000000 --- a/.changeset/tasty-cups-think.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/rpc-transformers': patch ---- - -Remove temporary fix for Agave issue 479 - -The fix is now deployed on mainnet-beta (See https://github.com/anza-xyz/agave/issues/479 and https://github.com/anza-xyz/agave/pull/483). diff --git a/.changeset/ten-buckets-search.md b/.changeset/ten-buckets-search.md deleted file mode 100644 index 131f94ef0af9..000000000000 --- a/.changeset/ten-buckets-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-api': patch ---- - -Update the response type of the `getClusterNodes` RPC method 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 dc3b2f74d949..000000000000 --- a/.changeset/tidy-wolves-share.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -"@solana/rpc-subscriptions-channel-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": 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/tricky-walls-doubt.md b/.changeset/tricky-walls-doubt.md deleted file mode 100644 index ff01401e762e..000000000000 --- a/.changeset/tricky-walls-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch ---- - -Rename `executeSubscriptionPlan` to `execute` in `RpcSubscriptionsPlan` diff --git a/.changeset/two-cougars-try.md b/.changeset/two-cougars-try.md deleted file mode 100644 index 9b0a6e891869..000000000000 --- a/.changeset/two-cougars-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solana/web3.js": patch ---- - -Created a utility function to estimate the compute unit consumption of a transaction message diff --git a/.changeset/unlucky-jars-travel.md b/.changeset/unlucky-jars-travel.md deleted file mode 100644 index 69d6386577ca..000000000000 --- a/.changeset/unlucky-jars-travel.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -'@solana/rpc-subscriptions-channel-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/promises': patch -'@solana/rpc-spec': patch -'@solana/web3.js': patch -'@solana/options': patch -'@solana/rpc-api': patch -'@solana/signers': patch -'@solana/sysvars': patch -'@solana/codecs': patch -'@solana/compat': patch -'@solana/errors': patch -'@solana/react': patch -'@solana/keys': patch -'@solana/rpc': patch ---- - -The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. 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/violet-eggs-whisper.md b/.changeset/violet-eggs-whisper.md deleted file mode 100644 index f5659b6944ea..000000000000 --- a/.changeset/violet-eggs-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/signers': patch ---- - -Remove the `feePayerSigner` attribute of transaction messages in favour of the existing `feePayer` attribute. This ensures fee payers are defined in a single place — whether they are using signers or not. diff --git a/.changeset/warm-dolls-yell.md b/.changeset/warm-dolls-yell.md deleted file mode 100644 index b64fec15a643..000000000000 --- a/.changeset/warm-dolls-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/rpc-spec': patch ---- - -Rename `createRpcApi` to `createJsonRpcApi` diff --git a/.changeset/warm-lizards-report.md b/.changeset/warm-lizards-report.md deleted file mode 100644 index eb6cab2ec784..000000000000 --- a/.changeset/warm-lizards-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/signers': patch ---- - -Override `feePayer` signer when the address matches the existing one. This is because users may want to provide a different wallet from the same address. 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/weak-peaches-fly.md b/.changeset/weak-peaches-fly.md deleted file mode 100644 index c7fbdb28b301..000000000000 --- a/.changeset/weak-peaches-fly.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@solana/keys': patch ---- - -Fix missing export in `@solana/keys` package. This means, the `getPublicKeyFromPrivateKey` function is now properly exported. diff --git a/.changeset/wet-colts-exist.md b/.changeset/wet-colts-exist.md deleted file mode 100644 index ed08e8dc8694..000000000000 --- a/.changeset/wet-colts-exist.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@solana/rpc-subscriptions-spec': patch -'@solana/rpc-spec-types': patch -'@solana/rpc-spec': patch ---- - -Use RpcRequest in createRpcMessage helper 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/wicked-toys-hear.md b/.changeset/wicked-toys-hear.md deleted file mode 100644 index 08f7646b8055..000000000000 --- a/.changeset/wicked-toys-hear.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@solana/keys': patch ---- - -Add a `getPublicKeyFromPrivateKey` helper that, given an extractable `CryptoKey` private key, gets the corresponding public key as a `CryptoKey`. - -```ts -import { createPrivateKeyFromBytes, getPublicKeyFromPrivateKey } from '@solana/keys'; - -const privateKey = await createPrivateKeyFromBytes(new Uint8Array([...]), true); - -const publicKey = await getPublicKeyFromPrivateKey(privateKey); -const extractablePublicKey = await getPublicKeyFromPrivateKey(privateKey, true); -``` diff --git a/.changeset/wild-beers-hang.md b/.changeset/wild-beers-hang.md deleted file mode 100644 index 65f85a251982..000000000000 --- a/.changeset/wild-beers-hang.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@solana/rpc-subscriptions': patch -'@solana/rpc-subscriptions-api': patch -'@solana/rpc-subscriptions-channel-websocket': patch -'@solana/rpc-subscriptions-spec': patch ---- - -We refactored the lower levels of the subscriptions API entirely. - -Previously, all layers of the subscriptions implementation, from the `WebSocket` transport to the API that developers use, dealt in `AsyncIterables`. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as an `AsyncIterable`. - -This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new `WebSocket` connections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separate `message` events into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message. 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/accounts/CHANGELOG.md b/packages/accounts/CHANGELOG.md index 15449e916122..88d7cb8e5d5d 100644 --- a/packages/accounts/CHANGELOG.md +++ b/packages/accounts/CHANGELOG.md @@ -1,5 +1,25 @@ # @solana/accounts +## 2.0.0 + +### Patch Changes + +- [#3213](https://github.com/solana-labs/solana-web3.js/pull/3213) [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`6b43588`](https://github.com/solana-labs/solana-web3.js/commit/6b4358864cb328d1b83f11c94b29f75e1b3d635f), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`628177f`](https://github.com/solana-labs/solana-web3.js/commit/628177ffcc1be1c40e0c82d80743b07f695cfe69), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`06dcd86`](https://github.com/solana-labs/solana-web3.js/commit/06dcd86d830e866eb3ee7c47ea1bb99b8205bd1e), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`4f87d12`](https://github.com/solana-labs/solana-web3.js/commit/4f87d12cf942fbd4f427005d5ac41671ce28a22c), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`91076ba`](https://github.com/solana-labs/solana-web3.js/commit/91076ba1884eb72880d1ee964b6800d90afb4460), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`f5660d2`](https://github.com/solana-labs/solana-web3.js/commit/f5660d2eb4d2ee5be8c9cd8e8b58a11de1a799bf), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`6340744`](https://github.com/solana-labs/solana-web3.js/commit/6340744e5cf0ea91ae677f381d5a187638a19597), [`d198638`](https://github.com/solana-labs/solana-web3.js/commit/d19863844cf28c252e6bedd7070e633692d9e46e), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/rpc-spec@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/accounts/package.json b/packages/accounts/package.json index 77304cebad7a..55335ee7d2e6 100644 --- a/packages/accounts/package.json +++ b/packages/accounts/package.json @@ -1,6 +1,6 @@ { "name": "@solana/accounts", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for representing, fetching and decoding Solana accounts", "exports": { "edge-light": { diff --git a/packages/addresses/CHANGELOG.md b/packages/addresses/CHANGELOG.md index 33b605e0bb18..27f2a93b8164 100644 --- a/packages/addresses/CHANGELOG.md +++ b/packages/addresses/CHANGELOG.md @@ -1,5 +1,48 @@ # @solana/addresses +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403) Thanks [@steveluscher](https://github.com/steveluscher)! - `isAddress()` no longer throws despite that the input might be unparseable as a base-58 string. Now, it correctly, simply, returns `false`. + +- [#2413](https://github.com/solana-labs/solana-web3.js/pull/2413) [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#2352](https://github.com/solana-labs/solana-web3.js/pull/2352) [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1) Thanks [@steveluscher](https://github.com/steveluscher)! - `SubtleCrypto` assertion methods that can make their assertions synchronously are now synchronous, for performance. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`441fa3a`](https://github.com/solana-labs/solana-web3.js/commit/441fa3a6c7c104961f935e65e259f40c10e82f8a), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/assertions@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/addresses/package.json b/packages/addresses/package.json index 08512254b3e4..675522ec0cf3 100644 --- a/packages/addresses/package.json +++ b/packages/addresses/package.json @@ -1,6 +1,6 @@ { "name": "@solana/addresses", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for generating account addresses", "exports": { "edge-light": { diff --git a/packages/assertions/CHANGELOG.md b/packages/assertions/CHANGELOG.md index 825ba37d066d..b06d10a3b383 100644 --- a/packages/assertions/CHANGELOG.md +++ b/packages/assertions/CHANGELOG.md @@ -1,5 +1,24 @@ # @solana/assertions +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3361](https://github.com/solana-labs/solana-web3.js/pull/3361) [`441fa3a`](https://github.com/solana-labs/solana-web3.js/commit/441fa3a6c7c104961f935e65e259f40c10e82f8a) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a bug where calls to `isEd25519CurveSupported()` might have resulted in uncaught rejections bubbling up through the app, in cases where Ed25519 is not supported + +- [#2329](https://github.com/solana-labs/solana-web3.js/pull/2329) [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8) Thanks [@luu-alex](https://github.com/luu-alex)! - `createKeyPairFromBytes()` now validates that the public key imported is the one that would be derived from the private key imported + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#2352](https://github.com/solana-labs/solana-web3.js/pull/2352) [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1) Thanks [@steveluscher](https://github.com/steveluscher)! - `SubtleCrypto` assertion methods that can make their assertions synchronously are now synchronous, for performance. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/assertions/package.json b/packages/assertions/package.json index faa41d1d8407..b297897f7129 100644 --- a/packages/assertions/package.json +++ b/packages/assertions/package.json @@ -1,6 +1,6 @@ { "name": "@solana/assertions", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for asserting that a JavaScript environment supports certain features necessary for the operation of the Solana JavaScript SDK", "exports": { "edge-light": { diff --git a/packages/codecs-core/CHANGELOG.md b/packages/codecs-core/CHANGELOG.md index bd90cd76a612..69af007bf002 100644 --- a/packages/codecs-core/CHANGELOG.md +++ b/packages/codecs-core/CHANGELOG.md @@ -1,5 +1,68 @@ # @solana/codecs-core +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#2397](https://github.com/solana-labs/solana-web3.js/pull/2397) [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2419](https://github.com/solana-labs/solana-web3.js/pull/2419) [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2400](https://github.com/solana-labs/solana-web3.js/pull/2400) [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2383](https://github.com/solana-labs/solana-web3.js/pull/2383) [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getScalarEnumCodec` is now called `getEnumCodec` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2382](https://github.com/solana-labs/solana-web3.js/pull/2382) [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getDataEnumCodec` is now called `getDiscriminatedUnionCodec` + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/codecs-core/package.json b/packages/codecs-core/package.json index e680ae064c21..0996c5dd24d8 100644 --- a/packages/codecs-core/package.json +++ b/packages/codecs-core/package.json @@ -1,6 +1,6 @@ { "name": "@solana/codecs-core", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Core types and helpers for encoding and decoding byte arrays on Solana", "exports": { "edge-light": { diff --git a/packages/codecs-data-structures/CHANGELOG.md b/packages/codecs-data-structures/CHANGELOG.md index 0bbe53d1cf87..5fff547724f1 100644 --- a/packages/codecs-data-structures/CHANGELOG.md +++ b/packages/codecs-data-structures/CHANGELOG.md @@ -1,5 +1,290 @@ # @solana/codecs-data-structures +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#2397](https://github.com/solana-labs/solana-web3.js/pull/2397) [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2344](https://github.com/solana-labs/solana-web3.js/pull/2344) [`deb7b80`](https://github.com/solana-labs/solana-web3.js/commit/deb7b806b4cbe620b1714be1765c981d88c3a2f6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + +- [#2322](https://github.com/solana-labs/solana-web3.js/pull/2322) [`6dcf548`](https://github.com/solana-labs/solana-web3.js/commit/6dcf5483bb6bbb8d343db28dedb258c8da91ffac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + +- [#2400](https://github.com/solana-labs/solana-web3.js/pull/2400) [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2381](https://github.com/solana-labs/solana-web3.js/pull/2381) [`49a764c`](https://github.com/solana-labs/solana-web3.js/commit/49a764c6d481886501540f8dbfe8be75d754355b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 }); + ``` + +- [#2413](https://github.com/solana-labs/solana-web3.js/pull/2413) [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#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`. + +- [#2383](https://github.com/solana-labs/solana-web3.js/pull/2383) [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getScalarEnumCodec` is now called `getEnumCodec` + +- [#2430](https://github.com/solana-labs/solana-web3.js/pull/2430) [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2398](https://github.com/solana-labs/solana-web3.js/pull/2398) [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2382](https://github.com/solana-labs/solana-web3.js/pull/2382) [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getDataEnumCodec` is now called `getDiscriminatedUnionCodec` + +- [#2401](https://github.com/solana-labs/solana-web3.js/pull/2401) [`919c736`](https://github.com/solana-labs/solana-web3.js/commit/919c7367dec8e142746295128cc6c2cc6752e636) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2433](https://github.com/solana-labs/solana-web3.js/pull/2433) [`2d48c09`](https://github.com/solana-labs/solana-web3.js/commit/2d48c0954a3823b937a9b4e572a8d63cd7e4631c) Thanks [@lorisleiva](https://github.com/lorisleiva)! - The `getBooleanCodec` function now accepts variable-size number codecs + +- [#2412](https://github.com/solana-labs/solana-web3.js/pull/2412) [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2394](https://github.com/solana-labs/solana-web3.js/pull/2394) [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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' + ``` + +- [#2410](https://github.com/solana-labs/solana-web3.js/pull/2410) [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#2380](https://github.com/solana-labs/solana-web3.js/pull/2380) [`bf029dd`](https://github.com/solana-labs/solana-web3.js/commit/bf029dd90230405b3d59f70aedd57fc0117b926e) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 }); + ``` + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/codecs-numbers@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/codecs-data-structures/package.json b/packages/codecs-data-structures/package.json index 33e1f214667b..c59db35a3867 100644 --- a/packages/codecs-data-structures/package.json +++ b/packages/codecs-data-structures/package.json @@ -1,6 +1,6 @@ { "name": "@solana/codecs-data-structures", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Codecs for various data structures", "exports": { "edge-light": { diff --git a/packages/codecs-numbers/CHANGELOG.md b/packages/codecs-numbers/CHANGELOG.md index 32a49a4de61b..4d17422a54c0 100644 --- a/packages/codecs-numbers/CHANGELOG.md +++ b/packages/codecs-numbers/CHANGELOG.md @@ -1,5 +1,33 @@ # @solana/codecs-numbers +## 2.0.0 + +### Patch Changes + +- [#2414](https://github.com/solana-labs/solana-web3.js/pull/2414) [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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; + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + - @solana/codecs-core@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/codecs-numbers/package.json b/packages/codecs-numbers/package.json index b9fa9082caa1..f7b5cefc5a26 100644 --- a/packages/codecs-numbers/package.json +++ b/packages/codecs-numbers/package.json @@ -1,6 +1,6 @@ { "name": "@solana/codecs-numbers", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Codecs for numbers of different sizes and endianness", "exports": { "edge-light": { diff --git a/packages/codecs-strings/CHANGELOG.md b/packages/codecs-strings/CHANGELOG.md index c091e9c7740c..1d2532fdbcb7 100644 --- a/packages/codecs-strings/CHANGELOG.md +++ b/packages/codecs-strings/CHANGELOG.md @@ -1,5 +1,56 @@ # @solana/codecs-strings +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#2397](https://github.com/solana-labs/solana-web3.js/pull/2397) [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7) Thanks [@steveluscher](https://github.com/steveluscher)! - Converting a base16 string to a byte buffer is now between 2-3x faster (Thanks @tibi77!) + +- [#2413](https://github.com/solana-labs/solana-web3.js/pull/2413) [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/codecs-numbers@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/codecs-strings/package.json b/packages/codecs-strings/package.json index c07bec258892..52cd5a981a19 100644 --- a/packages/codecs-strings/package.json +++ b/packages/codecs-strings/package.json @@ -1,6 +1,6 @@ { "name": "@solana/codecs-strings", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Codecs for strings of different sizes and encodings", "exports": { "edge-light": { diff --git a/packages/codecs/CHANGELOG.md b/packages/codecs/CHANGELOG.md index aabc1eb31ed5..8469db036134 100644 --- a/packages/codecs/CHANGELOG.md +++ b/packages/codecs/CHANGELOG.md @@ -1,5 +1,60 @@ # @solana/codecs +## 2.0.0 + +### Patch Changes + +- [#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`. + +- [#2383](https://github.com/solana-labs/solana-web3.js/pull/2383) [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getScalarEnumCodec` is now called `getEnumCodec` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2382](https://github.com/solana-labs/solana-web3.js/pull/2382) [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getDataEnumCodec` is now called `getDiscriminatedUnionCodec` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`deb7b80`](https://github.com/solana-labs/solana-web3.js/commit/deb7b806b4cbe620b1714be1765c981d88c3a2f6), [`6dcf548`](https://github.com/solana-labs/solana-web3.js/commit/6dcf5483bb6bbb8d343db28dedb258c8da91ffac), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`49a764c`](https://github.com/solana-labs/solana-web3.js/commit/49a764c6d481886501540f8dbfe8be75d754355b), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`919c736`](https://github.com/solana-labs/solana-web3.js/commit/919c7367dec8e142746295128cc6c2cc6752e636), [`a29bfee`](https://github.com/solana-labs/solana-web3.js/commit/a29bfeeb2119d99906a31fb1e5103d8ebf783ceb), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2d48c09`](https://github.com/solana-labs/solana-web3.js/commit/2d48c0954a3823b937a9b4e572a8d63cd7e4631c), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`bf029dd`](https://github.com/solana-labs/solana-web3.js/commit/bf029dd90230405b3d59f70aedd57fc0117b926e)]: + - @solana/codecs-data-structures@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/options@2.0.0 + - @solana/codecs-numbers@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/codecs/package.json b/packages/codecs/package.json index 45945182a117..3b34ed662ded 100644 --- a/packages/codecs/package.json +++ b/packages/codecs/package.json @@ -1,6 +1,6 @@ { "name": "@solana/codecs", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A library for encoding and decoding any data structure", "exports": { "edge-light": { diff --git a/packages/compat/CHANGELOG.md b/packages/compat/CHANGELOG.md index 9f46eb9b5aca..7c67bad45532 100644 --- a/packages/compat/CHANGELOG.md +++ b/packages/compat/CHANGELOG.md @@ -1,5 +1,22 @@ # @solana/compat +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/transactions@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/keys@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/compat/package.json b/packages/compat/package.json index b270beec2bf0..2c4a64ce36de 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -1,6 +1,6 @@ { "name": "@solana/compat", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for converting from legacy web3js classes", "exports": { "edge-light": { diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index fff86450b068..09556731e1bc 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -1,5 +1,143 @@ # @solana/errors +## 2.0.0 + +### Patch Changes + +- [#2376](https://github.com/solana-labs/solana-web3.js/pull/2376) [`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a bug that prevented the production error decoder from decoding negative error codes + +- [#2419](https://github.com/solana-labs/solana-web3.js/pull/2419) [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2400](https://github.com/solana-labs/solana-web3.js/pull/2400) [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2383](https://github.com/solana-labs/solana-web3.js/pull/2383) [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getScalarEnumCodec` is now called `getEnumCodec` + +- [#2430](https://github.com/solana-labs/solana-web3.js/pull/2430) [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2358](https://github.com/solana-labs/solana-web3.js/pull/2358) [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199) Thanks [@steveluscher](https://github.com/steveluscher)! - The encoded `SolanaError` context that is thrown in production is now base64-encoded for compatibility with more terminal shells + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2398](https://github.com/solana-labs/solana-web3.js/pull/2398) [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2382](https://github.com/solana-labs/solana-web3.js/pull/2382) [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026) Thanks [@lorisleiva](https://github.com/lorisleiva)! - `getDataEnumCodec` is now called `getDiscriminatedUnionCodec` + +- [#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. + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#3519](https://github.com/solana-labs/solana-web3.js/pull/3519) [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Accept bigints in RPC error factories, fixing functions such as `isProgramError` + +- [#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. + +- [#2394](https://github.com/solana-labs/solana-web3.js/pull/2394) [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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' + ``` + +- [#2410](https://github.com/solana-labs/solana-web3.js/pull/2410) [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2329](https://github.com/solana-labs/solana-web3.js/pull/2329) [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8) Thanks [@luu-alex](https://github.com/luu-alex)! - `createKeyPairFromBytes()` now validates that the public key imported is the one that would be derived from the private key imported + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/errors/package.json b/packages/errors/package.json index 56ab5e97e34d..8793643d3cab 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@solana/errors", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Throw, identify, and decode Solana JavaScript errors", "exports": { "edge-light": { diff --git a/packages/fast-stable-stringify/CHANGELOG.md b/packages/fast-stable-stringify/CHANGELOG.md index 3672e6349eb5..84d3040a1096 100644 --- a/packages/fast-stable-stringify/CHANGELOG.md +++ b/packages/fast-stable-stringify/CHANGELOG.md @@ -1,5 +1,17 @@ # @solana/fast-stable-stringify +## 2.0.0 + +### Patch Changes + +- [#2502](https://github.com/solana-labs/solana-web3.js/pull/2502) [`5ed19c6`](https://github.com/solana-labs/solana-web3.js/commit/5ed19c6c3c6e7a1bacde8c23c438ecb85454b126) Thanks [@steveluscher](https://github.com/steveluscher)! - Added TypeScript types to `@solana/fast-stable-stringify` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/fast-stable-stringify/package.json b/packages/fast-stable-stringify/package.json index 53e35f8e72fc..675f73dac512 100644 --- a/packages/fast-stable-stringify/package.json +++ b/packages/fast-stable-stringify/package.json @@ -1,6 +1,6 @@ { "name": "@solana/fast-stable-stringify", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Deterministic stringification for when performance and bundle size matters", "exports": { "edge-light": { diff --git a/packages/functional/CHANGELOG.md b/packages/functional/CHANGELOG.md index a876171798e0..6a45d6f5fe43 100644 --- a/packages/functional/CHANGELOG.md +++ b/packages/functional/CHANGELOG.md @@ -1,5 +1,15 @@ # @solana/functional +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/functional/package.json b/packages/functional/package.json index b913df220745..24edf661bc90 100644 --- a/packages/functional/package.json +++ b/packages/functional/package.json @@ -1,6 +1,6 @@ { "name": "@solana/functional", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Functional JavaScript helpers", "exports": { "edge-light": { diff --git a/packages/instructions/CHANGELOG.md b/packages/instructions/CHANGELOG.md index e27506a4d010..a337839ca5f3 100644 --- a/packages/instructions/CHANGELOG.md +++ b/packages/instructions/CHANGELOG.md @@ -1,5 +1,18 @@ # @solana/instructions +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/instructions/package.json b/packages/instructions/package.json index 0088e499b903..fe0642989436 100644 --- a/packages/instructions/package.json +++ b/packages/instructions/package.json @@ -1,6 +1,6 @@ { "name": "@solana/instructions", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for creating transaction instructions", "exports": { "edge-light": { diff --git a/packages/keys/CHANGELOG.md b/packages/keys/CHANGELOG.md index b81a22bc6529..383054d0a168 100644 --- a/packages/keys/CHANGELOG.md +++ b/packages/keys/CHANGELOG.md @@ -1,5 +1,48 @@ # @solana/keys +## 2.0.0 + +### Patch Changes + +- [#3050](https://github.com/solana-labs/solana-web3.js/pull/3050) [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add a `createKeyPairFromPrivateKeyBytes` helper that creates a keypair from the 32-byte private key bytes. + + ```ts + import { createKeyPairFromPrivateKeyBytes } from '@solana/keys'; + + const { privateKey, publicKey } = await createKeyPairFromPrivateKeyBytes(new Uint8Array([...])); + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#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 + +- [#2329](https://github.com/solana-labs/solana-web3.js/pull/2329) [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8) Thanks [@luu-alex](https://github.com/luu-alex)! - `createKeyPairFromBytes()` now validates that the public key imported is the one that would be derived from the private key imported + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#3128](https://github.com/solana-labs/solana-web3.js/pull/3128) [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix missing export in `@solana/keys` package. This means, the `getPublicKeyFromPrivateKey` function is now properly exported. + +- [#3049](https://github.com/solana-labs/solana-web3.js/pull/3049) [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add a `getPublicKeyFromPrivateKey` helper that, given an extractable `CryptoKey` private key, gets the corresponding public key as a `CryptoKey`. + + ```ts + import { createPrivateKeyFromBytes, getPublicKeyFromPrivateKey } from '@solana/keys'; + + const privateKey = await createPrivateKeyFromBytes(new Uint8Array([...]), true); + + const publicKey = await getPublicKeyFromPrivateKey(privateKey); + const extractablePublicKey = await getPublicKeyFromPrivateKey(privateKey, true); + ``` + +- [#2352](https://github.com/solana-labs/solana-web3.js/pull/2352) [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1) Thanks [@steveluscher](https://github.com/steveluscher)! - `SubtleCrypto` assertion methods that can make their assertions synchronously are now synchronous, for performance. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`441fa3a`](https://github.com/solana-labs/solana-web3.js/commit/441fa3a6c7c104961f935e65e259f40c10e82f8a), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/assertions@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/keys/package.json b/packages/keys/package.json index 1ee28bc31ec2..e2b54a1d6e4b 100644 --- a/packages/keys/package.json +++ b/packages/keys/package.json @@ -1,6 +1,6 @@ { "name": "@solana/keys", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for generating and transforming key material", "exports": { "edge-light": { diff --git a/packages/library/CHANGELOG.md b/packages/library/CHANGELOG.md index 3768726550d8..0e0d16c4f8ad 100644 --- a/packages/library/CHANGELOG.md +++ b/packages/library/CHANGELOG.md @@ -1,5 +1,121 @@ # @solana/web3.js +## 2.0.0 + +### Major Changes + +- [`4e7ec14`](https://github.com/solana-labs/solana-web3.js/commit/4e7ec14d9c1a74122d8b9b6cd177928bd1087c4b) Thanks [@steveluscher](https://github.com/steveluscher)! - 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 + +### Patch Changes + +- [#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` + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2905](https://github.com/solana-labs/solana-web3.js/pull/2905) [`56fde06`](https://github.com/solana-labs/solana-web3.js/commit/56fde06003841228d4e7de162059dda648f1043d) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed the type of `config` on `getComputeUnitEstimateForTransactionMessage`. It is now optional and does not include `transactionMessage`. + +- [#3453](https://github.com/solana-labs/solana-web3.js/pull/3453) [`bafefed`](https://github.com/solana-labs/solana-web3.js/commit/bafefed88574009ba5a983023e439d91b65fada2) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Rename decodeTransactionMessage to decompileTransactionMessageFetchingLookupTables + +- [#2504](https://github.com/solana-labs/solana-web3.js/pull/2504) [`18d6b56`](https://github.com/solana-labs/solana-web3.js/commit/18d6b56a69509e4c98de8f3de51abe2623b46763) Thanks [@steveluscher](https://github.com/steveluscher)! - Replaced `fast-stable-stringify` with our fork + +- [#3290](https://github.com/solana-labs/solana-web3.js/pull/3290) [`2368163`](https://github.com/solana-labs/solana-web3.js/commit/23681637fa3ee0e2242b3b6bf087a066393bcbd8) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Throw an error if a transaction fails when being simulated to estimate CUs + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#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 + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`42a70f4`](https://github.com/solana-labs/solana-web3.js/commit/42a70f4c3004e55fe6ce5a8e500f5610765ec66f), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`1ad523d`](https://github.com/solana-labs/solana-web3.js/commit/1ad523dc5792d9152a66e9dc2b83294e3eba4db0), [`7ee47ae`](https://github.com/solana-labs/solana-web3.js/commit/7ee47ae24ad73b429ee863342f300a6f6c49e3d2), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`696c72c`](https://github.com/solana-labs/solana-web3.js/commit/696c72ce25c96f06442785bddffbc890ceb802f3), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`2040f96`](https://github.com/solana-labs/solana-web3.js/commit/2040f96cc22e4195749577d265cd6a76d8a08b87), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`1672346`](https://github.com/solana-labs/solana-web3.js/commit/1672346246fe9444b018d726ab7bfcd4bb092ec2), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`af9fa3b`](https://github.com/solana-labs/solana-web3.js/commit/af9fa3b7e83220d69eab67b37d3a36beac0e848c), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`500a991`](https://github.com/solana-labs/solana-web3.js/commit/500a991d292638eaee1fa48a7b94acfe2ff83cb7), [`c122c75`](https://github.com/solana-labs/solana-web3.js/commit/c122c75936e8fa5364edf114a5182cf119b26922), [`0b02de1`](https://github.com/solana-labs/solana-web3.js/commit/0b02de140887654f19f8eda374f40c6f5a8f5e92), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`8f94a9e`](https://github.com/solana-labs/solana-web3.js/commit/8f94a9ede71b32662bff991e6def68bc9e8bc921), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`cec9048`](https://github.com/solana-labs/solana-web3.js/commit/cec9048b2f83535df7e499db5488c336981dfb5a), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`44c8772`](https://github.com/solana-labs/solana-web3.js/commit/44c8772c8711b99e68dce3348e17bfc5b1d2a833), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`18d6b56`](https://github.com/solana-labs/solana-web3.js/commit/18d6b56a69509e4c98de8f3de51abe2623b46763), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`4decebb`](https://github.com/solana-labs/solana-web3.js/commit/4decebb9b619972f49c740323b59cf470696e105), [`d4965ec`](https://github.com/solana-labs/solana-web3.js/commit/d4965ece9abaf81e3006442db15f3f77d89a622c), [`9239e6e`](https://github.com/solana-labs/solana-web3.js/commit/9239e6ec972b4de9f0d15b197fbef1d2871759d9), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`22a34aa`](https://github.com/solana-labs/solana-web3.js/commit/22a34aa08d1be7e9b43ccfea94a99eaa2694e491), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/transactions@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc@2.0.0 + - @solana/rpc-subscriptions@2.0.0 + - @solana/rpc-spec-types@2.0.0 + - @solana/keys@2.0.0 + - @solana/signers@2.0.0 + - @solana/transaction-confirmation@2.0.0 + - @solana/transaction-messages@2.0.0 + - @solana/accounts@2.0.0 + - @solana/codecs@2.0.0 + - @solana/programs@2.0.0 + - @solana/rpc-parsed-types@2.0.0 + - @solana/instructions@2.0.0 + - @solana/functional@2.0.0 + - @solana/sysvars@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/library/package.json b/packages/library/package.json index 8c2081c6dd5c..f4b48abaef5a 100644 --- a/packages/library/package.json +++ b/packages/library/package.json @@ -1,6 +1,6 @@ { "name": "@solana/web3.js", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Solana Javascript API", "exports": { "edge-light": { diff --git a/packages/options/CHANGELOG.md b/packages/options/CHANGELOG.md index 83e9658bb531..b8a907f7e491 100644 --- a/packages/options/CHANGELOG.md +++ b/packages/options/CHANGELOG.md @@ -1,5 +1,103 @@ # @solana/options +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#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`. + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2573](https://github.com/solana-labs/solana-web3.js/pull/2573) [`a29bfee`](https://github.com/solana-labs/solana-web3.js/commit/a29bfeeb2119d99906a31fb1e5103d8ebf783ceb) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Fix missing export of Zeroable Option codecs + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2412](https://github.com/solana-labs/solana-web3.js/pull/2412) [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2410](https://github.com/solana-labs/solana-web3.js/pull/2410) [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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 + ``` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`deb7b80`](https://github.com/solana-labs/solana-web3.js/commit/deb7b806b4cbe620b1714be1765c981d88c3a2f6), [`6dcf548`](https://github.com/solana-labs/solana-web3.js/commit/6dcf5483bb6bbb8d343db28dedb258c8da91ffac), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`49a764c`](https://github.com/solana-labs/solana-web3.js/commit/49a764c6d481886501540f8dbfe8be75d754355b), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`919c736`](https://github.com/solana-labs/solana-web3.js/commit/919c7367dec8e142746295128cc6c2cc6752e636), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2d48c09`](https://github.com/solana-labs/solana-web3.js/commit/2d48c0954a3823b937a9b4e572a8d63cd7e4631c), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`bf029dd`](https://github.com/solana-labs/solana-web3.js/commit/bf029dd90230405b3d59f70aedd57fc0117b926e)]: + - @solana/errors@2.0.0 + - @solana/codecs-data-structures@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/codecs-numbers@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/options/package.json b/packages/options/package.json index cd220bd8241e..73b8199c1b88 100644 --- a/packages/options/package.json +++ b/packages/options/package.json @@ -1,6 +1,6 @@ { "name": "@solana/options", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Managing and serializing Rust-like Option types in JavaScript", "exports": { "edge-light": { diff --git a/packages/programs/CHANGELOG.md b/packages/programs/CHANGELOG.md index b1a638fd75db..001c81deaddc 100644 --- a/packages/programs/CHANGELOG.md +++ b/packages/programs/CHANGELOG.md @@ -1,5 +1,25 @@ # @solana/programs +## 2.0.0 + +### Patch Changes + +- [#2491](https://github.com/solana-labs/solana-web3.js/pull/2491) [`2040f96`](https://github.com/solana-labs/solana-web3.js/commit/2040f96cc22e4195749577d265cd6a76d8a08b87) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove program types and `resolveTransactionError` helper + +- [#2490](https://github.com/solana-labs/solana-web3.js/pull/2490) [`1672346`](https://github.com/solana-labs/solana-web3.js/commit/1672346246fe9444b018d726ab7bfcd4bb092ec2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `isProgramError` helper function to `@solana/programs` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#2968](https://github.com/solana-labs/solana-web3.js/pull/2968) [`9239e6e`](https://github.com/solana-labs/solana-web3.js/commit/9239e6ec972b4de9f0d15b197fbef1d2871759d9) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Tighten return type of isProgramError + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/addresses@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/programs/package.json b/packages/programs/package.json index e0372ea024f4..b2290452fea0 100644 --- a/packages/programs/package.json +++ b/packages/programs/package.json @@ -1,6 +1,6 @@ { "name": "@solana/programs", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for defining programs and resolving program errors", "exports": { "edge-light": { diff --git a/packages/promises/CHANGELOG.md b/packages/promises/CHANGELOG.md index 38b2511f8521..d0007a71156f 100644 --- a/packages/promises/CHANGELOG.md +++ b/packages/promises/CHANGELOG.md @@ -1,5 +1,17 @@ # @solana/promises +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3071](https://github.com/solana-labs/solana-web3.js/pull/3071) [`b4bf318`](https://github.com/solana-labs/solana-web3.js/commit/b4bf318d7d4bdd639e4c126c70350993a8540fe8) Thanks [@steveluscher](https://github.com/steveluscher)! - Created a helper that you can use to race two or more promises without having to worry about them leaking memory + +- [#3070](https://github.com/solana-labs/solana-web3.js/pull/3070) [`f2bb4e8`](https://github.com/solana-labs/solana-web3.js/commit/f2bb4e8c7f7efd049cb1c3810291c99e9293c25d) Thanks [@steveluscher](https://github.com/steveluscher)! - Created a package for dealing with JavaScript Promises, and copied the implementation of `getAbortablePromise` into it + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/promises/package.json b/packages/promises/package.json index 2ec6568f1033..06c61959a51a 100644 --- a/packages/promises/package.json +++ b/packages/promises/package.json @@ -1,6 +1,6 @@ { "name": "@solana/promises", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for using JavaScript promises", "exports": { "edge-light": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index c6231967bed6..3c5e2b6c19ab 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,64 @@ # @solana/react +## 2.0.0 + +### Minor Changes + +- [#2928](https://github.com/solana-labs/solana-web3.js/pull/2928) [`bac3747`](https://github.com/solana-labs/solana-web3.js/commit/bac37479dcfad3da86ccd01da5095759f449eb3d) Thanks [@steveluscher](https://github.com/steveluscher)! - 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 ( + + ); + } + ``` + +### Patch Changes + +- [#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 + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`1ad523d`](https://github.com/solana-labs/solana-web3.js/commit/1ad523dc5792d9152a66e9dc2b83294e3eba4db0), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`cec9048`](https://github.com/solana-labs/solana-web3.js/commit/cec9048b2f83535df7e499db5488c336981dfb5a), [`b4bf318`](https://github.com/solana-labs/solana-web3.js/commit/b4bf318d7d4bdd639e4c126c70350993a8540fe8), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`f2bb4e8`](https://github.com/solana-labs/solana-web3.js/commit/f2bb4e8c7f7efd049cb1c3810291c99e9293c25d), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`4decebb`](https://github.com/solana-labs/solana-web3.js/commit/4decebb9b619972f49c740323b59cf470696e105), [`d4965ec`](https://github.com/solana-labs/solana-web3.js/commit/d4965ece9abaf81e3006442db15f3f77d89a622c), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`22a34aa`](https://github.com/solana-labs/solana-web3.js/commit/22a34aa08d1be7e9b43ccfea94a99eaa2694e491), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/transactions@2.0.0 + - @solana/addresses@2.0.0 + - @solana/keys@2.0.0 + - @solana/signers@2.0.0 + - @solana/promises@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 3b94a42b2638..07098cece2dc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@solana/react", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "React hooks for building Solana apps", "exports": { "edge-light": { diff --git a/packages/rpc-api/CHANGELOG.md b/packages/rpc-api/CHANGELOG.md index c578153565c5..ec534b76e2bf 100644 --- a/packages/rpc-api/CHANGELOG.md +++ b/packages/rpc-api/CHANGELOG.md @@ -1,5 +1,56 @@ # @solana/rpc-api +## 2.0.0 + +### Patch Changes + +- [#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. + +- [#2865](https://github.com/solana-labs/solana-web3.js/pull/2865) [`daf9691`](https://github.com/solana-labs/solana-web3.js/commit/daf96918b2e875b60ab733acb0bd3f1b76a46c76) Thanks [@steveluscher](https://github.com/steveluscher)! - 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` + +- [#3145](https://github.com/solana-labs/solana-web3.js/pull/3145) [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcResponse` type to `RpcResponseData` to make room for a new `RpcResponse` type + +- [#3213](https://github.com/solana-labs/solana-web3.js/pull/3213) [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export + +- [#3454](https://github.com/solana-labs/solana-web3.js/pull/3454) [`1fde4b1`](https://github.com/solana-labs/solana-web3.js/commit/1fde4b1d75c4af6d965ca26f6a7c649c6a517deb) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Correct type of replacementBlockhash in simulateTransaction + +- [#3456](https://github.com/solana-labs/solana-web3.js/pull/3456) [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove `UnsafeBeyond2Pow53Minus1` type suffixes + +- [#3150](https://github.com/solana-labs/solana-web3.js/pull/3150) [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcApi` use new `RpcRequestTransformer` and `RpcResponseTransformer` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3202](https://github.com/solana-labs/solana-web3.js/pull/3202) [`bf07a60`](https://github.com/solana-labs/solana-web3.js/commit/bf07a606768eef7cd37c1dd0e2c0a35fe3b12f24) Thanks [@disco-infinex](https://github.com/disco-infinex)! - PerformanceSample return type field numNonVoteTransaction corrected to numNonVoteTransactions + +- [#3161](https://github.com/solana-labs/solana-web3.js/pull/3161) [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `getIntegerOverflowRequestTransformer`, `getBigIntDowncastRequestTransformer` and `getTreeWalkerRequestTransformer` helpers + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#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` + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#3148](https://github.com/solana-labs/solana-web3.js/pull/3148) [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcTransport` return new `RpcReponse` type instead of parsed JSON data + +- [#3201](https://github.com/solana-labs/solana-web3.js/pull/3201) [`02cefa7`](https://github.com/solana-labs/solana-web3.js/commit/02cefa7cc98463e602f78a8acc10d85c37f03481) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Update the response type of the `getClusterNodes` RPC method + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`6b43588`](https://github.com/solana-labs/solana-web3.js/commit/6b4358864cb328d1b83f11c94b29f75e1b3d635f), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`628177f`](https://github.com/solana-labs/solana-web3.js/commit/628177ffcc1be1c40e0c82d80743b07f695cfe69), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`06dcd86`](https://github.com/solana-labs/solana-web3.js/commit/06dcd86d830e866eb3ee7c47ea1bb99b8205bd1e), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`4f87d12`](https://github.com/solana-labs/solana-web3.js/commit/4f87d12cf942fbd4f427005d5ac41671ce28a22c), [`29d5113`](https://github.com/solana-labs/solana-web3.js/commit/29d5113b2c6f8c7907127ad992bad1329edbd7e7), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`91076ba`](https://github.com/solana-labs/solana-web3.js/commit/91076ba1884eb72880d1ee964b6800d90afb4460), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`747b9ab`](https://github.com/solana-labs/solana-web3.js/commit/747b9abb90c6baeec73a284d87a324bf3caeab03), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`f5660d2`](https://github.com/solana-labs/solana-web3.js/commit/f5660d2eb4d2ee5be8c9cd8e8b58a11de1a799bf), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`28ca5d1`](https://github.com/solana-labs/solana-web3.js/commit/28ca5d17d4c574a690a5bf29d4f1fe0ad8f5883c), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`c801637`](https://github.com/solana-labs/solana-web3.js/commit/c801637bcf94930be832c57817166da2d2fdb1a4), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`6340744`](https://github.com/solana-labs/solana-web3.js/commit/6340744e5cf0ea91ae677f381d5a187638a19597), [`d198638`](https://github.com/solana-labs/solana-web3.js/commit/d19863844cf28c252e6bedd7070e633692d9e46e), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/rpc-spec@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/transactions@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc-transformers@2.0.0 + - @solana/keys@2.0.0 + - @solana/transaction-messages@2.0.0 + - @solana/rpc-parsed-types@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-api/package.json b/packages/rpc-api/package.json index e488ecc5282a..fa9f100ff764 100644 --- a/packages/rpc-api/package.json +++ b/packages/rpc-api/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-api", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Defines all default Solana RPC methods as types", "exports": { "edge-light": { diff --git a/packages/rpc-graphql/CHANGELOG.md b/packages/rpc-graphql/CHANGELOG.md index db099f4e0840..831cab284c58 100644 --- a/packages/rpc-graphql/CHANGELOG.md +++ b/packages/rpc-graphql/CHANGELOG.md @@ -1,5 +1,25 @@ # @solana/rpc-graphql +## 2.0.0 + +### Minor Changes + +- [#3098](https://github.com/solana-labs/solana-web3.js/pull/3098) [`2f541b6`](https://github.com/solana-labs/solana-web3.js/commit/2f541b6c7e87002cf26e911d31df4779d4da674c) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Update program accounts filters for `programAccounts` query + +### Patch Changes + +- [#3213](https://github.com/solana-labs/solana-web3.js/pull/3213) [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`5ed19c6`](https://github.com/solana-labs/solana-web3.js/commit/5ed19c6c3c6e7a1bacde8c23c438ecb85454b126), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/fast-stable-stringify@2.0.0 + - @solana/codecs-strings@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-graphql/package.json b/packages/rpc-graphql/package.json index a139605c9b2c..1b1db580cc02 100644 --- a/packages/rpc-graphql/package.json +++ b/packages/rpc-graphql/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-graphql", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A library for resolving GraphQl query calls to the Solana JSON RPC API", "exports": { "edge-light": { diff --git a/packages/rpc-parsed-types/CHANGELOG.md b/packages/rpc-parsed-types/CHANGELOG.md index 058ad196236d..034b9633fbd8 100644 --- a/packages/rpc-parsed-types/CHANGELOG.md +++ b/packages/rpc-parsed-types/CHANGELOG.md @@ -1,5 +1,17 @@ # @solana/rpc-parsed-types +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/rpc-parsed-types/package.json b/packages/rpc-parsed-types/package.json index 78a373cd2a3b..29208d8b5e5c 100644 --- a/packages/rpc-parsed-types/package.json +++ b/packages/rpc-parsed-types/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-parsed-types", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Type definitions for parsed types used in the Solana RPC", "exports": { "edge-light": { diff --git a/packages/rpc-spec-types/CHANGELOG.md b/packages/rpc-spec-types/CHANGELOG.md index 6d850d288218..b00dfd3f95f9 100644 --- a/packages/rpc-spec-types/CHANGELOG.md +++ b/packages/rpc-spec-types/CHANGELOG.md @@ -1,5 +1,35 @@ # @solana/rpc-spec-types +## 2.0.0 + +### Patch Changes + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3507](https://github.com/solana-labs/solana-web3.js/pull/3507) [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Fixed a bug where the subcription server's response would not be detected, because of a mismatch in the format of the `id`. Now all RPC message ids are strings, for avoidance of doubt. + +- [#3393](https://github.com/solana-labs/solana-web3.js/pull/3393) [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Move RpcRequest and RpcResponse types to rpc-spec-types + +- [#3145](https://github.com/solana-labs/solana-web3.js/pull/3145) [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcResponse` type to `RpcResponseData` to make room for a new `RpcResponse` type + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#3394](https://github.com/solana-labs/solana-web3.js/pull/3394) [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use RpcRequest in createRpcMessage helper + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/rpc-spec-types/package.json b/packages/rpc-spec-types/package.json index 546e90bf86b0..9eaf7fd8cb40 100644 --- a/packages/rpc-spec-types/package.json +++ b/packages/rpc-spec-types/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-spec-types", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Shared generic JSON RPC specifications", "exports": { "edge-light": { diff --git a/packages/rpc-spec/CHANGELOG.md b/packages/rpc-spec/CHANGELOG.md index 031a4dceb19e..70c76d86a9b8 100644 --- a/packages/rpc-spec/CHANGELOG.md +++ b/packages/rpc-spec/CHANGELOG.md @@ -1,5 +1,70 @@ # @solana/rpc-spec +## 2.0.0 + +### Patch Changes + +- [#3221](https://github.com/solana-labs/solana-web3.js/pull/3221) [`6b43588`](https://github.com/solana-labs/solana-web3.js/commit/6b4358864cb328d1b83f11c94b29f75e1b3d635f) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add new `isJsonRpcPayload` helper method + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3146](https://github.com/solana-labs/solana-web3.js/pull/3146) [`628177f`](https://github.com/solana-labs/solana-web3.js/commit/628177ffcc1be1c40e0c82d80743b07f695cfe69) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcRequest` type to `RpcApiRequestPlan` to make room for new `RpcRequest` type + +- [#3429](https://github.com/solana-labs/solana-web3.js/pull/3429) [`06dcd86`](https://github.com/solana-labs/solana-web3.js/commit/06dcd86d830e866eb3ee7c47ea1bb99b8205bd1e) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcApiRequestPlan` to `RpcPlan` to stay consistent with the `RpcSusbscriptionsPlan` of the RPC Subscription architecture. + +- [#3507](https://github.com/solana-labs/solana-web3.js/pull/3507) [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Fixed a bug where the subcription server's response would not be detected, because of a mismatch in the format of the `id`. Now all RPC message ids are strings, for avoidance of doubt. + +- [#3393](https://github.com/solana-labs/solana-web3.js/pull/3393) [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Move RpcRequest and RpcResponse types to rpc-spec-types + +- [#3145](https://github.com/solana-labs/solana-web3.js/pull/3145) [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcResponse` type to `RpcResponseData` to make room for a new `RpcResponse` type + +- [#3213](https://github.com/solana-labs/solana-web3.js/pull/3213) [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export + +- [#3147](https://github.com/solana-labs/solana-web3.js/pull/3147) [`4f87d12`](https://github.com/solana-labs/solana-web3.js/commit/4f87d12cf942fbd4f427005d5ac41671ce28a22c) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add new `RpcRequest` and `RpcResponse` types with `RpcRequestTransformer` and `RpcResponseTransformer` functions + +- [#2950](https://github.com/solana-labs/solana-web3.js/pull/2950) [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Refactor rpc-spec to remove requirement for transports to implement parts of JSON RPC spec + +- [#3150](https://github.com/solana-labs/solana-web3.js/pull/3150) [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcApi` use new `RpcRequestTransformer` and `RpcResponseTransformer` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3432](https://github.com/solana-labs/solana-web3.js/pull/3432) [`91076ba`](https://github.com/solana-labs/solana-web3.js/commit/91076ba1884eb72880d1ee964b6800d90afb4460) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Redesign the `RpcPlan` by using a plan executor function. + + This change replaces the `payload` and `responseTransformer` attributes of the `RpcPlan` type (returned by the RPC API) in favour of a new `execute` function that accepts an `RpcTransport` and an optional `AbortSignal` and return an `RpcResponse`. That way, the RPC API is able to completely wrap the RPC Transport layer and can do things like: not calling the transport at all for caching purposes or calling the transport multiple times for retries or even for aggregating responses from multiple RPC calls. + + See the following PRs for more details: + + - [PR #3430](https://github.com/solana-labs/solana-web3.js/pull/3430) + - [PR #3431](https://github.com/solana-labs/solana-web3.js/pull/3431) + +- [#3229](https://github.com/solana-labs/solana-web3.js/pull/3229) [`f5660d2`](https://github.com/solana-labs/solana-web3.js/commit/f5660d2eb4d2ee5be8c9cd8e8b58a11de1a799bf) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make API plans return payloads + +- [#3148](https://github.com/solana-labs/solana-web3.js/pull/3148) [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcTransport` return new `RpcReponse` type instead of parsed JSON data + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#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 + +- [#3230](https://github.com/solana-labs/solana-web3.js/pull/3230) [`d198638`](https://github.com/solana-labs/solana-web3.js/commit/d19863844cf28c252e6bedd7070e633692d9e46e) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `createRpcApi` to `createJsonRpcApi` + +- [#3394](https://github.com/solana-labs/solana-web3.js/pull/3394) [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use RpcRequest in createRpcMessage helper + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2)]: + - @solana/errors@2.0.0 + - @solana/rpc-spec-types@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-spec/package.json b/packages/rpc-spec/package.json index 27ab44b70e30..22a02846b5ac 100644 --- a/packages/rpc-spec/package.json +++ b/packages/rpc-spec/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-spec", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A generic implementation of JSON RPCs using proxies", "exports": { "edge-light": { diff --git a/packages/rpc-subscriptions-api/CHANGELOG.md b/packages/rpc-subscriptions-api/CHANGELOG.md index 9b398690dc16..3ad147b683c5 100644 --- a/packages/rpc-subscriptions-api/CHANGELOG.md +++ b/packages/rpc-subscriptions-api/CHANGELOG.md @@ -1,5 +1,50 @@ # @solana/rpc-subscriptions-api +## 2.0.0 + +### Patch Changes + +- [#3218](https://github.com/solana-labs/solana-web3.js/pull/3218) [`1d87b3c`](https://github.com/solana-labs/solana-web3.js/commit/1d87b3c9fb5637cdceb31c5675e876d8fe088677) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcSubscriptionsApi: no longer extend RpcApiSubscriptionsMethods + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3150](https://github.com/solana-labs/solana-web3.js/pull/3150) [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcApi` use new `RpcRequestTransformer` and `RpcResponseTransformer` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#3406](https://github.com/solana-labs/solana-web3.js/pull/3406) [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Replace subscriptionConfigurationHash with RpcRequest in RpcSubscriptionPlan + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc) Thanks [@steveluscher](https://github.com/steveluscher)! - We refactored the lower levels of the subscriptions API entirely. + + Previously, all layers of the subscriptions implementation, from the `WebSocket` transport to the API that developers use, dealt in `AsyncIterables`. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as an `AsyncIterable`. + + This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new `WebSocket` connections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separate `message` events into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message. + +- Updated dependencies [[`1d87b3c`](https://github.com/solana-labs/solana-web3.js/commit/1d87b3c9fb5637cdceb31c5675e876d8fe088677), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`17c373d`](https://github.com/solana-labs/solana-web3.js/commit/17c373dec6dd167ea5b4e37e213067aa05fa4e14), [`29d5113`](https://github.com/solana-labs/solana-web3.js/commit/29d5113b2c6f8c7907127ad992bad1329edbd7e7), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`747b9ab`](https://github.com/solana-labs/solana-web3.js/commit/747b9abb90c6baeec73a284d87a324bf3caeab03), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`28ca5d1`](https://github.com/solana-labs/solana-web3.js/commit/28ca5d17d4c574a690a5bf29d4f1fe0ad8f5883c), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`c801637`](https://github.com/solana-labs/solana-web3.js/commit/c801637bcf94930be832c57817166da2d2fdb1a4), [`92655fd`](https://github.com/solana-labs/solana-web3.js/commit/92655fda6631339f07c6cd7097ed9e2518f86853), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/rpc-subscriptions-spec@2.0.0 + - @solana/transactions@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc-transformers@2.0.0 + - @solana/keys@2.0.0 + - @solana/transaction-messages@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-subscriptions-api/package.json b/packages/rpc-subscriptions-api/package.json index 39c2cd34081e..f3019a501085 100644 --- a/packages/rpc-subscriptions-api/package.json +++ b/packages/rpc-subscriptions-api/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-subscriptions-api", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Defines all default Solana RPC subscriptions as types", "exports": { "edge-light": { diff --git a/packages/rpc-subscriptions-channel-websocket/CHANGELOG.md b/packages/rpc-subscriptions-channel-websocket/CHANGELOG.md index 488c4059bbf7..f16a5b7d4d81 100644 --- a/packages/rpc-subscriptions-channel-websocket/CHANGELOG.md +++ b/packages/rpc-subscriptions-channel-websocket/CHANGELOG.md @@ -1,5 +1,29 @@ # @solana/rpc-subscriptions-channel-websocket +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc) Thanks [@steveluscher](https://github.com/steveluscher)! - We refactored the lower levels of the subscriptions API entirely. + + Previously, all layers of the subscriptions implementation, from the `WebSocket` transport to the API that developers use, dealt in `AsyncIterables`. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as an `AsyncIterable`. + + This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new `WebSocket` connections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separate `message` events into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message. + +- Updated dependencies [[`1d87b3c`](https://github.com/solana-labs/solana-web3.js/commit/1d87b3c9fb5637cdceb31c5675e876d8fe088677), [`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`17c373d`](https://github.com/solana-labs/solana-web3.js/commit/17c373dec6dd167ea5b4e37e213067aa05fa4e14), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`8c2cb9f`](https://github.com/solana-labs/solana-web3.js/commit/8c2cb9f44a52b3c27bc15c2c972bea1aae1622e7), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`92655fd`](https://github.com/solana-labs/solana-web3.js/commit/92655fda6631339f07c6cd7097ed9e2518f86853), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc)]: + - @solana/rpc-subscriptions-spec@2.0.0 + - @solana/errors@2.0.0 + - @solana/subscribable@2.0.0 + - @solana/functional@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-subscriptions-channel-websocket/package.json b/packages/rpc-subscriptions-channel-websocket/package.json index 3dd5bd627cf2..1107154182dd 100644 --- a/packages/rpc-subscriptions-channel-websocket/package.json +++ b/packages/rpc-subscriptions-channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-subscriptions-channel-websocket", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "An RPC Subscriptions transport that uses WebSockets", "exports": { "edge-light": { diff --git a/packages/rpc-subscriptions-spec/CHANGELOG.md b/packages/rpc-subscriptions-spec/CHANGELOG.md index ea562d03610f..154a033a34bb 100644 --- a/packages/rpc-subscriptions-spec/CHANGELOG.md +++ b/packages/rpc-subscriptions-spec/CHANGELOG.md @@ -1,5 +1,51 @@ # @solana/rpc-subscriptions-spec +## 2.0.0 + +### Patch Changes + +- [#3218](https://github.com/solana-labs/solana-web3.js/pull/3218) [`1d87b3c`](https://github.com/solana-labs/solana-web3.js/commit/1d87b3c9fb5637cdceb31c5675e876d8fe088677) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Clean up SolanaRpcSubscriptionsApi: no longer extend RpcApiSubscriptionsMethods + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3145](https://github.com/solana-labs/solana-web3.js/pull/3145) [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `RpcResponse` type to `RpcResponseData` to make room for a new `RpcResponse` type + +- [#3449](https://github.com/solana-labs/solana-web3.js/pull/3449) [`17c373d`](https://github.com/solana-labs/solana-web3.js/commit/17c373dec6dd167ea5b4e37e213067aa05fa4e14) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `transformChannelInboundMessages` and `transformChannelOutboundMessages` helper functions to transform incoming and outgoing messages on a given channel. + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3406](https://github.com/solana-labs/solana-web3.js/pull/3406) [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Replace subscriptionConfigurationHash with RpcRequest in RpcSubscriptionPlan + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3433](https://github.com/solana-labs/solana-web3.js/pull/3433) [`92655fd`](https://github.com/solana-labs/solana-web3.js/commit/92655fda6631339f07c6cd7097ed9e2518f86853) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Rename `executeSubscriptionPlan` to `execute` in `RpcSubscriptionsPlan` + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#3394](https://github.com/solana-labs/solana-web3.js/pull/3394) [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use RpcRequest in createRpcMessage helper + +- [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc) Thanks [@steveluscher](https://github.com/steveluscher)! - We refactored the lower levels of the subscriptions API entirely. + + Previously, all layers of the subscriptions implementation, from the `WebSocket` transport to the API that developers use, dealt in `AsyncIterables`. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as an `AsyncIterable`. + + This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new `WebSocket` connections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separate `message` events into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`8c2cb9f`](https://github.com/solana-labs/solana-web3.js/commit/8c2cb9f44a52b3c27bc15c2c972bea1aae1622e7), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`b4bf318`](https://github.com/solana-labs/solana-web3.js/commit/b4bf318d7d4bdd639e4c126c70350993a8540fe8), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`f2bb4e8`](https://github.com/solana-labs/solana-web3.js/commit/f2bb4e8c7f7efd049cb1c3810291c99e9293c25d), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2)]: + - @solana/errors@2.0.0 + - @solana/rpc-spec-types@2.0.0 + - @solana/subscribable@2.0.0 + - @solana/promises@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-subscriptions-spec/package.json b/packages/rpc-subscriptions-spec/package.json index 9e1c1650eadd..bf81eb535048 100644 --- a/packages/rpc-subscriptions-spec/package.json +++ b/packages/rpc-subscriptions-spec/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-subscriptions-spec", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A generic implementation of JSON RPC Subscriptions using proxies", "exports": { "edge-light": { diff --git a/packages/rpc-subscriptions/CHANGELOG.md b/packages/rpc-subscriptions/CHANGELOG.md index cfcd2417cba1..7cb1b7c707d7 100644 --- a/packages/rpc-subscriptions/CHANGELOG.md +++ b/packages/rpc-subscriptions/CHANGELOG.md @@ -1,5 +1,62 @@ # @solana/rpc-subscriptions +## 2.0.0 + +### Patch Changes + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3507](https://github.com/solana-labs/solana-web3.js/pull/3507) [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Fixed a bug where the subcription server's response would not be detected, because of a mismatch in the format of the `id`. Now all RPC message ids are strings, for avoidance of doubt. + +- [#3161](https://github.com/solana-labs/solana-web3.js/pull/3161) [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Change first argument of `onIntegerOverflow` handler from `methodName: string` to `request: RpcRequest` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3455](https://github.com/solana-labs/solana-web3.js/pull/3455) [`500a991`](https://github.com/solana-labs/solana-web3.js/commit/500a991d292638eaee1fa48a7b94acfe2ff83cb7) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Adds a channel creator function called `createDefaultSolanaRpcSubscriptionsChannelCreator`. This function works similarly to `createDefaultRpcSubscriptionsChannelCreator` but with some Solana-specific defaults. For instance, it safely handles `BigInt` values in JSON messages since Solana RPC servers accept and return integers larger than `Number.MAX_SAFE_INTEGER`. + +- [#3072](https://github.com/solana-labs/solana-web3.js/pull/3072) [`c122c75`](https://github.com/solana-labs/solana-web3.js/commit/c122c75936e8fa5364edf114a5182cf119b26922) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a memory leak with transaction confirmation and subscriptions + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#3451](https://github.com/solana-labs/solana-web3.js/pull/3451) [`8f94a9e`](https://github.com/solana-labs/solana-web3.js/commit/8f94a9ede71b32662bff991e6def68bc9e8bc921) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add a \`getRpcSubscriptionsChannelWithBigIntJSONSerialization\` helper function that parses and stringifies JSON messages with support for \`BigInt\` values. Any integer value is parsed as a \`BigInt\` in order to safely handle numbers that exceed the JavaScript \`Number.MAX_SAFE_INTEGER\` value. + +- [#3406](https://github.com/solana-labs/solana-web3.js/pull/3406) [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Replace subscriptionConfigurationHash with RpcRequest in RpcSubscriptionPlan + +- [#2504](https://github.com/solana-labs/solana-web3.js/pull/2504) [`18d6b56`](https://github.com/solana-labs/solana-web3.js/commit/18d6b56a69509e4c98de8f3de51abe2623b46763) Thanks [@steveluscher](https://github.com/steveluscher)! - Replaced `fast-stable-stringify` with our fork + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc) Thanks [@steveluscher](https://github.com/steveluscher)! - We refactored the lower levels of the subscriptions API entirely. + + Previously, all layers of the subscriptions implementation, from the `WebSocket` transport to the API that developers use, dealt in `AsyncIterables`. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as an `AsyncIterable`. + + This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new `WebSocket` connections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separate `message` events into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message. + +- Updated dependencies [[`1d87b3c`](https://github.com/solana-labs/solana-web3.js/commit/1d87b3c9fb5637cdceb31c5675e876d8fe088677), [`5ed19c6`](https://github.com/solana-labs/solana-web3.js/commit/5ed19c6c3c6e7a1bacde8c23c438ecb85454b126), [`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`17c373d`](https://github.com/solana-labs/solana-web3.js/commit/17c373dec6dd167ea5b4e37e213067aa05fa4e14), [`29d5113`](https://github.com/solana-labs/solana-web3.js/commit/29d5113b2c6f8c7907127ad992bad1329edbd7e7), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`8c2cb9f`](https://github.com/solana-labs/solana-web3.js/commit/8c2cb9f44a52b3c27bc15c2c972bea1aae1622e7), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`747b9ab`](https://github.com/solana-labs/solana-web3.js/commit/747b9abb90c6baeec73a284d87a324bf3caeab03), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`b4bf318`](https://github.com/solana-labs/solana-web3.js/commit/b4bf318d7d4bdd639e4c126c70350993a8540fe8), [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`f2bb4e8`](https://github.com/solana-labs/solana-web3.js/commit/f2bb4e8c7f7efd049cb1c3810291c99e9293c25d), [`28ca5d1`](https://github.com/solana-labs/solana-web3.js/commit/28ca5d17d4c574a690a5bf29d4f1fe0ad8f5883c), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`c801637`](https://github.com/solana-labs/solana-web3.js/commit/c801637bcf94930be832c57817166da2d2fdb1a4), [`92655fd`](https://github.com/solana-labs/solana-web3.js/commit/92655fda6631339f07c6cd7097ed9e2518f86853), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2), [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc)]: + - @solana/rpc-subscriptions-spec@2.0.0 + - @solana/rpc-subscriptions-api@2.0.0 + - @solana/fast-stable-stringify@2.0.0 + - @solana/errors@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc-transformers@2.0.0 + - @solana/rpc-spec-types@2.0.0 + - @solana/rpc-subscriptions-channel-websocket@2.0.0 + - @solana/subscribable@2.0.0 + - @solana/functional@2.0.0 + - @solana/promises@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-subscriptions/package.json b/packages/rpc-subscriptions/package.json index 7783cc556622..b819f4577727 100644 --- a/packages/rpc-subscriptions/package.json +++ b/packages/rpc-subscriptions/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-subscriptions", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A library for subscribing to Solana RPC notifications", "exports": { "edge-light": { diff --git a/packages/rpc-transformers/CHANGELOG.md b/packages/rpc-transformers/CHANGELOG.md index b9d1b3701ac2..15013c18c194 100644 --- a/packages/rpc-transformers/CHANGELOG.md +++ b/packages/rpc-transformers/CHANGELOG.md @@ -1,5 +1,51 @@ # @solana/rpc-transformers +## 2.0.0 + +### Patch Changes + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3161](https://github.com/solana-labs/solana-web3.js/pull/3161) [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Change first argument of `onIntegerOverflow` handler from `methodName: string` to `request: RpcRequest` + +- [#3163](https://github.com/solana-labs/solana-web3.js/pull/3163) [`29d5113`](https://github.com/solana-labs/solana-web3.js/commit/29d5113b2c6f8c7907127ad992bad1329edbd7e7) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `getThrowSolanaErrorResponseTransformer`, `getResultResponseTransformer`, `getBigIntUpcastResponseTransformer` and `getTreeWalkerResponseTransformer` helpers + +- [#2950](https://github.com/solana-labs/solana-web3.js/pull/2950) [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Refactor rpc-spec to remove requirement for transports to implement parts of JSON RPC spec + +- [#3150](https://github.com/solana-labs/solana-web3.js/pull/3150) [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcApi` use new `RpcRequestTransformer` and `RpcResponseTransformer` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3161](https://github.com/solana-labs/solana-web3.js/pull/3161) [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `getIntegerOverflowRequestTransformer`, `getBigIntDowncastRequestTransformer` and `getTreeWalkerRequestTransformer` helpers + +- [#3159](https://github.com/solana-labs/solana-web3.js/pull/3159) [`747b9ab`](https://github.com/solana-labs/solana-web3.js/commit/747b9abb90c6baeec73a284d87a324bf3caeab03) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `getDefaultCommitmentRequestTransformer` helper + +- [#3184](https://github.com/solana-labs/solana-web3.js/pull/3184) [`28ca5d1`](https://github.com/solana-labs/solana-web3.js/commit/28ca5d17d4c574a690a5bf29d4f1fe0ad8f5883c) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove temporary fix for Agave issue 479 + + The fix is now deployed on mainnet-beta (See https://github.com/anza-xyz/agave/issues/479 and https://github.com/anza-xyz/agave/pull/483). + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#2415](https://github.com/solana-labs/solana-web3.js/pull/2415) [`c801637`](https://github.com/solana-labs/solana-web3.js/commit/c801637bcf94930be832c57817166da2d2fdb1a4) Thanks [@steveluscher](https://github.com/steveluscher)! - Improve transaction sending reliability for those who skip preflight (simulation) when calling `sendTransaction` + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2)]: + - @solana/errors@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc-spec-types@2.0.0 + - @solana/functional@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-transformers/package.json b/packages/rpc-transformers/package.json index 49bcc91b5fb9..f4950ab84deb 100644 --- a/packages/rpc-transformers/package.json +++ b/packages/rpc-transformers/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-transformers", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Reusable transformers for patching RPC inputs and outputs", "exports": { "edge-light": { diff --git a/packages/rpc-transport-http/CHANGELOG.md b/packages/rpc-transport-http/CHANGELOG.md index 3a754ffe3d9b..a2c093120ccc 100644 --- a/packages/rpc-transport-http/CHANGELOG.md +++ b/packages/rpc-transport-http/CHANGELOG.md @@ -1,5 +1,40 @@ # @solana/rpc-transport-http +## 2.0.0 + +### Patch Changes + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#3196](https://github.com/solana-labs/solana-web3.js/pull/3196) [`512853e`](https://github.com/solana-labs/solana-web3.js/commit/512853e5d0964075261913f9b2b08137116ce82e) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add new `createHttpTransportForSolanaRpc` function that creates a new HTTP transport specific to the Solana RPC API. This transport uses custom JSON parsing and stringifying strategies on both the request and response of Solana RPC API requests in order to prevents loss of precision for large integers. + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#3192](https://github.com/solana-labs/solana-web3.js/pull/3192) [`422f928`](https://github.com/solana-labs/solana-web3.js/commit/422f928086db5897522605243ac09148f9301fa1) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add `fromJson` and `toJson` options to the HTTP transport + +- [#3148](https://github.com/solana-labs/solana-web3.js/pull/3148) [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcTransport` return new `RpcReponse` type instead of parsed JSON data + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`6b43588`](https://github.com/solana-labs/solana-web3.js/commit/6b4358864cb328d1b83f11c94b29f75e1b3d635f), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`628177f`](https://github.com/solana-labs/solana-web3.js/commit/628177ffcc1be1c40e0c82d80743b07f695cfe69), [`06dcd86`](https://github.com/solana-labs/solana-web3.js/commit/06dcd86d830e866eb3ee7c47ea1bb99b8205bd1e), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`4f87d12`](https://github.com/solana-labs/solana-web3.js/commit/4f87d12cf942fbd4f427005d5ac41671ce28a22c), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`91076ba`](https://github.com/solana-labs/solana-web3.js/commit/91076ba1884eb72880d1ee964b6800d90afb4460), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`f5660d2`](https://github.com/solana-labs/solana-web3.js/commit/f5660d2eb4d2ee5be8c9cd8e8b58a11de1a799bf), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`6340744`](https://github.com/solana-labs/solana-web3.js/commit/6340744e5cf0ea91ae677f381d5a187638a19597), [`d198638`](https://github.com/solana-labs/solana-web3.js/commit/d19863844cf28c252e6bedd7070e633692d9e46e), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2)]: + - @solana/errors@2.0.0 + - @solana/rpc-spec@2.0.0 + - @solana/rpc-spec-types@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-transport-http/package.json b/packages/rpc-transport-http/package.json index 1675109e5657..b0799ff02e83 100644 --- a/packages/rpc-transport-http/package.json +++ b/packages/rpc-transport-http/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-transport-http", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "An RPC transport that uses HTTP requests", "exports": { "edge-light": { diff --git a/packages/rpc-types/CHANGELOG.md b/packages/rpc-types/CHANGELOG.md index bf91929d6ed3..cd041e6e54d5 100644 --- a/packages/rpc-types/CHANGELOG.md +++ b/packages/rpc-types/CHANGELOG.md @@ -1,5 +1,53 @@ # @solana/rpc-types +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#3467](https://github.com/solana-labs/solana-web3.js/pull/3467) [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove `U64` and `I64` types in favour of `bigint` + +- [#2413](https://github.com/solana-labs/solana-web3.js/pull/2413) [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#3456](https://github.com/solana-labs/solana-web3.js/pull/3456) [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove `UnsafeBeyond2Pow53Minus1` type suffixes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#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` + +- [#2411](https://github.com/solana-labs/solana-web3.js/pull/2411) [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `fixCodec` to `fixCodecSize` + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/codecs-numbers@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc-types/package.json b/packages/rpc-types/package.json index 18247bfa7c83..1d6dc3f4f84e 100644 --- a/packages/rpc-types/package.json +++ b/packages/rpc-types/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc-types", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Type definitions for values used in the Solana RPC, and helper functions for working with them", "exports": { "edge-light": { diff --git a/packages/rpc/CHANGELOG.md b/packages/rpc/CHANGELOG.md index 1e1c317ec3a2..feb6e6359596 100644 --- a/packages/rpc/CHANGELOG.md +++ b/packages/rpc/CHANGELOG.md @@ -1,5 +1,52 @@ # @solana/rpc +## 2.0.0 + +### Patch Changes + +- [#2910](https://github.com/solana-labs/solana-web3.js/pull/2910) [`42a70f4`](https://github.com/solana-labs/solana-web3.js/commit/42a70f4c3004e55fe6ce5a8e500f5610765ec66f) Thanks [@Jac0xb](https://github.com/Jac0xb)! - Fixed a bug where the RPC would fail to throw errors in the event that you configured it with an `AbortSignal` + +- [#3407](https://github.com/solana-labs/solana-web3.js/pull/3407) [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use `RpcRequest`, `RpcResponse` and their transformers in RPC Subscriptions packages + + This change makes the RPC and RPC Subscriptions architecture more consistent by using the same `RpcRequest` and `RpcResponse` types and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them. + + See the following PRs for more details: + + - [PR #3393](https://github.com/solana-labs/solana-web3.js/pull/3393) + - [PR #3394](https://github.com/solana-labs/solana-web3.js/pull/3394) + - [PR #3403](https://github.com/solana-labs/solana-web3.js/pull/3403) + - [PR #3404](https://github.com/solana-labs/solana-web3.js/pull/3404) + - [PR #3405](https://github.com/solana-labs/solana-web3.js/pull/3405) + +- [#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. + +- [#3161](https://github.com/solana-labs/solana-web3.js/pull/3161) [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Change first argument of `onIntegerOverflow` handler from `methodName: string` to `request: RpcRequest` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#3340](https://github.com/solana-labs/solana-web3.js/pull/3340) [`44c8772`](https://github.com/solana-labs/solana-web3.js/commit/44c8772c8711b99e68dce3348e17bfc5b1d2a833) Thanks [@steveluscher](https://github.com/steveluscher)! - Enabled Brotli, gzip, and Deflate compression by default when running in Node.js, where compression headers are not added by the runtime like they are in browsers + +- [#2504](https://github.com/solana-labs/solana-web3.js/pull/2504) [`18d6b56`](https://github.com/solana-labs/solana-web3.js/commit/18d6b56a69509e4c98de8f3de51abe2623b46763) Thanks [@steveluscher](https://github.com/steveluscher)! - Replaced `fast-stable-stringify` with our fork + +- [#3148](https://github.com/solana-labs/solana-web3.js/pull/3148) [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Make `RpcTransport` return new `RpcReponse` type instead of parsed JSON data + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`5ed19c6`](https://github.com/solana-labs/solana-web3.js/commit/5ed19c6c3c6e7a1bacde8c23c438ecb85454b126), [`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`6b43588`](https://github.com/solana-labs/solana-web3.js/commit/6b4358864cb328d1b83f11c94b29f75e1b3d635f), [`91fb1f3`](https://github.com/solana-labs/solana-web3.js/commit/91fb1f39bb174cf1e899a21365153a7b3bbf3571), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`628177f`](https://github.com/solana-labs/solana-web3.js/commit/628177ffcc1be1c40e0c82d80743b07f695cfe69), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`daf9691`](https://github.com/solana-labs/solana-web3.js/commit/daf96918b2e875b60ab733acb0bd3f1b76a46c76), [`06dcd86`](https://github.com/solana-labs/solana-web3.js/commit/06dcd86d830e866eb3ee7c47ea1bb99b8205bd1e), [`512853e`](https://github.com/solana-labs/solana-web3.js/commit/512853e5d0964075261913f9b2b08137116ce82e), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`3c02c35`](https://github.com/solana-labs/solana-web3.js/commit/3c02c3582f5b87151b7ac1d9cd24b9d20f6945ea), [`1c25dd4`](https://github.com/solana-labs/solana-web3.js/commit/1c25dd4069a3a8f5599285c9b0eaeb71a2f897d1), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`4f87d12`](https://github.com/solana-labs/solana-web3.js/commit/4f87d12cf942fbd4f427005d5ac41671ce28a22c), [`29d5113`](https://github.com/solana-labs/solana-web3.js/commit/29d5113b2c6f8c7907127ad992bad1329edbd7e7), [`1fde4b1`](https://github.com/solana-labs/solana-web3.js/commit/1fde4b1d75c4af6d965ca26f6a7c649c6a517deb), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`29821df`](https://github.com/solana-labs/solana-web3.js/commit/29821df246b14eb41dd4606913f44fac40183957), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`a705413`](https://github.com/solana-labs/solana-web3.js/commit/a705413e357fb5c5907c5fc1df17d241bc5c0f76), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`91076ba`](https://github.com/solana-labs/solana-web3.js/commit/91076ba1884eb72880d1ee964b6800d90afb4460), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`bf07a60`](https://github.com/solana-labs/solana-web3.js/commit/bf07a606768eef7cd37c1dd0e2c0a35fe3b12f24), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`747b9ab`](https://github.com/solana-labs/solana-web3.js/commit/747b9abb90c6baeec73a284d87a324bf3caeab03), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`422f928`](https://github.com/solana-labs/solana-web3.js/commit/422f928086db5897522605243ac09148f9301fa1), [`f5660d2`](https://github.com/solana-labs/solana-web3.js/commit/f5660d2eb4d2ee5be8c9cd8e8b58a11de1a799bf), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`28ca5d1`](https://github.com/solana-labs/solana-web3.js/commit/28ca5d17d4c574a690a5bf29d4f1fe0ad8f5883c), [`02cefa7`](https://github.com/solana-labs/solana-web3.js/commit/02cefa7cc98463e602f78a8acc10d85c37f03481), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`c801637`](https://github.com/solana-labs/solana-web3.js/commit/c801637bcf94930be832c57817166da2d2fdb1a4), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`6340744`](https://github.com/solana-labs/solana-web3.js/commit/6340744e5cf0ea91ae677f381d5a187638a19597), [`d198638`](https://github.com/solana-labs/solana-web3.js/commit/d19863844cf28c252e6bedd7070e633692d9e46e), [`db144da`](https://github.com/solana-labs/solana-web3.js/commit/db144da362e3389837b56f97abfb766cc8c847c2)]: + - @solana/fast-stable-stringify@2.0.0 + - @solana/errors@2.0.0 + - @solana/rpc-spec@2.0.0 + - @solana/rpc-api@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc-transport-http@2.0.0 + - @solana/rpc-transformers@2.0.0 + - @solana/rpc-spec-types@2.0.0 + - @solana/functional@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/rpc/package.json b/packages/rpc/package.json index 69f702564ac9..8df03f5afdb4 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -1,6 +1,6 @@ { "name": "@solana/rpc", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A library for sending JSON RPC requests to Solana RPCs", "exports": { "edge-light": { diff --git a/packages/signers/CHANGELOG.md b/packages/signers/CHANGELOG.md index 8cb29d7fefba..fbfbd624e962 100644 --- a/packages/signers/CHANGELOG.md +++ b/packages/signers/CHANGELOG.md @@ -1,5 +1,38 @@ # @solana/signers +## 2.0.0 + +### Minor Changes + +- [#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. + +### Patch Changes + +- [#3051](https://github.com/solana-labs/solana-web3.js/pull/3051) [`1ad523d`](https://github.com/solana-labs/solana-web3.js/commit/1ad523dc5792d9152a66e9dc2b83294e3eba4db0) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add a `createKeyPairSignerFromPrivateKeyBytes` helper that compose `createKeyPairFromPrivateKeyBytes` and `createSignerFromKeyPair`. + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#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 + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- [#3481](https://github.com/solana-labs/solana-web3.js/pull/3481) [`4decebb`](https://github.com/solana-labs/solana-web3.js/commit/4decebb9b619972f49c740323b59cf470696e105) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Remove the `feePayerSigner` attribute of transaction messages in favour of the existing `feePayer` attribute. This ensures fee payers are defined in a single place — whether they are using signers or not. + +- [#3482](https://github.com/solana-labs/solana-web3.js/pull/3482) [`d4965ec`](https://github.com/solana-labs/solana-web3.js/commit/d4965ece9abaf81e3006442db15f3f77d89a622c) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Override `feePayer` signer when the address matches the existing one. This is because users may want to provide a different wallet from the same address. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/transactions@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/keys@2.0.0 + - @solana/transaction-messages@2.0.0 + - @solana/instructions@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/signers/package.json b/packages/signers/package.json index cd4a9fd2c91d..4612e691e5b1 100644 --- a/packages/signers/package.json +++ b/packages/signers/package.json @@ -1,6 +1,6 @@ { "name": "@solana/signers", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "An abstraction layer over signing messages and transactions in Solana", "exports": { "edge-light": { diff --git a/packages/subscribable/CHANGELOG.md b/packages/subscribable/CHANGELOG.md index ac33d53f7db0..fb3e1a15f4fe 100644 --- a/packages/subscribable/CHANGELOG.md +++ b/packages/subscribable/CHANGELOG.md @@ -1,5 +1,16 @@ # @solana/subscribable +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3301](https://github.com/solana-labs/solana-web3.js/pull/3301) [`8c2cb9f`](https://github.com/solana-labs/solana-web3.js/commit/8c2cb9f44a52b3c27bc15c2c972bea1aae1622e7) Thanks [@steveluscher](https://github.com/steveluscher)! - Creates a package for working with subscribable data sources like event targets. From an `EventTarget` or object which conforms to the `EventEmitter` interface you can now create a more ergonomic `DataPublisher` (object with an `on` method that vends an unsubscribe function) or an abortable `AsyncIterable`. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/subscribable/package.json b/packages/subscribable/package.json index 217ed755dbb0..12679b80d3d2 100644 --- a/packages/subscribable/package.json +++ b/packages/subscribable/package.json @@ -1,6 +1,6 @@ { "name": "@solana/subscribable", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for creating subscription-based event emitters", "exports": { "edge-light": { diff --git a/packages/sysvars/CHANGELOG.md b/packages/sysvars/CHANGELOG.md index 3f1336f1f8cb..2769d54b78d9 100644 --- a/packages/sysvars/CHANGELOG.md +++ b/packages/sysvars/CHANGELOG.md @@ -1,5 +1,23 @@ # @solana/sysvars +## 2.0.0 + +### Patch Changes + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3134](https://github.com/solana-labs/solana-web3.js/pull/3134) [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Change unix timestamp type to bigint with an unsafe label + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3fc388f`](https://github.com/solana-labs/solana-web3.js/commit/3fc388f0b40243436a3ecbcd2af27ea8efa683e4), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a)]: + - @solana/errors@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/accounts@2.0.0 + - @solana/codecs@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/sysvars/package.json b/packages/sysvars/package.json index be2ab613e25a..b02f7338404b 100644 --- a/packages/sysvars/package.json +++ b/packages/sysvars/package.json @@ -1,6 +1,6 @@ { "name": "@solana/sysvars", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "An abstraction layer over signing messages and transactions in Solana", "exports": { "edge-light": { diff --git a/packages/transaction-confirmation/CHANGELOG.md b/packages/transaction-confirmation/CHANGELOG.md index dc92ee927b7e..1206044ce344 100644 --- a/packages/transaction-confirmation/CHANGELOG.md +++ b/packages/transaction-confirmation/CHANGELOG.md @@ -1,5 +1,35 @@ # @solana/transaction-confirmation +## 2.0.0 + +### Patch Changes + +- [#3353](https://github.com/solana-labs/solana-web3.js/pull/3353) [`696c72c`](https://github.com/solana-labs/solana-web3.js/commit/696c72ce25c96f06442785bddffbc890ceb802f3) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a bug that could result in the transaction confirmer claiming that the blockheight had been exceeded, when the fact of the matter was that the confirmation was aborted by an `AbortSignal` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2553](https://github.com/solana-labs/solana-web3.js/pull/2553) [`af9fa3b`](https://github.com/solana-labs/solana-web3.js/commit/af9fa3b7e83220d69eab67b37d3a36beac0e848c) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Changes `createRecentSignatureConfirmationPromiseFactory` to enforce `rpc` and `rpcSubscriptions` to have matching clusters, changing the function signature to accept an object rather than two parameters. + +- [#3072](https://github.com/solana-labs/solana-web3.js/pull/3072) [`c122c75`](https://github.com/solana-labs/solana-web3.js/commit/c122c75936e8fa5364edf114a5182cf119b26922) Thanks [@steveluscher](https://github.com/steveluscher)! - Fixed a memory leak with transaction confirmation and subscriptions + +- [#2554](https://github.com/solana-labs/solana-web3.js/pull/2554) [`0b02de1`](https://github.com/solana-labs/solana-web3.js/commit/0b02de140887654f19f8eda374f40c6f5a8f5e92) Thanks [@buffalojoec](https://github.com/buffalojoec)! - Changes `createNonceInvalidationPromiseFactory` to enforce `rpc` and `rpcSubscriptions` to have matching clusters, changing the function signature to accept an object rather than two parameters. + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`42a70f4`](https://github.com/solana-labs/solana-web3.js/commit/42a70f4c3004e55fe6ce5a8e500f5610765ec66f), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`10b08ac`](https://github.com/solana-labs/solana-web3.js/commit/10b08ac8cdb61aa1412475426cfcaf0eefe32722), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`7ee47ae`](https://github.com/solana-labs/solana-web3.js/commit/7ee47ae24ad73b429ee863342f300a6f6c49e3d2), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`45df702`](https://github.com/solana-labs/solana-web3.js/commit/45df7028d872e65759dad86b97cd9d4a9a3a545e), [`9dfca45`](https://github.com/solana-labs/solana-web3.js/commit/9dfca454355819444bad29e48602886428ba4cac), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`500a991`](https://github.com/solana-labs/solana-web3.js/commit/500a991d292638eaee1fa48a7b94acfe2ff83cb7), [`c122c75`](https://github.com/solana-labs/solana-web3.js/commit/c122c75936e8fa5364edf114a5182cf119b26922), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`8f94a9e`](https://github.com/solana-labs/solana-web3.js/commit/8f94a9ede71b32662bff991e6def68bc9e8bc921), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`b4bf318`](https://github.com/solana-labs/solana-web3.js/commit/b4bf318d7d4bdd639e4c126c70350993a8540fe8), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`4c7224d`](https://github.com/solana-labs/solana-web3.js/commit/4c7224d0a884b0dc91ea536ce5fbdcd0a0d7e011), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`44c8772`](https://github.com/solana-labs/solana-web3.js/commit/44c8772c8711b99e68dce3348e17bfc5b1d2a833), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`18d6b56`](https://github.com/solana-labs/solana-web3.js/commit/18d6b56a69509e4c98de8f3de51abe2623b46763), [`e1cb697`](https://github.com/solana-labs/solana-web3.js/commit/e1cb697d66dc906aa2433965452417e03cf86e13), [`f2bb4e8`](https://github.com/solana-labs/solana-web3.js/commit/f2bb4e8c7f7efd049cb1c3810291c99e9293c25d), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`c8e6e71`](https://github.com/solana-labs/solana-web3.js/commit/c8e6e71529f219caf83ed444e53f5a1e757129dc), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/transactions@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/rpc@2.0.0 + - @solana/rpc-subscriptions@2.0.0 + - @solana/keys@2.0.0 + - @solana/transaction-messages@2.0.0 + - @solana/promises@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/transaction-confirmation/package.json b/packages/transaction-confirmation/package.json index 22747725cb1b..d3beee4c412a 100644 --- a/packages/transaction-confirmation/package.json +++ b/packages/transaction-confirmation/package.json @@ -1,6 +1,6 @@ { "name": "@solana/transaction-confirmation", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for confirming Solana transactions", "exports": { "edge-light": { diff --git a/packages/transaction-messages/CHANGELOG.md b/packages/transaction-messages/CHANGELOG.md index 5486f39b0ad1..a404ef69e816 100644 --- a/packages/transaction-messages/CHANGELOG.md +++ b/packages/transaction-messages/CHANGELOG.md @@ -1,5 +1,39 @@ # @solana/transaction-messages +## 2.0.0 + +### Patch Changes + +- [#2969](https://github.com/solana-labs/solana-web3.js/pull/2969) [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Add a function to replace accounts in a transaction message using lookup tables + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3480](https://github.com/solana-labs/solana-web3.js/pull/3480) [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Change `feePayer` type of transaction messages from `Address` to `{ address: Address }` + +- [#2550](https://github.com/solana-labs/solana-web3.js/pull/2550) [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941) Thanks [@mcintyre94](https://github.com/mcintyre94)! - 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`. + +- [#2607](https://github.com/solana-labs/solana-web3.js/pull/2607) [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7) Thanks [@mcintyre94](https://github.com/mcintyre94)! - Freeze the instructions and lifetimeConstraint fields within transaction messages + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`deb7b80`](https://github.com/solana-labs/solana-web3.js/commit/deb7b806b4cbe620b1714be1765c981d88c3a2f6), [`6dcf548`](https://github.com/solana-labs/solana-web3.js/commit/6dcf5483bb6bbb8d343db28dedb258c8da91ffac), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`49a764c`](https://github.com/solana-labs/solana-web3.js/commit/49a764c6d481886501540f8dbfe8be75d754355b), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`919c736`](https://github.com/solana-labs/solana-web3.js/commit/919c7367dec8e142746295128cc6c2cc6752e636), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2d48c09`](https://github.com/solana-labs/solana-web3.js/commit/2d48c0954a3823b937a9b4e572a8d63cd7e4631c), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`bf029dd`](https://github.com/solana-labs/solana-web3.js/commit/bf029dd90230405b3d59f70aedd57fc0117b926e), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-data-structures@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/codecs-numbers@2.0.0 + - @solana/instructions@2.0.0 + - @solana/functional@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/transaction-messages/package.json b/packages/transaction-messages/package.json index 211b3038313c..fcb8a7267dce 100644 --- a/packages/transaction-messages/package.json +++ b/packages/transaction-messages/package.json @@ -1,6 +1,6 @@ { "name": "@solana/transaction-messages", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for creating transaction messages", "exports": { "edge-light": { diff --git a/packages/transactions/CHANGELOG.md b/packages/transactions/CHANGELOG.md index 1c304f51fcbf..f1e82938658a 100644 --- a/packages/transactions/CHANGELOG.md +++ b/packages/transactions/CHANGELOG.md @@ -1,5 +1,73 @@ # @solana/transactions +## 2.0.0 + +### Patch Changes + +- [#2434](https://github.com/solana-labs/solana-web3.js/pull/2434) [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Renamed `mapCodec` to `transformCodec` + +- [#2413](https://github.com/solana-labs/solana-web3.js/pull/2413) [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#2412](https://github.com/solana-labs/solana-web3.js/pull/2412) [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd) Thanks [@lorisleiva](https://github.com/lorisleiva)! - 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. + ``` + +- [#2550](https://github.com/solana-labs/solana-web3.js/pull/2550) [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941) Thanks [@mcintyre94](https://github.com/mcintyre94)! - 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`. + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + +- Updated dependencies [[`9370133`](https://github.com/solana-labs/solana-web3.js/commit/9370133e414bfa863517248d97905449e9a867eb), [`31916ae`](https://github.com/solana-labs/solana-web3.js/commit/31916ae5d4fb29f239c63252a59745e33a6979ea), [`a548de2`](https://github.com/solana-labs/solana-web3.js/commit/a548de2ebe3cf7289fd126933c4c395c885c3224), [`292487d`](https://github.com/solana-labs/solana-web3.js/commit/292487da00ee57350e8faf49ccf961203aed6403), [`7d310f6`](https://github.com/solana-labs/solana-web3.js/commit/7d310f6f9cd7d02fca4d6f8e311b857c9dd84e61), [`3834d82`](https://github.com/solana-labs/solana-web3.js/commit/3834d82eb1dd150f261612d742c3105194689c13), [`ff4aff6`](https://github.com/solana-labs/solana-web3.js/commit/ff4aff61c05c0ae5bfb62d35353d9527588b39b6), [`419c12e`](https://github.com/solana-labs/solana-web3.js/commit/419c12e617435570d0cded6ca6d35370d0060da7), [`89f399d`](https://github.com/solana-labs/solana-web3.js/commit/89f399d474abac463b1daaa864c88305d7b8c21f), [`deb7b80`](https://github.com/solana-labs/solana-web3.js/commit/deb7b806b4cbe620b1714be1765c981d88c3a2f6), [`6dcf548`](https://github.com/solana-labs/solana-web3.js/commit/6dcf5483bb6bbb8d343db28dedb258c8da91ffac), [`3bf31e7`](https://github.com/solana-labs/solana-web3.js/commit/3bf31e7b7918cb60cd9f5f4476909d81257cdfd7), [`ebb03cd`](https://github.com/solana-labs/solana-web3.js/commit/ebb03cd8270027db957d4cecc7d2374d468d4ccb), [`49a764c`](https://github.com/solana-labs/solana-web3.js/commit/49a764c6d481886501540f8dbfe8be75d754355b), [`002cc38`](https://github.com/solana-labs/solana-web3.js/commit/002cc38a99cd4c91c7ce9023e1b4fb28f7e10832), [`26dae19`](https://github.com/solana-labs/solana-web3.js/commit/26dae190c2ec835fbdaa7b7d66ca33d6ba0727b8), [`0245265`](https://github.com/solana-labs/solana-web3.js/commit/024526554fa0145e31e62a0d47f1eea556a30e71), [`ce1be3f`](https://github.com/solana-labs/solana-web3.js/commit/ce1be3fe37ea9b744fd836f3d6c2c8e5e31efd77), [`82cf07f`](https://github.com/solana-labs/solana-web3.js/commit/82cf07f4e905f6b056e70a0463a94222c3e7cadd), [`2d54650`](https://github.com/solana-labs/solana-web3.js/commit/2d5465018d8060eceb00efbf4f718df26d145199), [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4), [`bef9604`](https://github.com/solana-labs/solana-web3.js/commit/bef960435eb2303395bfa76e44f84d3348c5722d), [`7e86583`](https://github.com/solana-labs/solana-web3.js/commit/7e86583da68695076ec62033f3fe078b3890f026), [`919c736`](https://github.com/solana-labs/solana-web3.js/commit/919c7367dec8e142746295128cc6c2cc6752e636), [`4f19842`](https://github.com/solana-labs/solana-web3.js/commit/4f198423997d28d927f982333d268e19940656df), [`231a030`](https://github.com/solana-labs/solana-web3.js/commit/231a0303ae5960e783719a8ff1d17a50ff26ad78), [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4), [`38faba0`](https://github.com/solana-labs/solana-web3.js/commit/38faba05fab479ddbd95d0e211744d203f8aa823), [`73bd5a9`](https://github.com/solana-labs/solana-web3.js/commit/73bd5a9e0b32846cd5d76f2d2d1b21661eab0677), [`2e5af9f`](https://github.com/solana-labs/solana-web3.js/commit/2e5af9f1a9410f15108863342b48225fdf9a0c83), [`2d48c09`](https://github.com/solana-labs/solana-web3.js/commit/2d48c0954a3823b937a9b4e572a8d63cd7e4631c), [`e3e82d9`](https://github.com/solana-labs/solana-web3.js/commit/e3e82d909825e958ae234ed18500335a621773bd), [`2798061`](https://github.com/solana-labs/solana-web3.js/commit/27980617e4f8d34dbc7b6da4507e4bca68a68090), [`54d68c4`](https://github.com/solana-labs/solana-web3.js/commit/54d68c482feebf4e62a9896b3badd77dab615941), [`be36bab`](https://github.com/solana-labs/solana-web3.js/commit/be36babd752b1c987a2f53b4ff83ac8c045a3418), [`cb49bfa`](https://github.com/solana-labs/solana-web3.js/commit/cb49bfa28f412376a41e758eeda59e7e90983147), [`288029a`](https://github.com/solana-labs/solana-web3.js/commit/288029a55a5eeb863b6df960027a59214ffc37f1), [`4ae78f5`](https://github.com/solana-labs/solana-web3.js/commit/4ae78f5cdddd6772b25351beb813483d4e52cea6), [`3d90241`](https://github.com/solana-labs/solana-web3.js/commit/3d902419c1b232fa7145757b9c95976de69790c7), [`478443f`](https://github.com/solana-labs/solana-web3.js/commit/478443fedac06678f12e8ac285aa7c7fcf503ee8), [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b), [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a), [`bf029dd`](https://github.com/solana-labs/solana-web3.js/commit/bf029dd90230405b3d59f70aedd57fc0117b926e), [`0158b31`](https://github.com/solana-labs/solana-web3.js/commit/0158b3181ed96996f269f3bff689f76411e460b3), [`f9a8446`](https://github.com/solana-labs/solana-web3.js/commit/f9a84460670a97d4ab6514b28fe0d29c6fac3302), [`125fc15`](https://github.com/solana-labs/solana-web3.js/commit/125fc1540cfbc0a4afdba5aabac0884c750e58c1)]: + - @solana/errors@2.0.0 + - @solana/codecs-data-structures@2.0.0 + - @solana/codecs-strings@2.0.0 + - @solana/codecs-core@2.0.0 + - @solana/addresses@2.0.0 + - @solana/rpc-types@2.0.0 + - @solana/keys@2.0.0 + - @solana/codecs-numbers@2.0.0 + - @solana/transaction-messages@2.0.0 + - @solana/instructions@2.0.0 + - @solana/functional@2.0.0 + ## 2.0.0-rc.4 ### Patch Changes diff --git a/packages/transactions/package.json b/packages/transactions/package.json index 9db8fb76e93e..27b049343161 100644 --- a/packages/transactions/package.json +++ b/packages/transactions/package.json @@ -1,6 +1,6 @@ { "name": "@solana/transactions", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "Helpers for creating and serializing transactions", "exports": { "edge-light": { diff --git a/packages/webcrypto-ed25519-polyfill/CHANGELOG.md b/packages/webcrypto-ed25519-polyfill/CHANGELOG.md index 8b059b354577..02438ae9d967 100644 --- a/packages/webcrypto-ed25519-polyfill/CHANGELOG.md +++ b/packages/webcrypto-ed25519-polyfill/CHANGELOG.md @@ -1,5 +1,21 @@ # @solana/webcrypto-ed25519-polyfill +## 2.0.0 + +### Patch Changes + +- [#3063](https://github.com/solana-labs/solana-web3.js/pull/3063) [`ae9e8d3`](https://github.com/solana-labs/solana-web3.js/commit/ae9e8d342740598d2dfc90e11c19aa9af520c1c4) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add support for exporting keys as JWK + +- [#3541](https://github.com/solana-labs/solana-web3.js/pull/3541) [`135dc5a`](https://github.com/solana-labs/solana-web3.js/commit/135dc5ad43f286380a4c3a689668016f0d7945f4) Thanks [@steveluscher](https://github.com/steveluscher)! - Drop the Release Candidate label and publish `@solana/web3.js` at version 2.0.0 + +- [#3064](https://github.com/solana-labs/solana-web3.js/pull/3064) [`2370096`](https://github.com/solana-labs/solana-web3.js/commit/237009609fbc0ae32eb9628d08a41f06229ac6d2) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Add support for importing JWK keys + +- [#2907](https://github.com/solana-labs/solana-web3.js/pull/2907) [`677a9c4`](https://github.com/solana-labs/solana-web3.js/commit/677a9c4eb88a8ac6a9ede8d82f367c5ac8d69ff4) Thanks [@steveluscher](https://github.com/steveluscher)! - `__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. + +- [#2606](https://github.com/solana-labs/solana-web3.js/pull/2606) [`367b8ad`](https://github.com/solana-labs/solana-web3.js/commit/367b8ad0cce55a916abfb0125f36b6e844333b2b) Thanks [@lorisleiva](https://github.com/lorisleiva)! - Use commonjs package type + +- [#3137](https://github.com/solana-labs/solana-web3.js/pull/3137) [`fd72c2e`](https://github.com/solana-labs/solana-web3.js/commit/fd72c2ed1edad488318fa5d3e285f04852f4210a) Thanks [@mcintyre94](https://github.com/mcintyre94)! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition of `edge-light` and `workerd` to the package exports. + ## 2.0.0-rc.4 ## 2.0.0-rc.3 diff --git a/packages/webcrypto-ed25519-polyfill/package.json b/packages/webcrypto-ed25519-polyfill/package.json index 0bb06c7446cc..06ceaba886d0 100644 --- a/packages/webcrypto-ed25519-polyfill/package.json +++ b/packages/webcrypto-ed25519-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@solana/webcrypto-ed25519-polyfill", - "version": "2.0.0-rc.4", + "version": "2.0.0", "description": "A polyfill that adds Ed25519 key manipulation capabilities to `SubtleCrypto` in environments where it is not yet supported", "exports": { "edge-light": {