starknet 11.6.1 → 11.6.3
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 +12 -0
- package/dist/index.d.ts +20 -2
- 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.mjs
CHANGED
|
@@ -7376,15 +7376,6 @@ function parseResponseValue(responseIterator, element, parser, structs, enums) {
|
|
|
7376
7376
|
return acc;
|
|
7377
7377
|
}, {});
|
|
7378
7378
|
}
|
|
7379
|
-
if (isTypeArray(element.type)) {
|
|
7380
|
-
const parsedDataArr = [];
|
|
7381
|
-
const el = { name: "", type: getArrayType(element.type) };
|
|
7382
|
-
const len = BigInt(responseIterator.next().value);
|
|
7383
|
-
while (parsedDataArr.length < len) {
|
|
7384
|
-
parsedDataArr.push(parseResponseValue(responseIterator, el, parser, structs, enums));
|
|
7385
|
-
}
|
|
7386
|
-
return parsedDataArr;
|
|
7387
|
-
}
|
|
7388
7379
|
return parseBaseTypes2(element.type, responseIterator, parser);
|
|
7389
7380
|
}
|
|
7390
7381
|
function responseParser({
|
|
@@ -10841,7 +10832,6 @@ function structStrategy(structs) {
|
|
|
10841
10832
|
|
|
10842
10833
|
// src/utils/calldata/parser/parsingStrategy.ts
|
|
10843
10834
|
var hdParsingStrategy = {
|
|
10844
|
-
// TODO: provjeri svi request parseri stvaraju array, dali je to ok sa requstParserom
|
|
10845
10835
|
request: {
|
|
10846
10836
|
[CairoBytes31.abiSelector]: (val) => {
|
|
10847
10837
|
return new CairoBytes31(val).toApiRequest();
|
|
@@ -14055,7 +14045,6 @@ var RpcChannel = class {
|
|
|
14055
14045
|
}
|
|
14056
14046
|
return this.specVersion;
|
|
14057
14047
|
}
|
|
14058
|
-
// TODO: New Method add test
|
|
14059
14048
|
/**
|
|
14060
14049
|
* 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
|
|
14061
14050
|
*/
|
|
@@ -14065,7 +14054,6 @@ var RpcChannel = class {
|
|
|
14065
14054
|
transaction_hash
|
|
14066
14055
|
});
|
|
14067
14056
|
}
|
|
14068
|
-
// TODO: New Method add test
|
|
14069
14057
|
getStorageProof(classHashes = [], contractAddresses = [], contractsStorageKeys = [], blockIdentifier = this.blockIdentifier) {
|
|
14070
14058
|
const block_id = new Block(blockIdentifier).identifier;
|
|
14071
14059
|
const class_hashes = bigNumberishArrayToHexadecimalStringArray(classHashes);
|
|
@@ -14077,7 +14065,6 @@ var RpcChannel = class {
|
|
|
14077
14065
|
contracts_storage_keys: contractsStorageKeys
|
|
14078
14066
|
});
|
|
14079
14067
|
}
|
|
14080
|
-
// TODO: New Method add test
|
|
14081
14068
|
getCompiledCasm(classHash) {
|
|
14082
14069
|
const class_hash = toHex(classHash);
|
|
14083
14070
|
return this.fetchEndpoint("starknet_getCompiledCasm", {
|
|
@@ -14190,7 +14177,8 @@ var RpcChannel = class {
|
|
|
14190
14177
|
}
|
|
14191
14178
|
async waitForTransaction(txHash, options) {
|
|
14192
14179
|
const transactionHash = toHex(txHash);
|
|
14193
|
-
|
|
14180
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
14181
|
+
let retries = maxRetries;
|
|
14194
14182
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
14195
14183
|
let onchain = false;
|
|
14196
14184
|
let isErrorState = false;
|
|
@@ -14240,9 +14228,9 @@ var RpcChannel = class {
|
|
|
14240
14228
|
}
|
|
14241
14229
|
lifeCycleRetries -= 1;
|
|
14242
14230
|
}
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
}
|
|
14231
|
+
}
|
|
14232
|
+
if (!onchain && retries <= 0) {
|
|
14233
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14246
14234
|
}
|
|
14247
14235
|
retries -= 1;
|
|
14248
14236
|
}
|
|
@@ -14252,7 +14240,7 @@ var RpcChannel = class {
|
|
|
14252
14240
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
14253
14241
|
} catch (error) {
|
|
14254
14242
|
if (retries <= 0) {
|
|
14255
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
14243
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14256
14244
|
}
|
|
14257
14245
|
retries -= 1;
|
|
14258
14246
|
await wait(retryInterval);
|
|
@@ -14841,7 +14829,8 @@ var RpcChannel2 = class {
|
|
|
14841
14829
|
}
|
|
14842
14830
|
async waitForTransaction(txHash, options) {
|
|
14843
14831
|
const transactionHash = toHex(txHash);
|
|
14844
|
-
|
|
14832
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
14833
|
+
let retries = maxRetries;
|
|
14845
14834
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
14846
14835
|
let onchain = false;
|
|
14847
14836
|
let isErrorState = false;
|
|
@@ -14891,9 +14880,9 @@ var RpcChannel2 = class {
|
|
|
14891
14880
|
}
|
|
14892
14881
|
lifeCycleRetries -= 1;
|
|
14893
14882
|
}
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
}
|
|
14883
|
+
}
|
|
14884
|
+
if (!onchain && retries <= 0) {
|
|
14885
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14897
14886
|
}
|
|
14898
14887
|
retries -= 1;
|
|
14899
14888
|
}
|
|
@@ -14903,7 +14892,7 @@ var RpcChannel2 = class {
|
|
|
14903
14892
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
14904
14893
|
} catch (error) {
|
|
14905
14894
|
if (retries <= 0) {
|
|
14906
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
14895
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
14907
14896
|
}
|
|
14908
14897
|
retries -= 1;
|
|
14909
14898
|
await wait(retryInterval);
|
|
@@ -19617,7 +19606,6 @@ var Account = class {
|
|
|
19617
19606
|
}
|
|
19618
19607
|
return this.cairoVersion;
|
|
19619
19608
|
}
|
|
19620
|
-
// TODO: TT Cairo version is still needed for invoke on existing contracts
|
|
19621
19609
|
async estimateInvokeFee(calls, details = {}) {
|
|
19622
19610
|
const invocations = [{ type: api_exports.ETransactionType.INVOKE, payload: [calls].flat() }];
|
|
19623
19611
|
const estimateBulk = await this.estimateFeeBulk(invocations, details);
|
|
@@ -20464,7 +20452,6 @@ var WalletAccount = class _WalletAccount extends Account {
|
|
|
20464
20452
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
20465
20453
|
return _WalletAccount.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
20466
20454
|
}
|
|
20467
|
-
// TODO: MISSING ESTIMATES
|
|
20468
20455
|
};
|
|
20469
20456
|
|
|
20470
20457
|
// src/wallet/connectV5.ts
|
|
@@ -20844,7 +20831,6 @@ var WalletAccountV5 = class _WalletAccountV5 extends Account {
|
|
|
20844
20831
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
20845
20832
|
return _WalletAccountV5.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
20846
20833
|
}
|
|
20847
|
-
// TODO: MISSING ESTIMATES
|
|
20848
20834
|
};
|
|
20849
20835
|
|
|
20850
20836
|
// src/wallet/adapterV6.ts
|