From f8912845c5098cff69b9268a16c294a3c7df3b4a Mon Sep 17 00:00:00 2001 From: aaroncox Date: Thu, 24 Sep 2026 17:51:48 -0700 Subject: [PATCH 1/4] Redirect the 4.0.0 release notes from a route --- src/routes/docs/releases/4-0-0/+page.ts | 7 +++++++ static/_redirects | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/routes/docs/releases/4-0-0/+page.ts delete mode 100644 static/_redirects diff --git a/src/routes/docs/releases/4-0-0/+page.ts b/src/routes/docs/releases/4-0-0/+page.ts new file mode 100644 index 00000000..c735f812 --- /dev/null +++ b/src/routes/docs/releases/4-0-0/+page.ts @@ -0,0 +1,7 @@ +import { redirect } from "@sveltejs/kit" + +export const prerender = false + +export const load = async () => { + throw redirect(301, "/docs/releases/4-0-1") +} diff --git a/static/_redirects b/static/_redirects deleted file mode 100644 index 8aa4b65c..00000000 --- a/static/_redirects +++ /dev/null @@ -1 +0,0 @@ -/docs/releases/4-0-0 /docs/releases/4-0-1 301 From 7d30a7ee1c723b19716c1ea45082b375e6d9e4fe Mon Sep 17 00:00:00 2001 From: aaroncox Date: Thu, 24 Sep 2026 18:02:24 -0700 Subject: [PATCH 2/4] Show a game action in the session key example --- src/lib/docs/Releases/4.0.1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/docs/Releases/4.0.1.md b/src/lib/docs/Releases/4.0.1.md index 427149e4..fdff8f2f 100644 --- a/src/lib/docs/Releases/4.0.1.md +++ b/src/lib/docs/Releases/4.0.1.md @@ -55,7 +55,7 @@ Your application can hold a key that signs a chosen set of actions on its own, s const sessionKit = new SessionKit(args, { ui, sessionKey: { - whitelist: [{ contract: "eosio.token", actions: ["transfer"] }], + whitelist: [{ contract: "mygame", actions: ["move", "attack"] }], }, }) @@ -64,6 +64,8 @@ await session.setupSessionKey() `setupSessionKey()` generates the key, adds it under a permission named after your application, and links the listed actions to it, in one transaction the user approves. `Session` also has methods to check, update and remove the key. Session keys need a `UserInterface` that draws four prompts (consent, an existing key on the permission, a whitelist mismatch, and removal); `@wharfkit/web-renderer` draws all four. +The key signs the listed actions without showing them to the user, and every action outside the whitelist goes to the wallet for approval. + ### Holding several sessions `equalityFn` on the `SessionKit` decides when two stored sessions are the same, which lets an application keep several sessions for one account apart by something it stores in `session.data`. Four fixes land with it: From 0ee92658215e84d872a8186ec948ffb1820b97b3 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Thu, 24 Sep 2026 18:09:01 -0700 Subject: [PATCH 3/4] Drop equalityFn from the release notes --- src/lib/docs/Releases/4.0.1.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/lib/docs/Releases/4.0.1.md b/src/lib/docs/Releases/4.0.1.md index fdff8f2f..d13e7340 100644 --- a/src/lib/docs/Releases/4.0.1.md +++ b/src/lib/docs/Releases/4.0.1.md @@ -66,15 +66,6 @@ await session.setupSessionKey() The key signs the listed actions without showing them to the user, and every action outside the whitelist goes to the wallet for approval. -### Holding several sessions - -`equalityFn` on the `SessionKit` decides when two stored sessions are the same, which lets an application keep several sessions for one account apart by something it stores in `session.data`. Four fixes land with it: - -- `logout(session)` clears the stored default only when that session was the default. -- `login()`, `restore()` and `persistSession()` resolve after the session is in storage, so two logins in a row keep both sessions. -- `restoreAll()` leaves storage untouched. -- Each restored session gets its own wallet plugin instance. - ### Waiting for irreversibility Set `awaitIrreversible` on `transact()`, or once on the `SessionKit`, and the call resolves only after the transaction is irreversible. `broadcastOptions` sets `returnFailureTrace`, `retryTrx` and `retryTrxNumBlocks` directly. @@ -89,6 +80,7 @@ Signing with Anchor on the same iOS device completes when Safari brings the user - `Authority.sort()` orders keys, accounts and waits the way nodeos does, so the chain accepts the `updateauth` you build with it. `Name`, `PermissionLevel` and `PublicKey` gained `compare()`. - `FetchProvider` uses the `fetch` built into Node.js and browsers, so you can drop `node-fetch`. - `get_table_rows` queries `float64` and `float128` secondary indexes. +- `SessionKit` keeps stored sessions intact: `login()`, `restore()` and `persistSession()` resolve after the session is in storage, so two logins in a row keep both sessions; `logout(session)` clears the stored default only when that session was the default; `restoreAll()` leaves storage untouched; and each restored session gets its own wallet plugin instance. - `@wharfkit/roborovski` gains `activity()`, which pages through an account's history with `next()` and `prev()` and filters by contract, action and date range. - `@wharfkit/web-renderer` accepts `colorMode`, `"light"` or `"dark"`. - `@wharfkit/protocol-scatter` and the four wallet plugins built on it import cleanly under Node.js. From ee3837d344db30c7c3700688f5672799d14bb391 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Thu, 24 Sep 2026 18:30:29 -0700 Subject: [PATCH 4/4] Fixed examples --- src/lib/docs/Releases/4.0.1.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/lib/docs/Releases/4.0.1.md b/src/lib/docs/Releases/4.0.1.md index d13e7340..95e9c263 100644 --- a/src/lib/docs/Releases/4.0.1.md +++ b/src/lib/docs/Releases/4.0.1.md @@ -37,11 +37,11 @@ After reinstalling, confirm that your project resolves one copy of antelope with ### Changes to check in your code - **K1 signatures differ byte for byte** from the ones 1.x produced for the same key and message. They are valid and canonical, and older signatures still verify. Re-record any test that asserts a literal signature string. -- **`PrivateKey.sharedSecret()` returns the full 32 bytes** of the shared x-coordinate, where 1.x stripped leading zero bytes. Pass `{legacy: true}` for the stripped form. -- **A binary extension field (`T$`) absent from the data is left out** of the object or `Struct` instance antelope decodes, matching nodeos, where 1.x set it to `null`. An empty optional field (`T?`) still decodes as `null`. Check any code that tests a decoded extension field for `null`. +- **`PrivateKey.sharedSecret()` returns the full 32 bytes** of the shared x-coordinate, where 1.x stripped leading zero bytes. Pass `{legacy: true}` for the stripped form: `privateKey.sharedSecret(publicKey, {legacy: true})`. +- **A binary extension field (`T$`) absent from the data is left out** of the object or `Struct` instance antelope decodes, matching nodeos, where 1.x set it to `null`. An empty optional field (`T?`) still decodes as `null`. Code that tests a decoded extension field for `null` tests for `undefined`: `decoded.field === null` becomes `decoded.field === undefined`. - **`Float32.toString()` returns the shortest round-tripping string**, so `1.5` renders as `"1.5"` in place of `"1.5000000"`. Infinity, NaN and negative zero render as nodeos spells them. - **`SessionKit.restore()` takes a `PartialSerializedSession`**, and the `RestoreArgs` type is removed. Only an explicit `import type {RestoreArgs}` needs editing. -- **`SessionKit.persistSession()` takes options** in place of a boolean: `persistSession(session, {setAsDefault: false})`. +- **`SessionKit.persistSession()` takes options** in place of a boolean: `persistSession(session, false)` becomes `persistSession(session, {setAsDefault: false})`. - **Namespaces re-exported from CommonJS dependencies** by `@wharfkit/cli`, `@wharfkit/protocol-esr` and `@wharfkit/session` are no longer frozen with a `null` prototype in the CommonJS bundles. Only code that checks one with `instanceof`, `Object.getPrototypeOf` or `Object.isFrozen` sees a difference. - **`pako` moved to 3.x** inside antelope. It is ESM with no default export, which matters only to a project that imports `pako` itself. @@ -53,7 +53,6 @@ Your application can hold a key that signs a chosen set of actions on its own, s ```ts const sessionKit = new SessionKit(args, { - ui, sessionKey: { whitelist: [{ contract: "mygame", actions: ["move", "attack"] }], }, @@ -68,7 +67,22 @@ The key signs the listed actions without showing them to the user, and every act ### Waiting for irreversibility -Set `awaitIrreversible` on `transact()`, or once on the `SessionKit`, and the call resolves only after the transaction is irreversible. `broadcastOptions` sets `returnFailureTrace`, `retryTrx` and `retryTrxNumBlocks` directly. +Set `awaitIrreversible` on `transact()`, or once on the `SessionKit`, and the call resolves only after the transaction is irreversible: + +```ts +await session.transact({ action }, { awaitIrreversible: true }) + +const sessionKit = new SessionKit(args, { awaitIrreversible: true }) +``` + +`broadcastOptions` sets `returnFailureTrace`, `retryTrx` and `retryTrxNumBlocks` directly: + +```ts +await session.transact( + { action }, + { broadcastOptions: { retryTrx: true, retryTrxNumBlocks: 10 } } +) +``` ### Anchor signing on iOS