starknet 5.0.2 → 5.1.1

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) {
@@ -5457,6 +5460,9 @@ function getChecksumAddress(address) {
5457
5460
  function validateChecksumAddress(address) {
5458
5461
  return getChecksumAddress(address) === address;
5459
5462
  }
5463
+
5464
+ // src/index.ts
5465
+ var number = num_exports;
5460
5466
  // Annotate the CommonJS export names for ESM import in node:
5461
5467
  0 && (module.exports = {
5462
5468
  Account,
@@ -5487,6 +5493,7 @@ function validateChecksumAddress(address) {
5487
5493
  isUrl,
5488
5494
  json,
5489
5495
  merkle,
5496
+ num,
5490
5497
  number,
5491
5498
  shortString,
5492
5499
  stark,