starknet 11.6.1 → 11.6.2
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 +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.global.js +12 -26
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +12 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7584,15 +7584,6 @@ function parseResponseValue(responseIterator, element, parser, structs, enums) {
|
|
|
7584
7584
|
return acc;
|
|
7585
7585
|
}, {});
|
|
7586
7586
|
}
|
|
7587
|
-
if (isTypeArray(element.type)) {
|
|
7588
|
-
const parsedDataArr = [];
|
|
7589
|
-
const el = { name: "", type: getArrayType(element.type) };
|
|
7590
|
-
const len = BigInt(responseIterator.next().value);
|
|
7591
|
-
while (parsedDataArr.length < len) {
|
|
7592
|
-
parsedDataArr.push(parseResponseValue(responseIterator, el, parser, structs, enums));
|
|
7593
|
-
}
|
|
7594
|
-
return parsedDataArr;
|
|
7595
|
-
}
|
|
7596
7587
|
return parseBaseTypes2(element.type, responseIterator, parser);
|
|
7597
7588
|
}
|
|
7598
7589
|
function responseParser({
|
|
@@ -11049,7 +11040,6 @@ function structStrategy(structs) {
|
|
|
11049
11040
|
|
|
11050
11041
|
// src/utils/calldata/parser/parsingStrategy.ts
|
|
11051
11042
|
var hdParsingStrategy = {
|
|
11052
|
-
// TODO: provjeri svi request parseri stvaraju array, dali je to ok sa requstParserom
|
|
11053
11043
|
request: {
|
|
11054
11044
|
[CairoBytes31.abiSelector]: (val) => {
|
|
11055
11045
|
return new CairoBytes31(val).toApiRequest();
|
|
@@ -14263,7 +14253,6 @@ var RpcChannel = class {
|
|
|
14263
14253
|
}
|
|
14264
14254
|
return this.specVersion;
|
|
14265
14255
|
}
|
|
14266
|
-
// TODO: New Method add test
|
|
14267
14256
|
/**
|
|
14268
14257
|
* Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
|
|
14269
14258
|
*/
|
|
@@ -14273,7 +14262,6 @@ var RpcChannel = class {
|
|
|
14273
14262
|
transaction_hash
|
|
14274
14263
|
});
|
|
14275
14264
|
}
|
|
14276
|
-
// TODO: New Method add test
|
|
14277
14265
|
getStorageProof(classHashes = [], contractAddresses = [], contractsStorageKeys = [], blockIdentifier = this.blockIdentifier) {
|
|
14278
14266
|
const block_id = new Block(blockIdentifier).identifier;
|
|
14279
14267
|
const class_hashes = bigNumberishArrayToHexadecimalStringArray(classHashes);
|
|
@@ -14285,7 +14273,6 @@ var RpcChannel = class {
|
|
|
14285
14273
|
contracts_storage_keys: contractsStorageKeys
|
|
14286
14274
|
});
|
|
14287
14275
|
}
|
|
14288
|
-
// TODO: New Method add test
|
|
14289
14276
|
getCompiledCasm(classHash) {
|
|
14290
14277
|
const class_hash = toHex(classHash);
|
|
14291
14278
|
return this.fetchEndpoint("starknet_getCompiledCasm", {
|
|
@@ -14398,7 +14385,8 @@ var RpcChannel = class {
|
|
|
14398
14385
|
}
|
|
14399
14386
|
async waitForTransaction(txHash, options) {
|
|
14400
14387
|
const transactionHash = toHex(txHash);
|
|
14401
|
-
|
|
14388
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
14389
|
+
let retries = maxRetries;
|
|
14402
14390
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
14403
14391
|
let onchain = false;
|
|
14404
14392
|
let isErrorState = false;
|
|
@@ -14448,9 +14436,9 @@ var RpcChannel = class {
|
|
|
14448
14436
|
}
|
|
14449
14437
|
lifeCycleRetries -= 1;
|
|
14450
14438
|
}
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
}
|
|
14439
|
+
}
|
|
14440
|
+
if (!onchain && retries <= 0) {
|
|
14441
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14454
14442
|
}
|
|
14455
14443
|
retries -= 1;
|
|
14456
14444
|
}
|
|
@@ -14460,7 +14448,7 @@ var RpcChannel = class {
|
|
|
14460
14448
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
14461
14449
|
} catch (error) {
|
|
14462
14450
|
if (retries <= 0) {
|
|
14463
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
14451
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14464
14452
|
}
|
|
14465
14453
|
retries -= 1;
|
|
14466
14454
|
await wait(retryInterval);
|
|
@@ -15049,7 +15037,8 @@ var RpcChannel2 = class {
|
|
|
15049
15037
|
}
|
|
15050
15038
|
async waitForTransaction(txHash, options) {
|
|
15051
15039
|
const transactionHash = toHex(txHash);
|
|
15052
|
-
|
|
15040
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
15041
|
+
let retries = maxRetries;
|
|
15053
15042
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
15054
15043
|
let onchain = false;
|
|
15055
15044
|
let isErrorState = false;
|
|
@@ -15099,9 +15088,9 @@ var RpcChannel2 = class {
|
|
|
15099
15088
|
}
|
|
15100
15089
|
lifeCycleRetries -= 1;
|
|
15101
15090
|
}
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
}
|
|
15091
|
+
}
|
|
15092
|
+
if (!onchain && retries <= 0) {
|
|
15093
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
15105
15094
|
}
|
|
15106
15095
|
retries -= 1;
|
|
15107
15096
|
}
|
|
@@ -15111,7 +15100,7 @@ var RpcChannel2 = class {
|
|
|
15111
15100
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
15112
15101
|
} catch (error) {
|
|
15113
15102
|
if (retries <= 0) {
|
|
15114
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
15103
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
15115
15104
|
}
|
|
15116
15105
|
retries -= 1;
|
|
15117
15106
|
await wait(retryInterval);
|
|
@@ -19825,7 +19814,6 @@ var Account = class {
|
|
|
19825
19814
|
}
|
|
19826
19815
|
return this.cairoVersion;
|
|
19827
19816
|
}
|
|
19828
|
-
// TODO: TT Cairo version is still needed for invoke on existing contracts
|
|
19829
19817
|
async estimateInvokeFee(calls, details = {}) {
|
|
19830
19818
|
const invocations = [{ type: api_exports.ETransactionType.INVOKE, payload: [calls].flat() }];
|
|
19831
19819
|
const estimateBulk = await this.estimateFeeBulk(invocations, details);
|
|
@@ -20672,7 +20660,6 @@ var WalletAccount = class _WalletAccount extends Account {
|
|
|
20672
20660
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
20673
20661
|
return _WalletAccount.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
20674
20662
|
}
|
|
20675
|
-
// TODO: MISSING ESTIMATES
|
|
20676
20663
|
};
|
|
20677
20664
|
|
|
20678
20665
|
// src/wallet/connectV5.ts
|
|
@@ -21052,7 +21039,6 @@ var WalletAccountV5 = class _WalletAccountV5 extends Account {
|
|
|
21052
21039
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
21053
21040
|
return _WalletAccountV5.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
21054
21041
|
}
|
|
21055
|
-
// TODO: MISSING ESTIMATES
|
|
21056
21042
|
};
|
|
21057
21043
|
|
|
21058
21044
|
// src/wallet/adapterV6.ts
|