starknet 6.6.6 → 6.7.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/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import * as starknet_types from 'starknet-types';
2
+ import { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, StarknetChainId as StarknetChainId$1, AddInvokeTransactionParameters, AddDeclareTransactionParameters, AddDeployAccountTransactionParameters } from 'starknet-types';
3
+ export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types';
1
4
  import * as weierstrass from '@noble/curves/abstract/weierstrass';
2
5
  import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
3
6
  import * as ts_mixer_dist_types_types from 'ts-mixer/dist/types/types';
@@ -6,320 +9,6 @@ import * as poseidon from '@noble/curves/abstract/poseidon';
6
9
  import * as json$1 from 'lossless-json';
7
10
  import * as starknet from '@scure/starknet';
8
11
 
9
- declare enum StarknetChainId$1 {
10
- SN_MAIN = "0x534e5f4d41494e",
11
- SN_GOERLI = "0x534e5f474f45524c49",
12
- SN_SEPOLIA = "0x534e5f5345504f4c4941"
13
- }
14
- declare enum Permission {
15
- Accounts = "accounts"
16
- }
17
- type FELT$3 = string;
18
- type Call$1 = {
19
- contract_address: FELT$3;
20
- entrypoint: string;
21
- calldata?: FELT$3[];
22
- };
23
- type SIERRA_ENTRY_POINT$2 = {
24
- selector: FELT$3;
25
- function_idx: number;
26
- };
27
- type StarknetMerkleType$1 = {
28
- name: string;
29
- type: 'merkletree';
30
- contains: string;
31
- };
32
- /**
33
- * A single type, as part of a struct. The `type` field can be any of the EIP-712 supported types.
34
- *
35
- * Note that the `uint` and `int` aliases like in Solidity, and fixed point numbers are not supported by the EIP-712
36
- * standard.
37
- */
38
- type StarknetType$1 = {
39
- name: string;
40
- type: string;
41
- } | StarknetMerkleType$1;
42
- /**
43
- * The EIP712 domain struct. Any of these fields are optional, but it must contain at least one field.
44
- */
45
- interface StarknetDomain$1 extends Record<string, unknown> {
46
- name?: string;
47
- version?: string;
48
- chainId?: string | number;
49
- }
50
- /**
51
- * The complete typed data, with all the structs, domain data, primary type of the message, and the message itself.
52
- */
53
- interface TypedData$1 {
54
- types: Record<string, StarknetType$1[]>;
55
- primaryType: string;
56
- domain: StarknetDomain$1;
57
- message: Record<string, unknown>;
58
- }
59
- /**
60
- * INVOKE_TXN_V1
61
- * @see https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json
62
- */
63
- interface AddInvokeTransactionParameters {
64
- /**
65
- * Calls to invoke by the account
66
- */
67
- calls: Call$1[];
68
- }
69
- interface AddInvokeTransactionResult {
70
- /**
71
- * The hash of the invoke transaction
72
- */
73
- transaction_hash: FELT$3;
74
- }
75
- /**
76
- * BROADCASTED_DECLARE_TXN_V2
77
- * @see https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json
78
- */
79
- interface AddDeclareTransactionParameters {
80
- /**
81
- * The hash of the Cairo assembly resulting from the Sierra compilation
82
- */
83
- compiled_class_hash: FELT$3;
84
- contract_class: {
85
- /**
86
- * The list of Sierra instructions of which the program consists
87
- */
88
- sierra_program: FELT$3[];
89
- /**
90
- * The version of the contract class object. Currently, the Starknet OS supports version 0.1.0
91
- */
92
- contract_class_version: string;
93
- /**
94
- * Entry points by type
95
- */
96
- entry_points_by_type: {
97
- CONSTRUCTOR: SIERRA_ENTRY_POINT$2[];
98
- EXTERNAL: SIERRA_ENTRY_POINT$2[];
99
- L1_HANDLER: SIERRA_ENTRY_POINT$2[];
100
- };
101
- /**
102
- * The class ABI, as supplied by the user declaring the class
103
- */
104
- abi?: string;
105
- };
106
- }
107
- interface AddDeclareTransactionResult {
108
- /**
109
- * The hash of the declare transaction
110
- */
111
- transaction_hash: FELT$3;
112
- /**
113
- * The hash of the declared class
114
- */
115
- class_hash: FELT$3;
116
- }
117
- /**
118
- * DEPLOY_ACCOUNT_TXN_V1
119
- * @see https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json
120
- */
121
- interface AddDeployAccountTransactionParameters {
122
- /**
123
- * The salt for the address of the deployed contract
124
- */
125
- contract_address_salt: FELT$3;
126
- /**
127
- * The parameters passed to the constructor
128
- */
129
- constructor_calldata: FELT$3[];
130
- /**
131
- * The hash of the deployed contract's class
132
- */
133
- class_hash: FELT$3;
134
- }
135
- interface AddDeployAccountTransactionResult {
136
- /**
137
- * The hash of the deploy transaction
138
- */
139
- transaction_hash: FELT$3;
140
- /**
141
- * The address of the new contract
142
- */
143
- contract_address: FELT$3;
144
- }
145
- /**
146
- * EIP-1102:
147
- * @see https://eips.ethereum.org/EIPS/eip-1102
148
- */
149
- interface RequestAccountsParameters {
150
- /**
151
- * If true, the wallet will not show the wallet-unlock UI in case of a locked wallet,
152
- * nor the dApp-approve UI in case of a non-allowed dApp.
153
- */
154
- silentMode?: boolean;
155
- }
156
- /**
157
- * EIP-747:
158
- * @see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-747.md
159
- */
160
- interface WatchAssetParameters {
161
- type: 'ERC20';
162
- options: {
163
- address: string;
164
- symbol?: string;
165
- decimals?: number;
166
- image?: string;
167
- name?: string;
168
- };
169
- }
170
- /**
171
- * EIP-3085:
172
- * @see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3085.md
173
- */
174
- interface AddStarknetChainParameters {
175
- id: string;
176
- chainId: string;
177
- chainName: string;
178
- rpcUrls?: string[];
179
- blockExplorerUrls?: string[];
180
- nativeCurrency?: {
181
- address: string;
182
- name: string;
183
- symbol: string;
184
- decimals: number;
185
- };
186
- iconUrls?: string[];
187
- }
188
- interface SwitchStarknetChainParameters {
189
- chainId: string;
190
- }
191
- interface GetDeploymentDataResult {
192
- address: FELT$3;
193
- class_hash: FELT$3;
194
- salt: FELT$3;
195
- calldata: FELT$3[];
196
- sigdata?: FELT$3[];
197
- version: 0 | 1;
198
- }
199
- /**
200
- * Maps each RPC message type to its corresponding parameters and result type.
201
- */
202
- interface RpcTypeToMessageMap {
203
- /**
204
- * Get permissions from the wallet.
205
- * @returns An array of permissions.
206
- */
207
- wallet_getPermissions: {
208
- params?: never;
209
- result: Permission[];
210
- };
211
- /**
212
- * Request accounts from the wallet.
213
- * @param params Optional parameters for requesting accounts.
214
- * @returns An array of account addresses as strings.
215
- */
216
- wallet_requestAccounts: {
217
- params?: RequestAccountsParameters;
218
- result: string[];
219
- };
220
- /**
221
- * Watch an asset in the wallet.
222
- * @param params The parameters required to watch an asset.
223
- * @returns A boolean indicating if the operation was successful.
224
- */
225
- wallet_watchAsset: {
226
- params: WatchAssetParameters;
227
- result: boolean;
228
- };
229
- /**
230
- * Add a new Starknet chain to the wallet.
231
- * @param params The parameters required to add a new chain.
232
- * @returns A boolean indicating if the operation was successful.
233
- */
234
- wallet_addStarknetChain: {
235
- params: AddStarknetChainParameters;
236
- result: boolean;
237
- };
238
- /**
239
- * Switch the current Starknet chain in the wallet.
240
- * @param params The parameters required to switch chains.
241
- * @returns A boolean indicating if the operation was successful.
242
- */
243
- wallet_switchStarknetChain: {
244
- params: SwitchStarknetChainParameters;
245
- result: boolean;
246
- };
247
- /**
248
- * Request the current chain ID from the wallet.
249
- * @returns The current Starknet chain ID.
250
- */
251
- wallet_requestChainId: {
252
- params?: never;
253
- result: StarknetChainId$1;
254
- };
255
- /**
256
- * Get deployment data for a contract.
257
- * @returns The deployment data result.
258
- */
259
- wallet_deploymentData: {
260
- params?: never;
261
- result: GetDeploymentDataResult;
262
- };
263
- /**
264
- * Add an invoke transaction to the wallet.
265
- * @param params The parameters required for the invoke transaction.
266
- * @returns The result of adding the invoke transaction.
267
- */
268
- starknet_addInvokeTransaction: {
269
- params: AddInvokeTransactionParameters;
270
- result: AddInvokeTransactionResult;
271
- };
272
- /**
273
- * Add a declare transaction to the wallet.
274
- * @param params The parameters required for the declare transaction.
275
- * @returns The result of adding the declare transaction.
276
- */
277
- starknet_addDeclareTransaction: {
278
- params: AddDeclareTransactionParameters;
279
- result: AddDeclareTransactionResult;
280
- };
281
- /**
282
- * Add a deploy account transaction to the wallet.
283
- * @param params The parameters required for the deploy account transaction.
284
- * @returns The result of adding the deploy account transaction.
285
- */
286
- starknet_addDeployAccountTransaction: {
287
- params: AddDeployAccountTransactionParameters;
288
- result: AddDeployAccountTransactionResult;
289
- };
290
- /**
291
- * Sign typed data using the wallet.
292
- * @param params The typed data to sign.
293
- * @returns An array of signatures as strings.
294
- */
295
- starknet_signTypedData: {
296
- params: TypedData$1;
297
- result: string[];
298
- };
299
- /**
300
- * Get the list of supported specifications.
301
- * @returns An array of supported specification strings.
302
- */
303
- starknet_supportedSpecs: {
304
- params?: never;
305
- result: string[];
306
- };
307
- }
308
- type RpcMessage = {
309
- [K in keyof RpcTypeToMessageMap]: {
310
- type: K;
311
- } & RpcTypeToMessageMap[K];
312
- }[keyof RpcTypeToMessageMap];
313
- type IsParamsOptional<T extends keyof RpcTypeToMessageMap> = undefined extends RpcTypeToMessageMap[T]['params'] ? true : false;
314
- type RequestFnCall<T extends RpcMessage['type']> = {
315
- type: T;
316
- } & (IsParamsOptional<T> extends true ? {
317
- params?: RpcTypeToMessageMap[T]['params'];
318
- } : {
319
- params: RpcTypeToMessageMap[T]['params'];
320
- });
321
- type RequestFn = <T extends RpcMessage['type']>(call: RequestFnCall<T>) => Promise<RpcTypeToMessageMap[T]['result']>;
322
-
323
12
  /**
324
13
  * PRIMITIVES
325
14
  */
@@ -3476,6 +3165,8 @@ interface EstimateFeeResponse {
3476
3165
  unit: PRICE_UNIT;
3477
3166
  suggestedMaxFee: bigint;
3478
3167
  resourceBounds: ResourceBounds;
3168
+ data_gas_consumed: bigint;
3169
+ data_gas_price: bigint;
3479
3170
  }
3480
3171
  type EstimateFeeResponseBulk = Array<EstimateFeeResponse>;
3481
3172
  type InvokeFunctionResponse = InvokedTransaction;
@@ -3674,49 +3365,6 @@ type V3DeployAccountSignerDetails = Required<DeployAccountContractPayload> & V3T
3674
3365
  version: `${ETransactionVersion3}`;
3675
3366
  };
3676
3367
 
3677
- declare enum TypedDataRevision {
3678
- Active = "1",
3679
- Legacy = "0"
3680
- }
3681
- type StarknetEnumType = {
3682
- name: string;
3683
- type: 'enum';
3684
- contains: string;
3685
- };
3686
- type StarknetMerkleType = {
3687
- name: string;
3688
- type: 'merkletree';
3689
- contains: string;
3690
- };
3691
- /**
3692
- * A single type, as part of a struct. The `type` field can be any of the EIP-712 supported types.
3693
- *
3694
- * Note that the `uint` and `int` aliases like in Solidity, and fixed point numbers are not supported by the EIP-712
3695
- * standard.
3696
- */
3697
- type StarknetType = {
3698
- name: string;
3699
- type: string;
3700
- } | StarknetEnumType | StarknetMerkleType;
3701
- /**
3702
- * The EIP712 domain struct. Any of these fields are optional, but it must contain at least one field.
3703
- */
3704
- interface StarknetDomain extends Record<string, unknown> {
3705
- name?: string;
3706
- version?: string;
3707
- chainId?: string | number;
3708
- revision?: string;
3709
- }
3710
- /**
3711
- * The complete typed data, with all the structs, domain data, primary type of the message, and the message itself.
3712
- */
3713
- interface TypedData {
3714
- types: Record<string, StarknetType[]>;
3715
- primaryType: string;
3716
- domain: StarknetDomain;
3717
- message: Record<string, unknown>;
3718
- }
3719
-
3720
3368
  type TransactionStatusReceiptSets = {
3721
3369
  success: SuccessfulTransactionReceiptResponse;
3722
3370
  reverted: RevertedTransactionReceiptResponse;
@@ -3869,10 +3517,10 @@ type index$2_SimulateTransactionResponse = SimulateTransactionResponse;
3869
3517
  type index$2_SimulatedTransaction = SimulatedTransaction;
3870
3518
  type index$2_SimulationFlags = SimulationFlags;
3871
3519
  type index$2_StarkProfile = StarkProfile;
3872
- type index$2_StarknetDomain = StarknetDomain;
3873
- type index$2_StarknetEnumType = StarknetEnumType;
3874
- type index$2_StarknetMerkleType = StarknetMerkleType;
3875
- type index$2_StarknetType = StarknetType;
3520
+ declare const index$2_StarknetDomain: typeof StarknetDomain;
3521
+ declare const index$2_StarknetEnumType: typeof StarknetEnumType;
3522
+ declare const index$2_StarknetMerkleType: typeof StarknetMerkleType;
3523
+ declare const index$2_StarknetType: typeof StarknetType;
3876
3524
  type index$2_StateUpdate = StateUpdate;
3877
3525
  type index$2_StateUpdateResponse = StateUpdateResponse;
3878
3526
  type index$2_Storage = Storage;
@@ -3895,8 +3543,7 @@ type index$2_TransactionStatusReceiptSets = TransactionStatusReceiptSets;
3895
3543
  type index$2_TransactionType = TransactionType;
3896
3544
  declare const index$2_TransactionType: typeof TransactionType;
3897
3545
  type index$2_Tupled = Tupled;
3898
- type index$2_TypedData = TypedData;
3899
- type index$2_TypedDataRevision = TypedDataRevision;
3546
+ declare const index$2_TypedData: typeof TypedData;
3900
3547
  declare const index$2_TypedDataRevision: typeof TypedDataRevision;
3901
3548
  type index$2_Uint = Uint;
3902
3549
  declare const index$2_Uint: typeof Uint;
@@ -3919,7 +3566,7 @@ type index$2_getEstimateFeeBulkOptions = getEstimateFeeBulkOptions;
3919
3566
  type index$2_getSimulateTransactionOptions = getSimulateTransactionOptions;
3920
3567
  type index$2_waitForTransactionOptions = waitForTransactionOptions;
3921
3568
  declare namespace index$2 {
3922
- export { type index$2_Abi as Abi, type index$2_AbiEntry as AbiEntry, type index$2_AbiEnums as AbiEnums, type index$2_AbiEvents as AbiEvents, type index$2_AbiStructs as AbiStructs, type index$2_AccountInvocationItem as AccountInvocationItem, type index$2_AccountInvocations as AccountInvocations, type index$2_AccountInvocationsFactoryDetails as AccountInvocationsFactoryDetails, type index$2_AllowArray as AllowArray, type index$2_Args as Args, type index$2_ArgsOrCalldata as ArgsOrCalldata, type index$2_ArgsOrCalldataWithOptions as ArgsOrCalldataWithOptions, type index$2_ArraySignatureType as ArraySignatureType, type index$2_AsyncContractFunction as AsyncContractFunction, type index$2_BigNumberish as BigNumberish, type Block$1 as Block, type index$2_BlockIdentifier as BlockIdentifier, type index$2_BlockNumber as BlockNumber, index$2_BlockStatus as BlockStatus, index$2_BlockTag as BlockTag, type index$2_BlockWithTxHashes as BlockWithTxHashes, type index$2_Builtins as Builtins, type index$2_ByteArray as ByteArray, type index$2_ByteCode as ByteCode, type index$2_Cairo1Event as Cairo1Event, type index$2_CairoAssembly as CairoAssembly, type index$2_CairoContract as CairoContract, type index$2_CairoEnum as CairoEnum, type index$2_CairoVersion as CairoVersion, type index$2_Call as Call, type index$2_CallContractResponse as CallContractResponse, type index$2_CallDetails as CallDetails, type index$2_CallOptions as CallOptions, type index$2_CallStruct as CallStruct, type index$2_Calldata as Calldata, type index$2_CompiledContract as CompiledContract, type index$2_CompiledSierra as CompiledSierra, type index$2_CompiledSierraCasm as CompiledSierraCasm, type index$2_CompilerVersion as CompilerVersion, type index$2_CompleteDeclareContractPayload as CompleteDeclareContractPayload, type index$2_CompressedProgram as CompressedProgram, type index$2_ContractClass as ContractClass, type index$2_ContractClassPayload as ContractClassPayload, type index$2_ContractClassResponse as ContractClassResponse, type index$2_ContractEntryPointFields as ContractEntryPointFields, type index$2_ContractFunction as ContractFunction, type index$2_ContractOptions as ContractOptions, type index$2_ContractVersion as ContractVersion, type index$2_DeclareAndDeployContractPayload as DeclareAndDeployContractPayload, type index$2_DeclareContractPayload as DeclareContractPayload, type index$2_DeclareContractResponse as DeclareContractResponse, type index$2_DeclareContractTransaction as DeclareContractTransaction, type index$2_DeclareDeployUDCResponse as DeclareDeployUDCResponse, type index$2_DeclareSignerDetails as DeclareSignerDetails, type index$2_DeclareTransactionReceiptResponse as DeclareTransactionReceiptResponse, type index$2_DeployAccountContractPayload as DeployAccountContractPayload, type index$2_DeployAccountContractTransaction as DeployAccountContractTransaction, type index$2_DeployAccountSignerDetails as DeployAccountSignerDetails, type index$2_DeployAccountTransactionReceiptResponse as DeployAccountTransactionReceiptResponse, type index$2_DeployContractResponse as DeployContractResponse, type index$2_DeployContractUDCResponse as DeployContractUDCResponse, type index$2_DeployTransactionReceiptResponse as DeployTransactionReceiptResponse, type index$2_Details as Details, index$2_EntryPointType as EntryPointType, type index$2_EntryPointsByType as EntryPointsByType, type index$2_EnumAbi as EnumAbi, type index$2_EstimateFee as EstimateFee, type index$2_EstimateFeeAction as EstimateFeeAction, type index$2_EstimateFeeBulk as EstimateFeeBulk, type index$2_EstimateFeeDetails as EstimateFeeDetails, type index$2_EstimateFeeResponse as EstimateFeeResponse, type index$2_EstimateFeeResponseBulk as EstimateFeeResponseBulk, type index$2_EventAbi as EventAbi, type index$2_EventEntry as EventEntry, type index$2_FeeEstimate as FeeEstimate, type index$2_FunctionAbi as FunctionAbi, type index$2_GetBlockResponse as GetBlockResponse, type index$2_GetTransactionResponse as GetTransactionResponse, type index$2_GetTxReceiptResponseWithoutHelper as GetTxReceiptResponseWithoutHelper, type index$2_HexCalldata as HexCalldata, type index$2_Invocation as Invocation, type index$2_Invocations as Invocations, type index$2_InvocationsDetails as InvocationsDetails, type index$2_InvocationsDetailsWithNonce as InvocationsDetailsWithNonce, type index$2_InvocationsSignerDetails as InvocationsSignerDetails, type index$2_InvokeFunctionResponse as InvokeFunctionResponse, type index$2_InvokeOptions as InvokeOptions, type index$2_InvokeTransactionReceiptResponse as InvokeTransactionReceiptResponse, type index$2_L1HandlerTransactionReceiptResponse as L1HandlerTransactionReceiptResponse, type index$2_LegacyCompiledContract as LegacyCompiledContract, type index$2_LegacyContractClass as LegacyContractClass, type index$2_LegacyEvent as LegacyEvent, index$2_Literal as Literal, type index$2_MessageToL1 as MessageToL1, type index$2_MultiDeployContractResponse as MultiDeployContractResponse, type index$2_MultiType as MultiType, type index$2_Nonce as Nonce, type index$2_OptionalPayload as OptionalPayload, type index$2_ParsedEvent as ParsedEvent, type index$2_ParsedEvents as ParsedEvents, type index$2_ParsedStruct as ParsedStruct, type index$2_PendingBlock as PendingBlock, type index$2_PendingStateUpdate as PendingStateUpdate, type index$2_Program as Program, type index$2_ProviderOptions as ProviderOptions, type index$2_PythonicHints as PythonicHints, index$3 as RPC, type index$2_RawArgs as RawArgs, type index$2_RawArgsArray as RawArgsArray, type index$2_RawArgsObject as RawArgsObject, type index$2_RawCalldata as RawCalldata, type index$2_RejectedTransactionReceiptResponse as RejectedTransactionReceiptResponse, type index$2_Result as Result, type index$2_RevertedTransactionReceiptResponse as RevertedTransactionReceiptResponse, type index$2_RpcProviderOptions as RpcProviderOptions, index$2_SIMULATION_FLAG as SIMULATION_FLAG, type index$2_SierraContractClass as SierraContractClass, type index$2_SierraContractEntryPointFields as SierraContractEntryPointFields, type index$2_SierraEntryPointsByType as SierraEntryPointsByType, type index$2_SierraProgramDebugInfo as SierraProgramDebugInfo, type index$2_Signature as Signature, type index$2_SimulateTransactionDetails as SimulateTransactionDetails, type index$2_SimulateTransactionResponse as SimulateTransactionResponse, type index$2_SimulatedTransaction as SimulatedTransaction, type index$2_SimulationFlags as SimulationFlags, type index$2_StarkProfile as StarkProfile, type index$2_StarknetDomain as StarknetDomain, type index$2_StarknetEnumType as StarknetEnumType, type index$2_StarknetMerkleType as StarknetMerkleType, type index$2_StarknetType as StarknetType, type index$2_StateUpdate as StateUpdate, type index$2_StateUpdateResponse as StateUpdateResponse, type index$2_Storage as Storage, type index$2_StructAbi as StructAbi, type index$2_SuccessfulTransactionReceiptResponse as SuccessfulTransactionReceiptResponse, index$2_TransactionExecutionStatus as TransactionExecutionStatus, index$2_TransactionFinalityStatus as TransactionFinalityStatus, type index$2_TransactionReceipt as TransactionReceipt, type index$2_TransactionReceiptCallbacks as TransactionReceiptCallbacks, type index$2_TransactionReceiptCallbacksDefault as TransactionReceiptCallbacksDefault, type index$2_TransactionReceiptCallbacksDefined as TransactionReceiptCallbacksDefined, type index$2_TransactionReceiptStatus as TransactionReceiptStatus, type index$2_TransactionReceiptUtilityInterface as TransactionReceiptUtilityInterface, type index$2_TransactionReceiptValue as TransactionReceiptValue, index$2_TransactionStatus as TransactionStatus, type index$2_TransactionStatusReceiptSets as TransactionStatusReceiptSets, index$2_TransactionType as TransactionType, type index$2_Tupled as Tupled, type index$2_TypedData as TypedData, index$2_TypedDataRevision as TypedDataRevision, index$2_Uint as Uint, type index$2_Uint256 as Uint256, type index$2_Uint512 as Uint512, type index$2_UniversalDeployerContractPayload as UniversalDeployerContractPayload, type index$2_UniversalDetails as UniversalDetails, type index$2_V2DeclareSignerDetails as V2DeclareSignerDetails, type index$2_V2DeployAccountSignerDetails as V2DeployAccountSignerDetails, type index$2_V2InvocationsSignerDetails as V2InvocationsSignerDetails, type index$2_V3DeclareSignerDetails as V3DeclareSignerDetails, type index$2_V3DeployAccountSignerDetails as V3DeployAccountSignerDetails, type index$2_V3InvocationsSignerDetails as V3InvocationsSignerDetails, type index$2_V3TransactionDetails as V3TransactionDetails, index$2_ValidateType as ValidateType, type index$2_WeierstrassSignatureType as WeierstrassSignatureType, type index$2_getContractVersionOptions as getContractVersionOptions, type index$2_getEstimateFeeBulkOptions as getEstimateFeeBulkOptions, type index$2_getSimulateTransactionOptions as getSimulateTransactionOptions, type index$2_waitForTransactionOptions as waitForTransactionOptions };
3569
+ export { type index$2_Abi as Abi, type index$2_AbiEntry as AbiEntry, type index$2_AbiEnums as AbiEnums, type index$2_AbiEvents as AbiEvents, type index$2_AbiStructs as AbiStructs, type index$2_AccountInvocationItem as AccountInvocationItem, type index$2_AccountInvocations as AccountInvocations, type index$2_AccountInvocationsFactoryDetails as AccountInvocationsFactoryDetails, type index$2_AllowArray as AllowArray, type index$2_Args as Args, type index$2_ArgsOrCalldata as ArgsOrCalldata, type index$2_ArgsOrCalldataWithOptions as ArgsOrCalldataWithOptions, type index$2_ArraySignatureType as ArraySignatureType, type index$2_AsyncContractFunction as AsyncContractFunction, type index$2_BigNumberish as BigNumberish, type Block$1 as Block, type index$2_BlockIdentifier as BlockIdentifier, type index$2_BlockNumber as BlockNumber, index$2_BlockStatus as BlockStatus, index$2_BlockTag as BlockTag, type index$2_BlockWithTxHashes as BlockWithTxHashes, type index$2_Builtins as Builtins, type index$2_ByteArray as ByteArray, type index$2_ByteCode as ByteCode, type index$2_Cairo1Event as Cairo1Event, type index$2_CairoAssembly as CairoAssembly, type index$2_CairoContract as CairoContract, type index$2_CairoEnum as CairoEnum, type index$2_CairoVersion as CairoVersion, type index$2_Call as Call, type index$2_CallContractResponse as CallContractResponse, type index$2_CallDetails as CallDetails, type index$2_CallOptions as CallOptions, type index$2_CallStruct as CallStruct, type index$2_Calldata as Calldata, type index$2_CompiledContract as CompiledContract, type index$2_CompiledSierra as CompiledSierra, type index$2_CompiledSierraCasm as CompiledSierraCasm, type index$2_CompilerVersion as CompilerVersion, type index$2_CompleteDeclareContractPayload as CompleteDeclareContractPayload, type index$2_CompressedProgram as CompressedProgram, type index$2_ContractClass as ContractClass, type index$2_ContractClassPayload as ContractClassPayload, type index$2_ContractClassResponse as ContractClassResponse, type index$2_ContractEntryPointFields as ContractEntryPointFields, type index$2_ContractFunction as ContractFunction, type index$2_ContractOptions as ContractOptions, type index$2_ContractVersion as ContractVersion, type index$2_DeclareAndDeployContractPayload as DeclareAndDeployContractPayload, type index$2_DeclareContractPayload as DeclareContractPayload, type index$2_DeclareContractResponse as DeclareContractResponse, type index$2_DeclareContractTransaction as DeclareContractTransaction, type index$2_DeclareDeployUDCResponse as DeclareDeployUDCResponse, type index$2_DeclareSignerDetails as DeclareSignerDetails, type index$2_DeclareTransactionReceiptResponse as DeclareTransactionReceiptResponse, type index$2_DeployAccountContractPayload as DeployAccountContractPayload, type index$2_DeployAccountContractTransaction as DeployAccountContractTransaction, type index$2_DeployAccountSignerDetails as DeployAccountSignerDetails, type index$2_DeployAccountTransactionReceiptResponse as DeployAccountTransactionReceiptResponse, type index$2_DeployContractResponse as DeployContractResponse, type index$2_DeployContractUDCResponse as DeployContractUDCResponse, type index$2_DeployTransactionReceiptResponse as DeployTransactionReceiptResponse, type index$2_Details as Details, index$2_EntryPointType as EntryPointType, type index$2_EntryPointsByType as EntryPointsByType, type index$2_EnumAbi as EnumAbi, type index$2_EstimateFee as EstimateFee, type index$2_EstimateFeeAction as EstimateFeeAction, type index$2_EstimateFeeBulk as EstimateFeeBulk, type index$2_EstimateFeeDetails as EstimateFeeDetails, type index$2_EstimateFeeResponse as EstimateFeeResponse, type index$2_EstimateFeeResponseBulk as EstimateFeeResponseBulk, type index$2_EventAbi as EventAbi, type index$2_EventEntry as EventEntry, type index$2_FeeEstimate as FeeEstimate, type index$2_FunctionAbi as FunctionAbi, type index$2_GetBlockResponse as GetBlockResponse, type index$2_GetTransactionResponse as GetTransactionResponse, type index$2_GetTxReceiptResponseWithoutHelper as GetTxReceiptResponseWithoutHelper, type index$2_HexCalldata as HexCalldata, type index$2_Invocation as Invocation, type index$2_Invocations as Invocations, type index$2_InvocationsDetails as InvocationsDetails, type index$2_InvocationsDetailsWithNonce as InvocationsDetailsWithNonce, type index$2_InvocationsSignerDetails as InvocationsSignerDetails, type index$2_InvokeFunctionResponse as InvokeFunctionResponse, type index$2_InvokeOptions as InvokeOptions, type index$2_InvokeTransactionReceiptResponse as InvokeTransactionReceiptResponse, type index$2_L1HandlerTransactionReceiptResponse as L1HandlerTransactionReceiptResponse, type index$2_LegacyCompiledContract as LegacyCompiledContract, type index$2_LegacyContractClass as LegacyContractClass, type index$2_LegacyEvent as LegacyEvent, index$2_Literal as Literal, type index$2_MessageToL1 as MessageToL1, type index$2_MultiDeployContractResponse as MultiDeployContractResponse, type index$2_MultiType as MultiType, type index$2_Nonce as Nonce, type index$2_OptionalPayload as OptionalPayload, type index$2_ParsedEvent as ParsedEvent, type index$2_ParsedEvents as ParsedEvents, type index$2_ParsedStruct as ParsedStruct, type index$2_PendingBlock as PendingBlock, type index$2_PendingStateUpdate as PendingStateUpdate, type index$2_Program as Program, type index$2_ProviderOptions as ProviderOptions, type index$2_PythonicHints as PythonicHints, index$3 as RPC, type index$2_RawArgs as RawArgs, type index$2_RawArgsArray as RawArgsArray, type index$2_RawArgsObject as RawArgsObject, type index$2_RawCalldata as RawCalldata, type index$2_RejectedTransactionReceiptResponse as RejectedTransactionReceiptResponse, type index$2_Result as Result, type index$2_RevertedTransactionReceiptResponse as RevertedTransactionReceiptResponse, type index$2_RpcProviderOptions as RpcProviderOptions, index$2_SIMULATION_FLAG as SIMULATION_FLAG, type index$2_SierraContractClass as SierraContractClass, type index$2_SierraContractEntryPointFields as SierraContractEntryPointFields, type index$2_SierraEntryPointsByType as SierraEntryPointsByType, type index$2_SierraProgramDebugInfo as SierraProgramDebugInfo, type index$2_Signature as Signature, type index$2_SimulateTransactionDetails as SimulateTransactionDetails, type index$2_SimulateTransactionResponse as SimulateTransactionResponse, type index$2_SimulatedTransaction as SimulatedTransaction, type index$2_SimulationFlags as SimulationFlags, type index$2_StarkProfile as StarkProfile, index$2_StarknetDomain as StarknetDomain, index$2_StarknetEnumType as StarknetEnumType, index$2_StarknetMerkleType as StarknetMerkleType, index$2_StarknetType as StarknetType, type index$2_StateUpdate as StateUpdate, type index$2_StateUpdateResponse as StateUpdateResponse, type index$2_Storage as Storage, type index$2_StructAbi as StructAbi, type index$2_SuccessfulTransactionReceiptResponse as SuccessfulTransactionReceiptResponse, index$2_TransactionExecutionStatus as TransactionExecutionStatus, index$2_TransactionFinalityStatus as TransactionFinalityStatus, type index$2_TransactionReceipt as TransactionReceipt, type index$2_TransactionReceiptCallbacks as TransactionReceiptCallbacks, type index$2_TransactionReceiptCallbacksDefault as TransactionReceiptCallbacksDefault, type index$2_TransactionReceiptCallbacksDefined as TransactionReceiptCallbacksDefined, type index$2_TransactionReceiptStatus as TransactionReceiptStatus, type index$2_TransactionReceiptUtilityInterface as TransactionReceiptUtilityInterface, type index$2_TransactionReceiptValue as TransactionReceiptValue, index$2_TransactionStatus as TransactionStatus, type index$2_TransactionStatusReceiptSets as TransactionStatusReceiptSets, index$2_TransactionType as TransactionType, type index$2_Tupled as Tupled, index$2_TypedData as TypedData, index$2_TypedDataRevision as TypedDataRevision, index$2_Uint as Uint, type index$2_Uint256 as Uint256, type index$2_Uint512 as Uint512, type index$2_UniversalDeployerContractPayload as UniversalDeployerContractPayload, type index$2_UniversalDetails as UniversalDetails, type index$2_V2DeclareSignerDetails as V2DeclareSignerDetails, type index$2_V2DeployAccountSignerDetails as V2DeployAccountSignerDetails, type index$2_V2InvocationsSignerDetails as V2InvocationsSignerDetails, type index$2_V3DeclareSignerDetails as V3DeclareSignerDetails, type index$2_V3DeployAccountSignerDetails as V3DeployAccountSignerDetails, type index$2_V3InvocationsSignerDetails as V3InvocationsSignerDetails, type index$2_V3TransactionDetails as V3TransactionDetails, index$2_ValidateType as ValidateType, type index$2_WeierstrassSignatureType as WeierstrassSignatureType, type index$2_getContractVersionOptions as getContractVersionOptions, type index$2_getEstimateFeeBulkOptions as getEstimateFeeBulkOptions, type index$2_getSimulateTransactionOptions as getSimulateTransactionOptions, type index$2_waitForTransactionOptions as waitForTransactionOptions };
3923
3570
  }
3924
3571
 
3925
3572
  declare class RpcChannel$1 {
@@ -3933,7 +3580,7 @@ declare class RpcChannel$1 {
3933
3580
  readonly waitMode: Boolean;
3934
3581
  constructor(optionsOrProvider?: RpcProviderOptions);
3935
3582
  setChainId(chainId: StarknetChainId): void;
3936
- fetch(method: string, params?: object, id?: string | number): any;
3583
+ fetch(method: string, params?: object, id?: string | number): Promise<Response>;
3937
3584
  protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
3938
3585
  protected fetchEndpoint<T extends keyof Methods$1>(method: T, params?: Methods$1[T]['params']): Promise<Methods$1[T]['result']>;
3939
3586
  getChainId(): Promise<StarknetChainId>;
@@ -4009,11 +3656,11 @@ declare class RpcChannel {
4009
3656
  requestId: number;
4010
3657
  readonly blockIdentifier: BlockIdentifier;
4011
3658
  private chainId?;
4012
- private speckVersion?;
3659
+ private specVersion?;
4013
3660
  readonly waitMode: Boolean;
4014
3661
  constructor(optionsOrProvider?: RpcProviderOptions);
4015
3662
  setChainId(chainId: StarknetChainId): void;
4016
- fetch(method: string, params?: object, id?: string | number): any;
3663
+ fetch(method: string, params?: object, id?: string | number): Promise<Response>;
4017
3664
  protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
4018
3665
  protected fetchEndpoint<T extends keyof Methods>(method: T, params?: Methods[T]['params']): Promise<Methods[T]['result']>;
4019
3666
  getChainId(): Promise<StarknetChainId>;
@@ -4361,7 +4008,7 @@ declare class RpcProvider$1 implements ProviderInterface {
4361
4008
  private responseParser;
4362
4009
  channel: RpcChannel | RpcChannel$1;
4363
4010
  constructor(optionsOrProvider?: RpcProviderOptions | ProviderInterface | RpcProvider$1);
4364
- fetch(method: string, params?: object, id?: string | number): any;
4011
+ fetch(method: string, params?: object, id?: string | number): Promise<Response>;
4365
4012
  getChainId(): Promise<StarknetChainId>;
4366
4013
  getSpecVersion(): Promise<string>;
4367
4014
  getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
@@ -4515,9 +4162,8 @@ declare abstract class SignerInterface {
4515
4162
  * - maxFee<br/>
4516
4163
  * - version<br/>
4517
4164
  * - nonce<br/>
4518
- * @param abis - (optional) An array of Abi objects for displaying decoded data
4519
4165
  */
4520
- abstract signTransaction(transactions: Call[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): Promise<Signature>;
4166
+ abstract signTransaction(transactions: Call[], transactionsDetail: InvocationsSignerDetails): Promise<Signature>;
4521
4167
  /**
4522
4168
  * Signs a DEPLOY_ACCOUNT transaction with the Starknet private key and returns the signature
4523
4169
  *
@@ -4722,10 +4368,22 @@ declare abstract class AccountInterface extends ProviderInterface {
4722
4368
  * - entrypoint - the entrypoint of the contract
4723
4369
  * - calldata - (defaults to []) the calldata
4724
4370
  * - signature - (defaults to []) the signature
4725
- * @param abi (optional) the abi of the contract for better displaying
4371
+ * @param {InvocationsDetails} transactionsDetail Additional optional parameters for the transaction
4726
4372
  *
4727
4373
  * @returns response from addTransaction
4728
4374
  */
4375
+ abstract execute(transactions: AllowArray<Call>, transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
4376
+ /**
4377
+ * @deprecated
4378
+ * @param transactions the invocation object or an array of them, containing:
4379
+ * - contractAddress - the address of the contract
4380
+ * - entrypoint - the entrypoint of the contract
4381
+ * - calldata - (defaults to []) the calldata
4382
+ * - signature - (defaults to []) the signature
4383
+ * @param abis (optional) the abi of the contract for better displaying
4384
+ * @param {InvocationsDetails} transactionsDetail Additional optional parameters for the transaction
4385
+ * * @returns response from addTransaction
4386
+ */
4729
4387
  abstract execute(transactions: AllowArray<Call>, abis?: Abi[], transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
4730
4388
  /**
4731
4389
  * Declares a given compiled contract (json) to starknet
@@ -4889,7 +4547,8 @@ declare class Account extends RpcProvider implements AccountInterface {
4889
4547
  estimateDeployFee(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<EstimateFee>;
4890
4548
  estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
4891
4549
  simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
4892
- execute(calls: AllowArray<Call>, abis?: Abi[] | undefined, details?: UniversalDetails): Promise<InvokeFunctionResponse>;
4550
+ execute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
4551
+ execute(transactions: AllowArray<Call>, abis?: Abi[], transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
4893
4552
  /**
4894
4553
  * First check if contract is already declared, if not declare it
4895
4554
  * If contract already declared returned transaction_hash is ''.
@@ -4921,32 +4580,6 @@ declare class Account extends RpcProvider implements AccountInterface {
4921
4580
  StarknetIdContract?: string): Promise<string>;
4922
4581
  }
4923
4582
 
4924
- type AccountChangeEventHandler = (accounts?: string[]) => void;
4925
- type NetworkChangeEventHandler = (chainId?: StarknetChainId$1, accounts?: string[]) => void;
4926
- interface WalletEventHandlers {
4927
- accountsChanged: AccountChangeEventHandler;
4928
- networkChanged: NetworkChangeEventHandler;
4929
- }
4930
-
4931
- type WalletEventListener = <E extends keyof WalletEventHandlers>(event: E, handleEvent: WalletEventHandlers[E]) => void;
4932
- interface StarknetWindowObject {
4933
- id: string;
4934
- name: string;
4935
- version: string;
4936
- icon: string | {
4937
- dark: string;
4938
- light: string;
4939
- };
4940
- request: RequestFn;
4941
- on: WalletEventListener;
4942
- off: WalletEventListener;
4943
- }
4944
- declare global {
4945
- interface Window {
4946
- [key: `starknet_${string}`]: StarknetWindowObject | undefined;
4947
- }
4948
- }
4949
-
4950
4583
  interface StarknetWalletProvider extends StarknetWindowObject {
4951
4584
  }
4952
4585
 
@@ -4963,95 +4596,26 @@ declare class WalletAccount extends Account implements AccountInterface {
4963
4596
  * WALLET SPECIFIC METHODS
4964
4597
  */
4965
4598
  requestAccounts(silentMode?: boolean): Promise<string[]>;
4966
- getPermissions(): Promise<Permission[]>;
4599
+ getPermissions(): Promise<starknet_types.Permission[]>;
4967
4600
  switchStarknetChain(chainId: StarknetChainId): Promise<boolean>;
4968
4601
  watchAsset(asset: WatchAssetParameters): Promise<boolean>;
4969
4602
  addStarknetChain(chain: AddStarknetChainParameters): Promise<boolean>;
4970
4603
  /**
4971
4604
  * ACCOUNT METHODS
4972
4605
  */
4973
- execute(calls: AllowArray<Call>): Promise<AddInvokeTransactionResult>;
4974
- declare(payload: DeclareContractPayload): Promise<AddDeclareTransactionResult>;
4606
+ execute(calls: AllowArray<Call>): Promise<starknet_types.AddInvokeTransactionResult>;
4607
+ declare(payload: DeclareContractPayload): Promise<starknet_types.AddDeclareTransactionResult>;
4975
4608
  deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
4976
- deployAccount(payload: DeployAccountContractPayload): Promise<AddDeployAccountTransactionResult>;
4609
+ deployAccount(payload: DeployAccountContractPayload): Promise<starknet_types.AddDeployAccountTransactionResult>;
4977
4610
  signMessage(typedData: TypedData): Promise<string[]>;
4978
4611
  }
4979
4612
 
4980
- /**
4981
- * Request Permission for wallet account, return addresses that are allowed by user
4982
- * @param silentMode false: request user interaction allowance. true: return only pre-allowed
4983
- * @returns allowed accounts addresses
4984
- */
4985
- declare function requestAccounts(swo: StarknetWindowObject, silentMode?: boolean): Promise<string[]>;
4986
- /**
4987
- * Request Permission for wallet account
4988
- * @returns allowed accounts addresses
4989
- */
4990
- declare function getPermissions(swo: StarknetWindowObject): Promise<Permission[]>;
4991
- /**
4992
- * Request adding ERC20 Token to Wallet List
4993
- * @param asset WatchAssetParameters
4994
- * @returns boolean
4995
- */
4996
- declare function watchAsset(swo: StarknetWindowObject, asset: WatchAssetParameters): Promise<boolean>;
4997
- /**
4998
- * Request adding custom Starknet chain
4999
- * @param chain AddStarknetChainParameters
5000
- * @returns boolean
5001
- */
5002
- declare function addStarknetChain(swo: StarknetWindowObject, chain: AddStarknetChainParameters): Promise<boolean>;
5003
- /**
5004
- * Request Wallet Network change
5005
- * @param chainId StarknetChainId
5006
- * @returns boolean
5007
- */
5008
- declare function switchStarknetChain(swo: StarknetWindowObject, chainId: StarknetChainId$1): Promise<boolean>;
5009
- /**
5010
- * Request the current chain ID from the wallet.
5011
- * @returns The current Starknet chain ID.
5012
- */
5013
- declare function requestChainId(swo: StarknetWindowObject): Promise<StarknetChainId$1>;
5014
- /**
5015
- * Get deployment data for a contract.
5016
- * @returns The deployment data result.
5017
- */
5018
- declare function deploymentData(swo: StarknetWindowObject): Promise<GetDeploymentDataResult>;
5019
- /**
5020
- * Add an invoke transaction to the wallet.
5021
- * @param params The parameters required for the invoke transaction.
5022
- * @returns The result of adding the invoke transaction.
5023
- */
5024
- declare function addInvokeTransaction(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<AddInvokeTransactionResult>;
5025
- /**
5026
- * Add a declare transaction to the wallet.
5027
- * @param params The parameters required for the declare transaction.
5028
- * @returns The result of adding the declare transaction.
5029
- */
5030
- declare function addDeclareTransaction(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<AddDeclareTransactionResult>;
5031
- /**
5032
- * Add a deploy account transaction to the wallet.
5033
- * @param params The parameters required for the deploy account transaction.
5034
- * @returns The result of adding the deploy account transaction.
5035
- */
5036
- declare function addDeployAccountTransaction(swo: StarknetWindowObject, params: AddDeployAccountTransactionParameters): Promise<AddDeployAccountTransactionResult>;
5037
- /**
5038
- * Sign typed data using the wallet.
5039
- * @param params The typed data to sign.
5040
- * @returns An array of signatures as strings.
5041
- */
5042
- declare function signMessage(swo: StarknetWindowObject, typedData: TypedData$1): Promise<string[]>;
5043
- /**
5044
- * Get the list of supported specifications.
5045
- * @returns An array of supported specification strings.
5046
- */
5047
- declare function supportedSpecs(swo: StarknetWindowObject): Promise<string[]>;
5048
- declare function onAccountChange(swo: StarknetWindowObject, callback: AccountChangeEventHandler): void;
5049
- declare function onNetworkChanged(swo: StarknetWindowObject, callback: NetworkChangeEventHandler): void;
5050
-
5051
4613
  declare module 'abi-wan-kanabi' {
5052
4614
  interface Config<OptionT = any, ResultT = any, ErrorT = any> {
5053
4615
  FeltType: BigNumberish;
5054
4616
  U256Type: number | bigint | Uint256;
4617
+ U512Type: BigNumberish;
4618
+ Secp256k1PointType: BigNumberish;
5055
4619
  Option: CairoOption<OptionT>;
5056
4620
  Tuple: Record<number, BigNumberish | object | boolean>;
5057
4621
  Result: CairoResult<ResultT, ErrorT>;
@@ -5857,14 +5421,28 @@ declare namespace stark {
5857
5421
  * Get random Ethereum private Key.
5858
5422
  * @returns an Hex string
5859
5423
  * @example
5424
+ * ```typescript
5860
5425
  * const myPK: string = randomAddress()
5861
5426
  * // result = "0xf04e69ac152fba37c02929c2ae78c9a481461dda42dbc6c6e286be6eb2a8ab83"
5427
+ * ```
5862
5428
  */
5863
5429
  declare function ethRandomPrivateKey(): string;
5430
+ /**
5431
+ * Get a string formatted for an Ethereum address, without uppercase characters.
5432
+ * @param {BigNumberish} address Address of an Ethereum account.
5433
+ * @returns an Hex string coded on 20 bytes
5434
+ * @example
5435
+ * ```typescript
5436
+ * const myEthAddress: string = validateAndParseEthAddress("0x8359E4B0152ed5A731162D3c7B0D8D56edB165")
5437
+ * // result = "0x008359e4b0152ed5a731162d3c7b0d8d56edb165"
5438
+ * ```
5439
+ */
5440
+ declare function validateAndParseEthAddress(address: BigNumberish): string;
5864
5441
 
5865
5442
  declare const eth_ethRandomPrivateKey: typeof ethRandomPrivateKey;
5443
+ declare const eth_validateAndParseEthAddress: typeof validateAndParseEthAddress;
5866
5444
  declare namespace eth {
5867
- export { eth_ethRandomPrivateKey as ethRandomPrivateKey };
5445
+ export { eth_ethRandomPrivateKey as ethRandomPrivateKey, eth_validateAndParseEthAddress as validateAndParseEthAddress };
5868
5446
  }
5869
5447
 
5870
5448
  declare class MerkleTree {
@@ -6118,12 +5696,11 @@ declare function getStructHash<T extends TypedData>(types: T['types'], type: str
6118
5696
  */
6119
5697
  declare function getMessageHash(typedData: TypedData, account: BigNumberish): string;
6120
5698
 
6121
- type typedData_StarknetDomain = StarknetDomain;
6122
- type typedData_StarknetEnumType = StarknetEnumType;
6123
- type typedData_StarknetMerkleType = StarknetMerkleType;
6124
- type typedData_StarknetType = StarknetType;
6125
- type typedData_TypedData = TypedData;
6126
- type typedData_TypedDataRevision = TypedDataRevision;
5699
+ declare const typedData_StarknetDomain: typeof StarknetDomain;
5700
+ declare const typedData_StarknetEnumType: typeof StarknetEnumType;
5701
+ declare const typedData_StarknetMerkleType: typeof StarknetMerkleType;
5702
+ declare const typedData_StarknetType: typeof StarknetType;
5703
+ declare const typedData_TypedData: typeof TypedData;
6127
5704
  declare const typedData_TypedDataRevision: typeof TypedDataRevision;
6128
5705
  declare const typedData_encodeData: typeof encodeData;
6129
5706
  declare const typedData_encodeType: typeof encodeType;
@@ -6135,7 +5712,7 @@ declare const typedData_getTypeHash: typeof getTypeHash;
6135
5712
  declare const typedData_isMerkleTreeType: typeof isMerkleTreeType;
6136
5713
  declare const typedData_prepareSelector: typeof prepareSelector;
6137
5714
  declare namespace typedData {
6138
- export { type typedData_StarknetDomain as StarknetDomain, type typedData_StarknetEnumType as StarknetEnumType, type typedData_StarknetMerkleType as StarknetMerkleType, type typedData_StarknetType as StarknetType, type typedData_TypedData as TypedData, typedData_TypedDataRevision as TypedDataRevision, typedData_encodeData as encodeData, typedData_encodeType as encodeType, typedData_encodeValue as encodeValue, typedData_getDependencies as getDependencies, typedData_getMessageHash as getMessageHash, typedData_getStructHash as getStructHash, typedData_getTypeHash as getTypeHash, typedData_isMerkleTreeType as isMerkleTreeType, typedData_prepareSelector as prepareSelector };
5715
+ export { typedData_StarknetDomain as StarknetDomain, typedData_StarknetEnumType as StarknetEnumType, typedData_StarknetMerkleType as StarknetMerkleType, typedData_StarknetType as StarknetType, typedData_TypedData as TypedData, typedData_TypedDataRevision as TypedDataRevision, typedData_encodeData as encodeData, typedData_encodeType as encodeType, typedData_encodeValue as encodeValue, typedData_getDependencies as getDependencies, typedData_getMessageHash as getMessageHash, typedData_getStructHash as getStructHash, typedData_getTypeHash as getTypeHash, typedData_isMerkleTreeType as isMerkleTreeType, typedData_prepareSelector as prepareSelector };
6139
5716
  }
6140
5717
 
6141
5718
  declare function useDecoded(encoded: bigint[]): string;
@@ -6675,6 +6252,95 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
6675
6252
  salt: string;
6676
6253
  };
6677
6254
 
6255
+ /**
6256
+ * Request Permission for wallet account, return addresses that are allowed by user
6257
+ * @param silentMode false: request user interaction allowance. true: return only pre-allowed
6258
+ * @returns allowed accounts addresses
6259
+ */
6260
+ declare function requestAccounts(swo: StarknetWindowObject, silentMode?: boolean): Promise<string[]>;
6261
+ /**
6262
+ * Request Permission for wallet account
6263
+ * @returns allowed accounts addresses
6264
+ */
6265
+ declare function getPermissions(swo: StarknetWindowObject): Promise<starknet_types.Permission[]>;
6266
+ /**
6267
+ * Request adding ERC20 Token to Wallet List
6268
+ * @param asset WatchAssetParameters
6269
+ * @returns boolean
6270
+ */
6271
+ declare function watchAsset(swo: StarknetWindowObject, asset: WatchAssetParameters): Promise<boolean>;
6272
+ /**
6273
+ * Request adding custom Starknet chain
6274
+ * @param chain AddStarknetChainParameters
6275
+ * @returns boolean
6276
+ */
6277
+ declare function addStarknetChain(swo: StarknetWindowObject, chain: AddStarknetChainParameters): Promise<boolean>;
6278
+ /**
6279
+ * Request Wallet Network change
6280
+ * @param chainId StarknetChainId
6281
+ * @returns boolean
6282
+ */
6283
+ declare function switchStarknetChain(swo: StarknetWindowObject, chainId: StarknetChainId$1): Promise<boolean>;
6284
+ /**
6285
+ * Request the current chain ID from the wallet.
6286
+ * @returns The current Starknet chain ID.
6287
+ */
6288
+ declare function requestChainId(swo: StarknetWindowObject): Promise<StarknetChainId$1>;
6289
+ /**
6290
+ * Get deployment data for a contract.
6291
+ * @returns The deployment data result.
6292
+ */
6293
+ declare function deploymentData(swo: StarknetWindowObject): Promise<starknet_types.GetDeploymentDataResult>;
6294
+ /**
6295
+ * Add an invoke transaction to the wallet.
6296
+ * @param params The parameters required for the invoke transaction.
6297
+ * @returns The result of adding the invoke transaction.
6298
+ */
6299
+ declare function addInvokeTransaction(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<starknet_types.AddInvokeTransactionResult>;
6300
+ /**
6301
+ * Add a declare transaction to the wallet.
6302
+ * @param params The parameters required for the declare transaction.
6303
+ * @returns The result of adding the declare transaction.
6304
+ */
6305
+ declare function addDeclareTransaction(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<starknet_types.AddDeclareTransactionResult>;
6306
+ /**
6307
+ * Add a deploy account transaction to the wallet.
6308
+ * @param params The parameters required for the deploy account transaction.
6309
+ * @returns The result of adding the deploy account transaction.
6310
+ */
6311
+ declare function addDeployAccountTransaction(swo: StarknetWindowObject, params: AddDeployAccountTransactionParameters): Promise<starknet_types.AddDeployAccountTransactionResult>;
6312
+ /**
6313
+ * Sign typed data using the wallet.
6314
+ * @param params The typed data to sign.
6315
+ * @returns An array of signatures as strings.
6316
+ */
6317
+ declare function signMessage(swo: StarknetWindowObject, typedData: TypedData): Promise<string[]>;
6318
+ /**
6319
+ * Get the list of supported specifications.
6320
+ * @returns An array of supported specification strings.
6321
+ */
6322
+ declare function supportedSpecs(swo: StarknetWindowObject): Promise<string[]>;
6323
+ declare function onAccountChange(swo: StarknetWindowObject, callback: AccountChangeEventHandler): void;
6324
+ declare function onNetworkChanged(swo: StarknetWindowObject, callback: NetworkChangeEventHandler): void;
6325
+
6326
+ declare const connect_addDeclareTransaction: typeof addDeclareTransaction;
6327
+ declare const connect_addDeployAccountTransaction: typeof addDeployAccountTransaction;
6328
+ declare const connect_addInvokeTransaction: typeof addInvokeTransaction;
6329
+ declare const connect_addStarknetChain: typeof addStarknetChain;
6330
+ declare const connect_deploymentData: typeof deploymentData;
6331
+ declare const connect_getPermissions: typeof getPermissions;
6332
+ declare const connect_onAccountChange: typeof onAccountChange;
6333
+ declare const connect_onNetworkChanged: typeof onNetworkChanged;
6334
+ declare const connect_requestAccounts: typeof requestAccounts;
6335
+ declare const connect_requestChainId: typeof requestChainId;
6336
+ declare const connect_signMessage: typeof signMessage;
6337
+ declare const connect_supportedSpecs: typeof supportedSpecs;
6338
+ declare const connect_switchStarknetChain: typeof switchStarknetChain;
6339
+ declare const connect_watchAsset: typeof watchAsset;
6340
+ declare namespace connect {
6341
+ export { connect_addDeclareTransaction as addDeclareTransaction, connect_addDeployAccountTransaction as addDeployAccountTransaction, connect_addInvokeTransaction as addInvokeTransaction, connect_addStarknetChain as addStarknetChain, connect_deploymentData as deploymentData, connect_getPermissions as getPermissions, connect_onAccountChange as onAccountChange, connect_onNetworkChanged as onNetworkChanged, connect_requestAccounts as requestAccounts, connect_requestChainId as requestChainId, connect_signMessage as signMessage, connect_supportedSpecs as supportedSpecs, connect_switchStarknetChain as switchStarknetChain, connect_watchAsset as watchAsset };
6342
+ }
6343
+
6678
6344
  /**
6679
6345
  * Main
6680
6346
  */
@@ -6682,4 +6348,4 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
6682
6348
  /** @deprecated prefer the 'num' naming */
6683
6349
  declare const number: typeof num;
6684
6350
 
6685
- export { type Abi, type AbiEntry, type AbiEnums, type AbiEvents, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AllowArray, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type Cairo1Event, type CairoAssembly, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallStruct, type Calldata, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, ContractFactory, type ContractFactoryParams, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, CustomError, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransactionReceiptResponse, type Details, EntryPointType, type EntryPointsByType, type EnumAbi, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type EventAbi, type EventEntry, type FeeEstimate, type FunctionAbi, GatewayError, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, HttpError, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeOptions, type InvokeTransactionReceiptResponse, type L1HandlerTransactionReceiptResponse, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type MessageToL1, type MultiDeployContractResponse, type MultiType, type Nonce, type OptionalPayload, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PendingBlock, type PendingStateUpdate, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, index$3 as RPC, rpc_0_6 as RPC06, rpc_0_7 as RPC07, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, ReceiptTx, type RejectedTransactionReceiptResponse, type Result, type RevertedTransactionReceiptResponse, RpcChannel, RpcProvider, type RpcProviderOptions, SIMULATION_FLAG, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type SimulateTransactionDetails, type SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StarknetDomain, type StarknetEnumType, type StarknetMerkleType, type StarknetType, type StateUpdate, type StateUpdateResponse, type Storage, type StructAbi, type SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptUtilityInterface, type TransactionReceiptValue, TransactionStatus, type TransactionStatusReceiptSets, TransactionType, type Tupled, type TypedContractV2, type TypedData, TypedDataRevision, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, type WeierstrassSignatureType, addAddressPadding, addDeclareTransaction, addDeployAccountTransaction, addInvokeTransaction, addStarknetChain, buildUrl, byteArray, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, deploymentData, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getPermissions, type getSimulateTransactionOptions, index$1 as hash, isSierra, isUrl, json, merkle, num, number, onAccountChange, onNetworkChanged, parseUDCEvent, provider, requestAccounts, requestChainId, selector, shortString, signMessage, splitArgsAndOptions, stark, starknetId, supportedSpecs, switchStarknetChain, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, watchAsset };
6351
+ export { type Abi, type AbiEntry, type AbiEnums, type AbiEvents, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AllowArray, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type Cairo1Event, type CairoAssembly, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallStruct, type Calldata, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, ContractFactory, type ContractFactoryParams, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, CustomError, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransactionReceiptResponse, type Details, EntryPointType, type EntryPointsByType, type EnumAbi, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type EventAbi, type EventEntry, type FeeEstimate, type FunctionAbi, GatewayError, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, HttpError, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeOptions, type InvokeTransactionReceiptResponse, type L1HandlerTransactionReceiptResponse, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type MessageToL1, type MultiDeployContractResponse, type MultiType, type Nonce, type OptionalPayload, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PendingBlock, type PendingStateUpdate, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, index$3 as RPC, rpc_0_6 as RPC06, rpc_0_7 as RPC07, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, ReceiptTx, type RejectedTransactionReceiptResponse, type Result, type RevertedTransactionReceiptResponse, RpcChannel, RpcProvider, type RpcProviderOptions, SIMULATION_FLAG, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type SimulateTransactionDetails, type SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type StructAbi, type SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptUtilityInterface, type TransactionReceiptValue, TransactionStatus, type TransactionStatusReceiptSets, TransactionType, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, type WeierstrassSignatureType, addAddressPadding, buildUrl, byteArray, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, type getSimulateTransactionOptions, index$1 as hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, connect as wallet };