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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [11.6.3](https://github.com/starknet-io/starknet.js/compare/v11.6.2...v11.6.3) (2026-11-13)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **types:** make the published types compile with skipLibCheck false ([14b26c5](https://github.com/starknet-io/starknet.js/commit/14b26c5e062950eb81390b665cf433ccc9e1531a))
|
|
6
|
+
|
|
7
|
+
## [11.6.2](https://github.com/starknet-io/starknet.js/compare/v11.6.1...v11.6.2) (2026-11-11)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- bound waitForTransaction polling for pending statuses ([76e3501](https://github.com/starknet-io/starknet.js/commit/76e3501b482eb69071a63225a1f71196a8158c33))
|
|
12
|
+
|
|
1
13
|
## [11.6.1](https://github.com/starknet-io/starknet.js/compare/v11.6.0...v11.6.1) (2026-11-06)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -879,7 +879,7 @@ type waitForTransactionOptions = {
|
|
|
879
879
|
*/
|
|
880
880
|
lifeCycleRetries?: number;
|
|
881
881
|
/**
|
|
882
|
-
*
|
|
882
|
+
* Limit status polling, including pending statuses, and receipt retries.
|
|
883
883
|
*/
|
|
884
884
|
retries?: number;
|
|
885
885
|
/**
|
|
@@ -9820,6 +9820,11 @@ declare class WebSocketProvider extends RpcProvider {
|
|
|
9820
9820
|
*/
|
|
9821
9821
|
static create<T extends RpcProvider = WebSocketProvider>(this: any, optionsOrProvider?: RpcProviderOptions): Promise<T>;
|
|
9822
9822
|
}
|
|
9823
|
+
declare global {
|
|
9824
|
+
interface SymbolConstructor {
|
|
9825
|
+
readonly dispose: unique symbol;
|
|
9826
|
+
}
|
|
9827
|
+
}
|
|
9823
9828
|
declare module "./index" {
|
|
9824
9829
|
interface WebSocketProvider {
|
|
9825
9830
|
[Symbol.dispose](): void;
|
|
@@ -10479,6 +10484,19 @@ type STRK20_CALL_AND_PROOF = Omit<STRK20_CALL_AND_PROOF$1, 'call'> & {
|
|
|
10479
10484
|
call: Call;
|
|
10480
10485
|
};
|
|
10481
10486
|
|
|
10487
|
+
/**
|
|
10488
|
+
* `WalletAccountV5`, without the two static methods that `WalletAccountV6` replaces.
|
|
10489
|
+
*
|
|
10490
|
+
* `connect` and `connectSilent` of `WalletAccountV6` take a get-starknet v6 wallet. The ones of
|
|
10491
|
+
* `WalletAccountV5` take a get-starknet v5 wallet. These two wallet types are not compatible, and
|
|
10492
|
+
* TypeScript refuses a subclass when a static method does not fit the one of its parent (TS2417).
|
|
10493
|
+
* A `@ts-ignore` is not enough: the build drops it from the published types.
|
|
10494
|
+
* So `WalletAccountV6` extends this type: all of `WalletAccountV5`, except these two methods.
|
|
10495
|
+
* At run time, it is `WalletAccountV5` itself.
|
|
10496
|
+
* In v12, a base class without `connect`, shared by both accounts, should replace this type.
|
|
10497
|
+
*/
|
|
10498
|
+
type WalletAccountV5WithoutConnect = Omit<typeof WalletAccountV5, 'connect' | 'connectSilent'> & (new (...args: ConstructorParameters<typeof WalletAccountV5>) => WalletAccountV5);
|
|
10499
|
+
declare const WalletAccountV6_base: WalletAccountV5WithoutConnect;
|
|
10482
10500
|
/**
|
|
10483
10501
|
* Account that lets a browser wallet sign and send the transactions, using get-starknet v6.
|
|
10484
10502
|
* This is the recommended class for a new DAPP.
|
|
@@ -10503,7 +10521,7 @@ type STRK20_CALL_AND_PROOF = Omit<STRK20_CALL_AND_PROOF$1, 'call'> & {
|
|
|
10503
10521
|
* // chainId = '0x534e5f5345504f4c4941' (the wallet is on Sepolia)
|
|
10504
10522
|
* ```
|
|
10505
10523
|
*/
|
|
10506
|
-
declare class WalletAccountV6 extends
|
|
10524
|
+
declare class WalletAccountV6 extends WalletAccountV6_base {
|
|
10507
10525
|
/**
|
|
10508
10526
|
* Prefer {@link WalletAccountV6.connect}: it also asks the wallet for the address.
|
|
10509
10527
|
* @param {WalletAccountV6Options} options - The provider, the wallet, the account address, and
|
package/dist/index.global.js
CHANGED
|
@@ -13013,15 +13013,6 @@ ${indent}}` : "}";
|
|
|
13013
13013
|
return acc;
|
|
13014
13014
|
}, {});
|
|
13015
13015
|
}
|
|
13016
|
-
if (isTypeArray(element.type)) {
|
|
13017
|
-
const parsedDataArr = [];
|
|
13018
|
-
const el = { name: "", type: getArrayType(element.type) };
|
|
13019
|
-
const len = BigInt(responseIterator.next().value);
|
|
13020
|
-
while (parsedDataArr.length < len) {
|
|
13021
|
-
parsedDataArr.push(parseResponseValue(responseIterator, el, parser, structs, enums));
|
|
13022
|
-
}
|
|
13023
|
-
return parsedDataArr;
|
|
13024
|
-
}
|
|
13025
13016
|
return parseBaseTypes2(element.type, responseIterator, parser);
|
|
13026
13017
|
}
|
|
13027
13018
|
function responseParser({
|
|
@@ -16478,7 +16469,6 @@ ${indent}}` : "}";
|
|
|
16478
16469
|
|
|
16479
16470
|
// src/utils/calldata/parser/parsingStrategy.ts
|
|
16480
16471
|
var hdParsingStrategy = {
|
|
16481
|
-
// TODO: provjeri svi request parseri stvaraju array, dali je to ok sa requstParserom
|
|
16482
16472
|
request: {
|
|
16483
16473
|
[CairoBytes31.abiSelector]: (val) => {
|
|
16484
16474
|
return new CairoBytes31(val).toApiRequest();
|
|
@@ -19738,7 +19728,6 @@ ${indent}}` : "}";
|
|
|
19738
19728
|
}
|
|
19739
19729
|
return this.specVersion;
|
|
19740
19730
|
}
|
|
19741
|
-
// TODO: New Method add test
|
|
19742
19731
|
/**
|
|
19743
19732
|
* 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
|
|
19744
19733
|
*/
|
|
@@ -19748,7 +19737,6 @@ ${indent}}` : "}";
|
|
|
19748
19737
|
transaction_hash
|
|
19749
19738
|
});
|
|
19750
19739
|
}
|
|
19751
|
-
// TODO: New Method add test
|
|
19752
19740
|
getStorageProof(classHashes = [], contractAddresses = [], contractsStorageKeys = [], blockIdentifier = this.blockIdentifier) {
|
|
19753
19741
|
const block_id = new Block(blockIdentifier).identifier;
|
|
19754
19742
|
const class_hashes = bigNumberishArrayToHexadecimalStringArray(classHashes);
|
|
@@ -19760,7 +19748,6 @@ ${indent}}` : "}";
|
|
|
19760
19748
|
contracts_storage_keys: contractsStorageKeys
|
|
19761
19749
|
});
|
|
19762
19750
|
}
|
|
19763
|
-
// TODO: New Method add test
|
|
19764
19751
|
getCompiledCasm(classHash) {
|
|
19765
19752
|
const class_hash = toHex(classHash);
|
|
19766
19753
|
return this.fetchEndpoint("starknet_getCompiledCasm", {
|
|
@@ -19873,7 +19860,8 @@ ${indent}}` : "}";
|
|
|
19873
19860
|
}
|
|
19874
19861
|
async waitForTransaction(txHash, options) {
|
|
19875
19862
|
const transactionHash = toHex(txHash);
|
|
19876
|
-
|
|
19863
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
19864
|
+
let retries = maxRetries;
|
|
19877
19865
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
19878
19866
|
let onchain = false;
|
|
19879
19867
|
let isErrorState = false;
|
|
@@ -19923,9 +19911,9 @@ ${indent}}` : "}";
|
|
|
19923
19911
|
}
|
|
19924
19912
|
lifeCycleRetries -= 1;
|
|
19925
19913
|
}
|
|
19926
|
-
|
|
19927
|
-
|
|
19928
|
-
}
|
|
19914
|
+
}
|
|
19915
|
+
if (!onchain && retries <= 0) {
|
|
19916
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
19929
19917
|
}
|
|
19930
19918
|
retries -= 1;
|
|
19931
19919
|
}
|
|
@@ -19935,7 +19923,7 @@ ${indent}}` : "}";
|
|
|
19935
19923
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
19936
19924
|
} catch (error) {
|
|
19937
19925
|
if (retries <= 0) {
|
|
19938
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
19926
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
19939
19927
|
}
|
|
19940
19928
|
retries -= 1;
|
|
19941
19929
|
await wait(retryInterval);
|
|
@@ -20606,7 +20594,8 @@ ${indent}}` : "}";
|
|
|
20606
20594
|
}
|
|
20607
20595
|
async waitForTransaction(txHash, options) {
|
|
20608
20596
|
const transactionHash = toHex(txHash);
|
|
20609
|
-
|
|
20597
|
+
const maxRetries = options?.retries ?? this.retries;
|
|
20598
|
+
let retries = maxRetries;
|
|
20610
20599
|
let lifeCycleRetries = options?.lifeCycleRetries ?? 3;
|
|
20611
20600
|
let onchain = false;
|
|
20612
20601
|
let isErrorState = false;
|
|
@@ -20656,9 +20645,9 @@ ${indent}}` : "}";
|
|
|
20656
20645
|
}
|
|
20657
20646
|
lifeCycleRetries -= 1;
|
|
20658
20647
|
}
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
}
|
|
20648
|
+
}
|
|
20649
|
+
if (!onchain && retries <= 0) {
|
|
20650
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
20662
20651
|
}
|
|
20663
20652
|
retries -= 1;
|
|
20664
20653
|
}
|
|
@@ -20668,7 +20657,7 @@ ${indent}}` : "}";
|
|
|
20668
20657
|
txReceipt = await this.getTransactionReceipt(transactionHash);
|
|
20669
20658
|
} catch (error) {
|
|
20670
20659
|
if (retries <= 0) {
|
|
20671
|
-
throw new Error(`waitForTransaction timed-out with retries ${
|
|
20660
|
+
throw new Error(`waitForTransaction timed-out with retries ${maxRetries}`);
|
|
20672
20661
|
}
|
|
20673
20662
|
retries -= 1;
|
|
20674
20663
|
await wait(retryInterval);
|
|
@@ -25380,7 +25369,6 @@ ${indent}}` : "}";
|
|
|
25380
25369
|
}
|
|
25381
25370
|
return this.cairoVersion;
|
|
25382
25371
|
}
|
|
25383
|
-
// TODO: TT Cairo version is still needed for invoke on existing contracts
|
|
25384
25372
|
async estimateInvokeFee(calls, details = {}) {
|
|
25385
25373
|
const invocations = [{ type: ETransactionType2.INVOKE, payload: [calls].flat() }];
|
|
25386
25374
|
const estimateBulk = await this.estimateFeeBulk(invocations, details);
|
|
@@ -26227,7 +26215,6 @@ ${indent}}` : "}";
|
|
|
26227
26215
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
26228
26216
|
return _WalletAccount.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
26229
26217
|
}
|
|
26230
|
-
// TODO: MISSING ESTIMATES
|
|
26231
26218
|
};
|
|
26232
26219
|
|
|
26233
26220
|
// src/wallet/connectV5.ts
|
|
@@ -26607,7 +26594,6 @@ ${indent}}` : "}";
|
|
|
26607
26594
|
static async connectSilent(provider, walletProvider, cairoVersion, paymaster) {
|
|
26608
26595
|
return _WalletAccountV5.connect(provider, walletProvider, cairoVersion, paymaster, true);
|
|
26609
26596
|
}
|
|
26610
|
-
// TODO: MISSING ESTIMATES
|
|
26611
26597
|
};
|
|
26612
26598
|
|
|
26613
26599
|
// src/wallet/adapterV6.ts
|