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.mjs CHANGED
@@ -55,6 +55,7 @@ __export(hash_exports, {
55
55
  getSelector: () => getSelector,
56
56
  getSelectorFromName: () => getSelectorFromName,
57
57
  keccakBn: () => keccakBn,
58
+ poseidon: () => poseidon,
58
59
  starknetKeccak: () => starknetKeccak,
59
60
  transactionVersion: () => transactionVersion
60
61
  });
@@ -2216,9 +2217,9 @@ var CONSTANT_POINTS = [
2216
2217
  ]
2217
2218
  ];
2218
2219
 
2219
- // src/utils/number.ts
2220
- var number_exports = {};
2221
- __export(number_exports, {
2220
+ // src/utils/num.ts
2221
+ var num_exports = {};
2222
+ __export(num_exports, {
2222
2223
  assertInRange: () => assertInRange,
2223
2224
  bigNumberishArrayToDecimalStringArray: () => bigNumberishArrayToDecimalStringArray,
2224
2225
  bigNumberishArrayToHexadecimalStringArray: () => bigNumberishArrayToHexadecimalStringArray,
@@ -2243,7 +2244,7 @@ function assert(condition, message) {
2243
2244
  }
2244
2245
  }
2245
2246
 
2246
- // src/utils/number.ts
2247
+ // src/utils/num.ts
2247
2248
  function isHex(hex) {
2248
2249
  return /^0x[0-9a-f]*$/i.test(hex);
2249
2250
  }
@@ -2253,8 +2254,8 @@ function toBigInt(value) {
2253
2254
  function isBigInt(value) {
2254
2255
  return typeof value === "bigint";
2255
2256
  }
2256
- function toHex(number) {
2257
- return addHexPrefix(toBigInt(number).toString(16));
2257
+ function toHex(number2) {
2258
+ return addHexPrefix(toBigInt(number2).toString(16));
2258
2259
  }
2259
2260
  function hexToDecimalString(hex) {
2260
2261
  return BigInt(addHexPrefix(hex)).toString(10);
@@ -2440,6 +2441,7 @@ var { parse: parseAlwaysAsBig, stringify: stringifyAlwaysAsBig } = json(true);
2440
2441
  var json_default = { parse, stringify };
2441
2442
 
2442
2443
  // src/utils/hash.ts
2444
+ import * as poseidon from "@noble/curves/abstract/poseidon";
2443
2445
  var transactionVersion = 1n;
2444
2446
  var feeTransactionVersion = 2n ** 128n + transactionVersion;
2445
2447
  function keccakBn(value) {
@@ -5396,6 +5398,9 @@ function getChecksumAddress(address) {
5396
5398
  function validateChecksumAddress(address) {
5397
5399
  return getChecksumAddress(address) === address;
5398
5400
  }
5401
+
5402
+ // src/index.ts
5403
+ var number = num_exports;
5399
5404
  export {
5400
5405
  Account,
5401
5406
  AccountInterface,
@@ -5425,7 +5430,8 @@ export {
5425
5430
  isUrl,
5426
5431
  json_exports as json,
5427
5432
  merkle_exports as merkle,
5428
- number_exports as number,
5433
+ num_exports as num,
5434
+ number,
5429
5435
  shortString_exports as shortString,
5430
5436
  stark_exports as stark,
5431
5437
  transaction_exports as transaction,