Releases: 0xMiden/rust-sdk
Releases · 0xMiden/rust-sdk
v0.15.2
0.15.2
Features
- [FEATURE][rust] Added PSWAP chain tracking: the client now follows a local creator's partial-swap order across foreign partial fills during sync, surfacing each reconstructed payback as a consumable input note and letting the creator reclaim the current tip. New
ClientAPI:pswap_lineages,pswap_lineages_for,pswap_active_lineages,pswap_lineage, andbuild_pswap_cancel_by_order(#2231). - [FEATURE][rust] Added
Client::send_private_note_with_block_hint, which relays a sender-providedafter_block_numso recipients get deterministic delivery instead of relying on receiving side lookback. (#2262)
Changes
- [rust] Bumped
miden-note-transport-proto-buildto0.4.1. Notes imported from the note transport layer now use the providedafter_block_numwhen present, falling back to the 20-block lookback window otherwise.NoteInfogained ablock_hint: Option<BlockNumber>field (plus aNoteInfo::newconstructor) andNoteTransportClientgained asend_note_with_block_hintmethod (defaulting tosend_note, so existing implementors keep compiling). (#2262)
v0.15.1
v0.15.0
v0.15.0
Enhancements
- [FEATURE][rust] Added
Client::sync_chain()(on-chain sync only) andClient::sync_note_transport()(Note Transport Layer fetch only) for callers needing finer-grained control over sync. (#2091) - [FEATURE][rust] Added
GrpcClient::with_bearer_auth(token)to attach anauthorization: Bearer <token>header to every outbound gRPC call, for use behind authenticating gateways. Tokens are validated at connection time and preserved acrossset_genesis_commitmentupdates (#2101). - Made new-account construction use merged storage schema commitment (
build_with_schema_commitment), re-exportedAccountBuilderSchemaCommitmentExt, added WASMbuildWithoutSchemaCommitment(), and fixed contractaccounts.create()to require explicitcomponents(#1996). - Fixed the faucet token symbol display when showing account details (#1985 (#2158)).
- [FEATURE][rust,cli,web] Added
get_network_note_statustoNodeRpcClienttrait for querying the processing status of notes submitted to the network (pending, nullifier-inflight, discarded, nullifier-committed), along with attempt count and error details. Exposed asmiden-client network-note-status <note_id>CLI command andRpcClient.getNetworkNoteStatus()in the web client. (#1981) - Remove MMR peaks from the blocks table and store them alongside the sync height in a new
blockchain_checkpointtable (#2100). - Added
miden-cli callcommand for invoking account procedures directly from the CLI (#1943). - [FEATURE][rust,store] Added
BatchBuilderfor stacking multiple transactions against multiple local accounts and submitting them as one proven batch viaSubmitProvenBatch. Also addsStore::apply_transaction_batch(atomic multi-tx apply) with aSqliteStoreimplementation. (#2109, #2160) - Made
TransactionStoreUpdateserialization lossless (#2112). - [FEATURE][cli] Added
address encode <ACCOUNT_ID> <INTERFACE> [TAG_LEN]subcommand that prints the bech32 encoding of an address built from the given fields (useful for producing the input toaddress add). (#2115) - [FEATURE][cli] On asset display, the CLI now lazily fetches on-chain
TokenMetadatafor untracked public faucets via RPC and persists the result in the client's settings store. (#2159) - [FEATURE][cli] Faucet/account IDs in human-facing CLI output (account list,
notes -s, transaction summaries) are now rendered as bech32 addresses using the configured network instead of hex IDs. Hex remains in error messages and debug output. (#2159) - Added an integration test for network-transaction public output note creation (#2073).
- [FEATURE][rust,cli] Added DAP-backed transaction execution support through
DapProgramExecutor/ProgramExecutor, and mademiden-client exec --start-debug-adaptercompile source scripts so DAP clients can resolve source locations. (#2189, #2245) - [FEATURE][web] Added
StorageViewJS wrapper over WASMAccountStorage.account.storage()now returns aStorageViewthat makesgetItem()work intuitively for both Value and StorageMap slots. WASM primitives are unchanged; the rawAccountStorageis accessible via.raw(#1955). - [FEATURE][web] Added
wordToBigInt()utility export for losslessly converting aWord's first felt to aBigInt.StorageResult.toString()is BigInt-backed, andvalueOf()returns a JS number for values fitting inNumber.MAX_SAFE_INTEGERand throwsRangeErrorfor larger u64 values — use.toBigInt()for exact access (#1955). - [FEATURE][rust,cli] Added partial swap (PSWAP) support:
TransactionRequestBuilder::build_pswap_create/build_pswap_consume/build_pswap_canceland amiden-client pswapCLI command (create,consume,cancel) for partially-fillable fungible swaps (#2162). - Added verification of MMR responses during state sync: validated the returned block range matches the requested range and checked that post-delta MMR peaks match the block header's chain commitment (#1887).
Fixes
- [FIX][rust]
Client::execute_transactionno longer writes to the store before execution: the request's input notes and output note scripts are persisted only after the transaction executes successfully and is applied, so a failed execution leaves the store unchanged (#2222). - [FIX][rust]
Client::send_private_noteis now durable across transient NTL failures: the relay payload is persisted to a durable outbox (aVec<NoteInfo>under thenote_transport_outboxsettings key) before the transport call, so a failed or interruptedsend_noteno longer drops the note.Client::sync_note_transportretries the outbox on each sync (the receiver dedupes by note id) and a failing relay no longer blocks the sync; the newClient::flush_relay_outbox()lets callers drive retries directly (#2127). - [FIX] Fixed
derive_account_commitmentsto return the final account commitment when multiple transactions for the same account are committed in the same block (#2164). - [FIX] Stopped state sync from aborting when the node reports a stale (non-monotonic) header for a rapidly-advancing account: such updates are now skipped instead of failing with a nonce error (#2216).
- [FIX] Preserve a fungible asset's callback flag when the store replays a vault delta, fixing a
ConflictingRootserror when consuming callback-bearing (e.g. agglayer-minted) assets (#2225). - [FIX] Fixed the
sync_notes_with_detailsto fetch the attachments for private notes (#2214). - [rust] Expanded validation for output notes before executing a
TransactionRequest. (#89) - [FIX][rust]
Client::fetch_all_private_notesnow drains the full backlog across multiple server-paginated responses instead of returning after a single batch. Needed once the note-transport server (0xMiden/note-transport-service#77) caps eachfetch_notesresponse atFETCH_NOTES_BATCH_SIZErows — previously the function silently returned only the first batch, contradicting its documented "fetches all notes" semantics. Companion deterministic regression test (fetch_all_private_notes_drains_across_batches) uses a newMockNoteTransportNode::with_max_batch(n)constructor to exercise multi-batch drain. (#2095) - [FIX][rust] Fixed the
dapfeature build by bumpingmiden-debug/miden-debug-engineto 0.8.1 andmiden-coreto 0.23.2, aligning the debugger crates with themiden-coreAPIs they call. (#2189)
Changes
- [BREAKING][rust] Added a
Subscription(Word)variant toNoteTagSource. (#2248) - [rust] Added
Store::apply_settings_mutationsfor batchedsettingswrites. (#2248) - [BREAKING][param][rust]
NodeRpcClient::get_block_by_number()now takes aninclude_proof: boolparameter to control whether the block proof is included in the response. (#1991) - [BREAKING][param][rust]
NodeRpcClient::sync_chain_mmr()replacedblock_to: Option<BlockNumber>withupper_bound: SyncTargetto match the RPC definition. UseSyncTarget::CommittedChainTipfor previous default behavior (None), orSyncTarget::BlockNumber(num)for a specific block number. (#1991) - [BREAKING][rust] Added
submit_proven_batchtoNodeRpcClienttrait. (#2075) - [BREAKING][param][cli]
address addnow takes<ACCOUNT_ID> <BECH32_ADDRESS>instead of<ACCOUNT_ID> <INTERFACE> [TAG_LEN]. Use the newaddress encodesubcommand to build a bech32 string from<ACCOUNT_ID> <INTERFACE> [TAG_LEN]. (#2115) - [BREAKING][rust]
StateSyncno longer takes anOption<Arc<dyn Store>>.StateSyncInput::accountsis now aVec<AccountSyncHint>(header +AccountStorageHeader); when hints cover the account's map slotsStateSyncissues a singleget_account_prooffor non-oversized accounts, and when new map slots appear on-chain it only fetches the missing ones. TheStoretrait methodget_account_map_slot_nameswas replaced withget_account_storage_header. (#2132) - [BREAKING]
NodeRpcClient::get_account_detailsnow fetches a public account's storage maps in a single/GetAccountrequest and returns `O...
v0.14.9
v0.14.8
0.14.8 (2026-05-11)
Enhancements
- [FEATURE][rust] Surfaced
concurrentas a top-levelmiden-clientfeature, independent ofstd. wasm32 consumers usingdefault-features = false(notably the@miden-sdk/miden-sdkMT WASM bundle and the newmiden-mobile-provernative plugin for iOS/Android wallets) can now opt into rayon-parallel proving viamiden-tx/concurrent+miden-prover/concurrentwithout also pulling in themiden-client/stddeps (dep:tokio,dep:tempfile,tonic'stransport/tls-*features). Nativestd-using consumers get this transitively throughstd; the duplication in thestdfeature list is intentional so each consumer can pick the smallest feature set they need. Note thatmiden-tx's ownconcurrentfeature is defined upstream as["miden-prover/concurrent", "std"], so this does activatestdon the protocol crates (miden-tx, miden-prover, miden-protocol) — thatstdis unavoidable for parallel proving and is cheap on wasm32 (#2169).
v0.14.7
0.14.7 (2026-06-05)
Enhancements
- [FEATURE][rust] Added
GrpcClient::with_bearer_auth(token)to attach anauthorization: Bearer <token>header to every outbound gRPC call, for use behind authenticating gateways. Tokens are validated at connection time and preserved acrossset_genesis_commitmentupdates (#2101).
v0.14.6
0.14.6 (2026-05-05)
Fixes
v0.14.5
0.14.5 (2026-04-27)
Enhancements
- Added
ClientBuilder::source_manager()to override theSourceManagerused by the client. When not set, the client defaults toDefaultSourceManager. Set this when compiling scripts outside the client with an externalAssembler, so source spans resolve against the same manager (#2047).
Fixes
- [BREAKING][behavior][rust,web]
CodeBuilder::compile_note_scriptnow expects a library module with a single procedure annotated@note_script(e.g.@note_script\npub proc main\n ...\nend) instead of abegin..endprogram. Inherited frommiden-standards0.14.5, which switched the underlying call fromassemble_programtoassemble_library(#2128). - [FIX][web] Stopped the wasm-bindgen-generated array constructors (
NoteArray,OutputNoteArray,NoteAndArgsArray,NoteRecipientArray,StorageSlotArray,TransactionScriptInputPairArray,FeltArray,AccountIdArray,AccountArray,ForeignAccountArray,NoteIdAndArgsArray) from silently moving each input element's underlying Rust value out of the caller's JS handle. The defaultpub fn new(elements: Option<Vec<T>>)path took every element by value via wasm-bindgen'sVec<T>ABI: the JS handle's__wbg_ptrwas left unchanged so the object looked fine, but any subsequent method on it panicked inside WASM with the opaque"null pointer passed to rust"error. The auto-generated array exports are now overridden injs/index.jswith thin wrappers that build the same array viapush(&T)(which already borrows + clones) so callers can keep using the originals after construction. Same pattern applied toreplaceAton the Rust side, which now takeselem: &Tinstead ofelem: T. Repro:const note = new Note(...); new NoteArray([note]); note.id();— used to panic, now succeeds (#2121). - [FIX][rust] Fixed source manager mismatch panic (
invalid source span: starting byte is out of bounds) in tests that compiled scripts with a standaloneSourceManagerand then executed them through the client. Test helpers now useTransactionKernel::assembler_with_source_manager()and the client's shared source manager (#2047). - [FIX][react] Fixed
initializeSignerAccount(the external-keystore init path used byMidenFiSignerProvider, Para, Turnkey, etc.) throwing"invalid enum value passed"on first connect. The code reached forAuthScheme.AuthEcdsaK256Keccak, which only exists on the internal wasm-bindgenAuthSchemeenum, not on the public string-valuedAuthSchemeconstant exported from@miden-sdk/miden-sdk/lazy— at runtime it resolved toundefined, and passingundefinedtoAccountComponent.createAuthComponentFromCommitmentfailed at the wasm boundary.initializeSignerAccountnow callsresolveAuthScheme(AuthScheme.ECDSA), whereresolveAuthSchemeis a newly-public helper from@miden-sdk/miden-sdkthat converts the string constants to the numeric wasm-bindgen variant (#2088). - [FIX][react]
DEFAULTS.AUTH_SCHEMEwas being initialized toAuthScheme.AuthRpoFalcon512— another nonexistent key on the publicAuthScheme, silently resolving toundefined. Now set toAuthScheme.Falcon. The four hooks that read this default (useCreateWallet,useCreateFaucet,useImportAccount,useSessionAccount) now pipe the value throughresolveAuthScheme(...)before handing it to the wasm-bindgennewWallet/newFaucet/importPublicAccountFromSeedcalls. The public hook option types stayauthScheme?: AuthScheme, which now correctly means"falcon" | "ecdsa"(#2088).
v0.14.4
0.14.4 (2026-04-20)
Features
- [FEATURE][web] Serialize all async
WebClientJS methods — both the explicit wrappers and every async call that falls throughcreateClientProxyto the underlying WASM client (e.g.getAccount,importAccountById,getAccountStorage) — via an internal_serializeWasmCallchain. Prevents"recursive use of an object detected"panics when an unwrapped read/write races the auto-sync timer or any explicitly-wrapped method. ExposewaitForIdle()onMidenClientso callers can drain in-flight work before mutating non-WASM state (#2057). - [FEATURE][web] Split
@miden-sdk/miden-sdkinto eager and lazy entry points. The default entry (import from "@miden-sdk/miden-sdk") now awaits WASM at module top level via a small shim (js/eager.js) — consumers don't needawait MidenClient.ready()/isReadybefore constructing wasm-bindgen types. The lazy entry (import from "@miden-sdk/miden-sdk/lazy") preserves the previous behavior and is required for Capacitor WKWebView hosts (the custom-scheme handler hangs on TLA) and Next.js SSR. Verified empirically against the Miden Wallet's iOS E2E suite on devnet.@miden-sdk/reactimports from/lazyinternally and manages readiness viaisReady. - [FEATURE][web] Expose
lastAuthError()onMidenClientfor typed sign-callback failure recovery — preserves the raw thrown value from the JS signCallback so consumers can distinguish locked/rejected/IO-error failure modes (#2058). - [FEATURE][web] Added
"custom"operation topreview()so users can dry-run any pre-builtTransactionRequest, not just send/mint/consume/swap (#2052). - [FEATURE][web] Exposed
BlockHeader.nativeAssetId()so JavaScript consumers can read the native fungible-faucet account ID from a block header. The field already rides the RPC wire and is decoded into the RustBlockHeader, but no WASM accessor existed, forcing wallets and dApps to hardcode the native faucet per network (#2070).
Fixes
- [FIX][web]
proveTransactionWithProvernow takes&TransactionProverby reference instead of consuming by value — the old signature invalidated the JS handle after one use, silently falling back to local proving on subsequent calls (#2062).