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] ClientOptions.noteTransportMaxRetries (integer 0 to 10, default 3) and ClientOptions.noteTransportRetryIntervalMs (integer 0 to 60000, default 250, doubling per retry) set how a private-note send retries a transient transport failure within the call; MidenConfig in @miden-sdk/react takes the same two fields. Together they may not exceed 120000 ms of total computed backoff, interval * (2^retries - 1) with an omitted value at its default; an out-of-range value or total throws a TypeError before the client is built. The retries run inside the client's serialized call (and under the provider lock in the React hooks), so a slow or rate-limiting transport blocks other client calls until the send finishes. A non-zero service retry-after replaces the delay with no upper bound (a zero one falls back to it), so pass noteTransportMaxRetries: 0 to bound a send to one attempt in a latency-sensitive UI (rust-sdk#2663).
Fixes
[FIX][react] useSend, useMultiSend and useTransaction (with privateNoteTarget) no longer lose the transaction id when a private note is not delivered after the transaction was submitted. They reject with PrivateNoteDeliveryError (new MidenErrorCode member PRIVATE_NOTE_DELIVERY_FAILED) carrying transactionId, commitment ("committed" or "unknown"), delivered and undelivered; a discarded transaction is still a plain error. Every owed note is attempted, so useMultiSend no longer stops at the first failed recipient, and the new useResendPrivateNotes() sends the undelivered notes again: resend({ transactionId: err.transactionId, notes: err.undelivered }). useTransaction now checks privateNoteTarget before executing, finds the request's private output notes (it relayed none before), and no longer fails with a consumed transaction id when the commit takes more than one poll; useWaitForCommit and useTransactionHistory likewise keep a caller's TransactionId usable (#460).
[FIX][web] buildNetworkNote was declared in the shipped types and implemented in standalone.js, but neither the browser nor the node entry point re-exported it, so import { buildNetworkNote } from "@miden-sdk/miden-sdk" failed at runtime while tsc accepted it. Both entries now export it (#401, #388).
[FIX][web] For an account whose header names a code root with no stored code row, WebClient.getAccountCode, feeAwareTransactionRequestBuilder and the new*TransactionRequest constructors that build through it now fail with account code with root <root> not found instead of a serde invalid type: unit value, expected struct AccountCodeIdxdbObject error (#241).
Changes
[BREAKING][behavior][web] The bundled Rust SDK 0.17.2 no longer queues a private-note send that fails, and sync() / syncNoteTransport() no longer re-send it. A rejected notes.sendPrivate / notes.sendPrivateOutput is final: keep the note id and send the same note again, which is idempotent by note id. Transient transport errors are retried within the call (in the browser: timeouts, and the service answering Unavailable or rate-limiting with retry-after; a failed fetch is not retried). The IndexedDB store drops the queue row a 0.17.1 client may have left, on upgrade and on importing an older export (rust-sdk#2663).
[CHANGE][web] Pin Rust SDK client, proto and SQLite store to exactly 0.17.2 (rust-sdk#2663).