starknet 5.0.1 → 5.1.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
@@ -54,7 +54,8 @@ __export(src_exports, {
54
54
  isUrl: () => isUrl,
55
55
  json: () => json_exports,
56
56
  merkle: () => merkle_exports,
57
- number: () => number_exports,
57
+ num: () => num_exports,
58
+ number: () => number,
58
59
  shortString: () => shortString_exports,
59
60
  stark: () => stark_exports,
60
61
  transaction: () => transaction_exports,
@@ -116,6 +117,7 @@ __export(hash_exports, {
116
117
  getSelector: () => getSelector,
117
118
  getSelectorFromName: () => getSelectorFromName,
118
119
  keccakBn: () => keccakBn,
120
+ poseidon: () => poseidon,
119
121
  starknetKeccak: () => starknetKeccak,
120
122
  transactionVersion: () => transactionVersion
121
123
  });
@@ -2277,9 +2279,9 @@ var CONSTANT_POINTS = [
2277
2279
  ]
2278
2280
  ];
2279
2281
 
2280
- // src/utils/number.ts
2281
- var number_exports = {};
2282
- __export(number_exports, {
2282
+ // src/utils/num.ts
2283
+ var num_exports = {};
2284
+ __export(num_exports, {
2283
2285
  assertInRange: () => assertInRange,
2284
2286
  bigNumberishArrayToDecimalStringArray: () => bigNumberishArrayToDecimalStringArray,
2285
2287
  bigNumberishArrayToHexadecimalStringArray: () => bigNumberishArrayToHexadecimalStringArray,
@@ -2304,7 +2306,7 @@ function assert(condition, message) {
2304
2306
  }
2305
2307
  }
2306
2308
 
2307
- // src/utils/number.ts
2309
+ // src/utils/num.ts
2308
2310
  function isHex(hex) {
2309
2311
  return /^0x[0-9a-f]*$/i.test(hex);
2310
2312
  }
@@ -2314,8 +2316,8 @@ function toBigInt(value) {
2314
2316
  function isBigInt(value) {
2315
2317
  return typeof value === "bigint";
2316
2318
  }
2317
- function toHex(number) {
2318
- return addHexPrefix(toBigInt(number).toString(16));
2319
+ function toHex(number2) {
2320
+ return addHexPrefix(toBigInt(number2).toString(16));
2319
2321
  }
2320
2322
  function hexToDecimalString(hex) {
2321
2323
  return BigInt(addHexPrefix(hex)).toString(10);
@@ -2501,6 +2503,7 @@ var { parse: parseAlwaysAsBig, stringify: stringifyAlwaysAsBig } = json(true);
2501
2503
  var json_default = { parse, stringify };
2502
2504
 
2503
2505
  // src/utils/hash.ts
2506
+ var poseidon = __toESM(require("@noble/curves/abstract/poseidon"));
2504
2507
  var transactionVersion = 1n;
2505
2508
  var feeTransactionVersion = 2n ** 128n + transactionVersion;
2506
2509
  function keccakBn(value) {
@@ -3857,7 +3860,8 @@ ${res.tx_failure_reason.error_message}` : res.tx_status;
3857
3860
  calldata: invocation.calldata ?? [],
3858
3861
  signature: signatureToDecimalArray(invocation.signature),
3859
3862
  version: toHex((invocationDetails == null ? void 0 : invocationDetails.version) || 1),
3860
- nonce: toHex(invocationDetails.nonce)
3863
+ nonce: toHex(invocationDetails.nonce),
3864
+ max_fee: toHex((invocationDetails == null ? void 0 : invocationDetails.maxFee) || 0)
3861
3865
  }
3862
3866
  ).then(this.responseParser.parseFeeSimulateTransactionResponse);
3863
3867
  }
@@ -5456,6 +5460,9 @@ function getChecksumAddress(address) {
5456
5460
  function validateChecksumAddress(address) {
5457
5461
  return getChecksumAddress(address) === address;
5458
5462
  }
5463
+
5464
+ // src/index.ts
5465
+ var number = num_exports;
5459
5466
  // Annotate the CommonJS export names for ESM import in node:
5460
5467
  0 && (module.exports = {
5461
5468
  Account,
@@ -5486,6 +5493,7 @@ function validateChecksumAddress(address) {
5486
5493
  isUrl,
5487
5494
  json,
5488
5495
  merkle,
5496
+ num,
5489
5497
  number,
5490
5498
  shortString,
5491
5499
  stark,