starknet 11.0.0 → 11.0.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +29 -3
- package/dist/index.global.js +15 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [11.0.1](https://github.com/starknet-io/starknet.js/compare/v11.0.0...v11.0.1) (2026-09-18)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **wallet:** missing RPC 0.10.4 valid_until option on strk20Balances ([c96a31a](https://github.com/starknet-io/starknet.js/commit/c96a31abb05b1c4c5b90ba2f8e320307731a3861))
|
|
6
|
+
|
|
1
7
|
# [11.0.0](https://github.com/starknet-io/starknet.js/compare/v10.8.0...v11.0.0) (2026-09-14)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -9801,15 +9801,25 @@ declare class WalletAccountV6 extends WalletAccountV5 {
|
|
|
9801
9801
|
executeWithProof(calls: AllowArray<Call>, proof?: STRK20_PROOF): Promise<RPCSPEC0104.AddInvokeTransactionResult>;
|
|
9802
9802
|
/**
|
|
9803
9803
|
* Get the private balances held by the user inside the STRK20 privacy pool.
|
|
9804
|
+
*
|
|
9805
|
+
* Reading a shielded balance requires the user approval, and this approval is time
|
|
9806
|
+
* limited : `validUntil` requests when it expires. When it is omitted, the wallet applies
|
|
9807
|
+
* its own default window.
|
|
9804
9808
|
* @param {Address[]} tokens - The tokens to get the private balance of. An empty array returns every shielded token.
|
|
9809
|
+
* @param {number} [validUntil] - Requested expiry of the balance read authorization, as a Unix timestamp in seconds. Omit it to let the wallet apply its default window.
|
|
9805
9810
|
* @returns {Promise<STRK20_BALANCE_ENTRY[]>} One entry per token.
|
|
9806
9811
|
* @example
|
|
9807
9812
|
* ```typescript
|
|
9808
9813
|
* const balances = await myWalletAccount.strk20Balances([strkAddress]);
|
|
9809
|
-
* // balances = [{ token: '0x4718...',
|
|
9814
|
+
* // balances = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
9815
|
+
*
|
|
9816
|
+
* // Asking for a 5 minutes authorization window :
|
|
9817
|
+
* const expiry = Math.floor(Date.now() / 1000) + 300;
|
|
9818
|
+
* const fresh = await myWalletAccount.strk20Balances([strkAddress], expiry);
|
|
9819
|
+
* // fresh = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
9810
9820
|
* ```
|
|
9811
9821
|
*/
|
|
9812
|
-
strk20Balances(tokens: Address[]): Promise<STRK20_BALANCE_ENTRY[]>;
|
|
9822
|
+
strk20Balances(tokens: Address[], validUntil?: number): Promise<STRK20_BALANCE_ENTRY[]>;
|
|
9813
9823
|
/**
|
|
9814
9824
|
* Build the Starknet call and the SNIP-36 zero-knowledge proof of a STRK20 transaction,
|
|
9815
9825
|
* without submitting it : the DAPP submits the returned call itself, and therefore pays
|
|
@@ -17437,7 +17447,23 @@ declare function signMessage(walletWSF: WalletWithStarknetFeatures$1, typedData:
|
|
|
17437
17447
|
declare function supportedSpecs(walletWSF: WalletWithStarknetFeatures$1): Promise<SpecVersion[]>;
|
|
17438
17448
|
declare function supportedWalletApi(walletWSF: WalletWithStarknetFeatures$1): Promise<API_VERSION$1[]>;
|
|
17439
17449
|
declare function subscribeWalletEvent(walletWSF: WalletWithStarknetFeatures$1, callback: (change: StandardEventsChangeProperties$1) => void): () => void;
|
|
17440
|
-
|
|
17450
|
+
/**
|
|
17451
|
+
* Get the private balances held by the user inside the STRK20 privacy pool.
|
|
17452
|
+
*
|
|
17453
|
+
* Reading a shielded balance requires the user approval, and this approval is time limited :
|
|
17454
|
+
* `valid_until` requests when it expires. When it is omitted, the wallet applies its own
|
|
17455
|
+
* default window.
|
|
17456
|
+
* @param {WalletWithStarknetFeaturesV6} walletWSF - The get-starknet V6 wallet object to use.
|
|
17457
|
+
* @param {Address[]} tokens - The tokens to get the private balance of. An empty array returns every shielded token.
|
|
17458
|
+
* @param {number} [valid_until] - Requested expiry of the balance read authorization, as a Unix timestamp in seconds. Omit it to let the wallet apply its default window.
|
|
17459
|
+
* @returns {Promise<STRK20_BALANCE_ENTRY[]>} One entry per token.
|
|
17460
|
+
* @example
|
|
17461
|
+
* ```typescript
|
|
17462
|
+
* const balances = await strk20Balances(walletWSF, [strkAddress]);
|
|
17463
|
+
* // balances = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
17464
|
+
* ```
|
|
17465
|
+
*/
|
|
17466
|
+
declare function strk20Balances(walletWSF: WalletWithStarknetFeatures$1, tokens: Address[], valid_until?: number): Promise<STRK20_BALANCE_ENTRY[]>;
|
|
17441
17467
|
declare function strk20PrepareInvoke(walletWSF: WalletWithStarknetFeatures$1, actions: STRK20_ACTION$1[], simulate?: boolean): Promise<STRK20_CALL_AND_PROOF$1>;
|
|
17442
17468
|
declare function strk20InvokeTransaction(walletWSF: WalletWithStarknetFeatures$1, actions: STRK20_ACTION$1[]): Promise<{
|
|
17443
17469
|
transaction_hash: string;
|
package/dist/index.global.js
CHANGED
|
@@ -25823,10 +25823,10 @@ ${indent}}` : "}";
|
|
|
25823
25823
|
function subscribeWalletEvent2(walletWSF, callback) {
|
|
25824
25824
|
return walletWSF.features["standard:events"].on("change", callback);
|
|
25825
25825
|
}
|
|
25826
|
-
function strk20Balances(walletWSF, tokens) {
|
|
25826
|
+
function strk20Balances(walletWSF, tokens, valid_until) {
|
|
25827
25827
|
return walletWSF.features["starknet:walletApi"].request({
|
|
25828
25828
|
type: "wallet_strk20Balances",
|
|
25829
|
-
params: { tokens }
|
|
25829
|
+
params: { tokens, valid_until }
|
|
25830
25830
|
});
|
|
25831
25831
|
}
|
|
25832
25832
|
function strk20PrepareInvoke(walletWSF, actions, simulate) {
|
|
@@ -25879,16 +25879,26 @@ ${indent}}` : "}";
|
|
|
25879
25879
|
}
|
|
25880
25880
|
/**
|
|
25881
25881
|
* Get the private balances held by the user inside the STRK20 privacy pool.
|
|
25882
|
+
*
|
|
25883
|
+
* Reading a shielded balance requires the user approval, and this approval is time
|
|
25884
|
+
* limited : `validUntil` requests when it expires. When it is omitted, the wallet applies
|
|
25885
|
+
* its own default window.
|
|
25882
25886
|
* @param {Address[]} tokens - The tokens to get the private balance of. An empty array returns every shielded token.
|
|
25887
|
+
* @param {number} [validUntil] - Requested expiry of the balance read authorization, as a Unix timestamp in seconds. Omit it to let the wallet apply its default window.
|
|
25883
25888
|
* @returns {Promise<STRK20_BALANCE_ENTRY[]>} One entry per token.
|
|
25884
25889
|
* @example
|
|
25885
25890
|
* ```typescript
|
|
25886
25891
|
* const balances = await myWalletAccount.strk20Balances([strkAddress]);
|
|
25887
|
-
* // balances = [{ token: '0x4718...',
|
|
25892
|
+
* // balances = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
25893
|
+
*
|
|
25894
|
+
* // Asking for a 5 minutes authorization window :
|
|
25895
|
+
* const expiry = Math.floor(Date.now() / 1000) + 300;
|
|
25896
|
+
* const fresh = await myWalletAccount.strk20Balances([strkAddress], expiry);
|
|
25897
|
+
* // fresh = [{ token: '0x4718...', balance: '0x2386f26fc10000' }]
|
|
25888
25898
|
* ```
|
|
25889
25899
|
*/
|
|
25890
|
-
strk20Balances(tokens) {
|
|
25891
|
-
return strk20Balances(this.v6Provider, tokens);
|
|
25900
|
+
strk20Balances(tokens, validUntil) {
|
|
25901
|
+
return strk20Balances(this.v6Provider, tokens, validUntil);
|
|
25892
25902
|
}
|
|
25893
25903
|
/**
|
|
25894
25904
|
* Build the Starknet call and the SNIP-36 zero-knowledge proof of a STRK20 transaction,
|