@miden-sdk/miden-sdk 0.15.5 → 0.15.6
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/README.md +13 -0
- package/dist/mt/{Cargo-C001gt8g.js → Cargo-mvyTli7g.js} +202 -87
- package/dist/mt/Cargo-mvyTli7g.js.map +1 -0
- package/dist/mt/assets/miden_client_web.wasm +0 -0
- package/dist/mt/crates/miden_client_web.d.ts +48 -1
- package/dist/mt/eager.js +1 -1
- package/dist/mt/index.js +1 -1
- package/dist/mt/wasm.js +1 -1
- package/dist/mt/workerHelpers.js +1 -1
- package/dist/mt/workers/{Cargo-C001gt8g-B8wBADUI.js → Cargo-mvyTli7g-BwMMSyoq.js} +202 -87
- package/dist/mt/workers/Cargo-mvyTli7g-BwMMSyoq.js.map +1 -0
- package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
- package/dist/mt/workers/web-client-methods-worker.js +203 -88
- package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
- package/dist/mt/workers/web-client-methods-worker.module.js +1 -1
- 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-CR1mzjgg.js → Cargo-Cysp4vto.js} +210 -95
- package/dist/st/Cargo-Cysp4vto.js.map +1 -0
- package/dist/st/assets/miden_client_web.wasm +0 -0
- package/dist/st/crates/miden_client_web.d.ts +48 -1
- package/dist/st/eager.js +1 -1
- package/dist/st/index.js +1 -1
- package/dist/st/wasm.js +1 -1
- package/dist/st/workers/{Cargo-CR1mzjgg-DeDmKA4W.js → Cargo-Cysp4vto-BIw-TeJn.js} +210 -95
- package/dist/st/workers/Cargo-Cysp4vto-BIw-TeJn.js.map +1 -0
- package/dist/st/workers/assets/miden_client_web.wasm +0 -0
- package/dist/st/workers/web-client-methods-worker.js +211 -96
- package/dist/st/workers/web-client-methods-worker.js.map +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js +1 -1
- package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
- package/package.json +4 -4
- package/dist/mt/Cargo-C001gt8g.js.map +0 -1
- package/dist/mt/workers/Cargo-C001gt8g-B8wBADUI.js.map +0 -1
- package/dist/st/Cargo-CR1mzjgg.js.map +0 -1
- package/dist/st/workers/Cargo-CR1mzjgg-DeDmKA4W.js.map +0 -1
|
Binary file
|
|
@@ -57,6 +57,13 @@ export class Account {
|
|
|
57
57
|
* Returns true if the account exposes a fungible-faucet interface.
|
|
58
58
|
*/
|
|
59
59
|
isFaucet(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if this is a network account.
|
|
62
|
+
*
|
|
63
|
+
* A network account is a public account whose storage
|
|
64
|
+
* carries the standardized network-account note-script allowlist slot.
|
|
65
|
+
*/
|
|
66
|
+
isNetworkAccount(): boolean;
|
|
60
67
|
/**
|
|
61
68
|
* Returns true if the account has not yet been committed to the chain.
|
|
62
69
|
*/
|
|
@@ -73,6 +80,11 @@ export class Account {
|
|
|
73
80
|
* Returns true if the account is a regular (non-faucet) account.
|
|
74
81
|
*/
|
|
75
82
|
isRegularAccount(): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the note-script roots this network account is allowed to
|
|
85
|
+
* consume, or `undefined` if this is not a network account.
|
|
86
|
+
*/
|
|
87
|
+
networkNoteAllowlist(): Word[] | undefined;
|
|
76
88
|
/**
|
|
77
89
|
* Returns the account nonce, which is incremented on every state update.
|
|
78
90
|
*/
|
|
@@ -211,6 +223,29 @@ export class AccountComponent {
|
|
|
211
223
|
* Builds an auth component from a secret key, inferring the auth scheme from the key type.
|
|
212
224
|
*/
|
|
213
225
|
static createAuthComponentFromSecretKey(secret_key: AuthSecretKey): AccountComponent;
|
|
226
|
+
/**
|
|
227
|
+
* Builds the auth component for a network account.
|
|
228
|
+
*
|
|
229
|
+
* A network account is a public account carrying this component: its
|
|
230
|
+
* note-script allowlist is the standardized storage slot the node's
|
|
231
|
+
* network-transaction builder inspects to identify the account as a network
|
|
232
|
+
* account and route matching notes to it for auto-consumption. The account
|
|
233
|
+
* may only consume notes whose script root is in `allowedNoteScriptRoots`
|
|
234
|
+
* (obtain a root via `NoteScript.root()`).
|
|
235
|
+
*
|
|
236
|
+
* `allowedTxScriptRoots` optionally allowlists transaction script roots
|
|
237
|
+
* (from `TransactionScript.root()`) the account will execute. When omitted
|
|
238
|
+
* or empty, the account permits no transaction scripts and deploys and
|
|
239
|
+
* advances via scriptless transactions only. Allowlist a script root only
|
|
240
|
+
* if the script's effect is safe for *every* possible input: a root pins
|
|
241
|
+
* the script's code but not its arguments or advice inputs, which the
|
|
242
|
+
* (arbitrary) transaction submitter controls.
|
|
243
|
+
*
|
|
244
|
+
* # Errors
|
|
245
|
+
* Errors if `allowedNoteScriptRoots` is empty: a network account with no
|
|
246
|
+
* allowlisted note scripts could never consume a note.
|
|
247
|
+
*/
|
|
248
|
+
static createNetworkAuth(allowed_note_script_roots: Word[], allowed_tx_script_roots?: Word[] | null): AccountComponent;
|
|
214
249
|
/**
|
|
215
250
|
* Creates an account component from a compiled library and storage slots.
|
|
216
251
|
*/
|
|
@@ -1113,7 +1148,7 @@ export class CodeBuilder {
|
|
|
1113
1148
|
* Given a Library Path, and a source code, turn it into a Library.
|
|
1114
1149
|
* E.g. A path library can be `miden::my_contract`. When turned into a library,
|
|
1115
1150
|
* this can be used from another script with an import statement, following the
|
|
1116
|
-
* previous example: `use miden::my_contract
|
|
1151
|
+
* previous example: `use miden::my_contract`.
|
|
1117
1152
|
*/
|
|
1118
1153
|
buildLibrary(library_path: string, source_code: string): Library;
|
|
1119
1154
|
/**
|
|
@@ -1751,6 +1786,12 @@ export class InputNoteRecord {
|
|
|
1751
1786
|
* Returns true if the note has already been consumed.
|
|
1752
1787
|
*/
|
|
1753
1788
|
isConsumed(): boolean;
|
|
1789
|
+
/**
|
|
1790
|
+
* Returns true while the note's on-chain inclusion is still unsettled
|
|
1791
|
+
* (`Expected` or `Unverified`), i.e. while sync is the mechanism that can
|
|
1792
|
+
* advance this record.
|
|
1793
|
+
*/
|
|
1794
|
+
isInclusionPending(): boolean;
|
|
1754
1795
|
/**
|
|
1755
1796
|
* Returns true if the note is currently being processed.
|
|
1756
1797
|
*/
|
|
@@ -3217,6 +3258,12 @@ export class OutputNoteRecord {
|
|
|
3217
3258
|
* Returns true if the note has been consumed on chain.
|
|
3218
3259
|
*/
|
|
3219
3260
|
isConsumed(): boolean;
|
|
3261
|
+
/**
|
|
3262
|
+
* Returns true while the note's on-chain inclusion is still unsettled
|
|
3263
|
+
* (`ExpectedFull` or `ExpectedPartial`), i.e. while sync is the mechanism
|
|
3264
|
+
* that can advance this record.
|
|
3265
|
+
*/
|
|
3266
|
+
isInclusionPending(): boolean;
|
|
3220
3267
|
/**
|
|
3221
3268
|
* Returns the note metadata.
|
|
3222
3269
|
*/
|
package/dist/st/eager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getWasmOrThrow } from './index.js';
|
|
2
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, EthAddress, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkAccountTarget, 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, PswapLineageRecord, PswapLineageState, 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, sequentialSumBench, setupLogging } from './Cargo-
|
|
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, EthAddress, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkAccountTarget, 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, PswapLineageRecord, PswapLineageState, 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, sequentialSumBench, setupLogging } from './Cargo-Cysp4vto.js';
|
|
4
4
|
import './wasm.js';
|
|
5
5
|
|
|
6
6
|
// Eager entry point for @miden-sdk/miden-sdk (browser builds).
|
package/dist/st/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import loadWasm from './wasm.js';
|
|
2
|
-
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, EthAddress, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkAccountTarget, 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, PswapLineageRecord, PswapLineageState, 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, sequentialSumBench, setupLogging } from './Cargo-
|
|
2
|
+
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, EthAddress, ExecutedTransaction, Felt, FeltArray, FetchedAccount, FetchedNote, FlattenedU8Vec, ForeignAccount, ForeignAccountArray, FungibleAsset, FungibleAssetDelta, FungibleAssetDeltaItem, GetProceduresResultItem, InputNote, InputNoteRecord, InputNoteState, InputNotes, IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, JsAccountUpdate, JsSettingMutation, JsStateSyncUpdate, JsStorageMapEntry, JsStorageSlot, JsVaultAsset, Library, MerklePath, NetworkAccountTarget, 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, PswapLineageRecord, PswapLineageState, 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, sequentialSumBench, setupLogging } from './Cargo-Cysp4vto.js';
|
|
3
3
|
|
|
4
4
|
const WorkerAction = Object.freeze({
|
|
5
5
|
INIT: "init",
|
package/dist/st/wasm.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
async function loadWasm() {
|
|
5
5
|
let wasmModule;
|
|
6
6
|
if (!import.meta.env || (import.meta.env && !import.meta.env.SSR)) {
|
|
7
|
-
wasmModule = await import('./Cargo-
|
|
7
|
+
wasmModule = await import('./Cargo-Cysp4vto.js');
|
|
8
8
|
// The Cargo glue's __wbg_init TLA is stripped by the rollup build to
|
|
9
9
|
// prevent blocking WKWebView module evaluation. Call it explicitly here
|
|
10
10
|
// with the WASM URL that the Cargo glue pre-resolves (relative to its
|