starknet 10.6.8 → 10.7.0

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/index.js CHANGED
@@ -13111,7 +13111,7 @@ function fromWalletApiCall(call) {
13111
13111
  }
13112
13112
  function toWalletApiActions(actions) {
13113
13113
  return actions.map(
13114
- (action) => action.type === "subaccount_invoke" ? { ...action, calls: action.calls.map(toWalletApiCall) } : action
13114
+ (action) => action.type === "shadow_account_invoke" ? { ...action, calls: action.calls.map(toWalletApiCall) } : action
13115
13115
  );
13116
13116
  }
13117
13117
 
@@ -13130,7 +13130,7 @@ __export(connectV6_exports, {
13130
13130
  strk20Balances: () => strk20Balances,
13131
13131
  strk20InvokeTransaction: () => strk20InvokeTransaction,
13132
13132
  strk20PrepareInvoke: () => strk20PrepareInvoke,
13133
- strk20SubaccountCommitment: () => strk20SubaccountCommitment,
13133
+ strk20ShadowAccountCommitment: () => strk20ShadowAccountCommitment,
13134
13134
  subscribeWalletEvent: () => subscribeWalletEvent2,
13135
13135
  supportedSpecs: () => supportedSpecs3,
13136
13136
  supportedWalletApi: () => supportedWalletApi3,
@@ -13218,9 +13218,9 @@ function strk20InvokeTransaction(walletWSF, actions) {
13218
13218
  params: { actions }
13219
13219
  });
13220
13220
  }
13221
- function strk20SubaccountCommitment(walletWSF, dapp_name, nonce) {
13221
+ function strk20ShadowAccountCommitment(walletWSF, dapp_name, nonce) {
13222
13222
  return walletWSF.features["starknet:walletApi"].request({
13223
- type: "wallet_strk20SubaccountCommitment",
13223
+ type: "wallet_strk20ShadowAccountCommitment",
13224
13224
  params: { dapp_name, nonce }
13225
13225
  });
13226
13226
  }
@@ -13312,25 +13312,25 @@ var WalletAccountV6 = class _WalletAccountV6 extends WalletAccountV5 {
13312
13312
  return strk20InvokeTransaction(this.v6Provider, toWalletApiActions(actions));
13313
13313
  }
13314
13314
  /**
13315
- * Compute the commitment of a DAPP STRK20 sub-account. The commitment is computed
13315
+ * Compute the commitment of a DAPP STRK20 shadow account. The commitment is computed
13316
13316
  * locally by the wallet from the user private state ; no transaction is sent.
13317
13317
  *
13318
- * When `nonce` is given, the full commitment of this single sub-account is returned.
13318
+ * When `nonce` is given, the full commitment of this single shadow account is returned.
13319
13319
  * When `nonce` is omitted, the partial (nonce independent) commitment is returned
13320
- * instead : it is shared by every sub-account the user derives for this DAPP, so it can
13321
- * be published once to let a DAPP recognize all the sub-accounts of a user without
13322
- * learning any individual nonce.
13323
- * @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the sub-account(s).
13324
- * @param {FELT} [nonce] - The sub-account nonce ; each nonce selects a distinct sub-account for this user + DAPP. Omit it to get the partial commitment.
13325
- * @returns {Promise<FELT>} The sub-account commitment.
13320
+ * instead : it is shared by every shadow account the user derives for this DAPP, so it
13321
+ * can be published once to let a DAPP recognize all the shadow accounts of a user
13322
+ * without learning any individual nonce.
13323
+ * @param {STRK20_DAPP_NAME} dappName - The DAPP that scopes the shadow account(s).
13324
+ * @param {FELT} [nonce] - The shadow account nonce ; each nonce selects a distinct shadow account for this user + DAPP. Omit it to get the partial commitment.
13325
+ * @returns {Promise<FELT>} The shadow account commitment.
13326
13326
  * @example
13327
13327
  * ```typescript
13328
- * const commitment = await myWalletAccount.strk20SubaccountCommitment('myDapp', '0x0');
13328
+ * const commitment = await myWalletAccount.strk20ShadowAccountCommitment('myDapp', '0x0');
13329
13329
  * // commitment = '0x5f2e...'
13330
13330
  * ```
13331
13331
  */
13332
- strk20SubaccountCommitment(dappName, nonce) {
13333
- return strk20SubaccountCommitment(this.v6Provider, dappName, nonce);
13332
+ strk20ShadowAccountCommitment(dappName, nonce) {
13333
+ return strk20ShadowAccountCommitment(this.v6Provider, dappName, nonce);
13334
13334
  }
13335
13335
  static async connect(provider, walletProvider, cairoVersion, paymaster, silentMode = false) {
13336
13336
  const { accounts } = await standardConnect2(walletProvider, silentMode);