You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Enhancements
[FEATURE][web] Check whether an invitation can still register an account with client.accounts.isInvitationCodeValid(code), without consuming the code. Low-level WebClient and RpcClient expose the same query (#459, rust-sdk#2686).
[FEATURE][web] AccountStoragePatch now names the storage slots it changes and exposes map changes, so a co-signer can read what a TransactionSummary writes to storage, such as a multisig's signer set or thresholds, from summary.accountDelta().storage() before signing. valueSlots() returns a StorageValueSlotPatch (slotName, operation, value) per changed value slot, and mapSlots() returns a StorageMapSlotPatch (slotName, operation, entries()) per changed map slot, each entry a StorageMapPatchEntry (key, value). operation is a StoragePatchOperation: Create, Update or Remove. A removed value slot has no value, a removed map has no entries, a cleared map entry has the empty word as its value, and every slot of a new account is reported as Create. values() is unchanged (#298).
Fixes
[FIX][web] client.accounts.removeAddress (removeAccountAddress) now removes the address only when it belongs to the given account; the store previously deleted it by address alone, so removing it through another account dropped the owner's address (#459).
[FIX][web,react] WebClient.newWallet, newFaucet and importPublicAccountFromSeed now resolve a friendly AuthScheme (AuthScheme.Falcon / AuthScheme.ECDSA) to the wasm enum on both the browser and the Node.js entry, as client.accounts.create() already does. The numeric enum values 2 (Falcon) and 1 (ECDSA) still pass through, and any other value rejects with Unknown auth scheme. @miden-sdk/react's useCreateWallet, useCreateFaucet, useImportAccount (seed import) and useSessionAccount accept AuthScheme.Falcon / AuthScheme.ECDSA and default to AuthScheme.Falcon; their previous default resolved to undefined and hung the call instead of rejecting. Accounts that MidenProvider builds for an external signer from its public key commitment now get the wasm ECDSA enum value for their auth component instead of undefined. The published types now match the runtime: AuthScheme is the friendly const as a value and its "falcon" | "ecdsa" union as a type, the three methods take that union or a numeric enum value, and TypeScript code that used AuthScheme.AuthRpoFalcon512 (undefined at runtime) now gets a type error; use AuthScheme.Falcon. (web-sdk#223, #276)
[FIX][web,react] terminate() now frees the client's main-realm wasm object and releases its IndexedDB connection, so creating and terminating clients no longer leaks open database handles, and await using (MidenClient's [Symbol.asyncDispose]) resolves once that release is done. A store shared by several clients stays open until the last of them is terminated. A call already queued that runs in the main realm still finishes; a call that needs the worker (in flight, waiting for it to start or still queued) rejects with WebClient terminated, and so does every later wasm call on a terminated WebClient, except that lastAuthError and the accessors throw it. The release and these rejections are browser-only: on the Node.js binding terminate() releases nothing. MidenProvider now terminates a client whose initialization was cancelled or failed after creating it, and never a client it has handed out (#377) (#410).
Changes
[CHANGE][web] Pin Rust SDK client, proto and SQLite store to exactly 0.17.3 (rust-sdk#2686).