starknet 7.6.1 → 7.6.3

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.mjs CHANGED
@@ -5378,7 +5378,7 @@ var EventEmitter = class {
5378
5378
  };
5379
5379
 
5380
5380
  // src/utils/connect/ws.ts
5381
- var ws_default = typeof WebSocket !== "undefined" && WebSocket || typeof globalThis !== "undefined" && globalThis.WebSocket || typeof window !== "undefined" && window.WebSocket.bind(window) || typeof global !== "undefined" && global.WebSocket || class {
5381
+ var ws_default = typeof WebSocket !== "undefined" && WebSocket || typeof globalThis !== "undefined" && globalThis.WebSocket || typeof window !== "undefined" && window.WebSocket && window.WebSocket.bind(window) || typeof global !== "undefined" && global.WebSocket || class {
5382
5382
  constructor() {
5383
5383
  throw new LibraryError(
5384
5384
  "WebSocket module not detected, use the 'websocket' constructor parameter to set a compatible connection"
@@ -10569,7 +10569,7 @@ var Contract = class {
10569
10569
  return this.callData.parse(method, it);
10570
10570
  });
10571
10571
  }
10572
- invoke(method, args = [], { parseRequest = true, maxFee, nonce, signature } = {}) {
10572
+ invoke(method, args = [], { parseRequest = true, signature, ...RestInvokeOptions } = {}) {
10573
10573
  assert(this.address !== null, "contract is not connected to an address");
10574
10574
  const calldata = getCalldata(args, () => {
10575
10575
  if (parseRequest) {
@@ -10586,11 +10586,11 @@ var Contract = class {
10586
10586
  };
10587
10587
  if ("execute" in this.providerOrAccount) {
10588
10588
  return this.providerOrAccount.execute(invocation, {
10589
- maxFee,
10590
- nonce
10589
+ ...RestInvokeOptions
10591
10590
  });
10592
10591
  }
10593
- if (!nonce) throw new Error(`Nonce is required when invoking a function without an account`);
10592
+ if (!RestInvokeOptions.nonce)
10593
+ throw new Error(`Nonce is required when invoking a function without an account`);
10594
10594
  logger.warn(`Invoking ${method} without an account. This will not work on a public node.`);
10595
10595
  return this.providerOrAccount.invokeFunction(
10596
10596
  {
@@ -10598,7 +10598,8 @@ var Contract = class {
10598
10598
  signature
10599
10599
  },
10600
10600
  {
10601
- nonce
10601
+ ...RestInvokeOptions,
10602
+ nonce: RestInvokeOptions.nonce
10602
10603
  }
10603
10604
  );
10604
10605
  }