@miden-sdk/miden-sdk 0.15.0-alpha.5 → 0.15.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mt/{Cargo-smJQCGjz.js → Cargo-C9UbiAcT.js} +62 -6
- package/dist/mt/{Cargo-smJQCGjz.js.map → Cargo-C9UbiAcT.js.map} +1 -1
- package/dist/mt/api-types.d.ts +6 -2
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +31 -1
- package/dist/mt/eager.js +2 -2
- package/dist/mt/index.d.ts +2 -1
- package/dist/mt/index.js +477 -375
- package/dist/mt/index.js.map +1 -1
- package/dist/mt/wasm.js +1 -1
- package/dist/mt/workerHelpers.js +1 -1
- package/dist/mt/workers/{Cargo-smJQCGjz-q4GYXDiD.js → Cargo-C9UbiAcT-Z344cyB1.js} +62 -6
- package/dist/mt/workers/{Cargo-smJQCGjz-q4GYXDiD.js.map → Cargo-C9UbiAcT-Z344cyB1.js.map} +1 -1
- package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
- package/dist/mt/workers/web-client-methods-worker.js +118 -7
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js +55 -2
- package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
- package/dist/mt/workers/workerHelpers.js +1 -1
- package/dist/st/{Cargo-CG4XszZo.js → Cargo-OZMlHpic.js} +24 -2
- package/dist/st/{Cargo-CG4XszZo.js.map → Cargo-OZMlHpic.js.map} +1 -1
- package/dist/st/api-types.d.ts +6 -2
- package/dist/st/assets/miden_client_web.wasm +0 -0
- package/dist/st/crates/miden_client_web.d.ts +15 -1
- package/dist/st/eager.js +2 -2
- package/dist/st/index.d.ts +2 -1
- package/dist/st/index.js +477 -375
- package/dist/st/index.js.map +1 -1
- package/dist/st/wasm.js +1 -1
- package/dist/st/workers/{Cargo-CG4XszZo-S7EHAZSa.js → Cargo-OZMlHpic-DZjvJlWc.js} +24 -2
- package/dist/st/workers/{Cargo-CG4XszZo-S7EHAZSa.js.map → Cargo-OZMlHpic-DZjvJlWc.js.map} +1 -1
- package/dist/st/workers/assets/miden_client_web.wasm +0 -0
- package/dist/st/workers/web-client-methods-worker.js +79 -4
- package/dist/st/workers/web-client-methods-worker.js.map +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js +55 -2
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
- package/js/client.js +24 -5
- package/js/node/napi-compat.js +7 -3
- package/js/resources/transactions.js +4 -1
- package/package.json +4 -4
package/dist/mt/api-types.d.ts
CHANGED
|
@@ -1054,8 +1054,12 @@ export declare class MidenClient {
|
|
|
1054
1054
|
readonly compile: CompilerResource;
|
|
1055
1055
|
readonly keystore: KeystoreResource;
|
|
1056
1056
|
|
|
1057
|
-
/** Syncs the client
|
|
1058
|
-
sync(
|
|
1057
|
+
/** Syncs the client: fetches private notes from the Note Transport Layer, then syncs on-chain state. Fails fast on either. */
|
|
1058
|
+
sync(): Promise<SyncSummary>;
|
|
1059
|
+
/** Syncs on-chain state only (no NTL fetch). */
|
|
1060
|
+
syncChain(): Promise<SyncSummary>;
|
|
1061
|
+
/** Fetches private notes from the Note Transport Layer. */
|
|
1062
|
+
syncNoteTransport(): Promise<void>;
|
|
1059
1063
|
/** Returns the current sync height. */
|
|
1060
1064
|
getSyncHeight(): Promise<number>;
|
|
1061
1065
|
/**
|
|
Binary file
|
|
@@ -4564,6 +4564,12 @@ export class WebClient {
|
|
|
4564
4564
|
/**
|
|
4565
4565
|
* Generates a transaction proof using either the provided prover or the client's default
|
|
4566
4566
|
* prover if none is supplied.
|
|
4567
|
+
*
|
|
4568
|
+
* With an explicit prover this is a pure computation over the `TransactionResult` and does
|
|
4569
|
+
* not touch client state, so it works on a bare `WebClient` that never ran
|
|
4570
|
+
* `createClient()`. "Prover-only" hosts rely on this — e.g. a `chrome.offscreen` document
|
|
4571
|
+
* that proves on its own rayon thread pool. Only the default-prover fallback requires an
|
|
4572
|
+
* initialized client.
|
|
4567
4573
|
*/
|
|
4568
4574
|
proveTransaction(transaction_result: TransactionResult, prover?: TransactionProver | null): Promise<ProvenTransaction>;
|
|
4569
4575
|
/**
|
|
@@ -4624,7 +4630,15 @@ export class WebClient {
|
|
|
4624
4630
|
submitNewTransactionWithProver(account_id: AccountId, transaction_request: TransactionRequest, prover: TransactionProver): Promise<TransactionId>;
|
|
4625
4631
|
submitProvenTransaction(proven_transaction: ProvenTransaction, transaction_result: TransactionResult): Promise<number>;
|
|
4626
4632
|
/**
|
|
4627
|
-
* Internal implementation of `
|
|
4633
|
+
* Internal implementation of `sync_chain` (on-chain-only sync). Use `syncChain()` from JS.
|
|
4634
|
+
*/
|
|
4635
|
+
syncChainImpl(): Promise<SyncSummary>;
|
|
4636
|
+
/**
|
|
4637
|
+
* Internal implementation of `sync_note_transport`. Use `syncNoteTransport()` from JS.
|
|
4638
|
+
*/
|
|
4639
|
+
syncNoteTransportImpl(): Promise<void>;
|
|
4640
|
+
/**
|
|
4641
|
+
* Internal implementation of `sync_state` (combined NTL + chain sync).
|
|
4628
4642
|
*
|
|
4629
4643
|
* This method performs the actual sync operation. Concurrent call coordination
|
|
4630
4644
|
* is handled at the JavaScript layer using the Web Locks API.
|
|
@@ -4740,6 +4754,22 @@ export function importStore(store_name: string, store_dump: string): Promise<voi
|
|
|
4740
4754
|
|
|
4741
4755
|
export function initThreadPool(num_threads: number): Promise<any>;
|
|
4742
4756
|
|
|
4757
|
+
/**
|
|
4758
|
+
* Same probe, but exported as an async fn so it runs inside a
|
|
4759
|
+
* wasm-bindgen-futures task — mirroring the context `proveTransaction`
|
|
4760
|
+
* executes in. Divergence between the two reveals whether the futures
|
|
4761
|
+
* context breaks rayon dispatch.
|
|
4762
|
+
*/
|
|
4763
|
+
export function mtProbeAsync(): Promise<string>;
|
|
4764
|
+
|
|
4765
|
+
/**
|
|
4766
|
+
* MT diagnostics: report which rayon threads execute a tiny par_iter when
|
|
4767
|
+
* dispatched from a plain synchronous wasm export. `outer` is the calling
|
|
4768
|
+
* thread's pool index (-1 = external), `inside` the distinct pool indexes
|
|
4769
|
+
* that ran chunks.
|
|
4770
|
+
*/
|
|
4771
|
+
export function mtProbeSync(): string;
|
|
4772
|
+
|
|
4743
4773
|
/**
|
|
4744
4774
|
* Synthetic parallel benchmark: sums 0..n via `par_iter()` on the global
|
|
4745
4775
|
* rayon pool. Returns elapsed micros. If the pool is actually multi-threaded,
|
package/dist/mt/eager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getWasmOrThrow } from './index.js';
|
|
2
|
-
export { AccountType, AuthScheme, CompilerResource, Linking, MidenArrays, MidenClient, MockWasmWebClient, MockWasmWebClient as MockWebClient, NoteVisibility, StorageMode, StorageResult, StorageView, WasmWebClient, buildSwapTag, createP2IDENote, createP2IDNote, wordToBigInt } from './index.js';
|
|
3
|
-
export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore, importStore, initSync, initThreadPool, parallelSumBench, rayonThreadCount, sequentialSumBench, setupLogging, wbg_rayon_PoolBuilder, wbg_rayon_start_worker } from './Cargo-
|
|
2
|
+
export { AccountType, AuthScheme, CompilerResource, Linking, MidenArrays, MidenClient, MockWasmWebClient, MockWasmWebClient as MockWebClient, NoteVisibility, StorageMode, StorageResult, StorageView, WasmWebClient, buildSwapTag, createP2IDENote, createP2IDNote, withSyncLock, wordToBigInt } from './index.js';
|
|
3
|
+
export { Account, AccountArray, AccountBuilder, AccountBuilderResult, AccountCode, AccountComponent, AccountComponentCode, AccountDelta, AccountFile, AccountHeader, AccountId, AccountIdArray, AccountInterface, AccountProof, AccountReader, AccountStatus, AccountStorage, AccountStorageDelta, AccountStorageMode, AccountStorageRequirements, AccountVaultDelta, Address, AdviceInputs, AdviceMap, AssetVault, AuthFalcon512RpoMultisigConfig, AuthSecretKey, BasicFungibleFaucetComponent, BlockHeader, CodeBuilder, CommittedNote, ConsumableNoteRecord, Endpoint, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkId, NetworkNoteStatusInfo, NetworkType, Note, NoteAndArgs, NoteAndArgsArray, NoteArray, NoteAssets, NoteAttachment, NoteAttachmentScheme, NoteConsumability, NoteConsumptionStatus, NoteDetails, NoteDetailsAndTag, NoteDetailsAndTagArray, NoteExecutionHint, NoteExportFormat, NoteFile, NoteFilter, NoteFilterTypes, NoteHeader, NoteId, NoteIdAndArgs, NoteIdAndArgsArray, NoteInclusionProof, NoteLocation, NoteMetadata, NoteRecipient, NoteRecipientArray, NoteScript, NoteStorage, NoteSyncBlock, NoteSyncInfo, NoteTag, NoteType, OutputNote, OutputNoteArray, OutputNoteRecord, OutputNoteState, OutputNotes, Package, PartialNote, Poseidon2, ProcedureThreshold, Program, ProvenTransaction, PublicKey, RpcClient, Rpo256, SerializedInputNoteData, SerializedOutputNoteData, SerializedTransactionData, Signature, SigningInputs, SigningInputsType, SlotAndKeys, SparseMerklePath, StorageMap, StorageMapEntry, StorageMapEntryJs, StorageMapInfo, StorageMapUpdate, StorageSlot, StorageSlotArray, SyncSummary, TestUtils, TokenSymbol, TransactionArgs, TransactionFilter, TransactionId, TransactionProver, TransactionRecord, TransactionRequest, TransactionRequestBuilder, TransactionResult, TransactionScript, TransactionScriptInputPair, TransactionScriptInputPairArray, TransactionStatus, TransactionStoreUpdate, TransactionSummary, WebClient, WebKeystoreApi, Word, createAuthFalcon512RpoMultisig, exportStore, importStore, initSync, initThreadPool, mtProbeAsync, mtProbeSync, parallelSumBench, rayonThreadCount, sequentialSumBench, setupLogging, wbg_rayon_PoolBuilder, wbg_rayon_start_worker } from './Cargo-C9UbiAcT.js';
|
|
4
4
|
import './wasm.js';
|
|
5
5
|
|
|
6
6
|
// Eager entry point for @miden-sdk/miden-sdk (browser builds).
|
package/dist/mt/index.d.ts
CHANGED
|
@@ -158,7 +158,8 @@ export declare class WasmWebClient extends WasmWebClientBase {
|
|
|
158
158
|
): Promise<WasmWebClient>;
|
|
159
159
|
|
|
160
160
|
syncState(): Promise<SyncSummary>;
|
|
161
|
-
|
|
161
|
+
syncChain(): Promise<SyncSummary>;
|
|
162
|
+
syncNoteTransport(): Promise<void>;
|
|
162
163
|
setSignCb(signCb: SignCallback | null | undefined): void;
|
|
163
164
|
onStateChanged(callback: (event: any) => void): (() => void) | undefined;
|
|
164
165
|
terminate(): void;
|