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/CHANGELOG.md +13 -0
- package/dist/index.d.ts +45 -35
- package/dist/index.global.js +938 -938
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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/
|
|
2220
|
-
var
|
|
2221
|
-
__export(
|
|
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/
|
|
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(
|
|
2257
|
-
return addHexPrefix(toBigInt(
|
|
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) {
|
|
@@ -3796,7 +3798,8 @@ ${res.tx_failure_reason.error_message}` : res.tx_status;
|
|
|
3796
3798
|
calldata: invocation.calldata ?? [],
|
|
3797
3799
|
signature: signatureToDecimalArray(invocation.signature),
|
|
3798
3800
|
version: toHex((invocationDetails == null ? void 0 : invocationDetails.version) || 1),
|
|
3799
|
-
nonce: toHex(invocationDetails.nonce)
|
|
3801
|
+
nonce: toHex(invocationDetails.nonce),
|
|
3802
|
+
max_fee: toHex((invocationDetails == null ? void 0 : invocationDetails.maxFee) || 0)
|
|
3800
3803
|
}
|
|
3801
3804
|
).then(this.responseParser.parseFeeSimulateTransactionResponse);
|
|
3802
3805
|
}
|
|
@@ -5395,6 +5398,9 @@ function getChecksumAddress(address) {
|
|
|
5395
5398
|
function validateChecksumAddress(address) {
|
|
5396
5399
|
return getChecksumAddress(address) === address;
|
|
5397
5400
|
}
|
|
5401
|
+
|
|
5402
|
+
// src/index.ts
|
|
5403
|
+
var number = num_exports;
|
|
5398
5404
|
export {
|
|
5399
5405
|
Account,
|
|
5400
5406
|
AccountInterface,
|
|
@@ -5424,7 +5430,8 @@ export {
|
|
|
5424
5430
|
isUrl,
|
|
5425
5431
|
json_exports as json,
|
|
5426
5432
|
merkle_exports as merkle,
|
|
5427
|
-
|
|
5433
|
+
num_exports as num,
|
|
5434
|
+
number,
|
|
5428
5435
|
shortString_exports as shortString,
|
|
5429
5436
|
stark_exports as stark,
|
|
5430
5437
|
transaction_exports as transaction,
|