starknet 7.4.0 → 7.5.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 +10 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.global.js +23 -22
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [7.5.0](https://github.com/starknet-io/starknet.js/compare/v7.4.0...v7.5.0) (2025-06-04)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- snip29 - timeBounds seconds (number), public preparePaymasterTransaction ([#1408](https://github.com/starknet-io/starknet.js/issues/1408)) ([8cd4fa8](https://github.com/starknet-io/starknet.js/commit/8cd4fa810c71300f23bab2896151afa18febbaff))
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- rename internal types-js alias to include organization scope ([#1410](https://github.com/starknet-io/starknet.js/issues/1410)) ([d19cb57](https://github.com/starknet-io/starknet.js/commit/d19cb57c651bcbf3f48b8682572f74ff03faa451))
|
|
10
|
+
|
|
1
11
|
# [7.4.0](https://github.com/starknet-io/starknet.js/compare/v7.3.0...v7.4.0) (2025-05-27)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as RPCSPEC07 from 'starknet-types-07';
|
|
2
|
-
import { STRUCT_EVENT, EVENT_FIELD, ENUM_EVENT, BlockHash, TransactionHash, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, StarknetWindowObject, Address, Permission, WatchAssetParameters as WatchAssetParameters$1, AddStarknetChainParameters as AddStarknetChainParameters$1, ChainId, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, Signature as Signature$2, SpecVersion, AccountChangeEventHandler as AccountChangeEventHandler$1, NetworkChangeEventHandler as NetworkChangeEventHandler$1 } from 'starknet-types-07';
|
|
3
|
-
export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types-07';
|
|
4
|
-
import * as RPCSPEC08 from 'starknet-types-08';
|
|
5
|
-
import { PAYMASTER_API, EDataAvailabilityMode as EDataAvailabilityMode$1, SUBSCRIPTION_BLOCK_TAG, BLOCK_WITH_TX_HASHES, PENDING_BLOCK_WITH_TX_HASHES, BlockWithTxHashes as BlockWithTxHashes$1, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, IsType, OutsideExecutionTypedData, ETransactionVersion as ETransactionVersion$1, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, SubscriptionReorgResponse, SubscriptionNewHeadsResponse, SubscriptionEventsResponse, SubscriptionTransactionsStatusResponse, SubscriptionPendingTransactionsResponse, SUBSCRIPTION_ID, WebSocketMethods, BLOCK_STATUS, BLOCK_HEADER, BLOCK_BODY_WITH_RECEIPTS, PENDING_BLOCK_HEADER, BlockTransactionsTraces, L1L2MessagesStatus, CONTRACT_STORAGE_KEYS, StorageProof, CASM_COMPILED_CONTRACT_CLASS, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, PRICE_UNIT as PRICE_UNIT$1, OutsideCallV1, OutsideCallV2, EmittedEvent as EmittedEvent$1, Methods as Methods$1 } from 'starknet-types-08';
|
|
1
|
+
import * as RPCSPEC07 from '@starknet-io/starknet-types-07';
|
|
2
|
+
import { STRUCT_EVENT, EVENT_FIELD, ENUM_EVENT, BlockHash, TransactionHash, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, StarknetWindowObject, Address, Permission, WatchAssetParameters as WatchAssetParameters$1, AddStarknetChainParameters as AddStarknetChainParameters$1, ChainId, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, Signature as Signature$2, SpecVersion, AccountChangeEventHandler as AccountChangeEventHandler$1, NetworkChangeEventHandler as NetworkChangeEventHandler$1 } from '@starknet-io/starknet-types-07';
|
|
3
|
+
export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from '@starknet-io/starknet-types-07';
|
|
4
|
+
import * as RPCSPEC08 from '@starknet-io/starknet-types-08';
|
|
5
|
+
import { PAYMASTER_API, EDataAvailabilityMode as EDataAvailabilityMode$1, SUBSCRIPTION_BLOCK_TAG, BLOCK_WITH_TX_HASHES, PENDING_BLOCK_WITH_TX_HASHES, BlockWithTxHashes as BlockWithTxHashes$1, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, IsType, OutsideExecutionTypedData, ETransactionVersion as ETransactionVersion$1, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, SubscriptionReorgResponse, SubscriptionNewHeadsResponse, SubscriptionEventsResponse, SubscriptionTransactionsStatusResponse, SubscriptionPendingTransactionsResponse, SUBSCRIPTION_ID, WebSocketMethods, BLOCK_STATUS, BLOCK_HEADER, BLOCK_BODY_WITH_RECEIPTS, PENDING_BLOCK_HEADER, BlockTransactionsTraces, L1L2MessagesStatus, CONTRACT_STORAGE_KEYS, StorageProof, CASM_COMPILED_CONTRACT_CLASS, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, PRICE_UNIT as PRICE_UNIT$1, OutsideCallV1, OutsideCallV2, EmittedEvent as EmittedEvent$1, Methods as Methods$1 } from '@starknet-io/starknet-types-08';
|
|
6
6
|
import * as weierstrass from '@noble/curves/abstract/weierstrass';
|
|
7
7
|
import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
|
|
8
8
|
import { Abi as Abi$1, TypedContract } from 'abi-wan-kanabi';
|
|
@@ -1011,8 +1011,8 @@ type ExecutionParameters = {
|
|
|
1011
1011
|
timeBounds?: PaymasterTimeBounds;
|
|
1012
1012
|
};
|
|
1013
1013
|
interface PaymasterTimeBounds {
|
|
1014
|
-
executeAfter?:
|
|
1015
|
-
executeBefore
|
|
1014
|
+
executeAfter?: number;
|
|
1015
|
+
executeBefore: number;
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
interface EstimateFee extends EstimateFeeResponse {
|
|
@@ -3900,9 +3900,9 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
3900
3900
|
* - calldata - (defaults to []) the calldata
|
|
3901
3901
|
*
|
|
3902
3902
|
* @param paymasterDetails the paymaster details containing:
|
|
3903
|
-
* - feeMode - the fee mode
|
|
3903
|
+
* - feeMode - the fee mode (sponsored or default)
|
|
3904
3904
|
* - deploymentData - the deployment data (optional)
|
|
3905
|
-
* - timeBounds - the time bounds (optional)
|
|
3905
|
+
* - timeBounds - the time bounds when the transaction is valid (optional) - executeAfter and executeBefore expected to be in seconds (BLOCK_TIMESTAMP)
|
|
3906
3906
|
*
|
|
3907
3907
|
* @param maxFeeInGasToken - the max fee acceptable to pay in gas token (optional)
|
|
3908
3908
|
*
|
|
@@ -4110,7 +4110,7 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4110
4110
|
execute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
|
|
4111
4111
|
buildPaymasterTransaction(calls: Call[], paymasterDetails: PaymasterDetails): Promise<PreparedTransaction>;
|
|
4112
4112
|
estimatePaymasterTransactionFee(calls: Call[], paymasterDetails: PaymasterDetails): Promise<PaymasterFeeEstimate>;
|
|
4113
|
-
|
|
4113
|
+
preparePaymasterTransaction(preparedTransaction: PreparedTransaction): Promise<ExecutableUserTransaction>;
|
|
4114
4114
|
executePaymasterTransaction(calls: Call[], paymasterDetails: PaymasterDetails, maxFeeInGasToken?: BigNumberish): Promise<InvokeFunctionResponse>;
|
|
4115
4115
|
/**
|
|
4116
4116
|
* First check if contract is already declared, if not declare it
|
package/dist/index.global.js
CHANGED
|
@@ -235,7 +235,7 @@ var starknet = (() => {
|
|
|
235
235
|
// src/types/api/jsonrpc/index.ts
|
|
236
236
|
var jsonrpc_exports = {};
|
|
237
237
|
|
|
238
|
-
// node_modules/starknet-types-07/dist/esm/index.js
|
|
238
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/index.js
|
|
239
239
|
var esm_exports = {};
|
|
240
240
|
__export(esm_exports, {
|
|
241
241
|
API: () => api_exports,
|
|
@@ -257,7 +257,7 @@ var starknet = (() => {
|
|
|
257
257
|
WALLET_API: () => wallet_api_exports
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
-
// node_modules/starknet-types-07/dist/esm/api/index.js
|
|
260
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/api/index.js
|
|
261
261
|
var api_exports = {};
|
|
262
262
|
__export(api_exports, {
|
|
263
263
|
EBlockTag: () => EBlockTag,
|
|
@@ -275,13 +275,13 @@ var starknet = (() => {
|
|
|
275
275
|
SPEC: () => components_exports
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
-
// node_modules/starknet-types-07/dist/esm/api/errors.js
|
|
278
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/api/errors.js
|
|
279
279
|
var errors_exports = {};
|
|
280
280
|
|
|
281
|
-
// node_modules/starknet-types-07/dist/esm/api/components.js
|
|
281
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/api/components.js
|
|
282
282
|
var components_exports = {};
|
|
283
283
|
|
|
284
|
-
// node_modules/starknet-types-07/dist/esm/api/nonspec.js
|
|
284
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/api/nonspec.js
|
|
285
285
|
var ETransactionType = {
|
|
286
286
|
DECLARE: "DECLARE",
|
|
287
287
|
DEPLOY: "DEPLOY",
|
|
@@ -342,25 +342,25 @@ var starknet = (() => {
|
|
|
342
342
|
F3: "0x100000000000000000000000000000003"
|
|
343
343
|
};
|
|
344
344
|
|
|
345
|
-
// node_modules/starknet-types-07/dist/esm/wallet-api/index.js
|
|
345
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/wallet-api/index.js
|
|
346
346
|
var wallet_api_exports = {};
|
|
347
347
|
__export(wallet_api_exports, {
|
|
348
348
|
Permission: () => Permission,
|
|
349
349
|
TypedDataRevision: () => TypedDataRevision
|
|
350
350
|
});
|
|
351
351
|
|
|
352
|
-
// node_modules/starknet-types-07/dist/esm/wallet-api/constants.js
|
|
352
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/wallet-api/constants.js
|
|
353
353
|
var Permission = {
|
|
354
354
|
ACCOUNTS: "accounts"
|
|
355
355
|
};
|
|
356
356
|
|
|
357
|
-
// node_modules/starknet-types-07/dist/esm/wallet-api/typedData.js
|
|
357
|
+
// node_modules/@starknet-io/starknet-types-07/dist/esm/wallet-api/typedData.js
|
|
358
358
|
var TypedDataRevision = {
|
|
359
359
|
ACTIVE: "1",
|
|
360
360
|
LEGACY: "0"
|
|
361
361
|
};
|
|
362
362
|
|
|
363
|
-
// node_modules/starknet-types-08/dist/esm/index.js
|
|
363
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/index.js
|
|
364
364
|
var esm_exports2 = {};
|
|
365
365
|
__export(esm_exports2, {
|
|
366
366
|
ABI_TYPE_CONSTRUCTOR: () => ABI_TYPE_CONSTRUCTOR,
|
|
@@ -406,7 +406,7 @@ var starknet = (() => {
|
|
|
406
406
|
WALLET_API: () => wallet_api_exports2
|
|
407
407
|
});
|
|
408
408
|
|
|
409
|
-
// node_modules/starknet-types-08/dist/esm/api/index.js
|
|
409
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/api/index.js
|
|
410
410
|
var api_exports2 = {};
|
|
411
411
|
__export(api_exports2, {
|
|
412
412
|
ABI_TYPE_CONSTRUCTOR: () => ABI_TYPE_CONSTRUCTOR,
|
|
@@ -447,10 +447,10 @@ var starknet = (() => {
|
|
|
447
447
|
TXN_TYPE_L1_HANDLER: () => TXN_TYPE_L1_HANDLER
|
|
448
448
|
});
|
|
449
449
|
|
|
450
|
-
// node_modules/starknet-types-08/dist/esm/api/contract.js
|
|
450
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/api/contract.js
|
|
451
451
|
var contract_exports = {};
|
|
452
452
|
|
|
453
|
-
// node_modules/starknet-types-08/dist/esm/api/constants.js
|
|
453
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/api/constants.js
|
|
454
454
|
var STATUS_ACCEPTED_ON_L2 = "ACCEPTED_ON_L2";
|
|
455
455
|
var STATUS_ACCEPTED_ON_L1 = "ACCEPTED_ON_L1";
|
|
456
456
|
var STATUS_SUCCEEDED = "SUCCEEDED";
|
|
@@ -560,25 +560,25 @@ var starknet = (() => {
|
|
|
560
560
|
F3: ETransactionVersion4.F3
|
|
561
561
|
};
|
|
562
562
|
|
|
563
|
-
// node_modules/starknet-types-08/dist/esm/wallet-api/index.js
|
|
563
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/wallet-api/index.js
|
|
564
564
|
var wallet_api_exports2 = {};
|
|
565
565
|
__export(wallet_api_exports2, {
|
|
566
566
|
Permission: () => Permission2,
|
|
567
567
|
TypedDataRevision: () => TypedDataRevision2
|
|
568
568
|
});
|
|
569
569
|
|
|
570
|
-
// node_modules/starknet-types-08/dist/esm/wallet-api/constants.js
|
|
570
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/wallet-api/constants.js
|
|
571
571
|
var Permission2 = {
|
|
572
572
|
ACCOUNTS: "accounts"
|
|
573
573
|
};
|
|
574
574
|
|
|
575
|
-
// node_modules/starknet-types-08/dist/esm/wallet-api/typedData.js
|
|
575
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/wallet-api/typedData.js
|
|
576
576
|
var TypedDataRevision2 = {
|
|
577
577
|
ACTIVE: "1",
|
|
578
578
|
LEGACY: "0"
|
|
579
579
|
};
|
|
580
580
|
|
|
581
|
-
// node_modules/starknet-types-08/dist/esm/snip-29/index.js
|
|
581
|
+
// node_modules/@starknet-io/starknet-types-08/dist/esm/snip-29/index.js
|
|
582
582
|
var snip_29_exports = {};
|
|
583
583
|
|
|
584
584
|
// src/utils/encode.ts
|
|
@@ -17570,13 +17570,14 @@ ${indent}}` : "}";
|
|
|
17570
17570
|
}
|
|
17571
17571
|
return { mode: "default", gasToken: feeMode.gas_token };
|
|
17572
17572
|
};
|
|
17573
|
-
var convertTimeBounds = (timeBounds) => timeBounds
|
|
17574
|
-
execute_after: timeBounds.executeAfter
|
|
17575
|
-
|
|
17573
|
+
var convertTimeBounds = (timeBounds) => timeBounds ? {
|
|
17574
|
+
execute_after: timeBounds.executeAfter || 1,
|
|
17575
|
+
// If executeAfter is not provided, set it to 1, meaning the transaction can be executed immediately
|
|
17576
|
+
execute_before: timeBounds.executeBefore
|
|
17576
17577
|
} : void 0;
|
|
17577
|
-
var convertTIME_BOUNDS = (timeBounds) => timeBounds
|
|
17578
|
-
executeAfter:
|
|
17579
|
-
executeBefore:
|
|
17578
|
+
var convertTIME_BOUNDS = (timeBounds) => timeBounds ? {
|
|
17579
|
+
executeAfter: timeBounds.execute_after,
|
|
17580
|
+
executeBefore: timeBounds.execute_before
|
|
17580
17581
|
} : void 0;
|
|
17581
17582
|
var convertEXECUTION_PARAMETERS = (parameters) => ({
|
|
17582
17583
|
version: parameters.version,
|