starknet 6.7.0 → 6.9.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 +30 -0
- package/README.md +2 -0
- package/dist/index.d.ts +1064 -1420
- package/dist/index.global.js +1335 -964
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +529 -518
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +512 -489
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters,
|
|
3
|
-
export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types';
|
|
1
|
+
import * as RPCSPEC07 from 'starknet-types-07';
|
|
2
|
+
import { ETransactionVersion as ETransactionVersion$1, ResourceBounds as ResourceBounds$2, EDataAvailabilityMode as EDataAvailabilityMode$1, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, BlockWithTxReceipts, InvokedTransaction as InvokedTransaction$2, DeclaredTransaction as DeclaredTransaction$2, DeployedAccountTransaction as DeployedAccountTransaction$1, L1Message as L1Message$1, EventFilter as EventFilter$1, SPEC, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, EDAMode as EDAMode$1, Event as Event$1, ChainId as ChainId$1, AddInvokeTransactionParameters, AddDeclareTransactionParameters } from 'starknet-types-07';
|
|
3
|
+
export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types-07';
|
|
4
4
|
import * as weierstrass from '@noble/curves/abstract/weierstrass';
|
|
5
5
|
import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
|
|
6
6
|
import * as ts_mixer_dist_types_types from 'ts-mixer/dist/types/types';
|
|
@@ -9,557 +9,19 @@ import * as poseidon from '@noble/curves/abstract/poseidon';
|
|
|
9
9
|
import * as json$1 from 'lossless-json';
|
|
10
10
|
import * as starknet from '@scure/starknet';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.
|
|
27
|
-
* @pattern ^0x0[0-7]{1}[a-fA-F0-9]{0,62}$
|
|
28
|
-
*/
|
|
29
|
-
type STORAGE_KEY$1 = string;
|
|
30
|
-
type ADDRESS$1 = FELT$2;
|
|
31
|
-
type NUM_AS_HEX$1 = string;
|
|
32
|
-
/**
|
|
33
|
-
* 64 bit integers, represented by hex string of length at most 16
|
|
34
|
-
* "pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,15})$"
|
|
35
|
-
*/
|
|
36
|
-
type u64$1 = string;
|
|
37
|
-
/**
|
|
38
|
-
* 64 bit integers, represented by hex string of length at most 32
|
|
39
|
-
* "pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,31})$"
|
|
40
|
-
*/
|
|
41
|
-
type u128$1 = string;
|
|
42
|
-
type SIGNATURE$1 = Array<FELT$2>;
|
|
43
|
-
type BLOCK_NUMBER$2 = number;
|
|
44
|
-
type BLOCK_HASH$2 = FELT$2;
|
|
45
|
-
type TXN_HASH$2 = FELT$2;
|
|
46
|
-
type CHAIN_ID$1 = NUM_AS_HEX$1;
|
|
47
|
-
type STRUCT_ABI_TYPE$1 = 'struct';
|
|
48
|
-
type EVENT_ABI_TYPE$1 = 'event';
|
|
49
|
-
type FUNCTION_ABI_TYPE$1 = 'function' | 'l1_handler' | 'constructor';
|
|
50
|
-
type ENTRY_POINT_TYPE$1 = 'EXTERNAL' | 'L1_HANDLER' | 'CONSTRUCTOR';
|
|
51
|
-
type CALL_TYPE$1 = 'DELEGATE' | 'LIBRARY_CALL' | 'CALL';
|
|
52
|
-
type TXN_STATUS$1 = 'RECEIVED' | 'REJECTED' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
53
|
-
type SIMULATION_FLAG$3 = 'SKIP_VALIDATE' | 'SKIP_FEE_CHARGE';
|
|
54
|
-
type DA_MODE$1 = 'L1' | 'L2';
|
|
55
|
-
type TXN_TYPE$1 = 'DECLARE' | 'DEPLOY' | 'DEPLOY_ACCOUNT' | 'INVOKE' | 'L1_HANDLER';
|
|
56
|
-
type TXN_FINALITY_STATUS$1 = 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
57
|
-
type TXN_EXECUTION_STATUS$1 = 'SUCCEEDED' | 'REVERTED';
|
|
58
|
-
type BLOCK_STATUS$1 = 'PENDING' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1' | 'REJECTED';
|
|
59
|
-
type BLOCK_TAG$1 = 'latest' | 'pending';
|
|
60
|
-
/**
|
|
61
|
-
* READ API
|
|
62
|
-
*/
|
|
63
|
-
type EVENTS_CHUNK$1 = {
|
|
64
|
-
events: EMITTED_EVENT$1[];
|
|
65
|
-
continuation_token?: string;
|
|
66
|
-
};
|
|
67
|
-
type RESULT_PAGE_REQUEST$1 = {
|
|
68
|
-
continuation_token?: string;
|
|
69
|
-
chunk_size: number;
|
|
70
|
-
};
|
|
71
|
-
type EMITTED_EVENT$1 = EVENT$2 & {
|
|
72
|
-
block_hash: BLOCK_HASH$2;
|
|
73
|
-
block_number: BLOCK_NUMBER$2;
|
|
74
|
-
transaction_hash: TXN_HASH$2;
|
|
75
|
-
};
|
|
76
|
-
type EVENT$2 = {
|
|
77
|
-
from_address: ADDRESS$1;
|
|
78
|
-
} & EVENT_CONTENT$1;
|
|
79
|
-
type EVENT_CONTENT$1 = {
|
|
80
|
-
keys: FELT$2[];
|
|
81
|
-
data: FELT$2[];
|
|
82
|
-
};
|
|
83
|
-
type EVENT_FILTER$1 = {
|
|
84
|
-
from_block?: BLOCK_ID$1;
|
|
85
|
-
to_block?: BLOCK_ID$1;
|
|
86
|
-
address?: ADDRESS$1;
|
|
87
|
-
keys?: FELT$2[][];
|
|
88
|
-
};
|
|
89
|
-
type BLOCK_ID$1 = {
|
|
90
|
-
block_hash?: BLOCK_HASH$2;
|
|
91
|
-
block_number?: BLOCK_NUMBER$2;
|
|
92
|
-
} | BLOCK_TAG$1;
|
|
93
|
-
type SYNC_STATUS$1 = {
|
|
94
|
-
starting_block_hash: BLOCK_HASH$2;
|
|
95
|
-
starting_block_num: BLOCK_NUMBER$2;
|
|
96
|
-
current_block_hash: BLOCK_HASH$2;
|
|
97
|
-
current_block_num: BLOCK_NUMBER$2;
|
|
98
|
-
highest_block_hash: BLOCK_HASH$2;
|
|
99
|
-
highest_block_num: BLOCK_NUMBER$2;
|
|
100
|
-
};
|
|
101
|
-
type NEW_CLASSES$1 = {
|
|
102
|
-
class_hash: FELT$2;
|
|
103
|
-
compiled_class_hash: FELT$2;
|
|
104
|
-
};
|
|
105
|
-
type REPLACED_CLASS$1 = {
|
|
106
|
-
class_hash: FELT$2;
|
|
107
|
-
contract_address: FELT$2;
|
|
108
|
-
};
|
|
109
|
-
type NONCE_UPDATE$1 = {
|
|
110
|
-
contract_address: ADDRESS$1;
|
|
111
|
-
nonce: FELT$2;
|
|
112
|
-
};
|
|
113
|
-
type STATE_DIFF$1 = {
|
|
114
|
-
storage_diffs: CONTRACT_STORAGE_DIFF_ITEM$1[];
|
|
115
|
-
deprecated_declared_classes: FELT$2[];
|
|
116
|
-
declared_classes: NEW_CLASSES$1[];
|
|
117
|
-
deployed_contracts: DEPLOYED_CONTRACT_ITEM$1[];
|
|
118
|
-
replaced_classes: REPLACED_CLASS$1[];
|
|
119
|
-
nonces: NONCE_UPDATE$1[];
|
|
120
|
-
};
|
|
121
|
-
type PENDING_STATE_UPDATE$2 = {
|
|
122
|
-
old_root: FELT$2;
|
|
123
|
-
state_diff: STATE_DIFF$1;
|
|
124
|
-
block_hash: never;
|
|
125
|
-
};
|
|
126
|
-
type STATE_UPDATE$2 = {
|
|
127
|
-
block_hash: BLOCK_HASH$2;
|
|
128
|
-
old_root: FELT$2;
|
|
129
|
-
new_root: FELT$2;
|
|
130
|
-
state_diff: STATE_DIFF$1;
|
|
131
|
-
};
|
|
132
|
-
type BLOCK_BODY_WITH_TX_HASHES$1 = {
|
|
133
|
-
transactions: TXN_HASH$2[];
|
|
134
|
-
};
|
|
135
|
-
type BLOCK_BODY_WITH_TXS$1 = {
|
|
136
|
-
transactions: (TXN$1 & {
|
|
137
|
-
transaction_hash: TXN_HASH$2;
|
|
138
|
-
})[];
|
|
139
|
-
};
|
|
140
|
-
type BLOCK_BODY_WITH_RECEIPTS = {
|
|
141
|
-
transactions: {
|
|
142
|
-
transaction: TXN$1;
|
|
143
|
-
receipt: TXN_RECEIPT$1;
|
|
144
|
-
}[];
|
|
145
|
-
};
|
|
146
|
-
type BLOCK_HEADER$1 = {
|
|
147
|
-
block_hash: BLOCK_HASH$2;
|
|
148
|
-
parent_hash: BLOCK_HASH$2;
|
|
149
|
-
block_number: BLOCK_NUMBER$2;
|
|
150
|
-
new_root: FELT$2;
|
|
151
|
-
timestamp: number;
|
|
152
|
-
sequencer_address: FELT$2;
|
|
153
|
-
l1_gas_price: RESOURCE_PRICE$2;
|
|
154
|
-
l1_data_gas_price: RESOURCE_PRICE$2;
|
|
155
|
-
l1_da_mode: 'BLOB' | 'CALLDATA';
|
|
156
|
-
starknet_version: string;
|
|
157
|
-
};
|
|
158
|
-
type PENDING_BLOCK_HEADER$1 = {
|
|
159
|
-
parent_hash: BLOCK_HASH$2;
|
|
160
|
-
timestamp: number;
|
|
161
|
-
sequencer_address: FELT$2;
|
|
162
|
-
l1_gas_price: RESOURCE_PRICE$2;
|
|
163
|
-
l1_data_gas_price: RESOURCE_PRICE$2;
|
|
164
|
-
l1_da_mode: 'BLOB' | 'CALLDATA';
|
|
165
|
-
starknet_version: string;
|
|
166
|
-
};
|
|
167
|
-
type BLOCK_WITH_TX_HASHES$1 = {
|
|
168
|
-
status: BLOCK_STATUS$1;
|
|
169
|
-
} & BLOCK_HEADER$1 & BLOCK_BODY_WITH_TX_HASHES$1;
|
|
170
|
-
type BLOCK_WITH_TXS$1 = {
|
|
171
|
-
status: BLOCK_STATUS$1;
|
|
172
|
-
} & BLOCK_HEADER$1 & BLOCK_BODY_WITH_TXS$1;
|
|
173
|
-
type BLOCK_WITH_RECEIPTS = {
|
|
174
|
-
status: BLOCK_STATUS$1;
|
|
175
|
-
} & BLOCK_HEADER$1 & BLOCK_BODY_WITH_RECEIPTS;
|
|
176
|
-
type PENDING_BLOCK_WITH_TX_HASHES$1 = BLOCK_BODY_WITH_TX_HASHES$1 & PENDING_BLOCK_HEADER$1;
|
|
177
|
-
type PENDING_BLOCK_WITH_TXS$1 = BLOCK_BODY_WITH_TXS$1 & PENDING_BLOCK_HEADER$1;
|
|
178
|
-
type PENDING_BLOCK_WITH_RECEIPTS = BLOCK_BODY_WITH_RECEIPTS & PENDING_BLOCK_HEADER$1;
|
|
179
|
-
type DEPLOYED_CONTRACT_ITEM$1 = {
|
|
180
|
-
address: FELT$2;
|
|
181
|
-
class_hash: FELT$2;
|
|
182
|
-
};
|
|
183
|
-
type CONTRACT_STORAGE_DIFF_ITEM$1 = {
|
|
184
|
-
address: string;
|
|
185
|
-
storage_entries: StorageDiffItem$1[];
|
|
186
|
-
};
|
|
187
|
-
type StorageDiffItem$1 = {
|
|
188
|
-
key: string;
|
|
189
|
-
value: string;
|
|
190
|
-
};
|
|
191
|
-
type TXN$1 = INVOKE_TXN$1 | L1_HANDLER_TXN$1 | DECLARE_TXN$1 | DEPLOY_TXN$1 | DEPLOY_ACCOUNT_TXN$1;
|
|
192
|
-
type DECLARE_TXN$1 = DECLARE_TXN_V0$1 | DECLARE_TXN_V1$1 | DECLARE_TXN_V2$1 | DECLARE_TXN_V3$1;
|
|
193
|
-
type DECLARE_TXN_V0$1 = {
|
|
194
|
-
type: 'DECLARE';
|
|
195
|
-
sender_address: ADDRESS$1;
|
|
196
|
-
max_fee: FELT$2;
|
|
197
|
-
version: '0x0' | '0x100000000000000000000000000000000';
|
|
198
|
-
signature: SIGNATURE$1;
|
|
199
|
-
class_hash: FELT$2;
|
|
200
|
-
};
|
|
201
|
-
type DECLARE_TXN_V1$1 = {
|
|
202
|
-
type: 'DECLARE';
|
|
203
|
-
sender_address: ADDRESS$1;
|
|
204
|
-
max_fee: FELT$2;
|
|
205
|
-
version: '0x1' | '0x100000000000000000000000000000001';
|
|
206
|
-
signature: SIGNATURE$1;
|
|
207
|
-
nonce: FELT$2;
|
|
208
|
-
class_hash: FELT$2;
|
|
209
|
-
};
|
|
210
|
-
type DECLARE_TXN_V2$1 = {
|
|
211
|
-
type: 'DECLARE';
|
|
212
|
-
sender_address: ADDRESS$1;
|
|
213
|
-
compiled_class_hash: FELT$2;
|
|
214
|
-
max_fee: FELT$2;
|
|
215
|
-
version: '0x2' | '0x100000000000000000000000000000002';
|
|
216
|
-
signature: SIGNATURE$1;
|
|
217
|
-
nonce: FELT$2;
|
|
218
|
-
class_hash: FELT$2;
|
|
219
|
-
};
|
|
220
|
-
type DECLARE_TXN_V3$1 = {
|
|
221
|
-
type: 'DECLARE';
|
|
222
|
-
sender_address: ADDRESS$1;
|
|
223
|
-
compiled_class_hash: FELT$2;
|
|
224
|
-
version: '0x3' | '0x100000000000000000000000000000003';
|
|
225
|
-
signature: SIGNATURE$1;
|
|
226
|
-
nonce: FELT$2;
|
|
227
|
-
class_hash: FELT$2;
|
|
228
|
-
resource_bounds: RESOURCE_BOUNDS_MAPPING$1;
|
|
229
|
-
tip: u64$1;
|
|
230
|
-
paymaster_data: FELT$2[];
|
|
231
|
-
account_deployment_data: FELT$2[];
|
|
232
|
-
nonce_data_availability_mode: DA_MODE$1;
|
|
233
|
-
fee_data_availability_mode: DA_MODE$1;
|
|
234
|
-
};
|
|
235
|
-
type BROADCASTED_TXN$1 = BROADCASTED_INVOKE_TXN$1 | BROADCASTED_DECLARE_TXN$1 | BROADCASTED_DEPLOY_ACCOUNT_TXN$1;
|
|
236
|
-
type BROADCASTED_INVOKE_TXN$1 = INVOKE_TXN$1;
|
|
237
|
-
type BROADCASTED_DEPLOY_ACCOUNT_TXN$1 = DEPLOY_ACCOUNT_TXN$1;
|
|
238
|
-
type BROADCASTED_DECLARE_TXN$1 = BROADCASTED_DECLARE_TXN_V1$1 | BROADCASTED_DECLARE_TXN_V2$1 | BROADCASTED_DECLARE_TXN_V3$1;
|
|
239
|
-
type BROADCASTED_DECLARE_TXN_V1$1 = {
|
|
240
|
-
type: 'DECLARE';
|
|
241
|
-
sender_address: ADDRESS$1;
|
|
242
|
-
max_fee: FELT$2;
|
|
243
|
-
version: '0x1' | '0x100000000000000000000000000000001';
|
|
244
|
-
signature: SIGNATURE$1;
|
|
245
|
-
nonce: FELT$2;
|
|
246
|
-
contract_class: DEPRECATED_CONTRACT_CLASS$1;
|
|
247
|
-
};
|
|
248
|
-
type BROADCASTED_DECLARE_TXN_V2$1 = {
|
|
249
|
-
type: 'DECLARE';
|
|
250
|
-
sender_address: ADDRESS$1;
|
|
251
|
-
compiled_class_hash: FELT$2;
|
|
252
|
-
max_fee: FELT$2;
|
|
253
|
-
version: '0x2' | '0x100000000000000000000000000000002';
|
|
254
|
-
signature: SIGNATURE$1;
|
|
255
|
-
nonce: FELT$2;
|
|
256
|
-
contract_class: CONTRACT_CLASS$1;
|
|
257
|
-
};
|
|
258
|
-
type BROADCASTED_DECLARE_TXN_V3$1 = {
|
|
259
|
-
type: 'DECLARE';
|
|
260
|
-
sender_address: ADDRESS$1;
|
|
261
|
-
compiled_class_hash: FELT$2;
|
|
262
|
-
version: '0x3' | '0x100000000000000000000000000000003';
|
|
263
|
-
signature: SIGNATURE$1;
|
|
264
|
-
nonce: FELT$2;
|
|
265
|
-
contract_class: CONTRACT_CLASS$1;
|
|
266
|
-
resource_bounds: RESOURCE_BOUNDS_MAPPING$1;
|
|
267
|
-
tip: u64$1;
|
|
268
|
-
paymaster_data: FELT$2[];
|
|
269
|
-
account_deployment_data: FELT$2[];
|
|
270
|
-
nonce_data_availability_mode: DA_MODE$1;
|
|
271
|
-
fee_data_availability_mode: DA_MODE$1;
|
|
272
|
-
};
|
|
273
|
-
type DEPLOY_ACCOUNT_TXN$1 = DEPLOY_ACCOUNT_TXN_V1$1 | DEPLOY_ACCOUNT_TXN_V3$1;
|
|
274
|
-
type DEPLOY_ACCOUNT_TXN_V1$1 = {
|
|
275
|
-
type: 'DEPLOY_ACCOUNT';
|
|
276
|
-
max_fee: FELT$2;
|
|
277
|
-
version: '0x1' | '0x100000000000000000000000000000001';
|
|
278
|
-
signature: SIGNATURE$1;
|
|
279
|
-
nonce: FELT$2;
|
|
280
|
-
contract_address_salt: FELT$2;
|
|
281
|
-
constructor_calldata: FELT$2[];
|
|
282
|
-
class_hash: FELT$2;
|
|
283
|
-
};
|
|
284
|
-
type DEPLOY_ACCOUNT_TXN_V3$1 = {
|
|
285
|
-
type: 'DEPLOY_ACCOUNT';
|
|
286
|
-
version: '0x3' | '0x100000000000000000000000000000003';
|
|
287
|
-
signature: SIGNATURE$1;
|
|
288
|
-
nonce: FELT$2;
|
|
289
|
-
contract_address_salt: FELT$2;
|
|
290
|
-
constructor_calldata: FELT$2[];
|
|
291
|
-
class_hash: FELT$2;
|
|
292
|
-
resource_bounds: RESOURCE_BOUNDS_MAPPING$1;
|
|
293
|
-
tip: u64$1;
|
|
294
|
-
paymaster_data: FELT$2[];
|
|
295
|
-
nonce_data_availability_mode: DA_MODE$1;
|
|
296
|
-
fee_data_availability_mode: DA_MODE$1;
|
|
297
|
-
};
|
|
298
|
-
type DEPLOY_TXN$1 = {
|
|
299
|
-
type: 'DEPLOY';
|
|
300
|
-
version: FELT$2;
|
|
301
|
-
contract_address_salt: FELT$2;
|
|
302
|
-
constructor_calldata: FELT$2[];
|
|
303
|
-
class_hash: FELT$2;
|
|
304
|
-
};
|
|
305
|
-
type INVOKE_TXN$1 = INVOKE_TXN_V0$1 | INVOKE_TXN_V1$1 | INVOKE_TXN_V3$1;
|
|
306
|
-
type INVOKE_TXN_V0$1 = {
|
|
307
|
-
type: 'INVOKE';
|
|
308
|
-
max_fee: FELT$2;
|
|
309
|
-
version: '0x0' | '0x100000000000000000000000000000000';
|
|
310
|
-
signature: SIGNATURE$1;
|
|
311
|
-
contract_address: ADDRESS$1;
|
|
312
|
-
entry_point_selector: FELT$2;
|
|
313
|
-
calldata: FELT$2[];
|
|
314
|
-
};
|
|
315
|
-
type INVOKE_TXN_V1$1 = {
|
|
316
|
-
type: 'INVOKE';
|
|
317
|
-
sender_address: ADDRESS$1;
|
|
318
|
-
calldata: FELT$2[];
|
|
319
|
-
max_fee: FELT$2;
|
|
320
|
-
version: '0x1' | '0x100000000000000000000000000000001';
|
|
321
|
-
signature: SIGNATURE$1;
|
|
322
|
-
nonce: FELT$2;
|
|
323
|
-
};
|
|
324
|
-
type INVOKE_TXN_V3$1 = {
|
|
325
|
-
type: 'INVOKE';
|
|
326
|
-
sender_address: ADDRESS$1;
|
|
327
|
-
calldata: FELT$2[];
|
|
328
|
-
version: '0x3' | '0x100000000000000000000000000000003';
|
|
329
|
-
signature: SIGNATURE$1;
|
|
330
|
-
nonce: FELT$2;
|
|
331
|
-
resource_bounds: RESOURCE_BOUNDS_MAPPING$1;
|
|
332
|
-
tip: u64$1;
|
|
333
|
-
paymaster_data: FELT$2[];
|
|
334
|
-
account_deployment_data: FELT$2[];
|
|
335
|
-
nonce_data_availability_mode: DA_MODE$1;
|
|
336
|
-
fee_data_availability_mode: DA_MODE$1;
|
|
337
|
-
};
|
|
338
|
-
type L1_HANDLER_TXN$1 = {
|
|
339
|
-
version: '0x0';
|
|
340
|
-
type: 'L1_HANDLER';
|
|
341
|
-
nonce: NUM_AS_HEX$1;
|
|
342
|
-
} & FUNCTION_CALL$1;
|
|
343
|
-
type COMMON_RECEIPT_PROPERTIES$1 = {
|
|
344
|
-
transaction_hash: TXN_HASH$2;
|
|
345
|
-
actual_fee: FEE_PAYMENT$1;
|
|
346
|
-
execution_status: TXN_EXECUTION_STATUS$1;
|
|
347
|
-
finality_status: TXN_FINALITY_STATUS$1;
|
|
348
|
-
messages_sent: MSG_TO_L1$1[];
|
|
349
|
-
revert_reason?: string;
|
|
350
|
-
events: EVENT$2[];
|
|
351
|
-
execution_resources: EXECUTION_RESOURCES$1;
|
|
352
|
-
};
|
|
353
|
-
type INVOKE_TXN_RECEIPT$2 = {
|
|
354
|
-
type: 'INVOKE';
|
|
355
|
-
} & COMMON_RECEIPT_PROPERTIES$1;
|
|
356
|
-
type DECLARE_TXN_RECEIPT$2 = {
|
|
357
|
-
type: 'DECLARE';
|
|
358
|
-
} & COMMON_RECEIPT_PROPERTIES$1;
|
|
359
|
-
type DEPLOY_ACCOUNT_TXN_RECEIPT$2 = {
|
|
360
|
-
type: 'DEPLOY_ACCOUNT';
|
|
361
|
-
contract_address: FELT$2;
|
|
362
|
-
} & COMMON_RECEIPT_PROPERTIES$1;
|
|
363
|
-
type DEPLOY_TXN_RECEIPT$1 = {
|
|
364
|
-
type: 'DEPLOY';
|
|
365
|
-
contract_address: FELT$2;
|
|
366
|
-
} & COMMON_RECEIPT_PROPERTIES$1;
|
|
367
|
-
type L1_HANDLER_TXN_RECEIPT$2 = {
|
|
368
|
-
type: 'L1_HANDLER';
|
|
369
|
-
message_hash: NUM_AS_HEX$1;
|
|
370
|
-
} & COMMON_RECEIPT_PROPERTIES$1;
|
|
371
|
-
type TXN_RECEIPT$1 = INVOKE_TXN_RECEIPT$2 | L1_HANDLER_TXN_RECEIPT$2 | DECLARE_TXN_RECEIPT$2 | DEPLOY_TXN_RECEIPT$1 | DEPLOY_ACCOUNT_TXN_RECEIPT$2;
|
|
372
|
-
type TXN_RECEIPT_WITH_BLOCK_INFO = TXN_RECEIPT$1 & {
|
|
373
|
-
block_hash?: BLOCK_HASH$2;
|
|
374
|
-
block_number?: BLOCK_NUMBER$2;
|
|
375
|
-
};
|
|
376
|
-
type MSG_TO_L1$1 = {
|
|
377
|
-
from_address: FELT$2;
|
|
378
|
-
to_address: FELT$2;
|
|
379
|
-
payload: FELT$2[];
|
|
380
|
-
};
|
|
381
|
-
type MSG_FROM_L1$1 = {
|
|
382
|
-
from_address: ETH_ADDRESS$1;
|
|
383
|
-
to_address: ADDRESS$1;
|
|
384
|
-
entry_point_selector: FELT$2;
|
|
385
|
-
payload: FELT$2[];
|
|
386
|
-
};
|
|
387
|
-
type FUNCTION_CALL$1 = {
|
|
388
|
-
contract_address: ADDRESS$1;
|
|
389
|
-
entry_point_selector: FELT$2;
|
|
390
|
-
calldata: FELT$2[];
|
|
391
|
-
};
|
|
392
|
-
type CONTRACT_CLASS$1 = {
|
|
393
|
-
sierra_program: FELT$2[];
|
|
394
|
-
contract_class_version: string;
|
|
395
|
-
entry_points_by_type: {
|
|
396
|
-
CONSTRUCTOR: SIERRA_ENTRY_POINT$1[];
|
|
397
|
-
EXTERNAL: SIERRA_ENTRY_POINT$1[];
|
|
398
|
-
L1_HANDLER: SIERRA_ENTRY_POINT$1[];
|
|
399
|
-
};
|
|
400
|
-
abi: string;
|
|
401
|
-
};
|
|
402
|
-
type DEPRECATED_CONTRACT_CLASS$1 = {
|
|
403
|
-
program: string;
|
|
404
|
-
entry_points_by_type: {
|
|
405
|
-
CONSTRUCTOR: DEPRECATED_CAIRO_ENTRY_POINT$1[];
|
|
406
|
-
EXTERNAL: DEPRECATED_CAIRO_ENTRY_POINT$1[];
|
|
407
|
-
L1_HANDLER: DEPRECATED_CAIRO_ENTRY_POINT$1[];
|
|
408
|
-
};
|
|
409
|
-
abi: CONTRACT_ABI$1;
|
|
410
|
-
};
|
|
411
|
-
type DEPRECATED_CAIRO_ENTRY_POINT$1 = {
|
|
412
|
-
offset: NUM_AS_HEX$1 | number;
|
|
413
|
-
selector: FELT$2;
|
|
414
|
-
};
|
|
415
|
-
type SIERRA_ENTRY_POINT$1 = {
|
|
416
|
-
selector: FELT$2;
|
|
417
|
-
function_idx: number;
|
|
418
|
-
};
|
|
419
|
-
type CONTRACT_ABI$1 = readonly CONTRACT_ABI_ENTRY$1[];
|
|
420
|
-
type CONTRACT_ABI_ENTRY$1 = {
|
|
421
|
-
selector: FELT$2;
|
|
422
|
-
input: string;
|
|
423
|
-
output: string;
|
|
424
|
-
};
|
|
425
|
-
type STRUCT_ABI_ENTRY$1 = {
|
|
426
|
-
type: STRUCT_ABI_TYPE$1;
|
|
427
|
-
name: string;
|
|
428
|
-
size: number;
|
|
429
|
-
members: STRUCT_MEMBER$1[];
|
|
430
|
-
};
|
|
431
|
-
type STRUCT_MEMBER$1 = TYPED_PARAMETER$1 & {
|
|
432
|
-
offset: number;
|
|
433
|
-
};
|
|
434
|
-
type EVENT_ABI_ENTRY$1 = {
|
|
435
|
-
type: EVENT_ABI_TYPE$1;
|
|
436
|
-
name: string;
|
|
437
|
-
keys: TYPED_PARAMETER$1[];
|
|
438
|
-
data: TYPED_PARAMETER$1[];
|
|
439
|
-
};
|
|
440
|
-
type FUNCTION_STATE_MUTABILITY$1 = 'view';
|
|
441
|
-
type FUNCTION_ABI_ENTRY$1 = {
|
|
442
|
-
type: FUNCTION_ABI_TYPE$1;
|
|
443
|
-
name: string;
|
|
444
|
-
inputs: TYPED_PARAMETER$1[];
|
|
445
|
-
outputs: TYPED_PARAMETER$1[];
|
|
446
|
-
stateMutability: FUNCTION_STATE_MUTABILITY$1;
|
|
447
|
-
};
|
|
448
|
-
type TYPED_PARAMETER$1 = {
|
|
449
|
-
name: string;
|
|
450
|
-
type: string;
|
|
451
|
-
};
|
|
452
|
-
type SIMULATION_FLAG_FOR_ESTIMATE_FEE$1 = 'SKIP_VALIDATE';
|
|
453
|
-
type PRICE_UNIT$2 = 'WEI' | 'FRI';
|
|
454
|
-
type FEE_ESTIMATE$1 = {
|
|
455
|
-
gas_consumed: FELT$2;
|
|
456
|
-
gas_price: FELT$2;
|
|
457
|
-
data_gas_consumed: FELT$2;
|
|
458
|
-
data_gas_price: FELT$2;
|
|
459
|
-
overall_fee: FELT$2;
|
|
460
|
-
unit: PRICE_UNIT$2;
|
|
461
|
-
};
|
|
462
|
-
type FEE_PAYMENT$1 = {
|
|
463
|
-
amount: FELT$2;
|
|
464
|
-
unit: PRICE_UNIT$2;
|
|
465
|
-
};
|
|
466
|
-
type RESOURCE_BOUNDS_MAPPING$1 = {
|
|
467
|
-
l1_gas: RESOURCE_BOUNDS$1;
|
|
468
|
-
l2_gas: RESOURCE_BOUNDS$1;
|
|
469
|
-
};
|
|
470
|
-
type RESOURCE_BOUNDS$1 = {
|
|
471
|
-
max_amount: u64$1;
|
|
472
|
-
max_price_per_unit: u128$1;
|
|
473
|
-
};
|
|
474
|
-
type RESOURCE_PRICE$2 = {
|
|
475
|
-
price_in_fri: FELT$2;
|
|
476
|
-
price_in_wei: FELT$2;
|
|
477
|
-
};
|
|
478
|
-
type COMPUTATION_RESOURCES = {
|
|
479
|
-
steps: number;
|
|
480
|
-
memory_holes?: number;
|
|
481
|
-
range_check_builtin_applications?: number;
|
|
482
|
-
pedersen_builtin_applications?: number;
|
|
483
|
-
poseidon_builtin_applications?: number;
|
|
484
|
-
ec_op_builtin_applications?: number;
|
|
485
|
-
ecdsa_builtin_applications?: number;
|
|
486
|
-
bitwise_builtin_applications?: number;
|
|
487
|
-
keccak_builtin_applications?: number;
|
|
488
|
-
segment_arena_builtin?: number;
|
|
489
|
-
};
|
|
490
|
-
type EXECUTION_RESOURCES$1 = COMPUTATION_RESOURCES & {
|
|
491
|
-
data_availability: {
|
|
492
|
-
l1_gas: number;
|
|
493
|
-
l1_data_gas: number;
|
|
494
|
-
};
|
|
495
|
-
};
|
|
496
|
-
/**
|
|
497
|
-
* TRACE API
|
|
498
|
-
*/
|
|
499
|
-
type TRANSACTION_TRACE$1 = {
|
|
500
|
-
invoke_tx_trace?: INVOKE_TXN_TRACE$1;
|
|
501
|
-
declare_tx_trace?: DECLARE_TXN_TRACE$1;
|
|
502
|
-
deploy_account_tx_trace?: DEPLOY_ACCOUNT_TXN_TRACE$1;
|
|
503
|
-
l1_handler_tx_trace?: L1_HANDLER_TXN_TRACE$1;
|
|
504
|
-
};
|
|
505
|
-
type INVOKE_TXN_TRACE$1 = {
|
|
506
|
-
type: 'INVOKE';
|
|
507
|
-
execute_invocation: FUNCTION_INVOCATION$1 | {
|
|
508
|
-
revert_reason: string;
|
|
509
|
-
};
|
|
510
|
-
validate_invocation?: FUNCTION_INVOCATION$1;
|
|
511
|
-
fee_transfer_invocation?: FUNCTION_INVOCATION$1;
|
|
512
|
-
state_diff?: STATE_DIFF$1;
|
|
513
|
-
execution_resources: EXECUTION_RESOURCES$1;
|
|
514
|
-
};
|
|
515
|
-
type DECLARE_TXN_TRACE$1 = {
|
|
516
|
-
type: 'DECLARE';
|
|
517
|
-
validate_invocation?: FUNCTION_INVOCATION$1;
|
|
518
|
-
fee_transfer_invocation?: FUNCTION_INVOCATION$1;
|
|
519
|
-
state_diff?: STATE_DIFF$1;
|
|
520
|
-
execution_resources: EXECUTION_RESOURCES$1;
|
|
521
|
-
};
|
|
522
|
-
type DEPLOY_ACCOUNT_TXN_TRACE$1 = {
|
|
523
|
-
type: 'DEPLOY_ACCOUNT';
|
|
524
|
-
constructor_invocation: FUNCTION_INVOCATION$1;
|
|
525
|
-
validate_invocation?: FUNCTION_INVOCATION$1;
|
|
526
|
-
fee_transfer_invocation?: FUNCTION_INVOCATION$1;
|
|
527
|
-
state_diff?: STATE_DIFF$1;
|
|
528
|
-
execution_resources: EXECUTION_RESOURCES$1;
|
|
529
|
-
};
|
|
530
|
-
type L1_HANDLER_TXN_TRACE$1 = {
|
|
531
|
-
type: 'L1_HANDLER';
|
|
532
|
-
function_invocation: FUNCTION_INVOCATION$1;
|
|
533
|
-
state_diff?: STATE_DIFF$1;
|
|
534
|
-
};
|
|
535
|
-
type NESTED_CALL$1 = FUNCTION_INVOCATION$1;
|
|
536
|
-
type FUNCTION_INVOCATION$1 = FUNCTION_CALL$1 & {
|
|
537
|
-
caller_address: string;
|
|
538
|
-
class_hash: string;
|
|
539
|
-
entry_point_type: ENTRY_POINT_TYPE$1;
|
|
540
|
-
call_type: CALL_TYPE$1;
|
|
541
|
-
result: string[];
|
|
542
|
-
calls: NESTED_CALL$1[];
|
|
543
|
-
events: ORDERED_EVENT$1[];
|
|
544
|
-
messages: ORDERED_MESSAGE$1[];
|
|
545
|
-
execution_resources: COMPUTATION_RESOURCES;
|
|
546
|
-
};
|
|
547
|
-
type ORDERED_EVENT$1 = {
|
|
548
|
-
order: number;
|
|
549
|
-
event: EVENT$2;
|
|
550
|
-
};
|
|
551
|
-
type ORDERED_MESSAGE$1 = {
|
|
552
|
-
order: number;
|
|
553
|
-
message: MSG_TO_L1$1;
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
type components$1_BLOCK_BODY_WITH_RECEIPTS = BLOCK_BODY_WITH_RECEIPTS;
|
|
557
|
-
type components$1_BLOCK_WITH_RECEIPTS = BLOCK_WITH_RECEIPTS;
|
|
558
|
-
type components$1_COMPUTATION_RESOURCES = COMPUTATION_RESOURCES;
|
|
559
|
-
type components$1_PENDING_BLOCK_WITH_RECEIPTS = PENDING_BLOCK_WITH_RECEIPTS;
|
|
560
|
-
type components$1_TXN_RECEIPT_WITH_BLOCK_INFO = TXN_RECEIPT_WITH_BLOCK_INFO;
|
|
561
|
-
declare namespace components$1 {
|
|
562
|
-
export type { ADDRESS$1 as ADDRESS, components$1_BLOCK_BODY_WITH_RECEIPTS as BLOCK_BODY_WITH_RECEIPTS, BLOCK_BODY_WITH_TXS$1 as BLOCK_BODY_WITH_TXS, BLOCK_BODY_WITH_TX_HASHES$1 as BLOCK_BODY_WITH_TX_HASHES, BLOCK_HASH$2 as BLOCK_HASH, BLOCK_HEADER$1 as BLOCK_HEADER, BLOCK_ID$1 as BLOCK_ID, BLOCK_NUMBER$2 as BLOCK_NUMBER, BLOCK_STATUS$1 as BLOCK_STATUS, BLOCK_TAG$1 as BLOCK_TAG, components$1_BLOCK_WITH_RECEIPTS as BLOCK_WITH_RECEIPTS, BLOCK_WITH_TXS$1 as BLOCK_WITH_TXS, BLOCK_WITH_TX_HASHES$1 as BLOCK_WITH_TX_HASHES, BROADCASTED_DECLARE_TXN$1 as BROADCASTED_DECLARE_TXN, BROADCASTED_DECLARE_TXN_V1$1 as BROADCASTED_DECLARE_TXN_V1, BROADCASTED_DECLARE_TXN_V2$1 as BROADCASTED_DECLARE_TXN_V2, BROADCASTED_DECLARE_TXN_V3$1 as BROADCASTED_DECLARE_TXN_V3, BROADCASTED_DEPLOY_ACCOUNT_TXN$1 as BROADCASTED_DEPLOY_ACCOUNT_TXN, BROADCASTED_INVOKE_TXN$1 as BROADCASTED_INVOKE_TXN, BROADCASTED_TXN$1 as BROADCASTED_TXN, CALL_TYPE$1 as CALL_TYPE, CHAIN_ID$1 as CHAIN_ID, COMMON_RECEIPT_PROPERTIES$1 as COMMON_RECEIPT_PROPERTIES, components$1_COMPUTATION_RESOURCES as COMPUTATION_RESOURCES, CONTRACT_ABI$1 as CONTRACT_ABI, CONTRACT_ABI_ENTRY$1 as CONTRACT_ABI_ENTRY, CONTRACT_CLASS$1 as CONTRACT_CLASS, CONTRACT_STORAGE_DIFF_ITEM$1 as CONTRACT_STORAGE_DIFF_ITEM, DA_MODE$1 as DA_MODE, DECLARE_TXN$1 as DECLARE_TXN, DECLARE_TXN_RECEIPT$2 as DECLARE_TXN_RECEIPT, DECLARE_TXN_TRACE$1 as DECLARE_TXN_TRACE, DECLARE_TXN_V0$1 as DECLARE_TXN_V0, DECLARE_TXN_V1$1 as DECLARE_TXN_V1, DECLARE_TXN_V2$1 as DECLARE_TXN_V2, DECLARE_TXN_V3$1 as DECLARE_TXN_V3, DEPLOYED_CONTRACT_ITEM$1 as DEPLOYED_CONTRACT_ITEM, DEPLOY_ACCOUNT_TXN$1 as DEPLOY_ACCOUNT_TXN, DEPLOY_ACCOUNT_TXN_RECEIPT$2 as DEPLOY_ACCOUNT_TXN_RECEIPT, DEPLOY_ACCOUNT_TXN_TRACE$1 as DEPLOY_ACCOUNT_TXN_TRACE, DEPLOY_ACCOUNT_TXN_V1$1 as DEPLOY_ACCOUNT_TXN_V1, DEPLOY_ACCOUNT_TXN_V3$1 as DEPLOY_ACCOUNT_TXN_V3, DEPLOY_TXN$1 as DEPLOY_TXN, DEPLOY_TXN_RECEIPT$1 as DEPLOY_TXN_RECEIPT, DEPRECATED_CAIRO_ENTRY_POINT$1 as DEPRECATED_CAIRO_ENTRY_POINT, DEPRECATED_CONTRACT_CLASS$1 as DEPRECATED_CONTRACT_CLASS, EMITTED_EVENT$1 as EMITTED_EVENT, ENTRY_POINT_TYPE$1 as ENTRY_POINT_TYPE, ETH_ADDRESS$1 as ETH_ADDRESS, EVENT$2 as EVENT, EVENTS_CHUNK$1 as EVENTS_CHUNK, EVENT_ABI_ENTRY$1 as EVENT_ABI_ENTRY, EVENT_ABI_TYPE$1 as EVENT_ABI_TYPE, EVENT_CONTENT$1 as EVENT_CONTENT, EVENT_FILTER$1 as EVENT_FILTER, EXECUTION_RESOURCES$1 as EXECUTION_RESOURCES, FEE_ESTIMATE$1 as FEE_ESTIMATE, FEE_PAYMENT$1 as FEE_PAYMENT, FELT$2 as FELT, FUNCTION_ABI_ENTRY$1 as FUNCTION_ABI_ENTRY, FUNCTION_ABI_TYPE$1 as FUNCTION_ABI_TYPE, FUNCTION_CALL$1 as FUNCTION_CALL, FUNCTION_INVOCATION$1 as FUNCTION_INVOCATION, FUNCTION_STATE_MUTABILITY$1 as FUNCTION_STATE_MUTABILITY, INVOKE_TXN$1 as INVOKE_TXN, INVOKE_TXN_RECEIPT$2 as INVOKE_TXN_RECEIPT, INVOKE_TXN_TRACE$1 as INVOKE_TXN_TRACE, INVOKE_TXN_V0$1 as INVOKE_TXN_V0, INVOKE_TXN_V1$1 as INVOKE_TXN_V1, INVOKE_TXN_V3$1 as INVOKE_TXN_V3, L1_HANDLER_TXN$1 as L1_HANDLER_TXN, L1_HANDLER_TXN_RECEIPT$2 as L1_HANDLER_TXN_RECEIPT, L1_HANDLER_TXN_TRACE$1 as L1_HANDLER_TXN_TRACE, MSG_FROM_L1$1 as MSG_FROM_L1, MSG_TO_L1$1 as MSG_TO_L1, NESTED_CALL$1 as NESTED_CALL, NEW_CLASSES$1 as NEW_CLASSES, NONCE_UPDATE$1 as NONCE_UPDATE, NUM_AS_HEX$1 as NUM_AS_HEX, ORDERED_EVENT$1 as ORDERED_EVENT, ORDERED_MESSAGE$1 as ORDERED_MESSAGE, PENDING_BLOCK_HEADER$1 as PENDING_BLOCK_HEADER, components$1_PENDING_BLOCK_WITH_RECEIPTS as PENDING_BLOCK_WITH_RECEIPTS, PENDING_BLOCK_WITH_TXS$1 as PENDING_BLOCK_WITH_TXS, PENDING_BLOCK_WITH_TX_HASHES$1 as PENDING_BLOCK_WITH_TX_HASHES, PENDING_STATE_UPDATE$2 as PENDING_STATE_UPDATE, PRICE_UNIT$2 as PRICE_UNIT, REPLACED_CLASS$1 as REPLACED_CLASS, RESOURCE_BOUNDS$1 as RESOURCE_BOUNDS, RESOURCE_BOUNDS_MAPPING$1 as RESOURCE_BOUNDS_MAPPING, RESOURCE_PRICE$2 as RESOURCE_PRICE, RESULT_PAGE_REQUEST$1 as RESULT_PAGE_REQUEST, SIERRA_ENTRY_POINT$1 as SIERRA_ENTRY_POINT, SIGNATURE$1 as SIGNATURE, SIMULATION_FLAG$3 as SIMULATION_FLAG, SIMULATION_FLAG_FOR_ESTIMATE_FEE$1 as SIMULATION_FLAG_FOR_ESTIMATE_FEE, STATE_DIFF$1 as STATE_DIFF, STATE_UPDATE$2 as STATE_UPDATE, STORAGE_KEY$1 as STORAGE_KEY, STRUCT_ABI_ENTRY$1 as STRUCT_ABI_ENTRY, STRUCT_ABI_TYPE$1 as STRUCT_ABI_TYPE, STRUCT_MEMBER$1 as STRUCT_MEMBER, SYNC_STATUS$1 as SYNC_STATUS, StorageDiffItem$1 as StorageDiffItem, TRANSACTION_TRACE$1 as TRANSACTION_TRACE, TXN$1 as TXN, TXN_EXECUTION_STATUS$1 as TXN_EXECUTION_STATUS, TXN_FINALITY_STATUS$1 as TXN_FINALITY_STATUS, TXN_HASH$2 as TXN_HASH, TXN_RECEIPT$1 as TXN_RECEIPT, components$1_TXN_RECEIPT_WITH_BLOCK_INFO as TXN_RECEIPT_WITH_BLOCK_INFO, TXN_STATUS$1 as TXN_STATUS, TXN_TYPE$1 as TXN_TYPE, TYPED_PARAMETER$1 as TYPED_PARAMETER, u128$1 as u128, u64$1 as u64 };
|
|
12
|
+
function _mergeNamespaces(n, m) {
|
|
13
|
+
m.forEach(function (e) {
|
|
14
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default' && !(k in n)) {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
return Object.freeze(n);
|
|
563
25
|
}
|
|
564
26
|
|
|
565
27
|
type RequestBody = {
|
|
@@ -584,12 +46,12 @@ type Error$1 = {
|
|
|
584
46
|
data?: unknown;
|
|
585
47
|
};
|
|
586
48
|
|
|
587
|
-
type index$
|
|
588
|
-
type index$
|
|
589
|
-
type index$
|
|
590
|
-
type index$
|
|
591
|
-
declare namespace index$
|
|
592
|
-
export type { Error$1 as Error, index$
|
|
49
|
+
type index$5_ErrorResponseBody = ErrorResponseBody;
|
|
50
|
+
type index$5_RequestBody = RequestBody;
|
|
51
|
+
type index$5_ResponseBody = ResponseBody;
|
|
52
|
+
type index$5_SuccessResponseBody = SuccessResponseBody;
|
|
53
|
+
declare namespace index$5 {
|
|
54
|
+
export type { Error$1 as Error, index$5_ErrorResponseBody as ErrorResponseBody, index$5_RequestBody as RequestBody, index$5_ResponseBody as ResponseBody, index$5_SuccessResponseBody as SuccessResponseBody };
|
|
593
55
|
}
|
|
594
56
|
|
|
595
57
|
/**
|
|
@@ -633,7 +95,7 @@ type FUNCTION_ABI_TYPE = 'function' | 'l1_handler' | 'constructor';
|
|
|
633
95
|
type ENTRY_POINT_TYPE = 'EXTERNAL' | 'L1_HANDLER' | 'CONSTRUCTOR';
|
|
634
96
|
type CALL_TYPE = 'DELEGATE' | 'LIBRARY_CALL' | 'CALL';
|
|
635
97
|
type TXN_STATUS = 'RECEIVED' | 'REJECTED' | 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
636
|
-
type SIMULATION_FLAG$
|
|
98
|
+
type SIMULATION_FLAG$1 = 'SKIP_VALIDATE' | 'SKIP_FEE_CHARGE';
|
|
637
99
|
type DA_MODE = 'L1' | 'L2';
|
|
638
100
|
type TXN_TYPE = 'DECLARE' | 'DEPLOY' | 'DEPLOY_ACCOUNT' | 'INVOKE' | 'L1_HANDLER';
|
|
639
101
|
type TXN_FINALITY_STATUS = 'ACCEPTED_ON_L2' | 'ACCEPTED_ON_L1';
|
|
@@ -1234,7 +696,7 @@ type components_TYPED_PARAMETER = TYPED_PARAMETER;
|
|
|
1234
696
|
type components_u128 = u128;
|
|
1235
697
|
type components_u64 = u64;
|
|
1236
698
|
declare namespace components {
|
|
1237
|
-
export type { components_ADDRESS as ADDRESS, components_BLOCK_BODY_WITH_TXS as BLOCK_BODY_WITH_TXS, components_BLOCK_BODY_WITH_TX_HASHES as BLOCK_BODY_WITH_TX_HASHES, BLOCK_HASH$1 as BLOCK_HASH, components_BLOCK_HEADER as BLOCK_HEADER, components_BLOCK_ID as BLOCK_ID, BLOCK_NUMBER$1 as BLOCK_NUMBER, components_BLOCK_STATUS as BLOCK_STATUS, components_BLOCK_TAG as BLOCK_TAG, components_BLOCK_WITH_TXS as BLOCK_WITH_TXS, components_BLOCK_WITH_TX_HASHES as BLOCK_WITH_TX_HASHES, components_BROADCASTED_DECLARE_TXN as BROADCASTED_DECLARE_TXN, components_BROADCASTED_DECLARE_TXN_V1 as BROADCASTED_DECLARE_TXN_V1, components_BROADCASTED_DECLARE_TXN_V2 as BROADCASTED_DECLARE_TXN_V2, components_BROADCASTED_DECLARE_TXN_V3 as BROADCASTED_DECLARE_TXN_V3, components_BROADCASTED_DEPLOY_ACCOUNT_TXN as BROADCASTED_DEPLOY_ACCOUNT_TXN, components_BROADCASTED_INVOKE_TXN as BROADCASTED_INVOKE_TXN, components_BROADCASTED_TXN as BROADCASTED_TXN, components_CALL_TYPE as CALL_TYPE, components_CHAIN_ID as CHAIN_ID, components_COMMON_RECEIPT_PROPERTIES as COMMON_RECEIPT_PROPERTIES, components_CONTRACT_ABI as CONTRACT_ABI, components_CONTRACT_ABI_ENTRY as CONTRACT_ABI_ENTRY, components_CONTRACT_CLASS as CONTRACT_CLASS, components_CONTRACT_STORAGE_DIFF_ITEM as CONTRACT_STORAGE_DIFF_ITEM, components_DA_MODE as DA_MODE, components_DECLARE_TXN as DECLARE_TXN, DECLARE_TXN_RECEIPT$1 as DECLARE_TXN_RECEIPT, components_DECLARE_TXN_TRACE as DECLARE_TXN_TRACE, components_DECLARE_TXN_V0 as DECLARE_TXN_V0, components_DECLARE_TXN_V1 as DECLARE_TXN_V1, components_DECLARE_TXN_V2 as DECLARE_TXN_V2, components_DECLARE_TXN_V3 as DECLARE_TXN_V3, components_DEPLOYED_CONTRACT_ITEM as DEPLOYED_CONTRACT_ITEM, components_DEPLOY_ACCOUNT_TXN as DEPLOY_ACCOUNT_TXN, DEPLOY_ACCOUNT_TXN_RECEIPT$1 as DEPLOY_ACCOUNT_TXN_RECEIPT, components_DEPLOY_ACCOUNT_TXN_TRACE as DEPLOY_ACCOUNT_TXN_TRACE, components_DEPLOY_ACCOUNT_TXN_V1 as DEPLOY_ACCOUNT_TXN_V1, components_DEPLOY_ACCOUNT_TXN_V3 as DEPLOY_ACCOUNT_TXN_V3, components_DEPLOY_TXN as DEPLOY_TXN, components_DEPLOY_TXN_RECEIPT as DEPLOY_TXN_RECEIPT, components_DEPRECATED_CAIRO_ENTRY_POINT as DEPRECATED_CAIRO_ENTRY_POINT, components_DEPRECATED_CONTRACT_CLASS as DEPRECATED_CONTRACT_CLASS, components_EMITTED_EVENT as EMITTED_EVENT, components_ENTRY_POINT_TYPE as ENTRY_POINT_TYPE, components_ETH_ADDRESS as ETH_ADDRESS, EVENT$1 as EVENT, components_EVENTS_CHUNK as EVENTS_CHUNK, components_EVENT_ABI_ENTRY as EVENT_ABI_ENTRY, components_EVENT_ABI_TYPE as EVENT_ABI_TYPE, components_EVENT_CONTENT as EVENT_CONTENT, components_EVENT_FILTER as EVENT_FILTER, components_EXECUTION_RESOURCES as EXECUTION_RESOURCES, components_FEE_ESTIMATE as FEE_ESTIMATE, components_FEE_PAYMENT as FEE_PAYMENT, FELT$1 as FELT, components_FUNCTION_ABI_ENTRY as FUNCTION_ABI_ENTRY, components_FUNCTION_ABI_TYPE as FUNCTION_ABI_TYPE, components_FUNCTION_CALL as FUNCTION_CALL, components_FUNCTION_INVOCATION as FUNCTION_INVOCATION, components_FUNCTION_STATE_MUTABILITY as FUNCTION_STATE_MUTABILITY, components_INVOKE_TXN as INVOKE_TXN, INVOKE_TXN_RECEIPT$1 as INVOKE_TXN_RECEIPT, components_INVOKE_TXN_TRACE as INVOKE_TXN_TRACE, components_INVOKE_TXN_V0 as INVOKE_TXN_V0, components_INVOKE_TXN_V1 as INVOKE_TXN_V1, components_INVOKE_TXN_V3 as INVOKE_TXN_V3, components_L1_HANDLER_TXN as L1_HANDLER_TXN, L1_HANDLER_TXN_RECEIPT$1 as L1_HANDLER_TXN_RECEIPT, components_L1_HANDLER_TXN_TRACE as L1_HANDLER_TXN_TRACE, components_MSG_FROM_L1 as MSG_FROM_L1, components_MSG_TO_L1 as MSG_TO_L1, components_NESTED_CALL as NESTED_CALL, components_NEW_CLASSES as NEW_CLASSES, components_NONCE_UPDATE as NONCE_UPDATE, components_NUM_AS_HEX as NUM_AS_HEX, components_ORDERED_EVENT as ORDERED_EVENT, components_ORDERED_MESSAGE as ORDERED_MESSAGE, components_PENDING_BLOCK_HEADER as PENDING_BLOCK_HEADER, components_PENDING_BLOCK_WITH_TXS as PENDING_BLOCK_WITH_TXS, components_PENDING_BLOCK_WITH_TX_HASHES as PENDING_BLOCK_WITH_TX_HASHES, components_PENDING_COMMON_RECEIPT_PROPERTIES as PENDING_COMMON_RECEIPT_PROPERTIES, PENDING_DECLARE_TXN_RECEIPT$1 as PENDING_DECLARE_TXN_RECEIPT, PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT$1 as PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, PENDING_INVOKE_TXN_RECEIPT$1 as PENDING_INVOKE_TXN_RECEIPT, PENDING_L1_HANDLER_TXN_RECEIPT$1 as PENDING_L1_HANDLER_TXN_RECEIPT, PENDING_STATE_UPDATE$1 as PENDING_STATE_UPDATE, components_PENDING_TXN_RECEIPT as PENDING_TXN_RECEIPT, PRICE_UNIT$1 as PRICE_UNIT, components_REPLACED_CLASS as REPLACED_CLASS, components_RESOURCE_BOUNDS as RESOURCE_BOUNDS, components_RESOURCE_BOUNDS_MAPPING as RESOURCE_BOUNDS_MAPPING, RESOURCE_PRICE$1 as RESOURCE_PRICE, components_RESULT_PAGE_REQUEST as RESULT_PAGE_REQUEST, components_SIERRA_ENTRY_POINT as SIERRA_ENTRY_POINT, components_SIGNATURE as SIGNATURE, SIMULATION_FLAG$
|
|
699
|
+
export type { components_ADDRESS as ADDRESS, components_BLOCK_BODY_WITH_TXS as BLOCK_BODY_WITH_TXS, components_BLOCK_BODY_WITH_TX_HASHES as BLOCK_BODY_WITH_TX_HASHES, BLOCK_HASH$1 as BLOCK_HASH, components_BLOCK_HEADER as BLOCK_HEADER, components_BLOCK_ID as BLOCK_ID, BLOCK_NUMBER$1 as BLOCK_NUMBER, components_BLOCK_STATUS as BLOCK_STATUS, components_BLOCK_TAG as BLOCK_TAG, components_BLOCK_WITH_TXS as BLOCK_WITH_TXS, components_BLOCK_WITH_TX_HASHES as BLOCK_WITH_TX_HASHES, components_BROADCASTED_DECLARE_TXN as BROADCASTED_DECLARE_TXN, components_BROADCASTED_DECLARE_TXN_V1 as BROADCASTED_DECLARE_TXN_V1, components_BROADCASTED_DECLARE_TXN_V2 as BROADCASTED_DECLARE_TXN_V2, components_BROADCASTED_DECLARE_TXN_V3 as BROADCASTED_DECLARE_TXN_V3, components_BROADCASTED_DEPLOY_ACCOUNT_TXN as BROADCASTED_DEPLOY_ACCOUNT_TXN, components_BROADCASTED_INVOKE_TXN as BROADCASTED_INVOKE_TXN, components_BROADCASTED_TXN as BROADCASTED_TXN, components_CALL_TYPE as CALL_TYPE, components_CHAIN_ID as CHAIN_ID, components_COMMON_RECEIPT_PROPERTIES as COMMON_RECEIPT_PROPERTIES, components_CONTRACT_ABI as CONTRACT_ABI, components_CONTRACT_ABI_ENTRY as CONTRACT_ABI_ENTRY, components_CONTRACT_CLASS as CONTRACT_CLASS, components_CONTRACT_STORAGE_DIFF_ITEM as CONTRACT_STORAGE_DIFF_ITEM, components_DA_MODE as DA_MODE, components_DECLARE_TXN as DECLARE_TXN, DECLARE_TXN_RECEIPT$1 as DECLARE_TXN_RECEIPT, components_DECLARE_TXN_TRACE as DECLARE_TXN_TRACE, components_DECLARE_TXN_V0 as DECLARE_TXN_V0, components_DECLARE_TXN_V1 as DECLARE_TXN_V1, components_DECLARE_TXN_V2 as DECLARE_TXN_V2, components_DECLARE_TXN_V3 as DECLARE_TXN_V3, components_DEPLOYED_CONTRACT_ITEM as DEPLOYED_CONTRACT_ITEM, components_DEPLOY_ACCOUNT_TXN as DEPLOY_ACCOUNT_TXN, DEPLOY_ACCOUNT_TXN_RECEIPT$1 as DEPLOY_ACCOUNT_TXN_RECEIPT, components_DEPLOY_ACCOUNT_TXN_TRACE as DEPLOY_ACCOUNT_TXN_TRACE, components_DEPLOY_ACCOUNT_TXN_V1 as DEPLOY_ACCOUNT_TXN_V1, components_DEPLOY_ACCOUNT_TXN_V3 as DEPLOY_ACCOUNT_TXN_V3, components_DEPLOY_TXN as DEPLOY_TXN, components_DEPLOY_TXN_RECEIPT as DEPLOY_TXN_RECEIPT, components_DEPRECATED_CAIRO_ENTRY_POINT as DEPRECATED_CAIRO_ENTRY_POINT, components_DEPRECATED_CONTRACT_CLASS as DEPRECATED_CONTRACT_CLASS, components_EMITTED_EVENT as EMITTED_EVENT, components_ENTRY_POINT_TYPE as ENTRY_POINT_TYPE, components_ETH_ADDRESS as ETH_ADDRESS, EVENT$1 as EVENT, components_EVENTS_CHUNK as EVENTS_CHUNK, components_EVENT_ABI_ENTRY as EVENT_ABI_ENTRY, components_EVENT_ABI_TYPE as EVENT_ABI_TYPE, components_EVENT_CONTENT as EVENT_CONTENT, components_EVENT_FILTER as EVENT_FILTER, components_EXECUTION_RESOURCES as EXECUTION_RESOURCES, components_FEE_ESTIMATE as FEE_ESTIMATE, components_FEE_PAYMENT as FEE_PAYMENT, FELT$1 as FELT, components_FUNCTION_ABI_ENTRY as FUNCTION_ABI_ENTRY, components_FUNCTION_ABI_TYPE as FUNCTION_ABI_TYPE, components_FUNCTION_CALL as FUNCTION_CALL, components_FUNCTION_INVOCATION as FUNCTION_INVOCATION, components_FUNCTION_STATE_MUTABILITY as FUNCTION_STATE_MUTABILITY, components_INVOKE_TXN as INVOKE_TXN, INVOKE_TXN_RECEIPT$1 as INVOKE_TXN_RECEIPT, components_INVOKE_TXN_TRACE as INVOKE_TXN_TRACE, components_INVOKE_TXN_V0 as INVOKE_TXN_V0, components_INVOKE_TXN_V1 as INVOKE_TXN_V1, components_INVOKE_TXN_V3 as INVOKE_TXN_V3, components_L1_HANDLER_TXN as L1_HANDLER_TXN, L1_HANDLER_TXN_RECEIPT$1 as L1_HANDLER_TXN_RECEIPT, components_L1_HANDLER_TXN_TRACE as L1_HANDLER_TXN_TRACE, components_MSG_FROM_L1 as MSG_FROM_L1, components_MSG_TO_L1 as MSG_TO_L1, components_NESTED_CALL as NESTED_CALL, components_NEW_CLASSES as NEW_CLASSES, components_NONCE_UPDATE as NONCE_UPDATE, components_NUM_AS_HEX as NUM_AS_HEX, components_ORDERED_EVENT as ORDERED_EVENT, components_ORDERED_MESSAGE as ORDERED_MESSAGE, components_PENDING_BLOCK_HEADER as PENDING_BLOCK_HEADER, components_PENDING_BLOCK_WITH_TXS as PENDING_BLOCK_WITH_TXS, components_PENDING_BLOCK_WITH_TX_HASHES as PENDING_BLOCK_WITH_TX_HASHES, components_PENDING_COMMON_RECEIPT_PROPERTIES as PENDING_COMMON_RECEIPT_PROPERTIES, PENDING_DECLARE_TXN_RECEIPT$1 as PENDING_DECLARE_TXN_RECEIPT, PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT$1 as PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, PENDING_INVOKE_TXN_RECEIPT$1 as PENDING_INVOKE_TXN_RECEIPT, PENDING_L1_HANDLER_TXN_RECEIPT$1 as PENDING_L1_HANDLER_TXN_RECEIPT, PENDING_STATE_UPDATE$1 as PENDING_STATE_UPDATE, components_PENDING_TXN_RECEIPT as PENDING_TXN_RECEIPT, PRICE_UNIT$1 as PRICE_UNIT, components_REPLACED_CLASS as REPLACED_CLASS, components_RESOURCE_BOUNDS as RESOURCE_BOUNDS, components_RESOURCE_BOUNDS_MAPPING as RESOURCE_BOUNDS_MAPPING, RESOURCE_PRICE$1 as RESOURCE_PRICE, components_RESULT_PAGE_REQUEST as RESULT_PAGE_REQUEST, components_SIERRA_ENTRY_POINT as SIERRA_ENTRY_POINT, components_SIGNATURE as SIGNATURE, SIMULATION_FLAG$1 as SIMULATION_FLAG, components_SIMULATION_FLAG_FOR_ESTIMATE_FEE as SIMULATION_FLAG_FOR_ESTIMATE_FEE, components_STATE_DIFF as STATE_DIFF, STATE_UPDATE$1 as STATE_UPDATE, components_STORAGE_KEY as STORAGE_KEY, components_STRUCT_ABI_ENTRY as STRUCT_ABI_ENTRY, components_STRUCT_ABI_TYPE as STRUCT_ABI_TYPE, components_STRUCT_MEMBER as STRUCT_MEMBER, components_SYNC_STATUS as SYNC_STATUS, components_StorageDiffItem as StorageDiffItem, components_TRANSACTION_TRACE as TRANSACTION_TRACE, components_TXN as TXN, components_TXN_EXECUTION_STATUS as TXN_EXECUTION_STATUS, components_TXN_FINALITY_STATUS as TXN_FINALITY_STATUS, TXN_HASH$1 as TXN_HASH, components_TXN_RECEIPT as TXN_RECEIPT, components_TXN_STATUS as TXN_STATUS, components_TXN_TYPE as TXN_TYPE, components_TYPED_PARAMETER as TYPED_PARAMETER, components_u128 as u128, components_u64 as u64 };
|
|
1238
700
|
}
|
|
1239
701
|
|
|
1240
702
|
interface FAILED_TO_RECEIVE_TXN {
|
|
@@ -1336,501 +798,34 @@ interface COMPILATION_FAILED {
|
|
|
1336
798
|
code: 56;
|
|
1337
799
|
message: 'Compilation failed';
|
|
1338
800
|
}
|
|
1339
|
-
interface CONTRACT_CLASS_SIZE_IS_TOO_LARGE {
|
|
1340
|
-
code: 57;
|
|
1341
|
-
message: 'Contract class size it too large';
|
|
1342
|
-
}
|
|
1343
|
-
interface NON_ACCOUNT {
|
|
1344
|
-
code: 58;
|
|
1345
|
-
message: 'Sender address in not an account contract';
|
|
1346
|
-
}
|
|
1347
|
-
interface DUPLICATE_TX {
|
|
1348
|
-
code: 59;
|
|
1349
|
-
message: 'A transaction with the same hash already exists in the mempool';
|
|
1350
|
-
}
|
|
1351
|
-
interface COMPILED_CLASS_HASH_MISMATCH {
|
|
1352
|
-
code: 60;
|
|
1353
|
-
message: 'the compiled class hash did not match the one supplied in the transaction';
|
|
1354
|
-
}
|
|
1355
|
-
interface UNSUPPORTED_TX_VERSION {
|
|
1356
|
-
code: 61;
|
|
1357
|
-
message: 'the transaction version is not supported';
|
|
1358
|
-
}
|
|
1359
|
-
interface UNSUPPORTED_CONTRACT_CLASS_VERSION {
|
|
1360
|
-
code: 62;
|
|
1361
|
-
message: 'the contract class version is not supported';
|
|
1362
|
-
}
|
|
1363
|
-
interface UNEXPECTED_ERROR {
|
|
1364
|
-
code: 63;
|
|
1365
|
-
message: 'An unexpected error occurred';
|
|
1366
|
-
data: string;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
type errors$1_BLOCK_NOT_FOUND = BLOCK_NOT_FOUND;
|
|
1370
|
-
type errors$1_CLASS_ALREADY_DECLARED = CLASS_ALREADY_DECLARED;
|
|
1371
|
-
type errors$1_CLASS_HASH_NOT_FOUND = CLASS_HASH_NOT_FOUND;
|
|
1372
|
-
type errors$1_COMPILATION_FAILED = COMPILATION_FAILED;
|
|
1373
|
-
type errors$1_COMPILED_CLASS_HASH_MISMATCH = COMPILED_CLASS_HASH_MISMATCH;
|
|
1374
|
-
type errors$1_CONTRACT_CLASS_SIZE_IS_TOO_LARGE = CONTRACT_CLASS_SIZE_IS_TOO_LARGE;
|
|
1375
|
-
type errors$1_CONTRACT_ERROR = CONTRACT_ERROR;
|
|
1376
|
-
type errors$1_CONTRACT_NOT_FOUND = CONTRACT_NOT_FOUND;
|
|
1377
|
-
type errors$1_DUPLICATE_TX = DUPLICATE_TX;
|
|
1378
|
-
type errors$1_FAILED_TO_RECEIVE_TXN = FAILED_TO_RECEIVE_TXN;
|
|
1379
|
-
type errors$1_INSUFFICIENT_ACCOUNT_BALANCE = INSUFFICIENT_ACCOUNT_BALANCE;
|
|
1380
|
-
type errors$1_INSUFFICIENT_MAX_FEE = INSUFFICIENT_MAX_FEE;
|
|
1381
|
-
type errors$1_INVALID_BLOCK_HASH = INVALID_BLOCK_HASH;
|
|
1382
|
-
type errors$1_INVALID_CALL_DATA = INVALID_CALL_DATA;
|
|
1383
|
-
type errors$1_INVALID_CONTINUATION_TOKEN = INVALID_CONTINUATION_TOKEN;
|
|
1384
|
-
type errors$1_INVALID_MESSAGE_SELECTOR = INVALID_MESSAGE_SELECTOR;
|
|
1385
|
-
type errors$1_INVALID_TRANSACTION_NONCE = INVALID_TRANSACTION_NONCE;
|
|
1386
|
-
type errors$1_INVALID_TXN_INDEX = INVALID_TXN_INDEX;
|
|
1387
|
-
type errors$1_NON_ACCOUNT = NON_ACCOUNT;
|
|
1388
|
-
type errors$1_NO_BLOCKS = NO_BLOCKS;
|
|
1389
|
-
type errors$1_NO_TRACE_AVAILABLE = NO_TRACE_AVAILABLE;
|
|
1390
|
-
type errors$1_PAGE_SIZE_TOO_BIG = PAGE_SIZE_TOO_BIG;
|
|
1391
|
-
type errors$1_TOO_MANY_KEYS_IN_FILTER = TOO_MANY_KEYS_IN_FILTER;
|
|
1392
|
-
type errors$1_TRANSACTION_EXECUTION_ERROR = TRANSACTION_EXECUTION_ERROR;
|
|
1393
|
-
type errors$1_TXN_HASH_NOT_FOUND = TXN_HASH_NOT_FOUND;
|
|
1394
|
-
type errors$1_UNEXPECTED_ERROR = UNEXPECTED_ERROR;
|
|
1395
|
-
type errors$1_UNSUPPORTED_CONTRACT_CLASS_VERSION = UNSUPPORTED_CONTRACT_CLASS_VERSION;
|
|
1396
|
-
type errors$1_UNSUPPORTED_TX_VERSION = UNSUPPORTED_TX_VERSION;
|
|
1397
|
-
type errors$1_VALIDATION_FAILURE = VALIDATION_FAILURE;
|
|
1398
|
-
declare namespace errors$1 {
|
|
1399
|
-
export type { errors$1_BLOCK_NOT_FOUND as BLOCK_NOT_FOUND, errors$1_CLASS_ALREADY_DECLARED as CLASS_ALREADY_DECLARED, errors$1_CLASS_HASH_NOT_FOUND as CLASS_HASH_NOT_FOUND, errors$1_COMPILATION_FAILED as COMPILATION_FAILED, errors$1_COMPILED_CLASS_HASH_MISMATCH as COMPILED_CLASS_HASH_MISMATCH, errors$1_CONTRACT_CLASS_SIZE_IS_TOO_LARGE as CONTRACT_CLASS_SIZE_IS_TOO_LARGE, errors$1_CONTRACT_ERROR as CONTRACT_ERROR, errors$1_CONTRACT_NOT_FOUND as CONTRACT_NOT_FOUND, errors$1_DUPLICATE_TX as DUPLICATE_TX, errors$1_FAILED_TO_RECEIVE_TXN as FAILED_TO_RECEIVE_TXN, errors$1_INSUFFICIENT_ACCOUNT_BALANCE as INSUFFICIENT_ACCOUNT_BALANCE, errors$1_INSUFFICIENT_MAX_FEE as INSUFFICIENT_MAX_FEE, errors$1_INVALID_BLOCK_HASH as INVALID_BLOCK_HASH, errors$1_INVALID_CALL_DATA as INVALID_CALL_DATA, errors$1_INVALID_CONTINUATION_TOKEN as INVALID_CONTINUATION_TOKEN, errors$1_INVALID_MESSAGE_SELECTOR as INVALID_MESSAGE_SELECTOR, errors$1_INVALID_TRANSACTION_NONCE as INVALID_TRANSACTION_NONCE, errors$1_INVALID_TXN_INDEX as INVALID_TXN_INDEX, errors$1_NON_ACCOUNT as NON_ACCOUNT, errors$1_NO_BLOCKS as NO_BLOCKS, errors$1_NO_TRACE_AVAILABLE as NO_TRACE_AVAILABLE, errors$1_PAGE_SIZE_TOO_BIG as PAGE_SIZE_TOO_BIG, errors$1_TOO_MANY_KEYS_IN_FILTER as TOO_MANY_KEYS_IN_FILTER, errors$1_TRANSACTION_EXECUTION_ERROR as TRANSACTION_EXECUTION_ERROR, errors$1_TXN_HASH_NOT_FOUND as TXN_HASH_NOT_FOUND, errors$1_UNEXPECTED_ERROR as UNEXPECTED_ERROR, errors$1_UNSUPPORTED_CONTRACT_CLASS_VERSION as UNSUPPORTED_CONTRACT_CLASS_VERSION, errors$1_UNSUPPORTED_TX_VERSION as UNSUPPORTED_TX_VERSION, errors$1_VALIDATION_FAILURE as VALIDATION_FAILURE };
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Types that are not in spec but required for UX
|
|
1404
|
-
*/
|
|
1405
|
-
|
|
1406
|
-
type ContractClass$2 = CONTRACT_CLASS | DEPRECATED_CONTRACT_CLASS;
|
|
1407
|
-
type SimulateTransaction$2 = {
|
|
1408
|
-
transaction_trace: TRANSACTION_TRACE;
|
|
1409
|
-
fee_estimation: FEE_ESTIMATE;
|
|
1410
|
-
};
|
|
1411
|
-
type SimulateTransactionResponse$2 = SimulateTransaction$2[];
|
|
1412
|
-
type FeeEstimate$2 = FEE_ESTIMATE;
|
|
1413
|
-
type TransactionWithHash$2 = TXN & {
|
|
1414
|
-
transaction_hash: TXN_HASH$1;
|
|
1415
|
-
};
|
|
1416
|
-
type BlockHashAndNumber$1 = {
|
|
1417
|
-
block_hash: BLOCK_HASH$1;
|
|
1418
|
-
block_number: BLOCK_NUMBER$1;
|
|
1419
|
-
};
|
|
1420
|
-
type BlockWithTxs$1 = BLOCK_WITH_TXS | PENDING_BLOCK_WITH_TXS;
|
|
1421
|
-
type BlockWithTxHashes$2 = BLOCK_WITH_TX_HASHES | PENDING_BLOCK_WITH_TX_HASHES;
|
|
1422
|
-
type StateUpdate$2 = STATE_UPDATE$1 | PENDING_STATE_UPDATE$1;
|
|
1423
|
-
type BlockTransactionsTraces$1 = {
|
|
1424
|
-
transaction_hash: FELT$1;
|
|
1425
|
-
trace_root: TRANSACTION_TRACE;
|
|
1426
|
-
}[];
|
|
1427
|
-
type Syncing$1 = false | SYNC_STATUS;
|
|
1428
|
-
type Events$1 = EVENTS_CHUNK;
|
|
1429
|
-
type EmittedEvent$1 = EMITTED_EVENT;
|
|
1430
|
-
type Event$1 = EVENT$1;
|
|
1431
|
-
type InvokedTransaction$2 = {
|
|
1432
|
-
transaction_hash: TXN_HASH$1;
|
|
1433
|
-
};
|
|
1434
|
-
type DeclaredTransaction$2 = {
|
|
1435
|
-
transaction_hash: TXN_HASH$1;
|
|
1436
|
-
class_hash: FELT$1;
|
|
1437
|
-
};
|
|
1438
|
-
type DeployedAccountTransaction$1 = {
|
|
1439
|
-
transaction_hash: TXN_HASH$1;
|
|
1440
|
-
contract_address: FELT$1;
|
|
1441
|
-
};
|
|
1442
|
-
type ContractAddress$1 = ADDRESS;
|
|
1443
|
-
type Felt$1 = FELT$1;
|
|
1444
|
-
type Nonce$2 = FELT$1;
|
|
1445
|
-
type TransactionHash$1 = TXN_HASH$1;
|
|
1446
|
-
type TransactionTrace$1 = TRANSACTION_TRACE;
|
|
1447
|
-
type BlockHash$1 = BLOCK_HASH$1;
|
|
1448
|
-
type TransactionReceipt$2 = TXN_RECEIPT | PENDING_TXN_RECEIPT;
|
|
1449
|
-
type Receipt$1 = TXN_RECEIPT;
|
|
1450
|
-
type PendingReceipt$1 = PENDING_TXN_RECEIPT;
|
|
1451
|
-
type EventFilter$1 = EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
1452
|
-
type SimulationFlags$2 = Array<SIMULATION_FLAG$2>;
|
|
1453
|
-
type L1Message$1 = MSG_FROM_L1;
|
|
1454
|
-
type BaseTransaction$1 = BROADCASTED_TXN;
|
|
1455
|
-
type ChainId$1 = CHAIN_ID;
|
|
1456
|
-
type Transaction$1 = TXN;
|
|
1457
|
-
type TransactionStatus$2 = {
|
|
1458
|
-
finality_status: TXN_STATUS;
|
|
1459
|
-
execution_status?: TXN_EXECUTION_STATUS;
|
|
1460
|
-
};
|
|
1461
|
-
type ResourceBounds$2 = RESOURCE_BOUNDS_MAPPING;
|
|
1462
|
-
type FeePayment$1 = FEE_PAYMENT;
|
|
1463
|
-
type PriceUnit$1 = PRICE_UNIT$1;
|
|
1464
|
-
type StorageDiffs$1 = Array<CONTRACT_STORAGE_DIFF_ITEM>;
|
|
1465
|
-
type DeprecatedDeclaredClasses$1 = Array<FELT$1>;
|
|
1466
|
-
type NonceUpdates$1 = NONCE_UPDATE[];
|
|
1467
|
-
type ReplacedClasses$1 = REPLACED_CLASS[];
|
|
1468
|
-
declare enum ETransactionType$1 {
|
|
1469
|
-
DECLARE = "DECLARE",
|
|
1470
|
-
DEPLOY = "DEPLOY",
|
|
1471
|
-
DEPLOY_ACCOUNT = "DEPLOY_ACCOUNT",
|
|
1472
|
-
INVOKE = "INVOKE",
|
|
1473
|
-
L1_HANDLER = "L1_HANDLER"
|
|
1474
|
-
}
|
|
1475
|
-
declare enum ESimulationFlag$1 {
|
|
1476
|
-
SKIP_VALIDATE = "SKIP_VALIDATE",
|
|
1477
|
-
SKIP_FEE_CHARGE = "SKIP_FEE_CHARGE"
|
|
1478
|
-
}
|
|
1479
|
-
declare enum ETransactionStatus$1 {
|
|
1480
|
-
RECEIVED = "RECEIVED",
|
|
1481
|
-
REJECTED = "REJECTED",
|
|
1482
|
-
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
1483
|
-
ACCEPTED_ON_L1 = "ACCEPTED_ON_L1"
|
|
1484
|
-
}
|
|
1485
|
-
declare enum ETransactionFinalityStatus$1 {
|
|
1486
|
-
ACCEPTED_ON_L2 = "ACCEPTED_ON_L2",
|
|
1487
|
-
ACCEPTED_ON_L1 = "ACCEPTED_ON_L1"
|
|
1488
|
-
}
|
|
1489
|
-
declare enum ETransactionExecutionStatus$1 {
|
|
1490
|
-
SUCCEEDED = "SUCCEEDED",
|
|
1491
|
-
REVERTED = "REVERTED"
|
|
1492
|
-
}
|
|
1493
|
-
declare enum EBlockTag$1 {
|
|
1494
|
-
LATEST = "latest",
|
|
1495
|
-
PENDING = "pending"
|
|
1496
|
-
}
|
|
1497
|
-
declare enum EDataAvailabilityMode$1 {
|
|
1498
|
-
L1 = "L1",
|
|
1499
|
-
L2 = "L2"
|
|
1500
|
-
}
|
|
1501
|
-
declare enum EDAMode$1 {
|
|
1502
|
-
L1 = 0,
|
|
1503
|
-
L2 = 1
|
|
1504
|
-
}
|
|
1505
|
-
/**
|
|
1506
|
-
* V_ Transaction versions HexString
|
|
1507
|
-
* F_ Fee Transaction Versions HexString (2 ** 128 + TRANSACTION_VERSION)
|
|
1508
|
-
*/
|
|
1509
|
-
declare enum ETransactionVersion$1 {
|
|
1510
|
-
V0 = "0x0",
|
|
1511
|
-
V1 = "0x1",
|
|
1512
|
-
V2 = "0x2",
|
|
1513
|
-
V3 = "0x3",
|
|
1514
|
-
F0 = "0x100000000000000000000000000000000",
|
|
1515
|
-
F1 = "0x100000000000000000000000000000001",
|
|
1516
|
-
F2 = "0x100000000000000000000000000000002",
|
|
1517
|
-
F3 = "0x100000000000000000000000000000003"
|
|
1518
|
-
}
|
|
1519
|
-
/**
|
|
1520
|
-
* Old Transaction Versions
|
|
1521
|
-
*/
|
|
1522
|
-
declare enum ETransactionVersion2$1 {
|
|
1523
|
-
V0 = "0x0",
|
|
1524
|
-
V1 = "0x1",
|
|
1525
|
-
V2 = "0x2",
|
|
1526
|
-
F0 = "0x100000000000000000000000000000000",
|
|
1527
|
-
F1 = "0x100000000000000000000000000000001",
|
|
1528
|
-
F2 = "0x100000000000000000000000000000002"
|
|
1529
|
-
}
|
|
1530
|
-
/**
|
|
1531
|
-
* V3 Transaction Versions
|
|
1532
|
-
*/
|
|
1533
|
-
declare enum ETransactionVersion3$1 {
|
|
1534
|
-
V3 = "0x3",
|
|
1535
|
-
F3 = "0x100000000000000000000000000000003"
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
type Methods$1 = ReadMethods$1 & WriteMethods$1 & TraceMethods$1;
|
|
1539
|
-
type ReadMethods$1 = {
|
|
1540
|
-
starknet_specVersion: {
|
|
1541
|
-
params: [];
|
|
1542
|
-
result: string;
|
|
1543
|
-
};
|
|
1544
|
-
starknet_getBlockWithTxHashes: {
|
|
1545
|
-
params: {
|
|
1546
|
-
block_id: BLOCK_ID;
|
|
1547
|
-
};
|
|
1548
|
-
result: BlockWithTxHashes$2;
|
|
1549
|
-
errors: BLOCK_NOT_FOUND;
|
|
1550
|
-
};
|
|
1551
|
-
starknet_getBlockWithTxs: {
|
|
1552
|
-
params: {
|
|
1553
|
-
block_id: BLOCK_ID;
|
|
1554
|
-
};
|
|
1555
|
-
result: BlockWithTxs$1;
|
|
1556
|
-
errors: BLOCK_NOT_FOUND;
|
|
1557
|
-
};
|
|
1558
|
-
starknet_getStateUpdate: {
|
|
1559
|
-
params: {
|
|
1560
|
-
block_id: BLOCK_ID;
|
|
1561
|
-
};
|
|
1562
|
-
result: StateUpdate$2;
|
|
1563
|
-
errors: BLOCK_NOT_FOUND;
|
|
1564
|
-
};
|
|
1565
|
-
starknet_getStorageAt: {
|
|
1566
|
-
params: {
|
|
1567
|
-
contract_address: ADDRESS;
|
|
1568
|
-
key: STORAGE_KEY;
|
|
1569
|
-
block_id: BLOCK_ID;
|
|
1570
|
-
};
|
|
1571
|
-
result: FELT$1;
|
|
1572
|
-
errors: CONTRACT_NOT_FOUND | BLOCK_NOT_FOUND;
|
|
1573
|
-
};
|
|
1574
|
-
starknet_getTransactionStatus: {
|
|
1575
|
-
params: {
|
|
1576
|
-
transaction_hash: TXN_HASH$1;
|
|
1577
|
-
};
|
|
1578
|
-
result: TransactionStatus$2;
|
|
1579
|
-
errors: TXN_HASH_NOT_FOUND;
|
|
1580
|
-
};
|
|
1581
|
-
starknet_getTransactionByHash: {
|
|
1582
|
-
params: {
|
|
1583
|
-
transaction_hash: TXN_HASH$1;
|
|
1584
|
-
};
|
|
1585
|
-
result: TransactionWithHash$2;
|
|
1586
|
-
errors: TXN_HASH_NOT_FOUND;
|
|
1587
|
-
};
|
|
1588
|
-
starknet_getTransactionByBlockIdAndIndex: {
|
|
1589
|
-
params: {
|
|
1590
|
-
block_id: BLOCK_ID;
|
|
1591
|
-
index: number;
|
|
1592
|
-
};
|
|
1593
|
-
result: TransactionWithHash$2;
|
|
1594
|
-
errors: BLOCK_NOT_FOUND | INVALID_TXN_INDEX;
|
|
1595
|
-
};
|
|
1596
|
-
starknet_getTransactionReceipt: {
|
|
1597
|
-
params: {
|
|
1598
|
-
transaction_hash: TXN_HASH$1;
|
|
1599
|
-
};
|
|
1600
|
-
result: TransactionReceipt$2;
|
|
1601
|
-
errors: TXN_HASH_NOT_FOUND;
|
|
1602
|
-
};
|
|
1603
|
-
starknet_getClass: {
|
|
1604
|
-
params: {
|
|
1605
|
-
block_id: BLOCK_ID;
|
|
1606
|
-
class_hash: FELT$1;
|
|
1607
|
-
};
|
|
1608
|
-
result: ContractClass$2;
|
|
1609
|
-
errors: BLOCK_NOT_FOUND | CLASS_HASH_NOT_FOUND;
|
|
1610
|
-
};
|
|
1611
|
-
starknet_getClassHashAt: {
|
|
1612
|
-
params: {
|
|
1613
|
-
block_id: BLOCK_ID;
|
|
1614
|
-
contract_address: ADDRESS;
|
|
1615
|
-
};
|
|
1616
|
-
result: FELT$1;
|
|
1617
|
-
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1618
|
-
};
|
|
1619
|
-
starknet_getClassAt: {
|
|
1620
|
-
params: {
|
|
1621
|
-
block_id: BLOCK_ID;
|
|
1622
|
-
contract_address: ADDRESS;
|
|
1623
|
-
};
|
|
1624
|
-
result: ContractClass$2;
|
|
1625
|
-
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1626
|
-
};
|
|
1627
|
-
starknet_getBlockTransactionCount: {
|
|
1628
|
-
params: {
|
|
1629
|
-
block_id: BLOCK_ID;
|
|
1630
|
-
};
|
|
1631
|
-
result: number;
|
|
1632
|
-
errors: BLOCK_NOT_FOUND;
|
|
1633
|
-
};
|
|
1634
|
-
starknet_call: {
|
|
1635
|
-
params: {
|
|
1636
|
-
request: FUNCTION_CALL;
|
|
1637
|
-
block_id: BLOCK_ID;
|
|
1638
|
-
};
|
|
1639
|
-
result: FELT$1[];
|
|
1640
|
-
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1641
|
-
};
|
|
1642
|
-
starknet_estimateFee: {
|
|
1643
|
-
params: {
|
|
1644
|
-
request: BROADCASTED_TXN[];
|
|
1645
|
-
simulation_flags?: [SIMULATION_FLAG_FOR_ESTIMATE_FEE] | [];
|
|
1646
|
-
block_id: BLOCK_ID;
|
|
1647
|
-
};
|
|
1648
|
-
result: FeeEstimate$2[];
|
|
1649
|
-
errors: TRANSACTION_EXECUTION_ERROR | BLOCK_NOT_FOUND;
|
|
1650
|
-
};
|
|
1651
|
-
starknet_estimateMessageFee: {
|
|
1652
|
-
params: {
|
|
1653
|
-
message: MSG_FROM_L1;
|
|
1654
|
-
block_id: BLOCK_ID;
|
|
1655
|
-
};
|
|
1656
|
-
result: FeeEstimate$2;
|
|
1657
|
-
errors: CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1658
|
-
};
|
|
1659
|
-
starknet_blockNumber: {
|
|
1660
|
-
params: [];
|
|
1661
|
-
result: BLOCK_NUMBER$1;
|
|
1662
|
-
errors: NO_BLOCKS;
|
|
1663
|
-
};
|
|
1664
|
-
starknet_blockHashAndNumber: {
|
|
1665
|
-
params: [];
|
|
1666
|
-
result: BlockHashAndNumber$1;
|
|
1667
|
-
errors: NO_BLOCKS;
|
|
1668
|
-
};
|
|
1669
|
-
starknet_chainId: {
|
|
1670
|
-
params: [];
|
|
1671
|
-
result: CHAIN_ID;
|
|
1672
|
-
};
|
|
1673
|
-
starknet_syncing: {
|
|
1674
|
-
params: [];
|
|
1675
|
-
result: Syncing$1;
|
|
1676
|
-
};
|
|
1677
|
-
starknet_getEvents: {
|
|
1678
|
-
params: {
|
|
1679
|
-
filter: EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
1680
|
-
};
|
|
1681
|
-
result: Events$1;
|
|
1682
|
-
errors: PAGE_SIZE_TOO_BIG | INVALID_CONTINUATION_TOKEN | BLOCK_NOT_FOUND | TOO_MANY_KEYS_IN_FILTER;
|
|
1683
|
-
};
|
|
1684
|
-
starknet_getNonce: {
|
|
1685
|
-
params: {
|
|
1686
|
-
block_id: BLOCK_ID;
|
|
1687
|
-
contract_address: ADDRESS;
|
|
1688
|
-
};
|
|
1689
|
-
result: Nonce$2;
|
|
1690
|
-
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
1691
|
-
};
|
|
1692
|
-
};
|
|
1693
|
-
type WriteMethods$1 = {
|
|
1694
|
-
starknet_addInvokeTransaction: {
|
|
1695
|
-
params: {
|
|
1696
|
-
invoke_transaction: BROADCASTED_INVOKE_TXN;
|
|
1697
|
-
};
|
|
1698
|
-
result: InvokedTransaction$2;
|
|
1699
|
-
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
1700
|
-
};
|
|
1701
|
-
starknet_addDeclareTransaction: {
|
|
1702
|
-
params: {
|
|
1703
|
-
declare_transaction: BROADCASTED_DECLARE_TXN;
|
|
1704
|
-
};
|
|
1705
|
-
result: DeclaredTransaction$2;
|
|
1706
|
-
errors: CLASS_ALREADY_DECLARED | COMPILATION_FAILED | COMPILED_CLASS_HASH_MISMATCH | INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | CONTRACT_CLASS_SIZE_IS_TOO_LARGE | UNSUPPORTED_TX_VERSION | UNSUPPORTED_CONTRACT_CLASS_VERSION | UNEXPECTED_ERROR;
|
|
1707
|
-
};
|
|
1708
|
-
starknet_addDeployAccountTransaction: {
|
|
1709
|
-
params: {
|
|
1710
|
-
deploy_account_transaction: BROADCASTED_DEPLOY_ACCOUNT_TXN;
|
|
1711
|
-
};
|
|
1712
|
-
result: DeployedAccountTransaction$1;
|
|
1713
|
-
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | CLASS_HASH_NOT_FOUND | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
1714
|
-
};
|
|
1715
|
-
};
|
|
1716
|
-
type TraceMethods$1 = {
|
|
1717
|
-
starknet_traceTransaction: {
|
|
1718
|
-
params: {
|
|
1719
|
-
transaction_hash: TXN_HASH$1;
|
|
1720
|
-
};
|
|
1721
|
-
result: TransactionTrace$1;
|
|
1722
|
-
errors: TXN_HASH_NOT_FOUND | NO_TRACE_AVAILABLE;
|
|
1723
|
-
};
|
|
1724
|
-
starknet_traceBlockTransactions: {
|
|
1725
|
-
params: {
|
|
1726
|
-
block_id: BLOCK_ID;
|
|
1727
|
-
};
|
|
1728
|
-
result: BlockTransactionsTraces$1;
|
|
1729
|
-
errors: BLOCK_NOT_FOUND;
|
|
1730
|
-
};
|
|
1731
|
-
starknet_simulateTransactions: {
|
|
1732
|
-
params: {
|
|
1733
|
-
block_id: BLOCK_ID;
|
|
1734
|
-
transactions: Array<BROADCASTED_TXN>;
|
|
1735
|
-
simulation_flags: Array<SIMULATION_FLAG$2>;
|
|
1736
|
-
};
|
|
1737
|
-
result: SimulateTransactionResponse$2;
|
|
1738
|
-
errors: BLOCK_NOT_FOUND | TRANSACTION_EXECUTION_ERROR;
|
|
1739
|
-
};
|
|
1740
|
-
};
|
|
1741
|
-
|
|
1742
|
-
/**
|
|
1743
|
-
* TypeScript Representation of Cairo1 v2+ Starknet Contract ABI
|
|
1744
|
-
*
|
|
1745
|
-
* starknet_metadata.json - tags/v0.5.0
|
|
1746
|
-
*
|
|
1747
|
-
* 'starknet-specs' (OpenRpc protocol types)
|
|
1748
|
-
* https://github.com/starkware-libs/starknet-specs
|
|
1749
|
-
*/
|
|
1750
|
-
type ABI = Array<FUNCTION | CONSTRUCTOR | L1_HANDLER | EVENT | STRUCT | ENUM | INTERFACE | IMPL>;
|
|
1751
|
-
type FUNCTION = {
|
|
1752
|
-
type: 'function';
|
|
1753
|
-
name: string;
|
|
1754
|
-
inputs: Array<{
|
|
1755
|
-
name: string;
|
|
1756
|
-
type: string;
|
|
1757
|
-
}>;
|
|
1758
|
-
outputs?: Array<{
|
|
1759
|
-
type: string;
|
|
1760
|
-
}>;
|
|
1761
|
-
state_mutability: 'view' | 'external';
|
|
1762
|
-
};
|
|
1763
|
-
type CONSTRUCTOR = {
|
|
1764
|
-
type: 'constructor';
|
|
1765
|
-
name: 'constructor';
|
|
1766
|
-
inputs: Array<{
|
|
1767
|
-
name: string;
|
|
1768
|
-
type: string;
|
|
1769
|
-
}>;
|
|
1770
|
-
};
|
|
1771
|
-
type L1_HANDLER = {
|
|
1772
|
-
type: 'l1_handler';
|
|
1773
|
-
name: string;
|
|
1774
|
-
inputs: Array<{
|
|
1775
|
-
name: string;
|
|
1776
|
-
type: string;
|
|
1777
|
-
}>;
|
|
1778
|
-
outputs?: Array<{
|
|
1779
|
-
type: string;
|
|
1780
|
-
}>;
|
|
1781
|
-
state_mutability: 'view' | 'external';
|
|
1782
|
-
};
|
|
1783
|
-
type EVENT = {
|
|
1784
|
-
type: 'event';
|
|
1785
|
-
name: string;
|
|
1786
|
-
} & (ENUM_EVENT | STRUCT_EVENT);
|
|
1787
|
-
type STRUCT_EVENT = {
|
|
1788
|
-
kind: 'struct';
|
|
1789
|
-
members: Array<EVENT_FIELD>;
|
|
1790
|
-
};
|
|
1791
|
-
type ENUM_EVENT = {
|
|
1792
|
-
kind: 'enum';
|
|
1793
|
-
variants: Array<EVENT_FIELD>;
|
|
1794
|
-
};
|
|
1795
|
-
type STRUCT = {
|
|
1796
|
-
type: 'struct';
|
|
1797
|
-
name: string;
|
|
1798
|
-
members: Array<{
|
|
1799
|
-
name: string;
|
|
1800
|
-
type: string;
|
|
1801
|
-
}>;
|
|
1802
|
-
};
|
|
1803
|
-
type ENUM = {
|
|
1804
|
-
type: 'enum';
|
|
1805
|
-
name: string;
|
|
1806
|
-
variants: Array<{
|
|
1807
|
-
name: string;
|
|
1808
|
-
type: string;
|
|
1809
|
-
}>;
|
|
1810
|
-
};
|
|
1811
|
-
type INTERFACE = {
|
|
1812
|
-
type: 'interface';
|
|
1813
|
-
name: string;
|
|
1814
|
-
items: Array<FUNCTION>;
|
|
1815
|
-
};
|
|
1816
|
-
type IMPL = {
|
|
1817
|
-
type: 'impl';
|
|
1818
|
-
name: string;
|
|
1819
|
-
interface_name: string;
|
|
1820
|
-
};
|
|
1821
|
-
type EVENT_FIELD = {
|
|
1822
|
-
name: string;
|
|
1823
|
-
type: string;
|
|
1824
|
-
kind: 'key' | 'data' | 'nested';
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
|
-
/**
|
|
1828
|
-
* version 0.6.0
|
|
1829
|
-
*/
|
|
1830
|
-
|
|
1831
|
-
type index$5_ABI = ABI;
|
|
1832
|
-
declare namespace index$5 {
|
|
1833
|
-
export { type index$5_ABI as ABI, type BaseTransaction$1 as BaseTransaction, type BlockHash$1 as BlockHash, type BlockHashAndNumber$1 as BlockHashAndNumber, type BlockTransactionsTraces$1 as BlockTransactionsTraces, type BlockWithTxHashes$2 as BlockWithTxHashes, type BlockWithTxs$1 as BlockWithTxs, type ChainId$1 as ChainId, type ContractAddress$1 as ContractAddress, type ContractClass$2 as ContractClass, type DeclaredTransaction$2 as DeclaredTransaction, type DeployedAccountTransaction$1 as DeployedAccountTransaction, type DeprecatedDeclaredClasses$1 as DeprecatedDeclaredClasses, EBlockTag$1 as EBlockTag, EDAMode$1 as EDAMode, EDataAvailabilityMode$1 as EDataAvailabilityMode, ESimulationFlag$1 as ESimulationFlag, ETransactionExecutionStatus$1 as ETransactionExecutionStatus, ETransactionFinalityStatus$1 as ETransactionFinalityStatus, ETransactionStatus$1 as ETransactionStatus, ETransactionType$1 as ETransactionType, ETransactionVersion$1 as ETransactionVersion, ETransactionVersion2$1 as ETransactionVersion2, ETransactionVersion3$1 as ETransactionVersion3, type EmittedEvent$1 as EmittedEvent, errors$1 as Errors, type Event$1 as Event, type EventFilter$1 as EventFilter, type Events$1 as Events, type FeeEstimate$2 as FeeEstimate, type FeePayment$1 as FeePayment, type Felt$1 as Felt, type InvokedTransaction$2 as InvokedTransaction, type L1Message$1 as L1Message, type Methods$1 as Methods, type Nonce$2 as Nonce, type NonceUpdates$1 as NonceUpdates, type PendingReceipt$1 as PendingReceipt, type PriceUnit$1 as PriceUnit, type Receipt$1 as Receipt, type ReplacedClasses$1 as ReplacedClasses, type ResourceBounds$2 as ResourceBounds, components as SPEC, type SimulateTransaction$2 as SimulateTransaction, type SimulateTransactionResponse$2 as SimulateTransactionResponse, type SimulationFlags$2 as SimulationFlags, type StateUpdate$2 as StateUpdate, type StorageDiffs$1 as StorageDiffs, type Syncing$1 as Syncing, type Transaction$1 as Transaction, type TransactionHash$1 as TransactionHash, type TransactionReceipt$2 as TransactionReceipt, type TransactionStatus$2 as TransactionStatus, type TransactionTrace$1 as TransactionTrace, type TransactionWithHash$2 as TransactionWithHash };
|
|
801
|
+
interface CONTRACT_CLASS_SIZE_IS_TOO_LARGE {
|
|
802
|
+
code: 57;
|
|
803
|
+
message: 'Contract class size it too large';
|
|
804
|
+
}
|
|
805
|
+
interface NON_ACCOUNT {
|
|
806
|
+
code: 58;
|
|
807
|
+
message: 'Sender address in not an account contract';
|
|
808
|
+
}
|
|
809
|
+
interface DUPLICATE_TX {
|
|
810
|
+
code: 59;
|
|
811
|
+
message: 'A transaction with the same hash already exists in the mempool';
|
|
812
|
+
}
|
|
813
|
+
interface COMPILED_CLASS_HASH_MISMATCH {
|
|
814
|
+
code: 60;
|
|
815
|
+
message: 'the compiled class hash did not match the one supplied in the transaction';
|
|
816
|
+
}
|
|
817
|
+
interface UNSUPPORTED_TX_VERSION {
|
|
818
|
+
code: 61;
|
|
819
|
+
message: 'the transaction version is not supported';
|
|
820
|
+
}
|
|
821
|
+
interface UNSUPPORTED_CONTRACT_CLASS_VERSION {
|
|
822
|
+
code: 62;
|
|
823
|
+
message: 'the contract class version is not supported';
|
|
824
|
+
}
|
|
825
|
+
interface UNEXPECTED_ERROR {
|
|
826
|
+
code: 63;
|
|
827
|
+
message: 'An unexpected error occurred';
|
|
828
|
+
data: string;
|
|
1834
829
|
}
|
|
1835
830
|
|
|
1836
831
|
type errors_BLOCK_NOT_FOUND = BLOCK_NOT_FOUND;
|
|
@@ -1870,69 +865,68 @@ declare namespace errors {
|
|
|
1870
865
|
* Types that are not in spec but required for UX
|
|
1871
866
|
*/
|
|
1872
867
|
|
|
1873
|
-
type ContractClass$1 = CONTRACT_CLASS
|
|
868
|
+
type ContractClass$1 = CONTRACT_CLASS | DEPRECATED_CONTRACT_CLASS;
|
|
1874
869
|
type SimulateTransaction$1 = {
|
|
1875
|
-
transaction_trace: TRANSACTION_TRACE
|
|
1876
|
-
fee_estimation: FEE_ESTIMATE
|
|
870
|
+
transaction_trace: TRANSACTION_TRACE;
|
|
871
|
+
fee_estimation: FEE_ESTIMATE;
|
|
1877
872
|
};
|
|
1878
873
|
type SimulateTransactionResponse$1 = SimulateTransaction$1[];
|
|
1879
|
-
type FeeEstimate$1 = FEE_ESTIMATE
|
|
1880
|
-
type TransactionWithHash$1 = TXN
|
|
1881
|
-
transaction_hash: TXN_HASH$
|
|
874
|
+
type FeeEstimate$1 = FEE_ESTIMATE;
|
|
875
|
+
type TransactionWithHash$1 = TXN & {
|
|
876
|
+
transaction_hash: TXN_HASH$1;
|
|
1882
877
|
};
|
|
1883
878
|
type BlockHashAndNumber = {
|
|
1884
|
-
block_hash: BLOCK_HASH$
|
|
1885
|
-
block_number: BLOCK_NUMBER$
|
|
879
|
+
block_hash: BLOCK_HASH$1;
|
|
880
|
+
block_number: BLOCK_NUMBER$1;
|
|
1886
881
|
};
|
|
1887
|
-
type BlockWithTxs = BLOCK_WITH_TXS
|
|
1888
|
-
type BlockWithTxHashes$1 = BLOCK_WITH_TX_HASHES
|
|
1889
|
-
type
|
|
1890
|
-
type StateUpdate$1 = STATE_UPDATE$2 | PENDING_STATE_UPDATE$2;
|
|
882
|
+
type BlockWithTxs = BLOCK_WITH_TXS | PENDING_BLOCK_WITH_TXS;
|
|
883
|
+
type BlockWithTxHashes$1 = BLOCK_WITH_TX_HASHES | PENDING_BLOCK_WITH_TX_HASHES;
|
|
884
|
+
type StateUpdate$1 = STATE_UPDATE$1 | PENDING_STATE_UPDATE$1;
|
|
1891
885
|
type BlockTransactionsTraces = {
|
|
1892
|
-
transaction_hash: FELT$
|
|
1893
|
-
trace_root: TRANSACTION_TRACE
|
|
886
|
+
transaction_hash: FELT$1;
|
|
887
|
+
trace_root: TRANSACTION_TRACE;
|
|
1894
888
|
}[];
|
|
1895
|
-
type Syncing = false | SYNC_STATUS
|
|
1896
|
-
type Events = EVENTS_CHUNK
|
|
1897
|
-
type EmittedEvent = EMITTED_EVENT
|
|
1898
|
-
type Event = EVENT$
|
|
889
|
+
type Syncing = false | SYNC_STATUS;
|
|
890
|
+
type Events = EVENTS_CHUNK;
|
|
891
|
+
type EmittedEvent = EMITTED_EVENT;
|
|
892
|
+
type Event = EVENT$1;
|
|
1899
893
|
type InvokedTransaction$1 = {
|
|
1900
|
-
transaction_hash: TXN_HASH$
|
|
894
|
+
transaction_hash: TXN_HASH$1;
|
|
1901
895
|
};
|
|
1902
896
|
type DeclaredTransaction$1 = {
|
|
1903
|
-
transaction_hash: TXN_HASH$
|
|
1904
|
-
class_hash: FELT$
|
|
897
|
+
transaction_hash: TXN_HASH$1;
|
|
898
|
+
class_hash: FELT$1;
|
|
1905
899
|
};
|
|
1906
900
|
type DeployedAccountTransaction = {
|
|
1907
|
-
transaction_hash: TXN_HASH$
|
|
1908
|
-
contract_address: FELT$
|
|
1909
|
-
};
|
|
1910
|
-
type ContractAddress = ADDRESS
|
|
1911
|
-
type Felt = FELT$
|
|
1912
|
-
type Nonce$1 = FELT$
|
|
1913
|
-
type TransactionHash = TXN_HASH$
|
|
1914
|
-
type TransactionTrace = TRANSACTION_TRACE
|
|
1915
|
-
type BlockHash = BLOCK_HASH$
|
|
1916
|
-
type TransactionReceipt$1 =
|
|
1917
|
-
type Receipt =
|
|
1918
|
-
type PendingReceipt =
|
|
1919
|
-
type EventFilter = EVENT_FILTER
|
|
1920
|
-
type SimulationFlags$1 = Array<SIMULATION_FLAG$
|
|
1921
|
-
type L1Message = MSG_FROM_L1
|
|
1922
|
-
type BaseTransaction = BROADCASTED_TXN
|
|
1923
|
-
type ChainId = CHAIN_ID
|
|
1924
|
-
type Transaction = TXN
|
|
901
|
+
transaction_hash: TXN_HASH$1;
|
|
902
|
+
contract_address: FELT$1;
|
|
903
|
+
};
|
|
904
|
+
type ContractAddress = ADDRESS;
|
|
905
|
+
type Felt = FELT$1;
|
|
906
|
+
type Nonce$1 = FELT$1;
|
|
907
|
+
type TransactionHash = TXN_HASH$1;
|
|
908
|
+
type TransactionTrace = TRANSACTION_TRACE;
|
|
909
|
+
type BlockHash = BLOCK_HASH$1;
|
|
910
|
+
type TransactionReceipt$1 = TXN_RECEIPT | PENDING_TXN_RECEIPT;
|
|
911
|
+
type Receipt = TXN_RECEIPT;
|
|
912
|
+
type PendingReceipt = PENDING_TXN_RECEIPT;
|
|
913
|
+
type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
914
|
+
type SimulationFlags$1 = Array<SIMULATION_FLAG$1>;
|
|
915
|
+
type L1Message = MSG_FROM_L1;
|
|
916
|
+
type BaseTransaction = BROADCASTED_TXN;
|
|
917
|
+
type ChainId = CHAIN_ID;
|
|
918
|
+
type Transaction = TXN;
|
|
1925
919
|
type TransactionStatus$1 = {
|
|
1926
|
-
finality_status: TXN_STATUS
|
|
1927
|
-
execution_status?: TXN_EXECUTION_STATUS
|
|
1928
|
-
};
|
|
1929
|
-
type ResourceBounds$1 = RESOURCE_BOUNDS_MAPPING
|
|
1930
|
-
type FeePayment = FEE_PAYMENT
|
|
1931
|
-
type PriceUnit = PRICE_UNIT$
|
|
1932
|
-
type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM
|
|
1933
|
-
type DeprecatedDeclaredClasses = Array<FELT$
|
|
1934
|
-
type NonceUpdates = NONCE_UPDATE
|
|
1935
|
-
type ReplacedClasses = REPLACED_CLASS
|
|
920
|
+
finality_status: TXN_STATUS;
|
|
921
|
+
execution_status?: TXN_EXECUTION_STATUS;
|
|
922
|
+
};
|
|
923
|
+
type ResourceBounds$1 = RESOURCE_BOUNDS_MAPPING;
|
|
924
|
+
type FeePayment = FEE_PAYMENT;
|
|
925
|
+
type PriceUnit = PRICE_UNIT$1;
|
|
926
|
+
type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM>;
|
|
927
|
+
type DeprecatedDeclaredClasses = Array<FELT$1>;
|
|
928
|
+
type NonceUpdates = NONCE_UPDATE[];
|
|
929
|
+
type ReplacedClasses = REPLACED_CLASS[];
|
|
1936
930
|
declare enum ETransactionType {
|
|
1937
931
|
DECLARE = "DECLARE",
|
|
1938
932
|
DEPLOY = "DEPLOY",
|
|
@@ -2011,58 +1005,51 @@ type ReadMethods = {
|
|
|
2011
1005
|
};
|
|
2012
1006
|
starknet_getBlockWithTxHashes: {
|
|
2013
1007
|
params: {
|
|
2014
|
-
block_id: BLOCK_ID
|
|
1008
|
+
block_id: BLOCK_ID;
|
|
2015
1009
|
};
|
|
2016
1010
|
result: BlockWithTxHashes$1;
|
|
2017
1011
|
errors: BLOCK_NOT_FOUND;
|
|
2018
1012
|
};
|
|
2019
1013
|
starknet_getBlockWithTxs: {
|
|
2020
1014
|
params: {
|
|
2021
|
-
block_id: BLOCK_ID
|
|
1015
|
+
block_id: BLOCK_ID;
|
|
2022
1016
|
};
|
|
2023
1017
|
result: BlockWithTxs;
|
|
2024
1018
|
errors: BLOCK_NOT_FOUND;
|
|
2025
1019
|
};
|
|
2026
|
-
starknet_getBlockWithReceipts: {
|
|
2027
|
-
params: {
|
|
2028
|
-
block_id: BLOCK_ID$1;
|
|
2029
|
-
};
|
|
2030
|
-
result: BlockWithTxReceipts;
|
|
2031
|
-
errors: BLOCK_NOT_FOUND;
|
|
2032
|
-
};
|
|
2033
1020
|
starknet_getStateUpdate: {
|
|
2034
1021
|
params: {
|
|
2035
|
-
block_id: BLOCK_ID
|
|
1022
|
+
block_id: BLOCK_ID;
|
|
2036
1023
|
};
|
|
2037
1024
|
result: StateUpdate$1;
|
|
2038
1025
|
errors: BLOCK_NOT_FOUND;
|
|
2039
1026
|
};
|
|
2040
1027
|
starknet_getStorageAt: {
|
|
2041
1028
|
params: {
|
|
2042
|
-
contract_address: ADDRESS
|
|
2043
|
-
key: STORAGE_KEY
|
|
2044
|
-
block_id: BLOCK_ID
|
|
1029
|
+
contract_address: ADDRESS;
|
|
1030
|
+
key: STORAGE_KEY;
|
|
1031
|
+
block_id: BLOCK_ID;
|
|
2045
1032
|
};
|
|
2046
|
-
result: FELT$
|
|
1033
|
+
result: FELT$1;
|
|
2047
1034
|
errors: CONTRACT_NOT_FOUND | BLOCK_NOT_FOUND;
|
|
2048
1035
|
};
|
|
2049
1036
|
starknet_getTransactionStatus: {
|
|
2050
1037
|
params: {
|
|
2051
|
-
transaction_hash: TXN_HASH$
|
|
1038
|
+
transaction_hash: TXN_HASH$1;
|
|
2052
1039
|
};
|
|
2053
1040
|
result: TransactionStatus$1;
|
|
2054
1041
|
errors: TXN_HASH_NOT_FOUND;
|
|
2055
1042
|
};
|
|
2056
1043
|
starknet_getTransactionByHash: {
|
|
2057
1044
|
params: {
|
|
2058
|
-
transaction_hash: TXN_HASH$
|
|
1045
|
+
transaction_hash: TXN_HASH$1;
|
|
2059
1046
|
};
|
|
2060
1047
|
result: TransactionWithHash$1;
|
|
2061
1048
|
errors: TXN_HASH_NOT_FOUND;
|
|
2062
1049
|
};
|
|
2063
1050
|
starknet_getTransactionByBlockIdAndIndex: {
|
|
2064
1051
|
params: {
|
|
2065
|
-
block_id: BLOCK_ID
|
|
1052
|
+
block_id: BLOCK_ID;
|
|
2066
1053
|
index: number;
|
|
2067
1054
|
};
|
|
2068
1055
|
result: TransactionWithHash$1;
|
|
@@ -2070,70 +1057,70 @@ type ReadMethods = {
|
|
|
2070
1057
|
};
|
|
2071
1058
|
starknet_getTransactionReceipt: {
|
|
2072
1059
|
params: {
|
|
2073
|
-
transaction_hash: TXN_HASH$
|
|
1060
|
+
transaction_hash: TXN_HASH$1;
|
|
2074
1061
|
};
|
|
2075
1062
|
result: TransactionReceipt$1;
|
|
2076
1063
|
errors: TXN_HASH_NOT_FOUND;
|
|
2077
1064
|
};
|
|
2078
1065
|
starknet_getClass: {
|
|
2079
1066
|
params: {
|
|
2080
|
-
block_id: BLOCK_ID
|
|
2081
|
-
class_hash: FELT$
|
|
1067
|
+
block_id: BLOCK_ID;
|
|
1068
|
+
class_hash: FELT$1;
|
|
2082
1069
|
};
|
|
2083
1070
|
result: ContractClass$1;
|
|
2084
1071
|
errors: BLOCK_NOT_FOUND | CLASS_HASH_NOT_FOUND;
|
|
2085
1072
|
};
|
|
2086
1073
|
starknet_getClassHashAt: {
|
|
2087
1074
|
params: {
|
|
2088
|
-
block_id: BLOCK_ID
|
|
2089
|
-
contract_address: ADDRESS
|
|
1075
|
+
block_id: BLOCK_ID;
|
|
1076
|
+
contract_address: ADDRESS;
|
|
2090
1077
|
};
|
|
2091
|
-
result: FELT$
|
|
1078
|
+
result: FELT$1;
|
|
2092
1079
|
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
2093
1080
|
};
|
|
2094
1081
|
starknet_getClassAt: {
|
|
2095
1082
|
params: {
|
|
2096
|
-
block_id: BLOCK_ID
|
|
2097
|
-
contract_address: ADDRESS
|
|
1083
|
+
block_id: BLOCK_ID;
|
|
1084
|
+
contract_address: ADDRESS;
|
|
2098
1085
|
};
|
|
2099
1086
|
result: ContractClass$1;
|
|
2100
1087
|
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
2101
1088
|
};
|
|
2102
1089
|
starknet_getBlockTransactionCount: {
|
|
2103
1090
|
params: {
|
|
2104
|
-
block_id: BLOCK_ID
|
|
1091
|
+
block_id: BLOCK_ID;
|
|
2105
1092
|
};
|
|
2106
1093
|
result: number;
|
|
2107
1094
|
errors: BLOCK_NOT_FOUND;
|
|
2108
1095
|
};
|
|
2109
1096
|
starknet_call: {
|
|
2110
1097
|
params: {
|
|
2111
|
-
request: FUNCTION_CALL
|
|
2112
|
-
block_id: BLOCK_ID
|
|
1098
|
+
request: FUNCTION_CALL;
|
|
1099
|
+
block_id: BLOCK_ID;
|
|
2113
1100
|
};
|
|
2114
|
-
result: FELT$
|
|
1101
|
+
result: FELT$1[];
|
|
2115
1102
|
errors: CONTRACT_NOT_FOUND | CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
2116
1103
|
};
|
|
2117
1104
|
starknet_estimateFee: {
|
|
2118
1105
|
params: {
|
|
2119
|
-
request: BROADCASTED_TXN
|
|
2120
|
-
simulation_flags?: [SIMULATION_FLAG_FOR_ESTIMATE_FEE
|
|
2121
|
-
block_id: BLOCK_ID
|
|
1106
|
+
request: BROADCASTED_TXN[];
|
|
1107
|
+
simulation_flags?: [SIMULATION_FLAG_FOR_ESTIMATE_FEE] | [];
|
|
1108
|
+
block_id: BLOCK_ID;
|
|
2122
1109
|
};
|
|
2123
1110
|
result: FeeEstimate$1[];
|
|
2124
1111
|
errors: TRANSACTION_EXECUTION_ERROR | BLOCK_NOT_FOUND;
|
|
2125
1112
|
};
|
|
2126
1113
|
starknet_estimateMessageFee: {
|
|
2127
1114
|
params: {
|
|
2128
|
-
message: MSG_FROM_L1
|
|
2129
|
-
block_id: BLOCK_ID
|
|
1115
|
+
message: MSG_FROM_L1;
|
|
1116
|
+
block_id: BLOCK_ID;
|
|
2130
1117
|
};
|
|
2131
1118
|
result: FeeEstimate$1;
|
|
2132
1119
|
errors: CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
2133
1120
|
};
|
|
2134
1121
|
starknet_blockNumber: {
|
|
2135
1122
|
params: [];
|
|
2136
|
-
result: BLOCK_NUMBER$
|
|
1123
|
+
result: BLOCK_NUMBER$1;
|
|
2137
1124
|
errors: NO_BLOCKS;
|
|
2138
1125
|
};
|
|
2139
1126
|
starknet_blockHashAndNumber: {
|
|
@@ -2143,7 +1130,7 @@ type ReadMethods = {
|
|
|
2143
1130
|
};
|
|
2144
1131
|
starknet_chainId: {
|
|
2145
1132
|
params: [];
|
|
2146
|
-
result: CHAIN_ID
|
|
1133
|
+
result: CHAIN_ID;
|
|
2147
1134
|
};
|
|
2148
1135
|
starknet_syncing: {
|
|
2149
1136
|
params: [];
|
|
@@ -2151,15 +1138,15 @@ type ReadMethods = {
|
|
|
2151
1138
|
};
|
|
2152
1139
|
starknet_getEvents: {
|
|
2153
1140
|
params: {
|
|
2154
|
-
filter: EVENT_FILTER
|
|
1141
|
+
filter: EVENT_FILTER & RESULT_PAGE_REQUEST;
|
|
2155
1142
|
};
|
|
2156
1143
|
result: Events;
|
|
2157
1144
|
errors: PAGE_SIZE_TOO_BIG | INVALID_CONTINUATION_TOKEN | BLOCK_NOT_FOUND | TOO_MANY_KEYS_IN_FILTER;
|
|
2158
1145
|
};
|
|
2159
1146
|
starknet_getNonce: {
|
|
2160
1147
|
params: {
|
|
2161
|
-
block_id: BLOCK_ID
|
|
2162
|
-
contract_address: ADDRESS
|
|
1148
|
+
block_id: BLOCK_ID;
|
|
1149
|
+
contract_address: ADDRESS;
|
|
2163
1150
|
};
|
|
2164
1151
|
result: Nonce$1;
|
|
2165
1152
|
errors: BLOCK_NOT_FOUND | CONTRACT_NOT_FOUND;
|
|
@@ -2168,21 +1155,21 @@ type ReadMethods = {
|
|
|
2168
1155
|
type WriteMethods = {
|
|
2169
1156
|
starknet_addInvokeTransaction: {
|
|
2170
1157
|
params: {
|
|
2171
|
-
invoke_transaction: BROADCASTED_INVOKE_TXN
|
|
1158
|
+
invoke_transaction: BROADCASTED_INVOKE_TXN;
|
|
2172
1159
|
};
|
|
2173
1160
|
result: InvokedTransaction$1;
|
|
2174
1161
|
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
2175
1162
|
};
|
|
2176
1163
|
starknet_addDeclareTransaction: {
|
|
2177
1164
|
params: {
|
|
2178
|
-
declare_transaction: BROADCASTED_DECLARE_TXN
|
|
1165
|
+
declare_transaction: BROADCASTED_DECLARE_TXN;
|
|
2179
1166
|
};
|
|
2180
1167
|
result: DeclaredTransaction$1;
|
|
2181
1168
|
errors: CLASS_ALREADY_DECLARED | COMPILATION_FAILED | COMPILED_CLASS_HASH_MISMATCH | INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | DUPLICATE_TX | CONTRACT_CLASS_SIZE_IS_TOO_LARGE | UNSUPPORTED_TX_VERSION | UNSUPPORTED_CONTRACT_CLASS_VERSION | UNEXPECTED_ERROR;
|
|
2182
1169
|
};
|
|
2183
1170
|
starknet_addDeployAccountTransaction: {
|
|
2184
1171
|
params: {
|
|
2185
|
-
deploy_account_transaction: BROADCASTED_DEPLOY_ACCOUNT_TXN
|
|
1172
|
+
deploy_account_transaction: BROADCASTED_DEPLOY_ACCOUNT_TXN;
|
|
2186
1173
|
};
|
|
2187
1174
|
result: DeployedAccountTransaction;
|
|
2188
1175
|
errors: INSUFFICIENT_ACCOUNT_BALANCE | INSUFFICIENT_MAX_FEE | INVALID_TRANSACTION_NONCE | VALIDATION_FAILURE | NON_ACCOUNT | CLASS_HASH_NOT_FOUND | DUPLICATE_TX | UNSUPPORTED_TX_VERSION | UNEXPECTED_ERROR;
|
|
@@ -2191,23 +1178,23 @@ type WriteMethods = {
|
|
|
2191
1178
|
type TraceMethods = {
|
|
2192
1179
|
starknet_traceTransaction: {
|
|
2193
1180
|
params: {
|
|
2194
|
-
transaction_hash: TXN_HASH$
|
|
1181
|
+
transaction_hash: TXN_HASH$1;
|
|
2195
1182
|
};
|
|
2196
1183
|
result: TransactionTrace;
|
|
2197
1184
|
errors: TXN_HASH_NOT_FOUND | NO_TRACE_AVAILABLE;
|
|
2198
1185
|
};
|
|
2199
1186
|
starknet_traceBlockTransactions: {
|
|
2200
1187
|
params: {
|
|
2201
|
-
block_id: BLOCK_ID
|
|
1188
|
+
block_id: BLOCK_ID;
|
|
2202
1189
|
};
|
|
2203
1190
|
result: BlockTransactionsTraces;
|
|
2204
1191
|
errors: BLOCK_NOT_FOUND;
|
|
2205
1192
|
};
|
|
2206
1193
|
starknet_simulateTransactions: {
|
|
2207
1194
|
params: {
|
|
2208
|
-
block_id: BLOCK_ID
|
|
2209
|
-
transactions: Array<BROADCASTED_TXN
|
|
2210
|
-
simulation_flags: Array<SIMULATION_FLAG$
|
|
1195
|
+
block_id: BLOCK_ID;
|
|
1196
|
+
transactions: Array<BROADCASTED_TXN>;
|
|
1197
|
+
simulation_flags: Array<SIMULATION_FLAG$1>;
|
|
2211
1198
|
};
|
|
2212
1199
|
result: SimulateTransactionResponse$1;
|
|
2213
1200
|
errors: BLOCK_NOT_FOUND | TRANSACTION_EXECUTION_ERROR;
|
|
@@ -2215,7 +1202,92 @@ type TraceMethods = {
|
|
|
2215
1202
|
};
|
|
2216
1203
|
|
|
2217
1204
|
/**
|
|
2218
|
-
*
|
|
1205
|
+
* TypeScript Representation of Cairo1 v2+ Starknet Contract ABI
|
|
1206
|
+
*
|
|
1207
|
+
* starknet_metadata.json - tags/v0.5.0
|
|
1208
|
+
*
|
|
1209
|
+
* 'starknet-specs' (OpenRpc protocol types)
|
|
1210
|
+
* https://github.com/starkware-libs/starknet-specs
|
|
1211
|
+
*/
|
|
1212
|
+
type ABI = Array<FUNCTION | CONSTRUCTOR | L1_HANDLER | EVENT | STRUCT | ENUM | INTERFACE | IMPL>;
|
|
1213
|
+
type FUNCTION = {
|
|
1214
|
+
type: 'function';
|
|
1215
|
+
name: string;
|
|
1216
|
+
inputs: Array<{
|
|
1217
|
+
name: string;
|
|
1218
|
+
type: string;
|
|
1219
|
+
}>;
|
|
1220
|
+
outputs?: Array<{
|
|
1221
|
+
type: string;
|
|
1222
|
+
}>;
|
|
1223
|
+
state_mutability: 'view' | 'external';
|
|
1224
|
+
};
|
|
1225
|
+
type CONSTRUCTOR = {
|
|
1226
|
+
type: 'constructor';
|
|
1227
|
+
name: 'constructor';
|
|
1228
|
+
inputs: Array<{
|
|
1229
|
+
name: string;
|
|
1230
|
+
type: string;
|
|
1231
|
+
}>;
|
|
1232
|
+
};
|
|
1233
|
+
type L1_HANDLER = {
|
|
1234
|
+
type: 'l1_handler';
|
|
1235
|
+
name: string;
|
|
1236
|
+
inputs: Array<{
|
|
1237
|
+
name: string;
|
|
1238
|
+
type: string;
|
|
1239
|
+
}>;
|
|
1240
|
+
outputs?: Array<{
|
|
1241
|
+
type: string;
|
|
1242
|
+
}>;
|
|
1243
|
+
state_mutability: 'view' | 'external';
|
|
1244
|
+
};
|
|
1245
|
+
type EVENT = {
|
|
1246
|
+
type: 'event';
|
|
1247
|
+
name: string;
|
|
1248
|
+
} & (ENUM_EVENT | STRUCT_EVENT);
|
|
1249
|
+
type STRUCT_EVENT = {
|
|
1250
|
+
kind: 'struct';
|
|
1251
|
+
members: Array<EVENT_FIELD>;
|
|
1252
|
+
};
|
|
1253
|
+
type ENUM_EVENT = {
|
|
1254
|
+
kind: 'enum';
|
|
1255
|
+
variants: Array<EVENT_FIELD>;
|
|
1256
|
+
};
|
|
1257
|
+
type STRUCT = {
|
|
1258
|
+
type: 'struct';
|
|
1259
|
+
name: string;
|
|
1260
|
+
members: Array<{
|
|
1261
|
+
name: string;
|
|
1262
|
+
type: string;
|
|
1263
|
+
}>;
|
|
1264
|
+
};
|
|
1265
|
+
type ENUM = {
|
|
1266
|
+
type: 'enum';
|
|
1267
|
+
name: string;
|
|
1268
|
+
variants: Array<{
|
|
1269
|
+
name: string;
|
|
1270
|
+
type: string;
|
|
1271
|
+
}>;
|
|
1272
|
+
};
|
|
1273
|
+
type INTERFACE = {
|
|
1274
|
+
type: 'interface';
|
|
1275
|
+
name: string;
|
|
1276
|
+
items: Array<FUNCTION>;
|
|
1277
|
+
};
|
|
1278
|
+
type IMPL = {
|
|
1279
|
+
type: 'impl';
|
|
1280
|
+
name: string;
|
|
1281
|
+
interface_name: string;
|
|
1282
|
+
};
|
|
1283
|
+
type EVENT_FIELD = {
|
|
1284
|
+
name: string;
|
|
1285
|
+
type: string;
|
|
1286
|
+
kind: 'key' | 'data' | 'nested';
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* version 0.6.0
|
|
2219
1291
|
*/
|
|
2220
1292
|
|
|
2221
1293
|
type index$4_ABI = ABI;
|
|
@@ -2223,7 +1295,6 @@ type index$4_BaseTransaction = BaseTransaction;
|
|
|
2223
1295
|
type index$4_BlockHash = BlockHash;
|
|
2224
1296
|
type index$4_BlockHashAndNumber = BlockHashAndNumber;
|
|
2225
1297
|
type index$4_BlockTransactionsTraces = BlockTransactionsTraces;
|
|
2226
|
-
type index$4_BlockWithTxReceipts = BlockWithTxReceipts;
|
|
2227
1298
|
type index$4_BlockWithTxs = BlockWithTxs;
|
|
2228
1299
|
type index$4_ChainId = ChainId;
|
|
2229
1300
|
type index$4_ContractAddress = ContractAddress;
|
|
@@ -2270,63 +1341,15 @@ type index$4_Transaction = Transaction;
|
|
|
2270
1341
|
type index$4_TransactionHash = TransactionHash;
|
|
2271
1342
|
type index$4_TransactionTrace = TransactionTrace;
|
|
2272
1343
|
declare namespace index$4 {
|
|
2273
|
-
export { type index$4_ABI as ABI, type index$4_BaseTransaction as BaseTransaction, type index$4_BlockHash as BlockHash, type index$4_BlockHashAndNumber as BlockHashAndNumber, type index$4_BlockTransactionsTraces as BlockTransactionsTraces, type BlockWithTxHashes$1 as BlockWithTxHashes, type index$
|
|
1344
|
+
export { type index$4_ABI as ABI, type index$4_BaseTransaction as BaseTransaction, type index$4_BlockHash as BlockHash, type index$4_BlockHashAndNumber as BlockHashAndNumber, type index$4_BlockTransactionsTraces as BlockTransactionsTraces, type BlockWithTxHashes$1 as BlockWithTxHashes, type index$4_BlockWithTxs as BlockWithTxs, type index$4_ChainId as ChainId, type index$4_ContractAddress as ContractAddress, type ContractClass$1 as ContractClass, type DeclaredTransaction$1 as DeclaredTransaction, type index$4_DeployedAccountTransaction as DeployedAccountTransaction, type index$4_DeprecatedDeclaredClasses as DeprecatedDeclaredClasses, index$4_EBlockTag as EBlockTag, index$4_EDAMode as EDAMode, index$4_EDataAvailabilityMode as EDataAvailabilityMode, index$4_ESimulationFlag as ESimulationFlag, index$4_ETransactionExecutionStatus as ETransactionExecutionStatus, index$4_ETransactionFinalityStatus as ETransactionFinalityStatus, index$4_ETransactionStatus as ETransactionStatus, index$4_ETransactionType as ETransactionType, index$4_ETransactionVersion as ETransactionVersion, index$4_ETransactionVersion2 as ETransactionVersion2, index$4_ETransactionVersion3 as ETransactionVersion3, type index$4_EmittedEvent as EmittedEvent, errors as Errors, type index$4_Event as Event, type index$4_EventFilter as EventFilter, type index$4_Events as Events, type FeeEstimate$1 as FeeEstimate, type index$4_FeePayment as FeePayment, type index$4_Felt as Felt, type InvokedTransaction$1 as InvokedTransaction, type index$4_L1Message as L1Message, type index$4_Methods as Methods, type Nonce$1 as Nonce, type index$4_NonceUpdates as NonceUpdates, type index$4_PendingReceipt as PendingReceipt, type index$4_PriceUnit as PriceUnit, type index$4_Receipt as Receipt, type index$4_ReplacedClasses as ReplacedClasses, type ResourceBounds$1 as ResourceBounds, components as SPEC, type SimulateTransaction$1 as SimulateTransaction, type SimulateTransactionResponse$1 as SimulateTransactionResponse, type SimulationFlags$1 as SimulationFlags, type StateUpdate$1 as StateUpdate, type index$4_StorageDiffs as StorageDiffs, type index$4_Syncing as Syncing, type index$4_Transaction as Transaction, type index$4_TransactionHash as TransactionHash, type TransactionReceipt$1 as TransactionReceipt, type TransactionStatus$1 as TransactionStatus, type index$4_TransactionTrace as TransactionTrace, type TransactionWithHash$1 as TransactionWithHash };
|
|
2274
1345
|
}
|
|
2275
1346
|
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
type index$3_BlockWithTxs = BlockWithTxs;
|
|
2283
|
-
type index$3_ChainId = ChainId;
|
|
2284
|
-
type index$3_ContractAddress = ContractAddress;
|
|
2285
|
-
type index$3_DeployedAccountTransaction = DeployedAccountTransaction;
|
|
2286
|
-
type index$3_DeprecatedDeclaredClasses = DeprecatedDeclaredClasses;
|
|
2287
|
-
type index$3_EBlockTag = EBlockTag;
|
|
2288
|
-
declare const index$3_EBlockTag: typeof EBlockTag;
|
|
2289
|
-
type index$3_EDAMode = EDAMode;
|
|
2290
|
-
declare const index$3_EDAMode: typeof EDAMode;
|
|
2291
|
-
type index$3_EDataAvailabilityMode = EDataAvailabilityMode;
|
|
2292
|
-
declare const index$3_EDataAvailabilityMode: typeof EDataAvailabilityMode;
|
|
2293
|
-
type index$3_ESimulationFlag = ESimulationFlag;
|
|
2294
|
-
declare const index$3_ESimulationFlag: typeof ESimulationFlag;
|
|
2295
|
-
type index$3_ETransactionExecutionStatus = ETransactionExecutionStatus;
|
|
2296
|
-
declare const index$3_ETransactionExecutionStatus: typeof ETransactionExecutionStatus;
|
|
2297
|
-
type index$3_ETransactionFinalityStatus = ETransactionFinalityStatus;
|
|
2298
|
-
declare const index$3_ETransactionFinalityStatus: typeof ETransactionFinalityStatus;
|
|
2299
|
-
type index$3_ETransactionStatus = ETransactionStatus;
|
|
2300
|
-
declare const index$3_ETransactionStatus: typeof ETransactionStatus;
|
|
2301
|
-
type index$3_ETransactionType = ETransactionType;
|
|
2302
|
-
declare const index$3_ETransactionType: typeof ETransactionType;
|
|
2303
|
-
type index$3_ETransactionVersion = ETransactionVersion;
|
|
2304
|
-
declare const index$3_ETransactionVersion: typeof ETransactionVersion;
|
|
2305
|
-
type index$3_ETransactionVersion2 = ETransactionVersion2;
|
|
2306
|
-
declare const index$3_ETransactionVersion2: typeof ETransactionVersion2;
|
|
2307
|
-
type index$3_ETransactionVersion3 = ETransactionVersion3;
|
|
2308
|
-
declare const index$3_ETransactionVersion3: typeof ETransactionVersion3;
|
|
2309
|
-
type index$3_EmittedEvent = EmittedEvent;
|
|
2310
|
-
type index$3_Event = Event;
|
|
2311
|
-
type index$3_EventFilter = EventFilter;
|
|
2312
|
-
type index$3_Events = Events;
|
|
2313
|
-
type index$3_FeePayment = FeePayment;
|
|
2314
|
-
type index$3_Felt = Felt;
|
|
2315
|
-
type index$3_L1Message = L1Message;
|
|
2316
|
-
type index$3_Methods = Methods;
|
|
2317
|
-
type index$3_NonceUpdates = NonceUpdates;
|
|
2318
|
-
type index$3_PendingReceipt = PendingReceipt;
|
|
2319
|
-
type index$3_PriceUnit = PriceUnit;
|
|
2320
|
-
type index$3_Receipt = Receipt;
|
|
2321
|
-
type index$3_ReplacedClasses = ReplacedClasses;
|
|
2322
|
-
type index$3_StorageDiffs = StorageDiffs;
|
|
2323
|
-
type index$3_Syncing = Syncing;
|
|
2324
|
-
type index$3_Transaction = Transaction;
|
|
2325
|
-
type index$3_TransactionHash = TransactionHash;
|
|
2326
|
-
type index$3_TransactionTrace = TransactionTrace;
|
|
2327
|
-
declare namespace index$3 {
|
|
2328
|
-
export { type index$3_ABI as ABI, type index$3_BaseTransaction as BaseTransaction, type index$3_BlockHash as BlockHash, type index$3_BlockHashAndNumber as BlockHashAndNumber, type index$3_BlockTransactionsTraces as BlockTransactionsTraces, type BlockWithTxHashes$1 as BlockWithTxHashes, type index$3_BlockWithTxReceipts as BlockWithTxReceipts, type index$3_BlockWithTxs as BlockWithTxs, type index$3_ChainId as ChainId, type index$3_ContractAddress as ContractAddress, type ContractClass$1 as ContractClass, type DeclaredTransaction$1 as DeclaredTransaction, type index$3_DeployedAccountTransaction as DeployedAccountTransaction, type index$3_DeprecatedDeclaredClasses as DeprecatedDeclaredClasses, index$3_EBlockTag as EBlockTag, index$3_EDAMode as EDAMode, index$3_EDataAvailabilityMode as EDataAvailabilityMode, index$3_ESimulationFlag as ESimulationFlag, index$3_ETransactionExecutionStatus as ETransactionExecutionStatus, index$3_ETransactionFinalityStatus as ETransactionFinalityStatus, index$3_ETransactionStatus as ETransactionStatus, index$3_ETransactionType as ETransactionType, index$3_ETransactionVersion as ETransactionVersion, index$3_ETransactionVersion2 as ETransactionVersion2, index$3_ETransactionVersion3 as ETransactionVersion3, type index$3_EmittedEvent as EmittedEvent, errors as Errors, type index$3_Event as Event, type index$3_EventFilter as EventFilter, type index$3_Events as Events, type FeeEstimate$1 as FeeEstimate, type index$3_FeePayment as FeePayment, type index$3_Felt as Felt, type InvokedTransaction$1 as InvokedTransaction, index$6 as JRPC, type index$3_L1Message as L1Message, type index$3_Methods as Methods, type Nonce$1 as Nonce, type index$3_NonceUpdates as NonceUpdates, type index$3_PendingReceipt as PendingReceipt, type index$3_PriceUnit as PriceUnit, index$5 as RPCSPEC06, index$4 as RPCSPEC07, type index$3_Receipt as Receipt, type index$3_ReplacedClasses as ReplacedClasses, type ResourceBounds$1 as ResourceBounds, components$1 as SPEC, type SimulateTransaction$1 as SimulateTransaction, type SimulateTransactionResponse$1 as SimulateTransactionResponse, type SimulationFlags$1 as SimulationFlags, type StateUpdate$1 as StateUpdate, type index$3_StorageDiffs as StorageDiffs, type index$3_Syncing as Syncing, type index$3_Transaction as Transaction, type index$3_TransactionHash as TransactionHash, type TransactionReceipt$1 as TransactionReceipt, type TransactionStatus$1 as TransactionStatus, type index$3_TransactionTrace as TransactionTrace, type TransactionWithHash$1 as TransactionWithHash };
|
|
2329
|
-
}
|
|
1347
|
+
var index$3 = /*#__PURE__*/_mergeNamespaces({
|
|
1348
|
+
__proto__: null,
|
|
1349
|
+
JRPC: index$5,
|
|
1350
|
+
RPCSPEC06: index$4,
|
|
1351
|
+
RPCSPEC07: RPCSPEC07
|
|
1352
|
+
}, [RPCSPEC07]);
|
|
2330
1353
|
|
|
2331
1354
|
declare const IS_BROWSER: boolean;
|
|
2332
1355
|
/**
|
|
@@ -2337,12 +1360,34 @@ declare const IS_BROWSER: boolean;
|
|
|
2337
1360
|
* Convert array buffer to string
|
|
2338
1361
|
*
|
|
2339
1362
|
* *[internal usage]*
|
|
1363
|
+
*
|
|
1364
|
+
* @param {ArrayBuffer} array The ArrayBuffer to convert to string.
|
|
1365
|
+
* @returns {string} The converted string.
|
|
1366
|
+
*
|
|
1367
|
+
* @example
|
|
1368
|
+
* ```typescript
|
|
1369
|
+
* const buffer = new ArrayBuffer(5);
|
|
1370
|
+
* const view = new Uint8Array(buffer);
|
|
1371
|
+
* [72, 101, 108, 108, 111].forEach((x, idx) => view[idx] = x);
|
|
1372
|
+
* const result = encode.arrayBufferToString(buffer);
|
|
1373
|
+
* // result = "Hello"
|
|
1374
|
+
* ```
|
|
2340
1375
|
*/
|
|
2341
1376
|
declare function arrayBufferToString(array: ArrayBuffer): string;
|
|
2342
1377
|
/**
|
|
2343
1378
|
* Convert utf8-string to Uint8Array
|
|
2344
1379
|
*
|
|
2345
1380
|
* *[internal usage]*
|
|
1381
|
+
*
|
|
1382
|
+
* @param {string} str The UTF-8 string to convert.
|
|
1383
|
+
* @returns {Uint8Array} The encoded Uint8Array.
|
|
1384
|
+
*
|
|
1385
|
+
* @example
|
|
1386
|
+
* ```typescript
|
|
1387
|
+
* const myString = 'Hi';
|
|
1388
|
+
* const result = encode.utf8ToArray(myString);
|
|
1389
|
+
* // result = Uint8Array(2) [ 72, 105 ]
|
|
1390
|
+
* ```
|
|
2346
1391
|
*/
|
|
2347
1392
|
declare function utf8ToArray(str: string): Uint8Array;
|
|
2348
1393
|
/**
|
|
@@ -2353,57 +1398,164 @@ declare function utf8ToArray(str: string): Uint8Array;
|
|
|
2353
1398
|
declare function stringToArrayBuffer(str: string): Uint8Array;
|
|
2354
1399
|
/**
|
|
2355
1400
|
* Convert string to array buffer (browser and node compatible)
|
|
1401
|
+
*
|
|
1402
|
+
* @param {string} a The Base64 encoded string to convert.
|
|
1403
|
+
* @returns {Uint8Array} The decoded Uint8Array.
|
|
1404
|
+
*
|
|
1405
|
+
* @example
|
|
1406
|
+
* ```typescript
|
|
1407
|
+
* const base64String = 'SGVsbG8='; // 'Hello' in Base64
|
|
1408
|
+
* const result = encode.atobUniversal(base64String);
|
|
1409
|
+
* // result = Uint8Array(5) [ 72, 101, 108, 108, 111 ]
|
|
1410
|
+
* ```
|
|
2356
1411
|
*/
|
|
2357
1412
|
declare function atobUniversal(a: string): Uint8Array;
|
|
2358
1413
|
/**
|
|
2359
1414
|
* Convert array buffer to string (browser and node compatible)
|
|
1415
|
+
*
|
|
1416
|
+
* @param {ArrayBuffer} b The Array buffer.
|
|
1417
|
+
* @returns {string} The Base64 encoded string.
|
|
1418
|
+
*
|
|
1419
|
+
* @example
|
|
1420
|
+
* ```typescript
|
|
1421
|
+
* const buffer = new Uint8Array([72, 101, 108, 108, 111]); // Array with ASCII values for 'Hello'
|
|
1422
|
+
* const result = encode.btoaUniversal(buffer);
|
|
1423
|
+
* // result = "SGVsbG8="
|
|
1424
|
+
* ```
|
|
2360
1425
|
*/
|
|
2361
1426
|
declare function btoaUniversal(b: ArrayBuffer): string;
|
|
2362
1427
|
/**
|
|
2363
1428
|
* Convert array buffer to hex-string
|
|
2364
|
-
*
|
|
1429
|
+
*
|
|
1430
|
+
* @param {Uint8Array} buffer The encoded Uint8Array.
|
|
1431
|
+
* @returns {string} The hex-string
|
|
1432
|
+
*
|
|
1433
|
+
* @example
|
|
1434
|
+
* ```typescript
|
|
1435
|
+
* const buffer = new Uint8Array([72, 101, 108, 108, 111]); // Array with ASCII values for 'Hello'
|
|
1436
|
+
* const result = encode.buf2hex(buffer);
|
|
1437
|
+
* // result = "48656c6c6f"
|
|
1438
|
+
* ```
|
|
2365
1439
|
*/
|
|
2366
1440
|
declare function buf2hex(buffer: Uint8Array): string;
|
|
2367
1441
|
/**
|
|
2368
1442
|
* Remove hex prefix '0x' from hex-string
|
|
2369
1443
|
* @param hex hex-string
|
|
2370
|
-
* @returns
|
|
1444
|
+
* @returns {string} The hex-string
|
|
1445
|
+
*
|
|
1446
|
+
* @example
|
|
1447
|
+
* ```typescript
|
|
1448
|
+
* const hexStringWithPrefix = '0x48656c6c6f';
|
|
1449
|
+
* const result = encode.removeHexPrefix(hexStringWithPrefix);
|
|
1450
|
+
* // result: "48656c6c6f"
|
|
1451
|
+
* ```
|
|
2371
1452
|
*/
|
|
2372
1453
|
declare function removeHexPrefix(hex: string): string;
|
|
2373
1454
|
/**
|
|
2374
1455
|
* Add hex prefix '0x' to base16-string
|
|
2375
1456
|
* @param hex base16-string
|
|
2376
|
-
* @returns
|
|
1457
|
+
* @returns {string} The hex-string
|
|
1458
|
+
*
|
|
1459
|
+
* @example
|
|
1460
|
+
* ```typescript
|
|
1461
|
+
* const plainHexString = '48656c6c6f';
|
|
1462
|
+
* const result = encode.addHexPrefix(plainHexString);
|
|
1463
|
+
* // result: "0x48656c6c6f"
|
|
1464
|
+
* ```
|
|
2377
1465
|
*/
|
|
2378
1466
|
declare function addHexPrefix(hex: string): string;
|
|
2379
1467
|
/**
|
|
2380
1468
|
* Prepend string (default with '0')
|
|
1469
|
+
*
|
|
1470
|
+
* Pads a string to a certain length with a specific string.
|
|
1471
|
+
* The padding can be applied only to the left of the input string.
|
|
1472
|
+
*
|
|
1473
|
+
* @param {string} str The string to pad.
|
|
1474
|
+
* @param {number} length The target length for the padded string.
|
|
1475
|
+
* @param {string} [padding='0'] The string to use for padding. Defaults to '0'.
|
|
1476
|
+
* @returns {string} The padded string.
|
|
1477
|
+
*
|
|
1478
|
+
* @example
|
|
1479
|
+
* ```typescript
|
|
1480
|
+
* const myString = '1A3F';
|
|
1481
|
+
* const result = encode.padLeft(myString, 10);
|
|
1482
|
+
* // result: '0000001A3F'
|
|
1483
|
+
* ```
|
|
2381
1484
|
*/
|
|
2382
1485
|
declare function padLeft(str: string, length: number, padding?: string): string;
|
|
2383
1486
|
/**
|
|
2384
1487
|
* Calculate byte length of string
|
|
2385
1488
|
*
|
|
2386
1489
|
* *[no internal usage]*
|
|
1490
|
+
*
|
|
1491
|
+
* Calculates the byte length of a string based on a specified byte size.
|
|
1492
|
+
* The function rounds up the byte count to the nearest multiple of the specified byte size.
|
|
1493
|
+
*
|
|
1494
|
+
* @param {string} str The string whose byte length is to be calculated.
|
|
1495
|
+
* @param {number} [byteSize='8'] The size of the byte block to round up to. Defaults to 8.
|
|
1496
|
+
* @returns {number} The calculated byte length, rounded to the nearest multiple of byteSize.
|
|
1497
|
+
*
|
|
1498
|
+
* @example
|
|
1499
|
+
* ```typescript
|
|
1500
|
+
* const myString = 'Hello';
|
|
1501
|
+
* const result = encode.calcByteLength(myString, 4);
|
|
1502
|
+
* // result = 8 (rounded up to the nearest multiple of 4)
|
|
1503
|
+
*
|
|
1504
|
+
* ```
|
|
2387
1505
|
*/
|
|
2388
1506
|
declare function calcByteLength(str: string, byteSize?: number): number;
|
|
2389
1507
|
/**
|
|
2390
1508
|
* Prepend '0' to string bytes
|
|
2391
1509
|
*
|
|
2392
1510
|
* *[no internal usage]*
|
|
1511
|
+
*
|
|
1512
|
+
*
|
|
1513
|
+
* * Prepends padding to the left of a string to ensure it matches a specific byte length.
|
|
1514
|
+
* The function uses a specified padding character and rounds up the string length to the nearest multiple of `byteSize`.
|
|
1515
|
+
*
|
|
1516
|
+
* @param {string} str The string to be padded.
|
|
1517
|
+
* @param {number} [byteSize='8'] The byte block size to which the string length should be rounded up. Defaults to 8.
|
|
1518
|
+
* @param {string} [padding='0'] The character to use for padding. Defaults to '0'.
|
|
1519
|
+
* @returns {string} The padded string.
|
|
1520
|
+
*
|
|
1521
|
+
* @example
|
|
1522
|
+
* ```typescript
|
|
1523
|
+
* const myString = '123';
|
|
1524
|
+
* const result = encode.sanitizeBytes(myString);
|
|
1525
|
+
* // result: '00000123' (padded to 8 characters)
|
|
1526
|
+
* ```
|
|
2393
1527
|
*/
|
|
2394
1528
|
declare function sanitizeBytes(str: string, byteSize?: number, padding?: string): string;
|
|
2395
1529
|
/**
|
|
2396
|
-
*
|
|
1530
|
+
* Sanitizes a hex-string by removing any existing '0x' prefix, padding the string with '0' to ensure it has even length,
|
|
1531
|
+
* and then re-adding the '0x' prefix.
|
|
2397
1532
|
*
|
|
2398
1533
|
* *[no internal usage]*
|
|
2399
1534
|
* @param hex hex-string
|
|
2400
1535
|
* @returns format: hex-string
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* ```typescript
|
|
1539
|
+
* const unevenHex = '0x23abc';
|
|
1540
|
+
* const result = encode.sanitizeHex(unevenHex);
|
|
1541
|
+
* // result = '0x023abc' (padded to ensure even length)
|
|
1542
|
+
* ```
|
|
2401
1543
|
*/
|
|
2402
1544
|
declare function sanitizeHex(hex: string): string;
|
|
2403
1545
|
/**
|
|
2404
1546
|
* String transformation util
|
|
2405
1547
|
*
|
|
2406
1548
|
* Pascal case to screaming snake case
|
|
1549
|
+
*
|
|
1550
|
+
* @param {string} text The PascalCase string to convert.
|
|
1551
|
+
* @returns {string} The converted snake_case string in uppercase.
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* ```typescript
|
|
1555
|
+
* const pascalString = 'PascalCaseExample';
|
|
1556
|
+
* const result = encode.pascalToSnake(pascalString);
|
|
1557
|
+
* // result: 'PASCAL_CASE_EXAMPLE'
|
|
1558
|
+
* ```
|
|
2407
1559
|
*/
|
|
2408
1560
|
declare const pascalToSnake: (text: string) => string;
|
|
2409
1561
|
|
|
@@ -2450,17 +1602,14 @@ declare const RANGE_U128: {
|
|
|
2450
1602
|
};
|
|
2451
1603
|
declare enum BaseUrl {
|
|
2452
1604
|
SN_MAIN = "https://alpha-mainnet.starknet.io",
|
|
2453
|
-
SN_GOERLI = "https://alpha4.starknet.io",
|
|
2454
1605
|
SN_SEPOLIA = "https://alpha-sepolia.starknet.io"
|
|
2455
1606
|
}
|
|
2456
1607
|
declare enum NetworkName {
|
|
2457
1608
|
SN_MAIN = "SN_MAIN",
|
|
2458
|
-
SN_GOERLI = "SN_GOERLI",
|
|
2459
1609
|
SN_SEPOLIA = "SN_SEPOLIA"
|
|
2460
1610
|
}
|
|
2461
1611
|
declare enum StarknetChainId {
|
|
2462
1612
|
SN_MAIN = "0x534e5f4d41494e",// encodeShortString('SN_MAIN'),
|
|
2463
|
-
SN_GOERLI = "0x534e5f474f45524c49",// encodeShortString('SN_GOERLI')
|
|
2464
1613
|
SN_SEPOLIA = "0x534e5f5345504f4c4941"
|
|
2465
1614
|
}
|
|
2466
1615
|
declare enum TransactionHashPrefix {
|
|
@@ -2481,7 +1630,6 @@ declare const UDC: {
|
|
|
2481
1630
|
};
|
|
2482
1631
|
declare const RPC_DEFAULT_VERSION = "v0_7";
|
|
2483
1632
|
declare const RPC_NODES: {
|
|
2484
|
-
SN_GOERLI: string[];
|
|
2485
1633
|
SN_MAIN: string[];
|
|
2486
1634
|
SN_SEPOLIA: string[];
|
|
2487
1635
|
};
|
|
@@ -2511,7 +1659,7 @@ declare const constants_ZERO: typeof ZERO;
|
|
|
2511
1659
|
type constants_feeMarginPercentage = feeMarginPercentage;
|
|
2512
1660
|
declare const constants_feeMarginPercentage: typeof feeMarginPercentage;
|
|
2513
1661
|
declare namespace constants {
|
|
2514
|
-
export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, constants_BaseUrl as BaseUrl, constants_IS_BROWSER as IS_BROWSER, constants_MASK_250 as MASK_250, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, constants_NetworkName as NetworkName, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_U128 as RANGE_U128, constants_RPC_DEFAULT_VERSION as RPC_DEFAULT_VERSION, constants_RPC_NODES as RPC_NODES, constants_StarknetChainId as StarknetChainId, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, ETransactionVersion as TRANSACTION_VERSION, constants_TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO, constants_feeMarginPercentage as feeMarginPercentage };
|
|
1662
|
+
export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, constants_BaseUrl as BaseUrl, constants_IS_BROWSER as IS_BROWSER, constants_MASK_250 as MASK_250, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, constants_NetworkName as NetworkName, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_U128 as RANGE_U128, constants_RPC_DEFAULT_VERSION as RPC_DEFAULT_VERSION, constants_RPC_NODES as RPC_NODES, constants_StarknetChainId as StarknetChainId, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, ETransactionVersion$1 as TRANSACTION_VERSION, constants_TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO, constants_feeMarginPercentage as feeMarginPercentage };
|
|
2515
1663
|
}
|
|
2516
1664
|
|
|
2517
1665
|
declare const ec_weierstrass: typeof weierstrass;
|
|
@@ -2632,7 +1780,7 @@ declare class CairoResult<T, U> {
|
|
|
2632
1780
|
type CairoEnum = CairoCustomEnum | CairoOption<any> | CairoResult<any, any>;
|
|
2633
1781
|
|
|
2634
1782
|
/** ABI */
|
|
2635
|
-
type Abi = ReadonlyArray<FunctionAbi | EventAbi | StructAbi | any>;
|
|
1783
|
+
type Abi = ReadonlyArray<FunctionAbi | EventAbi | StructAbi | InterfaceAbi | any>;
|
|
2636
1784
|
type AbiEntry = {
|
|
2637
1785
|
name: string;
|
|
2638
1786
|
type: 'felt' | 'felt*' | string;
|
|
@@ -2666,6 +1814,14 @@ type StructAbi = {
|
|
|
2666
1814
|
size: number;
|
|
2667
1815
|
type: 'struct';
|
|
2668
1816
|
};
|
|
1817
|
+
type AbiInterfaces = {
|
|
1818
|
+
[name: string]: InterfaceAbi;
|
|
1819
|
+
};
|
|
1820
|
+
type InterfaceAbi = {
|
|
1821
|
+
items: FunctionAbi[];
|
|
1822
|
+
name: string;
|
|
1823
|
+
type: 'interface';
|
|
1824
|
+
};
|
|
2669
1825
|
type AbiEnums = {
|
|
2670
1826
|
[name: string]: EnumAbi;
|
|
2671
1827
|
};
|
|
@@ -2740,6 +1896,7 @@ type CairoAssembly = {
|
|
|
2740
1896
|
/** COMPILED CONTRACT */
|
|
2741
1897
|
/**
|
|
2742
1898
|
* format produced after starknet-compile .cairo to .json
|
|
1899
|
+
*
|
|
2743
1900
|
* sierra_program is hex array
|
|
2744
1901
|
*/
|
|
2745
1902
|
type CompiledSierra = {
|
|
@@ -2751,6 +1908,7 @@ type CompiledSierra = {
|
|
|
2751
1908
|
};
|
|
2752
1909
|
/**
|
|
2753
1910
|
* format produced after compressing 'sierra_program', stringifies 'abi' property and omit sierra_program_debug_info
|
|
1911
|
+
*
|
|
2754
1912
|
* CompressedCompiledSierra
|
|
2755
1913
|
*/
|
|
2756
1914
|
type SierraContractClass = Omit<CompiledSierra, 'abi' | 'sierra_program_debug_info'> & {
|
|
@@ -2778,6 +1936,7 @@ type SierraContractEntryPointFields = {
|
|
|
2778
1936
|
|
|
2779
1937
|
/**
|
|
2780
1938
|
* format produced after compressing compiled contract
|
|
1939
|
+
*
|
|
2781
1940
|
* CompressedCompiledContract
|
|
2782
1941
|
*/
|
|
2783
1942
|
type ContractClass = LegacyContractClass | SierraContractClass;
|
|
@@ -2806,6 +1965,7 @@ type ByteArray = {
|
|
|
2806
1965
|
};
|
|
2807
1966
|
/**
|
|
2808
1967
|
* Compiled calldata ready to be sent
|
|
1968
|
+
*
|
|
2809
1969
|
* decimal-string array
|
|
2810
1970
|
*/
|
|
2811
1971
|
type Calldata = string[] & {
|
|
@@ -2829,6 +1989,7 @@ interface Uint512 {
|
|
|
2829
1989
|
}
|
|
2830
1990
|
/**
|
|
2831
1991
|
* BigNumberish array
|
|
1992
|
+
*
|
|
2832
1993
|
* use CallData.compile() to convert to Calldata
|
|
2833
1994
|
*/
|
|
2834
1995
|
type RawCalldata = BigNumberish[];
|
|
@@ -2901,12 +2062,12 @@ type InvocationsDetails = {
|
|
|
2901
2062
|
type V3TransactionDetails = {
|
|
2902
2063
|
nonce: BigNumberish;
|
|
2903
2064
|
version: BigNumberish;
|
|
2904
|
-
resourceBounds: ResourceBounds$
|
|
2065
|
+
resourceBounds: ResourceBounds$2;
|
|
2905
2066
|
tip: BigNumberish;
|
|
2906
2067
|
paymasterData: BigNumberish[];
|
|
2907
2068
|
accountDeploymentData: BigNumberish[];
|
|
2908
|
-
nonceDataAvailabilityMode: EDataAvailabilityMode;
|
|
2909
|
-
feeDataAvailabilityMode: EDataAvailabilityMode;
|
|
2069
|
+
nonceDataAvailabilityMode: EDataAvailabilityMode$1;
|
|
2070
|
+
feeDataAvailabilityMode: EDataAvailabilityMode$1;
|
|
2910
2071
|
};
|
|
2911
2072
|
/**
|
|
2912
2073
|
* Contain all additional details params
|
|
@@ -2961,9 +2122,13 @@ declare enum BlockTag {
|
|
|
2961
2122
|
}
|
|
2962
2123
|
type BlockNumber = BlockTag | null | number;
|
|
2963
2124
|
/**
|
|
2964
|
-
* hex string and
|
|
2125
|
+
* hex string and BigInt are detected as block hashes
|
|
2126
|
+
*
|
|
2965
2127
|
* decimal string and number are detected as block numbers
|
|
2966
|
-
*
|
|
2128
|
+
*
|
|
2129
|
+
* text string are detected as block tag
|
|
2130
|
+
*
|
|
2131
|
+
* null return 'pending' block tag
|
|
2967
2132
|
*/
|
|
2968
2133
|
type BlockIdentifier = BlockNumber | BigNumberish;
|
|
2969
2134
|
/**
|
|
@@ -3041,6 +2206,7 @@ interface ProviderOptions extends RpcProviderOptions {
|
|
|
3041
2206
|
type RpcProviderOptions = {
|
|
3042
2207
|
nodeUrl?: string | NetworkName;
|
|
3043
2208
|
retries?: number;
|
|
2209
|
+
transactionRetryIntervalFallback?: number;
|
|
3044
2210
|
headers?: object;
|
|
3045
2211
|
blockIdentifier?: BlockIdentifier;
|
|
3046
2212
|
chainId?: StarknetChainId;
|
|
@@ -3071,32 +2237,32 @@ type MergeProperties<T1 extends Record<any, any>, T2 extends Record<any, any>> =
|
|
|
3071
2237
|
[K in Exclude<keyof T2, keyof T1>]?: T2[K];
|
|
3072
2238
|
};
|
|
3073
2239
|
type Merge<T1, T2> = Simplify<T1 extends Array<any> ? T2 extends Array<any> ? Array<Merge<ArrayElement<T1>, ArrayElement<T2>>> : T1 : T2 extends Array<any> ? T2 : T1 extends object ? T2 extends object ? MergeProperties<T1, T2> : T1 : T2 extends object ? T2 : T1 | T2>;
|
|
3074
|
-
type BLOCK_HASH = Merge<BLOCK_HASH$1, BLOCK_HASH
|
|
3075
|
-
type BLOCK_NUMBER = Merge<BLOCK_NUMBER$1, BLOCK_NUMBER
|
|
3076
|
-
type FELT = Merge<FELT$1, FELT
|
|
3077
|
-
type TXN_HASH = Merge<TXN_HASH$1, TXN_HASH
|
|
3078
|
-
type PRICE_UNIT = Merge<PRICE_UNIT$1, PRICE_UNIT
|
|
3079
|
-
type RESOURCE_PRICE = Merge<RESOURCE_PRICE$1, RESOURCE_PRICE
|
|
3080
|
-
type SIMULATION_FLAG
|
|
3081
|
-
type STATE_UPDATE = Merge<STATE_UPDATE$1, STATE_UPDATE
|
|
3082
|
-
type PENDING_STATE_UPDATE = Merge<PENDING_STATE_UPDATE$1, PENDING_STATE_UPDATE
|
|
3083
|
-
type INVOKE_TXN_RECEIPT = Merge<INVOKE_TXN_RECEIPT$1, INVOKE_TXN_RECEIPT
|
|
3084
|
-
type DECLARE_TXN_RECEIPT = Merge<DECLARE_TXN_RECEIPT$1, DECLARE_TXN_RECEIPT
|
|
3085
|
-
type DEPLOY_ACCOUNT_TXN_RECEIPT = Merge<DEPLOY_ACCOUNT_TXN_RECEIPT$1, DEPLOY_ACCOUNT_TXN_RECEIPT
|
|
3086
|
-
type L1_HANDLER_TXN_RECEIPT = Merge<L1_HANDLER_TXN_RECEIPT$1, L1_HANDLER_TXN_RECEIPT
|
|
3087
|
-
type PENDING_INVOKE_TXN_RECEIPT = Merge<PENDING_INVOKE_TXN_RECEIPT$1, INVOKE_TXN_RECEIPT
|
|
3088
|
-
type PENDING_DECLARE_TXN_RECEIPT = Merge<PENDING_DECLARE_TXN_RECEIPT$1, DECLARE_TXN_RECEIPT
|
|
3089
|
-
type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT = Merge<PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT$1, DEPLOY_ACCOUNT_TXN_RECEIPT
|
|
3090
|
-
type PENDING_L1_HANDLER_TXN_RECEIPT = Merge<PENDING_L1_HANDLER_TXN_RECEIPT$1, L1_HANDLER_TXN_RECEIPT
|
|
3091
|
-
type BlockWithTxHashes = Merge<BlockWithTxHashes$
|
|
3092
|
-
type ContractClassPayload = Merge<ContractClass$
|
|
3093
|
-
type DeclaredTransaction = Merge<DeclaredTransaction$
|
|
3094
|
-
type FeeEstimate = Merge<FEE_ESTIMATE, FEE_ESTIMATE
|
|
3095
|
-
type InvokedTransaction = Merge<InvokedTransaction$
|
|
3096
|
-
type ResourceBounds = Merge<ResourceBounds$
|
|
3097
|
-
type SimulateTransaction = Merge<SimulateTransaction$
|
|
3098
|
-
type TransactionReceipt = Merge<TransactionReceipt$
|
|
3099
|
-
type TransactionWithHash = Merge<TransactionWithHash$
|
|
2240
|
+
type BLOCK_HASH = Merge<BLOCK_HASH$1, RPCSPEC07.SPEC.BLOCK_HASH>;
|
|
2241
|
+
type BLOCK_NUMBER = Merge<BLOCK_NUMBER$1, RPCSPEC07.SPEC.BLOCK_NUMBER>;
|
|
2242
|
+
type FELT = Merge<FELT$1, RPCSPEC07.SPEC.FELT>;
|
|
2243
|
+
type TXN_HASH = Merge<TXN_HASH$1, RPCSPEC07.SPEC.TXN_HASH>;
|
|
2244
|
+
type PRICE_UNIT = Merge<PRICE_UNIT$1, RPCSPEC07.SPEC.PRICE_UNIT>;
|
|
2245
|
+
type RESOURCE_PRICE = Merge<RESOURCE_PRICE$1, RPCSPEC07.SPEC.RESOURCE_PRICE>;
|
|
2246
|
+
type SIMULATION_FLAG = Merge<SIMULATION_FLAG$1, RPCSPEC07.SPEC.SIMULATION_FLAG>;
|
|
2247
|
+
type STATE_UPDATE = Merge<STATE_UPDATE$1, RPCSPEC07.SPEC.STATE_UPDATE>;
|
|
2248
|
+
type PENDING_STATE_UPDATE = Merge<PENDING_STATE_UPDATE$1, RPCSPEC07.SPEC.PENDING_STATE_UPDATE>;
|
|
2249
|
+
type INVOKE_TXN_RECEIPT = Merge<INVOKE_TXN_RECEIPT$1, RPCSPEC07.SPEC.INVOKE_TXN_RECEIPT & RPCSPEC07.BlockHashAndNumber>;
|
|
2250
|
+
type DECLARE_TXN_RECEIPT = Merge<DECLARE_TXN_RECEIPT$1, RPCSPEC07.SPEC.DECLARE_TXN_RECEIPT & RPCSPEC07.BlockHashAndNumber>;
|
|
2251
|
+
type DEPLOY_ACCOUNT_TXN_RECEIPT = Merge<DEPLOY_ACCOUNT_TXN_RECEIPT$1, RPCSPEC07.SPEC.DEPLOY_ACCOUNT_TXN_RECEIPT & RPCSPEC07.BlockHashAndNumber>;
|
|
2252
|
+
type L1_HANDLER_TXN_RECEIPT = Merge<L1_HANDLER_TXN_RECEIPT$1, RPCSPEC07.SPEC.L1_HANDLER_TXN_RECEIPT & RPCSPEC07.BlockHashAndNumber>;
|
|
2253
|
+
type PENDING_INVOKE_TXN_RECEIPT = Merge<PENDING_INVOKE_TXN_RECEIPT$1, RPCSPEC07.SPEC.INVOKE_TXN_RECEIPT>;
|
|
2254
|
+
type PENDING_DECLARE_TXN_RECEIPT = Merge<PENDING_DECLARE_TXN_RECEIPT$1, RPCSPEC07.SPEC.DECLARE_TXN_RECEIPT>;
|
|
2255
|
+
type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT = Merge<PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT$1, RPCSPEC07.SPEC.DEPLOY_ACCOUNT_TXN_RECEIPT>;
|
|
2256
|
+
type PENDING_L1_HANDLER_TXN_RECEIPT = Merge<PENDING_L1_HANDLER_TXN_RECEIPT$1, RPCSPEC07.SPEC.L1_HANDLER_TXN_RECEIPT>;
|
|
2257
|
+
type BlockWithTxHashes = Merge<BlockWithTxHashes$1, RPCSPEC07.BlockWithTxHashes>;
|
|
2258
|
+
type ContractClassPayload = Merge<ContractClass$1, RPCSPEC07.ContractClass>;
|
|
2259
|
+
type DeclaredTransaction = Merge<DeclaredTransaction$1, RPCSPEC07.DeclaredTransaction>;
|
|
2260
|
+
type FeeEstimate = Merge<FEE_ESTIMATE, RPCSPEC07.SPEC.FEE_ESTIMATE>;
|
|
2261
|
+
type InvokedTransaction = Merge<InvokedTransaction$1, RPCSPEC07.InvokedTransaction>;
|
|
2262
|
+
type ResourceBounds = Merge<ResourceBounds$1, RPCSPEC07.ResourceBounds>;
|
|
2263
|
+
type SimulateTransaction = Merge<SimulateTransaction$1, RPCSPEC07.SimulateTransaction>;
|
|
2264
|
+
type TransactionReceipt = Merge<TransactionReceipt$1, RPCSPEC07.TransactionReceipt>;
|
|
2265
|
+
type TransactionWithHash = Merge<TransactionWithHash$1, RPCSPEC07.TransactionWithHash>;
|
|
3100
2266
|
|
|
3101
2267
|
/**
|
|
3102
2268
|
* Common interface response
|
|
@@ -3174,7 +2340,8 @@ type DeclareContractResponse = DeclaredTransaction;
|
|
|
3174
2340
|
type CallContractResponse = string[];
|
|
3175
2341
|
type Storage = FELT;
|
|
3176
2342
|
type Nonce = string;
|
|
3177
|
-
|
|
2343
|
+
|
|
2344
|
+
type SimulationFlags = Array<SIMULATION_FLAG>;
|
|
3178
2345
|
type SimulatedTransaction = SimulateTransaction & {
|
|
3179
2346
|
suggestedMaxFee: bigint;
|
|
3180
2347
|
resourceBounds: ResourceBounds;
|
|
@@ -3185,8 +2352,11 @@ type StateUpdate = STATE_UPDATE;
|
|
|
3185
2352
|
type PendingStateUpdate = PENDING_STATE_UPDATE;
|
|
3186
2353
|
/**
|
|
3187
2354
|
* Standardized type
|
|
2355
|
+
*
|
|
3188
2356
|
* Cairo0 program compressed and Cairo1 sierra_program decompressed
|
|
2357
|
+
*
|
|
3189
2358
|
* abi Abi
|
|
2359
|
+
*
|
|
3190
2360
|
* CompiledSierra without '.sierra_program_debug_info'
|
|
3191
2361
|
*/
|
|
3192
2362
|
type ContractClassResponse = LegacyContractClass | Omit<CompiledSierra, 'sierra_program_debug_info'>;
|
|
@@ -3195,7 +2365,7 @@ interface EstimateFee extends EstimateFeeResponse {
|
|
|
3195
2365
|
}
|
|
3196
2366
|
type EstimateFeeBulk = Array<EstimateFee>;
|
|
3197
2367
|
type AccountInvocationsFactoryDetails = {
|
|
3198
|
-
versions: Array<`${ETransactionVersion}`>;
|
|
2368
|
+
versions: Array<`${ETransactionVersion$1}`>;
|
|
3199
2369
|
nonce?: BigNumberish;
|
|
3200
2370
|
blockIdentifier?: BlockIdentifier;
|
|
3201
2371
|
skipValidate?: boolean;
|
|
@@ -3207,10 +2377,10 @@ interface UniversalDetails {
|
|
|
3207
2377
|
tip?: BigNumberish;
|
|
3208
2378
|
paymasterData?: BigNumberish[];
|
|
3209
2379
|
accountDeploymentData?: BigNumberish[];
|
|
3210
|
-
nonceDataAvailabilityMode?: EDataAvailabilityMode;
|
|
3211
|
-
feeDataAvailabilityMode?: EDataAvailabilityMode;
|
|
2380
|
+
nonceDataAvailabilityMode?: EDataAvailabilityMode$1;
|
|
2381
|
+
feeDataAvailabilityMode?: EDataAvailabilityMode$1;
|
|
3212
2382
|
version?: BigNumberish;
|
|
3213
|
-
resourceBounds?: ResourceBounds$
|
|
2383
|
+
resourceBounds?: ResourceBounds$2;
|
|
3214
2384
|
skipValidate?: boolean;
|
|
3215
2385
|
}
|
|
3216
2386
|
interface EstimateFeeDetails extends UniversalDetails {
|
|
@@ -3246,10 +2416,6 @@ type SimulateTransactionDetails = {
|
|
|
3246
2416
|
skipValidate?: boolean;
|
|
3247
2417
|
skipExecute?: boolean;
|
|
3248
2418
|
} & Partial<V3TransactionDetails>;
|
|
3249
|
-
declare enum SIMULATION_FLAG {
|
|
3250
|
-
SKIP_VALIDATE = "SKIP_VALIDATE",
|
|
3251
|
-
SKIP_EXECUTE = "SKIP_EXECUTE"
|
|
3252
|
-
}
|
|
3253
2419
|
type EstimateFeeAction = {
|
|
3254
2420
|
type: TransactionType.INVOKE;
|
|
3255
2421
|
payload: AllowArray<Call>;
|
|
@@ -3319,7 +2485,7 @@ type ParsedEvent = {
|
|
|
3319
2485
|
type ParsedEvents = Array<ParsedEvent>;
|
|
3320
2486
|
|
|
3321
2487
|
type InvocationsSignerDetails = (V2InvocationsSignerDetails | V3InvocationsSignerDetails) & {
|
|
3322
|
-
version: `${ETransactionVersion}`;
|
|
2488
|
+
version: `${ETransactionVersion$1}`;
|
|
3323
2489
|
skipValidate?: boolean;
|
|
3324
2490
|
};
|
|
3325
2491
|
type V2InvocationsSignerDetails = {
|
|
@@ -3328,41 +2494,41 @@ type V2InvocationsSignerDetails = {
|
|
|
3328
2494
|
chainId: StarknetChainId;
|
|
3329
2495
|
nonce: BigNumberish;
|
|
3330
2496
|
maxFee: BigNumberish;
|
|
3331
|
-
version: `${ETransactionVersion2}`;
|
|
2497
|
+
version: `${ETransactionVersion2$1}`;
|
|
3332
2498
|
};
|
|
3333
2499
|
type V3InvocationsSignerDetails = V3TransactionDetails & {
|
|
3334
2500
|
walletAddress: string;
|
|
3335
2501
|
cairoVersion: CairoVersion;
|
|
3336
2502
|
chainId: StarknetChainId;
|
|
3337
|
-
version: `${ETransactionVersion3}`;
|
|
2503
|
+
version: `${ETransactionVersion3$1}`;
|
|
3338
2504
|
};
|
|
3339
2505
|
type DeclareSignerDetails = (V3DeclareSignerDetails | V2DeclareSignerDetails) & {
|
|
3340
|
-
version: `${ETransactionVersion}`;
|
|
2506
|
+
version: `${ETransactionVersion$1}`;
|
|
3341
2507
|
};
|
|
3342
2508
|
type V2DeclareSignerDetails = Required<InvocationsDetails> & {
|
|
3343
2509
|
classHash: string;
|
|
3344
2510
|
compiledClassHash?: string;
|
|
3345
2511
|
senderAddress: string;
|
|
3346
2512
|
chainId: StarknetChainId;
|
|
3347
|
-
version: `${ETransactionVersion2}`;
|
|
2513
|
+
version: `${ETransactionVersion2$1}`;
|
|
3348
2514
|
};
|
|
3349
2515
|
type V3DeclareSignerDetails = V3TransactionDetails & {
|
|
3350
2516
|
classHash: string;
|
|
3351
2517
|
compiledClassHash: string;
|
|
3352
2518
|
senderAddress: string;
|
|
3353
2519
|
chainId: StarknetChainId;
|
|
3354
|
-
version: `${ETransactionVersion3}`;
|
|
2520
|
+
version: `${ETransactionVersion3$1}`;
|
|
3355
2521
|
};
|
|
3356
2522
|
type DeployAccountSignerDetails = V2DeployAccountSignerDetails | V3DeployAccountSignerDetails;
|
|
3357
2523
|
type V2DeployAccountSignerDetails = Required<DeployAccountContractPayload> & Required<InvocationsDetails> & {
|
|
3358
2524
|
contractAddress: BigNumberish;
|
|
3359
2525
|
chainId: StarknetChainId;
|
|
3360
|
-
version: `${ETransactionVersion2}`;
|
|
2526
|
+
version: `${ETransactionVersion2$1}`;
|
|
3361
2527
|
};
|
|
3362
2528
|
type V3DeployAccountSignerDetails = Required<DeployAccountContractPayload> & V3TransactionDetails & {
|
|
3363
2529
|
contractAddress: BigNumberish;
|
|
3364
2530
|
chainId: StarknetChainId;
|
|
3365
|
-
version: `${ETransactionVersion3}`;
|
|
2531
|
+
version: `${ETransactionVersion3$1}`;
|
|
3366
2532
|
};
|
|
3367
2533
|
|
|
3368
2534
|
type TransactionStatusReceiptSets = {
|
|
@@ -3392,6 +2558,7 @@ type index$2_Abi = Abi;
|
|
|
3392
2558
|
type index$2_AbiEntry = AbiEntry;
|
|
3393
2559
|
type index$2_AbiEnums = AbiEnums;
|
|
3394
2560
|
type index$2_AbiEvents = AbiEvents;
|
|
2561
|
+
type index$2_AbiInterfaces = AbiInterfaces;
|
|
3395
2562
|
type index$2_AbiStructs = AbiStructs;
|
|
3396
2563
|
type index$2_AccountInvocationItem = AccountInvocationItem;
|
|
3397
2564
|
type index$2_AccountInvocations = AccountInvocations;
|
|
@@ -3470,6 +2637,7 @@ type index$2_GetBlockResponse = GetBlockResponse;
|
|
|
3470
2637
|
type index$2_GetTransactionResponse = GetTransactionResponse;
|
|
3471
2638
|
type index$2_GetTxReceiptResponseWithoutHelper = GetTxReceiptResponseWithoutHelper;
|
|
3472
2639
|
type index$2_HexCalldata = HexCalldata;
|
|
2640
|
+
type index$2_InterfaceAbi = InterfaceAbi;
|
|
3473
2641
|
type index$2_Invocation = Invocation;
|
|
3474
2642
|
type index$2_Invocations = Invocations;
|
|
3475
2643
|
type index$2_InvocationsDetails = InvocationsDetails;
|
|
@@ -3506,7 +2674,6 @@ type index$2_Result = Result;
|
|
|
3506
2674
|
type index$2_RevertedTransactionReceiptResponse = RevertedTransactionReceiptResponse;
|
|
3507
2675
|
type index$2_RpcProviderOptions = RpcProviderOptions;
|
|
3508
2676
|
type index$2_SIMULATION_FLAG = SIMULATION_FLAG;
|
|
3509
|
-
declare const index$2_SIMULATION_FLAG: typeof SIMULATION_FLAG;
|
|
3510
2677
|
type index$2_SierraContractClass = SierraContractClass;
|
|
3511
2678
|
type index$2_SierraContractEntryPointFields = SierraContractEntryPointFields;
|
|
3512
2679
|
type index$2_SierraEntryPointsByType = SierraEntryPointsByType;
|
|
@@ -3566,7 +2733,7 @@ type index$2_getEstimateFeeBulkOptions = getEstimateFeeBulkOptions;
|
|
|
3566
2733
|
type index$2_getSimulateTransactionOptions = getSimulateTransactionOptions;
|
|
3567
2734
|
type index$2_waitForTransactionOptions = waitForTransactionOptions;
|
|
3568
2735
|
declare namespace index$2 {
|
|
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 };
|
|
2736
|
+
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_AbiInterfaces as AbiInterfaces, 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_InterfaceAbi as InterfaceAbi, 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, type 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 };
|
|
3570
2737
|
}
|
|
3571
2738
|
|
|
3572
2739
|
declare class RpcChannel$1 {
|
|
@@ -3582,33 +2749,33 @@ declare class RpcChannel$1 {
|
|
|
3582
2749
|
setChainId(chainId: StarknetChainId): void;
|
|
3583
2750
|
fetch(method: string, params?: object, id?: string | number): Promise<Response>;
|
|
3584
2751
|
protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
|
|
3585
|
-
protected fetchEndpoint<T extends keyof Methods
|
|
2752
|
+
protected fetchEndpoint<T extends keyof Methods>(method: T, params?: Methods[T]['params']): Promise<Methods[T]['result']>;
|
|
3586
2753
|
getChainId(): Promise<StarknetChainId>;
|
|
3587
2754
|
getSpecVersion(): Promise<string>;
|
|
3588
2755
|
getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3589
2756
|
/**
|
|
3590
2757
|
* Get the most recent accepted block hash and number
|
|
3591
2758
|
*/
|
|
3592
|
-
getBlockLatestAccepted(): Promise<BlockHashAndNumber
|
|
2759
|
+
getBlockLatestAccepted(): Promise<BlockHashAndNumber>;
|
|
3593
2760
|
/**
|
|
3594
2761
|
* Get the most recent accepted block number
|
|
3595
2762
|
* redundant use getBlockLatestAccepted();
|
|
3596
2763
|
* @returns Number of the latest block
|
|
3597
2764
|
*/
|
|
3598
2765
|
getBlockNumber(): Promise<number>;
|
|
3599
|
-
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes$
|
|
3600
|
-
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs
|
|
3601
|
-
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdate$
|
|
3602
|
-
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces
|
|
2766
|
+
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes$1>;
|
|
2767
|
+
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs>;
|
|
2768
|
+
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdate$1>;
|
|
2769
|
+
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces>;
|
|
3603
2770
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
3604
|
-
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash$
|
|
3605
|
-
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash$
|
|
3606
|
-
getTransactionReceipt(txHash: BigNumberish): Promise<TransactionReceipt$
|
|
2771
|
+
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash$1>;
|
|
2772
|
+
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash$1>;
|
|
2773
|
+
getTransactionReceipt(txHash: BigNumberish): Promise<TransactionReceipt$1>;
|
|
3607
2774
|
getTransactionTrace(txHash: BigNumberish): Promise<TRANSACTION_TRACE>;
|
|
3608
2775
|
/**
|
|
3609
2776
|
* Get the status of a transaction
|
|
3610
2777
|
*/
|
|
3611
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus$
|
|
2778
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus$1>;
|
|
3612
2779
|
/**
|
|
3613
2780
|
* @param invocations AccountInvocations
|
|
3614
2781
|
* @param simulateTransactionOptions blockIdentifier and flags to skip validation and fee charge<br/>
|
|
@@ -3616,33 +2783,33 @@ declare class RpcChannel$1 {
|
|
|
3616
2783
|
* - skipValidate (default false)<br/>
|
|
3617
2784
|
* - skipFeeCharge (default true)<br/>
|
|
3618
2785
|
*/
|
|
3619
|
-
simulateTransaction(invocations: AccountInvocations,
|
|
2786
|
+
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<SimulateTransactionResponse$1>;
|
|
3620
2787
|
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<TXN_RECEIPT>;
|
|
3621
2788
|
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3622
2789
|
getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3623
|
-
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass$
|
|
3624
|
-
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass$
|
|
2790
|
+
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass$1>;
|
|
2791
|
+
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass$1>;
|
|
3625
2792
|
getEstimateFee(invocations: AccountInvocations, { blockIdentifier, skipValidate }: getEstimateFeeBulkOptions): Promise<FEE_ESTIMATE[]>;
|
|
3626
|
-
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction$
|
|
3627
|
-
declare({ contract, signature, senderAddress, compiledClassHash }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<TXN_RECEIPT | DeclaredTransaction$
|
|
3628
|
-
deployAccount({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<TXN_RECEIPT | DeployedAccountTransaction
|
|
2793
|
+
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction$1>;
|
|
2794
|
+
declare({ contract, signature, senderAddress, compiledClassHash }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<TXN_RECEIPT | DeclaredTransaction$1>;
|
|
2795
|
+
deployAccount({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<TXN_RECEIPT | DeployedAccountTransaction>;
|
|
3629
2796
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
3630
2797
|
/**
|
|
3631
2798
|
* NEW: Estimate the fee for a message from L1
|
|
3632
2799
|
* @param message Message From L1
|
|
3633
2800
|
*/
|
|
3634
|
-
estimateMessageFee(message: L1Message
|
|
2801
|
+
estimateMessageFee(message: L1Message, blockIdentifier?: BlockIdentifier): Promise<FEE_ESTIMATE>;
|
|
3635
2802
|
/**
|
|
3636
2803
|
* Returns an object about the sync status, or false if the node is not synching
|
|
3637
2804
|
* @returns Object with the stats data
|
|
3638
2805
|
*/
|
|
3639
|
-
getSyncingStats(): Promise<Syncing
|
|
2806
|
+
getSyncingStats(): Promise<Syncing>;
|
|
3640
2807
|
/**
|
|
3641
2808
|
* Returns all events matching the given filter
|
|
3642
2809
|
* @returns events and the pagination of the events
|
|
3643
2810
|
*/
|
|
3644
|
-
getEvents(eventFilter: EventFilter
|
|
3645
|
-
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): BaseTransaction
|
|
2811
|
+
getEvents(eventFilter: EventFilter): Promise<EVENTS_CHUNK>;
|
|
2812
|
+
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): BaseTransaction;
|
|
3646
2813
|
}
|
|
3647
2814
|
|
|
3648
2815
|
declare namespace rpc_0_6 {
|
|
@@ -3657,39 +2824,41 @@ declare class RpcChannel {
|
|
|
3657
2824
|
readonly blockIdentifier: BlockIdentifier;
|
|
3658
2825
|
private chainId?;
|
|
3659
2826
|
private specVersion?;
|
|
2827
|
+
private transactionRetryIntervalFallback?;
|
|
3660
2828
|
readonly waitMode: Boolean;
|
|
3661
2829
|
constructor(optionsOrProvider?: RpcProviderOptions);
|
|
2830
|
+
private get transactionRetryIntervalDefault();
|
|
3662
2831
|
setChainId(chainId: StarknetChainId): void;
|
|
3663
2832
|
fetch(method: string, params?: object, id?: string | number): Promise<Response>;
|
|
3664
2833
|
protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
|
|
3665
|
-
protected fetchEndpoint<T extends keyof Methods>(method: T, params?: Methods[T]['params']): Promise<Methods[T]['result']>;
|
|
2834
|
+
protected fetchEndpoint<T extends keyof RPCSPEC07.Methods>(method: T, params?: RPCSPEC07.Methods[T]['params']): Promise<RPCSPEC07.Methods[T]['result']>;
|
|
3666
2835
|
getChainId(): Promise<StarknetChainId>;
|
|
3667
2836
|
getSpecVersion(): Promise<string>;
|
|
3668
2837
|
getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3669
2838
|
/**
|
|
3670
2839
|
* Get the most recent accepted block hash and number
|
|
3671
2840
|
*/
|
|
3672
|
-
getBlockLatestAccepted(): Promise<BlockHashAndNumber>;
|
|
2841
|
+
getBlockLatestAccepted(): Promise<RPCSPEC07.BlockHashAndNumber>;
|
|
3673
2842
|
/**
|
|
3674
2843
|
* Get the most recent accepted block number
|
|
3675
2844
|
* redundant use getBlockLatestAccepted();
|
|
3676
2845
|
* @returns Number of the latest block
|
|
3677
2846
|
*/
|
|
3678
2847
|
getBlockNumber(): Promise<number>;
|
|
3679
|
-
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes
|
|
3680
|
-
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs>;
|
|
3681
|
-
getBlockWithReceipts(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxReceipts>;
|
|
3682
|
-
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdate
|
|
3683
|
-
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces>;
|
|
2848
|
+
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.BlockWithTxHashes>;
|
|
2849
|
+
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.BlockWithTxs>;
|
|
2850
|
+
getBlockWithReceipts(blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.BlockWithTxReceipts>;
|
|
2851
|
+
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.StateUpdate>;
|
|
2852
|
+
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.BlockTransactionsTraces>;
|
|
3684
2853
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
3685
|
-
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash
|
|
3686
|
-
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash
|
|
3687
|
-
getTransactionReceipt(txHash: BigNumberish): Promise<TXN_RECEIPT_WITH_BLOCK_INFO>;
|
|
3688
|
-
getTransactionTrace(txHash: BigNumberish): Promise<TRANSACTION_TRACE
|
|
2854
|
+
getTransactionByHash(txHash: BigNumberish): Promise<RPCSPEC07.TransactionWithHash>;
|
|
2855
|
+
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<RPCSPEC07.TransactionWithHash>;
|
|
2856
|
+
getTransactionReceipt(txHash: BigNumberish): Promise<RPCSPEC07.API.SPEC.TXN_RECEIPT_WITH_BLOCK_INFO>;
|
|
2857
|
+
getTransactionTrace(txHash: BigNumberish): Promise<RPCSPEC07.API.SPEC.TRANSACTION_TRACE>;
|
|
3689
2858
|
/**
|
|
3690
2859
|
* Get the status of a transaction
|
|
3691
2860
|
*/
|
|
3692
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus
|
|
2861
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<RPCSPEC07.TransactionStatus>;
|
|
3693
2862
|
/**
|
|
3694
2863
|
* @param invocations AccountInvocations
|
|
3695
2864
|
* @param simulateTransactionOptions blockIdentifier and flags to skip validation and fee charge<br/>
|
|
@@ -3697,33 +2866,33 @@ declare class RpcChannel {
|
|
|
3697
2866
|
* - skipValidate (default false)<br/>
|
|
3698
2867
|
* - skipFeeCharge (default true)<br/>
|
|
3699
2868
|
*/
|
|
3700
|
-
simulateTransaction(invocations: AccountInvocations,
|
|
3701
|
-
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<TXN_RECEIPT
|
|
2869
|
+
simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<RPCSPEC07.SimulateTransactionResponse>;
|
|
2870
|
+
waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<RPCSPEC07.API.SPEC.TXN_RECEIPT>;
|
|
3702
2871
|
getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3703
2872
|
getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3704
|
-
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass
|
|
3705
|
-
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<ContractClass
|
|
3706
|
-
getEstimateFee(invocations: AccountInvocations, { blockIdentifier, skipValidate }: getEstimateFeeBulkOptions): Promise<FEE_ESTIMATE
|
|
3707
|
-
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction
|
|
3708
|
-
declare({ contract, signature, senderAddress, compiledClassHash }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<
|
|
3709
|
-
deployAccount({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<TXN_RECEIPT
|
|
2873
|
+
getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.ContractClass>;
|
|
2874
|
+
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.ContractClass>;
|
|
2875
|
+
getEstimateFee(invocations: AccountInvocations, { blockIdentifier, skipValidate }: getEstimateFeeBulkOptions): Promise<RPCSPEC07.API.SPEC.FEE_ESTIMATE[]>;
|
|
2876
|
+
invoke(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<RPCSPEC07.InvokedTransaction>;
|
|
2877
|
+
declare({ contract, signature, senderAddress, compiledClassHash }: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPCSPEC07.DeclaredTransaction | RPCSPEC07.API.SPEC.TXN_RECEIPT>;
|
|
2878
|
+
deployAccount({ classHash, constructorCalldata, addressSalt, signature }: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<RPCSPEC07.API.SPEC.TXN_RECEIPT | RPCSPEC07.DeployedAccountTransaction>;
|
|
3710
2879
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
3711
2880
|
/**
|
|
3712
2881
|
* NEW: Estimate the fee for a message from L1
|
|
3713
2882
|
* @param message Message From L1
|
|
3714
2883
|
*/
|
|
3715
|
-
estimateMessageFee(message: L1Message, blockIdentifier?: BlockIdentifier): Promise<FEE_ESTIMATE
|
|
2884
|
+
estimateMessageFee(message: RPCSPEC07.L1Message, blockIdentifier?: BlockIdentifier): Promise<RPCSPEC07.API.SPEC.FEE_ESTIMATE>;
|
|
3716
2885
|
/**
|
|
3717
2886
|
* Returns an object about the sync status, or false if the node is not synching
|
|
3718
2887
|
* @returns Object with the stats data
|
|
3719
2888
|
*/
|
|
3720
|
-
getSyncingStats(): Promise<Syncing>;
|
|
2889
|
+
getSyncingStats(): Promise<RPCSPEC07.Syncing>;
|
|
3721
2890
|
/**
|
|
3722
2891
|
* Returns all events matching the given filter
|
|
3723
2892
|
* @returns events and the pagination of the events
|
|
3724
2893
|
*/
|
|
3725
|
-
getEvents(eventFilter: EventFilter): Promise<EVENTS_CHUNK
|
|
3726
|
-
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): BaseTransaction;
|
|
2894
|
+
getEvents(eventFilter: RPCSPEC07.EventFilter): Promise<RPCSPEC07.API.SPEC.EVENTS_CHUNK>;
|
|
2895
|
+
buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): RPCSPEC07.BaseTransaction;
|
|
3727
2896
|
}
|
|
3728
2897
|
|
|
3729
2898
|
type rpc_0_7_RpcChannel = RpcChannel;
|
|
@@ -3786,8 +2955,7 @@ declare abstract class ProviderInterface {
|
|
|
3786
2955
|
* @param blockIdentifier block identifier
|
|
3787
2956
|
* @returns the block object
|
|
3788
2957
|
*/
|
|
3789
|
-
abstract getBlock(): Promise<PendingBlock>;
|
|
3790
|
-
abstract getBlock(blockIdentifier: 'pending'): Promise<PendingBlock>;
|
|
2958
|
+
abstract getBlock(blockIdentifier?: 'pending'): Promise<PendingBlock>;
|
|
3791
2959
|
abstract getBlock(blockIdentifier: 'latest'): Promise<Block$1>;
|
|
3792
2960
|
abstract getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse>;
|
|
3793
2961
|
/**
|
|
@@ -3798,6 +2966,25 @@ declare abstract class ProviderInterface {
|
|
|
3798
2966
|
* @returns Contract class of compiled contract
|
|
3799
2967
|
*/
|
|
3800
2968
|
abstract getClassAt(contractAddress: string, blockIdentifier?: BlockIdentifier): Promise<ContractClassResponse>;
|
|
2969
|
+
/**
|
|
2970
|
+
* Gets the price of l1 gas in the block
|
|
2971
|
+
*
|
|
2972
|
+
* @param blockIdentifier block identifier
|
|
2973
|
+
* @returns gas price of the block
|
|
2974
|
+
*/
|
|
2975
|
+
abstract getL1GasPrice(blockIdentifier: BlockIdentifier): Promise<string>;
|
|
2976
|
+
/**
|
|
2977
|
+
* Get L1 message hash from L2 transaction hash
|
|
2978
|
+
* @param {BigNumberish} l2TxHash L2 transaction hash
|
|
2979
|
+
* @returns {string} Hex string of L1 message hash
|
|
2980
|
+
* @example
|
|
2981
|
+
* In Sepolia Testnet :
|
|
2982
|
+
* ```typescript
|
|
2983
|
+
* const result = provider.getL1MessageHash('0x28dfc05eb4f261b37ddad451ff22f1d08d4e3c24dc646af0ec69fa20e096819');
|
|
2984
|
+
* // result = '0x55b3f8b6e607fffd9b4d843dfe8f9b5c05822cd94fcad8797deb01d77805532a'
|
|
2985
|
+
* ```
|
|
2986
|
+
*/
|
|
2987
|
+
abstract getL1MessageHash(l2TxHash: BigNumberish): Promise<string>;
|
|
3801
2988
|
/**
|
|
3802
2989
|
* Returns the contract class hash in the given block for the contract deployed at the given address
|
|
3803
2990
|
*
|
|
@@ -3832,14 +3019,14 @@ declare abstract class ProviderInterface {
|
|
|
3832
3019
|
/**
|
|
3833
3020
|
* Gets the transaction information from a tx id.
|
|
3834
3021
|
*
|
|
3835
|
-
* @param
|
|
3022
|
+
* @param transactionHash
|
|
3836
3023
|
* @returns the transaction object \{ transaction_id, status, transaction, block_number?, block_number?, transaction_index?, transaction_failure_reason? \}
|
|
3837
3024
|
*/
|
|
3838
3025
|
abstract getTransaction(transactionHash: BigNumberish): Promise<GetTransactionResponse>;
|
|
3839
3026
|
/**
|
|
3840
3027
|
* Gets the transaction receipt from a tx hash.
|
|
3841
3028
|
*
|
|
3842
|
-
* @param
|
|
3029
|
+
* @param transactionHash
|
|
3843
3030
|
* @returns the transaction receipt object
|
|
3844
3031
|
*/
|
|
3845
3032
|
abstract getTransactionReceipt(transactionHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
@@ -4019,15 +3206,29 @@ declare class RpcProvider$1 implements ProviderInterface {
|
|
|
4019
3206
|
/**
|
|
4020
3207
|
* Get the most recent accepted block hash and number
|
|
4021
3208
|
*/
|
|
4022
|
-
getBlockLatestAccepted(): Promise<BlockHashAndNumber
|
|
3209
|
+
getBlockLatestAccepted(): Promise<BlockHashAndNumber>;
|
|
4023
3210
|
/**
|
|
4024
3211
|
* Get the most recent accepted block number
|
|
4025
3212
|
* redundant use getBlockLatestAccepted();
|
|
4026
3213
|
* @returns Number of the latest block
|
|
4027
3214
|
*/
|
|
4028
3215
|
getBlockNumber(): Promise<number>;
|
|
4029
|
-
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes$
|
|
4030
|
-
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs
|
|
3216
|
+
getBlockWithTxHashes(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxHashes$1>;
|
|
3217
|
+
getBlockWithTxs(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxs>;
|
|
3218
|
+
/**
|
|
3219
|
+
* Pause the execution of the script until a specified block is created.
|
|
3220
|
+
* @param {BlockIdentifier} blockIdentifier bloc number (BigNumberisk) or 'pending' or 'latest'.
|
|
3221
|
+
* Use of 'latest" or of a block already created will generate no pause.
|
|
3222
|
+
* @param {number} [retryInterval] number of milliseconds between 2 requests to the node
|
|
3223
|
+
* @example
|
|
3224
|
+
* ```typescript
|
|
3225
|
+
* await myProvider.waitForBlock();
|
|
3226
|
+
* // wait the creation of the pending block
|
|
3227
|
+
* ```
|
|
3228
|
+
*/
|
|
3229
|
+
waitForBlock(blockIdentifier?: BlockIdentifier, retryInterval?: number): Promise<void>;
|
|
3230
|
+
getL1GasPrice(blockIdentifier?: BlockIdentifier): Promise<string>;
|
|
3231
|
+
getL1MessageHash(l2TxHash: BigNumberish): Promise<string>;
|
|
4031
3232
|
getBlockWithReceipts(blockIdentifier?: BlockIdentifier): Promise<BlockWithTxReceipts>;
|
|
4032
3233
|
getStateUpdate: {
|
|
4033
3234
|
(): Promise<PendingStateUpdate>;
|
|
@@ -4039,26 +3240,26 @@ declare class RpcProvider$1 implements ProviderInterface {
|
|
|
4039
3240
|
getBlockStateUpdate(blockIdentifier: 'pending'): Promise<PendingStateUpdate>;
|
|
4040
3241
|
getBlockStateUpdate(blockIdentifier: 'latest'): Promise<StateUpdate>;
|
|
4041
3242
|
getBlockStateUpdate(blockIdentifier?: BlockIdentifier): Promise<StateUpdateResponse>;
|
|
4042
|
-
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces
|
|
3243
|
+
getBlockTransactionsTraces(blockIdentifier?: BlockIdentifier): Promise<BlockTransactionsTraces>;
|
|
4043
3244
|
getBlockTransactionCount(blockIdentifier?: BlockIdentifier): Promise<number>;
|
|
4044
3245
|
/**
|
|
4045
3246
|
* Return transactions from pending block
|
|
4046
3247
|
* @deprecated Instead use getBlock(BlockTag.pending); (will be removed in next minor version)
|
|
4047
3248
|
* Utility method, same result can be achieved using getBlockWithTxHashes(BlockTag.pending);
|
|
4048
3249
|
*/
|
|
4049
|
-
getPendingTransactions(): Promise<TransactionWithHash$
|
|
4050
|
-
getTransaction(txHash: BigNumberish): Promise<TransactionWithHash$
|
|
4051
|
-
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash$
|
|
4052
|
-
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash$
|
|
3250
|
+
getPendingTransactions(): Promise<TransactionWithHash$1[]>;
|
|
3251
|
+
getTransaction(txHash: BigNumberish): Promise<TransactionWithHash$1>;
|
|
3252
|
+
getTransactionByHash(txHash: BigNumberish): Promise<TransactionWithHash$1>;
|
|
3253
|
+
getTransactionByBlockIdAndIndex(blockIdentifier: BlockIdentifier, index: number): Promise<TransactionWithHash$1>;
|
|
4053
3254
|
getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse>;
|
|
4054
3255
|
getTransactionTrace(txHash: BigNumberish): Promise<TRANSACTION_TRACE>;
|
|
4055
3256
|
/**
|
|
4056
3257
|
* Get the status of a transaction
|
|
4057
3258
|
*/
|
|
4058
|
-
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus$
|
|
3259
|
+
getTransactionStatus(transactionHash: BigNumberish): Promise<TransactionStatus$1>;
|
|
4059
3260
|
/**
|
|
4060
3261
|
* @param invocations AccountInvocations
|
|
4061
|
-
* @param
|
|
3262
|
+
* @param options blockIdentifier and flags to skip validation and fee charge<br/>
|
|
4062
3263
|
* - blockIdentifier<br/>
|
|
4063
3264
|
* - skipValidate (default false)<br/>
|
|
4064
3265
|
* - skipFeeCharge (default true)<br/>
|
|
@@ -4080,25 +3281,25 @@ declare class RpcProvider$1 implements ProviderInterface {
|
|
|
4080
3281
|
getDeclareEstimateFee(invocation: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponse>;
|
|
4081
3282
|
getDeployAccountEstimateFee(invocation: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponse>;
|
|
4082
3283
|
getEstimateFeeBulk(invocations: AccountInvocations, options: getEstimateFeeBulkOptions): Promise<EstimateFeeResponseBulk>;
|
|
4083
|
-
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction$
|
|
4084
|
-
declareContract(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclaredTransaction$
|
|
4085
|
-
deployAccountContract(transaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployedAccountTransaction>;
|
|
3284
|
+
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<InvokedTransaction$2>;
|
|
3285
|
+
declareContract(transaction: DeclareContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeclaredTransaction$2>;
|
|
3286
|
+
deployAccountContract(transaction: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce): Promise<DeployedAccountTransaction$1>;
|
|
4086
3287
|
callContract(call: Call, blockIdentifier?: BlockIdentifier): Promise<string[]>;
|
|
4087
3288
|
/**
|
|
4088
3289
|
* NEW: Estimate the fee for a message from L1
|
|
4089
3290
|
* @param message Message From L1
|
|
4090
3291
|
*/
|
|
4091
|
-
estimateMessageFee(message: L1Message, blockIdentifier?: BlockIdentifier): Promise<FEE_ESTIMATE>;
|
|
3292
|
+
estimateMessageFee(message: L1Message$1, blockIdentifier?: BlockIdentifier): Promise<FEE_ESTIMATE>;
|
|
4092
3293
|
/**
|
|
4093
3294
|
* Returns an object about the sync status, or false if the node is not synching
|
|
4094
3295
|
* @returns Object with the stats data
|
|
4095
3296
|
*/
|
|
4096
|
-
getSyncingStats(): Promise<Syncing
|
|
3297
|
+
getSyncingStats(): Promise<Syncing>;
|
|
4097
3298
|
/**
|
|
4098
3299
|
* Returns all events matching the given filter
|
|
4099
3300
|
* @returns events and the pagination of the events
|
|
4100
3301
|
*/
|
|
4101
|
-
getEvents(eventFilter: EventFilter): Promise<EVENTS_CHUNK>;
|
|
3302
|
+
getEvents(eventFilter: EventFilter$1): Promise<EVENTS_CHUNK>;
|
|
4102
3303
|
}
|
|
4103
3304
|
|
|
4104
3305
|
declare class StarknetId {
|
|
@@ -4106,8 +3307,10 @@ declare class StarknetId {
|
|
|
4106
3307
|
getAddressFromStarkName(name: string, StarknetIdContract?: string): Promise<string>;
|
|
4107
3308
|
getStarkProfile(address: BigNumberish, StarknetIdContract?: string, StarknetIdIdentityContract?: string, StarknetIdVerifierContract?: string, StarknetIdPfpContract?: string, StarknetIdPopContract?: string, StarknetIdMulticallContract?: string): Promise<StarkProfile>;
|
|
4108
3309
|
static getStarkName(provider: ProviderInterface, address: BigNumberish, StarknetIdContract?: string): Promise<string>;
|
|
3310
|
+
static executeStarkName(provider: ProviderInterface, address: string, contract: string): Promise<CallContractResponse>;
|
|
4109
3311
|
static getAddressFromStarkName(provider: ProviderInterface, name: string, StarknetIdContract?: string): Promise<string>;
|
|
4110
3312
|
static getStarkProfile(provider: ProviderInterface, address: BigNumberish, StarknetIdContract?: string, StarknetIdIdentityContract?: string, StarknetIdVerifierContract?: string, StarknetIdPfpContract?: string, StarknetIdPopContract?: string, StarknetIdMulticallContract?: string): Promise<StarkProfile>;
|
|
3313
|
+
static executeStarkProfile(provider: ProviderInterface, contract: string, functionName: string, initialCalldata: RawArgsArray, fallbackCalldata: RawArgsArray): Promise<CallContractResponse>;
|
|
4111
3314
|
}
|
|
4112
3315
|
|
|
4113
3316
|
declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvider$1 & StarknetId, typeof RpcProvider$1 & typeof StarknetId>;
|
|
@@ -4167,7 +3370,7 @@ declare abstract class SignerInterface {
|
|
|
4167
3370
|
/**
|
|
4168
3371
|
* Signs a DEPLOY_ACCOUNT transaction with the Starknet private key and returns the signature
|
|
4169
3372
|
*
|
|
4170
|
-
* @param transaction<br/>
|
|
3373
|
+
* @param transaction <br/>
|
|
4171
3374
|
* - contractAddress<br/>
|
|
4172
3375
|
* - chainId<br/>
|
|
4173
3376
|
* - classHash<br/>
|
|
@@ -4181,7 +3384,7 @@ declare abstract class SignerInterface {
|
|
|
4181
3384
|
/**
|
|
4182
3385
|
* Signs a DECLARE transaction with the Starknet private key and returns the signature
|
|
4183
3386
|
*
|
|
4184
|
-
* @param transaction<br/>
|
|
3387
|
+
* @param transaction <br/>
|
|
4185
3388
|
* - classHash<br/>
|
|
4186
3389
|
* - compiledClassHash? - used for Cairo1<br/>
|
|
4187
3390
|
* - senderAddress<br/>
|
|
@@ -4324,11 +3527,11 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4324
3527
|
* Estimate Fee for executing a list of transactions on starknet
|
|
4325
3528
|
* Contract must be deployed for fee estimation to be possible
|
|
4326
3529
|
*
|
|
4327
|
-
* @param
|
|
3530
|
+
* @param invocations array of transaction object containing :
|
|
4328
3531
|
* - type - the type of transaction : 'DECLARE' | (multi)'DEPLOY' | (multi)'INVOKE_FUNCTION' | 'DEPLOY_ACCOUNT'
|
|
4329
3532
|
* - payload - the payload of the transaction
|
|
4330
3533
|
*
|
|
4331
|
-
* @param
|
|
3534
|
+
* @param details -
|
|
4332
3535
|
* - blockIdentifier?
|
|
4333
3536
|
* - nonce?
|
|
4334
3537
|
* - skipValidate? - default true
|
|
@@ -4481,30 +3684,32 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4481
3684
|
*/
|
|
4482
3685
|
abstract deployAccount(contractPayload: DeployAccountContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
4483
3686
|
/**
|
|
4484
|
-
* Signs a
|
|
3687
|
+
* Signs a TypedData object for off-chain usage with the Starknet private key and returns the signature
|
|
4485
3688
|
* This adds a message prefix so it can't be interchanged with transactions
|
|
4486
3689
|
*
|
|
4487
|
-
* @param
|
|
4488
|
-
* @returns the signature of the
|
|
4489
|
-
* @throws {Error} if
|
|
3690
|
+
* @param typedData - TypedData object to be signed
|
|
3691
|
+
* @returns the signature of the TypedData object
|
|
3692
|
+
* @throws {Error} if typedData is not a valid TypedData
|
|
4490
3693
|
*/
|
|
4491
3694
|
abstract signMessage(typedData: TypedData): Promise<Signature>;
|
|
4492
3695
|
/**
|
|
4493
|
-
* Hash a
|
|
3696
|
+
* Hash a TypedData object with Pedersen hash and return the hash
|
|
4494
3697
|
* This adds a message prefix so it can't be interchanged with transactions
|
|
4495
3698
|
*
|
|
4496
|
-
* @param
|
|
4497
|
-
* @returns the hash of the
|
|
4498
|
-
* @throws {Error} if
|
|
3699
|
+
* @param typedData - TypedData object to be hashed
|
|
3700
|
+
* @returns the hash of the TypedData object
|
|
3701
|
+
* @throws {Error} if typedData is not a valid TypedData
|
|
4499
3702
|
*/
|
|
4500
3703
|
abstract hashMessage(typedData: TypedData): Promise<string>;
|
|
4501
3704
|
/**
|
|
4502
|
-
* Verify a signature of a
|
|
3705
|
+
* Verify a signature of a TypedData object
|
|
4503
3706
|
*
|
|
4504
|
-
* @param typedData -
|
|
4505
|
-
* @param signature - signature of the
|
|
3707
|
+
* @param typedData - TypedData object to be verified
|
|
3708
|
+
* @param signature - signature of the TypedData object
|
|
3709
|
+
* @param signatureVerificationFunctionName - optional account contract verification function name override
|
|
3710
|
+
* @param signatureVerificationResponse - optional response override { okResponse: string[]; nokResponse: string[]; error: string[] }
|
|
4506
3711
|
* @returns true if the signature is valid, false otherwise
|
|
4507
|
-
* @throws {Error} if
|
|
3712
|
+
* @throws {Error} if typedData is not a valid TypedData or the signature is not a valid signature
|
|
4508
3713
|
*/
|
|
4509
3714
|
abstract verifyMessage(typedData: TypedData, signature: Signature): Promise<boolean>;
|
|
4510
3715
|
/**
|
|
@@ -4513,6 +3718,8 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4513
3718
|
*
|
|
4514
3719
|
* @param hash - hash to be verified
|
|
4515
3720
|
* @param signature - signature of the hash
|
|
3721
|
+
* @param signatureVerificationFunctionName - optional account contract verification function name override
|
|
3722
|
+
* @param signatureVerificationResponse - optional response override { okResponse: string[]; nokResponse: string[]; error: string[] }
|
|
4516
3723
|
* @returns true if the signature is valid, false otherwise
|
|
4517
3724
|
* @throws {Error} if the signature is not a valid signature
|
|
4518
3725
|
*/
|
|
@@ -4530,13 +3737,13 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4530
3737
|
signer: SignerInterface;
|
|
4531
3738
|
address: string;
|
|
4532
3739
|
cairoVersion: CairoVersion;
|
|
4533
|
-
readonly transactionVersion: ETransactionVersion.V2 | ETransactionVersion.V3;
|
|
4534
|
-
constructor(providerOrOptions: ProviderOptions | ProviderInterface, address: string, pkOrSigner: Uint8Array | string | SignerInterface, cairoVersion?: CairoVersion, transactionVersion?: ETransactionVersion.V2 | ETransactionVersion.V3);
|
|
4535
|
-
protected getPreferredVersion(type12: ETransactionVersion, type3: ETransactionVersion): ETransactionVersion;
|
|
3740
|
+
readonly transactionVersion: ETransactionVersion$1.V2 | ETransactionVersion$1.V3;
|
|
3741
|
+
constructor(providerOrOptions: ProviderOptions | ProviderInterface, address: string, pkOrSigner: Uint8Array | string | SignerInterface, cairoVersion?: CairoVersion, transactionVersion?: ETransactionVersion$1.V2 | ETransactionVersion$1.V3);
|
|
3742
|
+
protected getPreferredVersion(type12: ETransactionVersion$1, type3: ETransactionVersion$1): ETransactionVersion$1;
|
|
4536
3743
|
getNonce(blockIdentifier?: BlockIdentifier): Promise<Nonce>;
|
|
4537
3744
|
protected getNonceSafe(nonce?: BigNumberish): Promise<bigint>;
|
|
4538
3745
|
/**
|
|
4539
|
-
* Retrieves the Cairo version from the network and sets `cairoVersion` if not already set in the constructor
|
|
3746
|
+
* Retrieves the Cairo version from the network and sets `cairoVersion` if not already set in the constructor.
|
|
4540
3747
|
* @param classHash if provided detects Cairo version from classHash, otherwise from the account address
|
|
4541
3748
|
*/
|
|
4542
3749
|
getCairoVersion(classHash?: string): Promise<CairoVersion>;
|
|
@@ -4564,11 +3771,19 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4564
3771
|
deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?: UniversalDetails): Promise<DeployContractResponse>;
|
|
4565
3772
|
signMessage(typedData: TypedData): Promise<Signature>;
|
|
4566
3773
|
hashMessage(typedData: TypedData): Promise<string>;
|
|
4567
|
-
verifyMessageHash(hash: BigNumberish, signature: Signature
|
|
4568
|
-
|
|
4569
|
-
|
|
3774
|
+
verifyMessageHash(hash: BigNumberish, signature: Signature, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
|
|
3775
|
+
okResponse: string[];
|
|
3776
|
+
nokResponse: string[];
|
|
3777
|
+
error: string[];
|
|
3778
|
+
}): Promise<boolean>;
|
|
3779
|
+
verifyMessage(typedData: TypedData, signature: Signature, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
|
|
3780
|
+
okResponse: string[];
|
|
3781
|
+
nokResponse: string[];
|
|
3782
|
+
error: string[];
|
|
3783
|
+
}): Promise<boolean>;
|
|
3784
|
+
protected getUniversalSuggestedFee(version: ETransactionVersion$1, { type, payload }: EstimateFeeAction, details: UniversalDetails): Promise<{
|
|
4570
3785
|
maxFee: BigNumberish;
|
|
4571
|
-
resourceBounds: RESOURCE_BOUNDS_MAPPING
|
|
3786
|
+
resourceBounds: SPEC.RESOURCE_BOUNDS_MAPPING;
|
|
4572
3787
|
}>;
|
|
4573
3788
|
getSuggestedFee({ type, payload }: EstimateFeeAction, details: UniversalDetails): Promise<EstimateFee>;
|
|
4574
3789
|
buildInvocation(call: Array<Call>, details: InvocationsSignerDetails): Promise<Invocation>;
|
|
@@ -4596,18 +3811,17 @@ declare class WalletAccount extends Account implements AccountInterface {
|
|
|
4596
3811
|
* WALLET SPECIFIC METHODS
|
|
4597
3812
|
*/
|
|
4598
3813
|
requestAccounts(silentMode?: boolean): Promise<string[]>;
|
|
4599
|
-
getPermissions(): Promise<
|
|
3814
|
+
getPermissions(): Promise<[] | RPCSPEC07.Permission[]>;
|
|
4600
3815
|
switchStarknetChain(chainId: StarknetChainId): Promise<boolean>;
|
|
4601
3816
|
watchAsset(asset: WatchAssetParameters): Promise<boolean>;
|
|
4602
3817
|
addStarknetChain(chain: AddStarknetChainParameters): Promise<boolean>;
|
|
4603
3818
|
/**
|
|
4604
3819
|
* ACCOUNT METHODS
|
|
4605
3820
|
*/
|
|
4606
|
-
execute(calls: AllowArray<Call>): Promise<
|
|
4607
|
-
declare(payload: DeclareContractPayload): Promise<
|
|
3821
|
+
execute(calls: AllowArray<Call>): Promise<RPCSPEC07.AddInvokeTransactionResult>;
|
|
3822
|
+
declare(payload: DeclareContractPayload): Promise<RPCSPEC07.AddDeclareTransactionResult>;
|
|
4608
3823
|
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
|
|
4609
|
-
|
|
4610
|
-
signMessage(typedData: TypedData): Promise<string[]>;
|
|
3824
|
+
signMessage(typedData: TypedData): Promise<SPEC.SIGNATURE>;
|
|
4611
3825
|
}
|
|
4612
3826
|
|
|
4613
3827
|
declare module 'abi-wan-kanabi' {
|
|
@@ -4721,6 +3935,12 @@ declare abstract class ContractInterface {
|
|
|
4721
3935
|
* Retrieves the version of the contract (cairo version & compiler version)
|
|
4722
3936
|
*/
|
|
4723
3937
|
abstract getVersion(): Promise<ContractVersion>;
|
|
3938
|
+
/**
|
|
3939
|
+
* Returns a typed instance of ContractV2 based on the supplied ABI.
|
|
3940
|
+
*
|
|
3941
|
+
* @param {TAbi} tAbi - The ABI (Abstract Binary Interface) of the ContractV2.
|
|
3942
|
+
* @return {TypedContractV2<TAbi>} - A typed instance of ContractV2.
|
|
3943
|
+
*/
|
|
4724
3944
|
abstract typedv2<TAbi extends Abi$1>(tAbi: TAbi): TypedContractV2$1<TAbi>;
|
|
4725
3945
|
}
|
|
4726
3946
|
|
|
@@ -4855,6 +4075,17 @@ declare function getSelectorFromName(funcName: string): string;
|
|
|
4855
4075
|
*
|
|
4856
4076
|
* @param value hex-string | dec-string | ascii-string
|
|
4857
4077
|
* @returns format: hex-string
|
|
4078
|
+
* @example
|
|
4079
|
+
* ```typescript
|
|
4080
|
+
* const selector: string = getSelector("myFunction");
|
|
4081
|
+
* // selector = "0x7e44bafo"
|
|
4082
|
+
*
|
|
4083
|
+
* const selector1: string = getSelector("0x123abc");
|
|
4084
|
+
* // selector1 = "0x123abc"
|
|
4085
|
+
*
|
|
4086
|
+
* const selector2: string = getSelector("123456");
|
|
4087
|
+
* // selector2 = "0x1e240"
|
|
4088
|
+
* ```
|
|
4858
4089
|
*/
|
|
4859
4090
|
declare function getSelector(value: string): string;
|
|
4860
4091
|
|
|
@@ -4872,7 +4103,7 @@ declare namespace selector {
|
|
|
4872
4103
|
|
|
4873
4104
|
type CalcV2InvokeTxHashArgs = {
|
|
4874
4105
|
senderAddress: BigNumberish;
|
|
4875
|
-
version: `${ETransactionVersion2}`;
|
|
4106
|
+
version: `${ETransactionVersion2$1}`;
|
|
4876
4107
|
compiledCalldata: Calldata;
|
|
4877
4108
|
maxFee: BigNumberish;
|
|
4878
4109
|
chainId: StarknetChainId;
|
|
@@ -4880,14 +4111,14 @@ type CalcV2InvokeTxHashArgs = {
|
|
|
4880
4111
|
};
|
|
4881
4112
|
type CalcV3InvokeTxHashArgs = {
|
|
4882
4113
|
senderAddress: BigNumberish;
|
|
4883
|
-
version: `${ETransactionVersion3}`;
|
|
4114
|
+
version: `${ETransactionVersion3$1}`;
|
|
4884
4115
|
compiledCalldata: Calldata;
|
|
4885
4116
|
chainId: StarknetChainId;
|
|
4886
4117
|
nonce: BigNumberish;
|
|
4887
4118
|
accountDeploymentData: BigNumberish[];
|
|
4888
|
-
nonceDataAvailabilityMode: EDAMode;
|
|
4889
|
-
feeDataAvailabilityMode: EDAMode;
|
|
4890
|
-
resourceBounds: ResourceBounds$
|
|
4119
|
+
nonceDataAvailabilityMode: EDAMode$1;
|
|
4120
|
+
feeDataAvailabilityMode: EDAMode$1;
|
|
4121
|
+
resourceBounds: ResourceBounds$2;
|
|
4891
4122
|
tip: BigNumberish;
|
|
4892
4123
|
paymasterData: BigNumberish[];
|
|
4893
4124
|
};
|
|
@@ -4896,7 +4127,7 @@ declare function calculateInvokeTransactionHash$1(args: CalcInvokeTxHashArgs): s
|
|
|
4896
4127
|
type CalcV2DeclareTxHashArgs = {
|
|
4897
4128
|
classHash: string;
|
|
4898
4129
|
senderAddress: BigNumberish;
|
|
4899
|
-
version: `${ETransactionVersion2}`;
|
|
4130
|
+
version: `${ETransactionVersion2$1}`;
|
|
4900
4131
|
maxFee: BigNumberish;
|
|
4901
4132
|
chainId: StarknetChainId;
|
|
4902
4133
|
nonce: BigNumberish;
|
|
@@ -4906,13 +4137,13 @@ type CalcV3DeclareTxHashArgs = {
|
|
|
4906
4137
|
classHash: string;
|
|
4907
4138
|
compiledClassHash: string;
|
|
4908
4139
|
senderAddress: BigNumberish;
|
|
4909
|
-
version: `${ETransactionVersion3}`;
|
|
4140
|
+
version: `${ETransactionVersion3$1}`;
|
|
4910
4141
|
chainId: StarknetChainId;
|
|
4911
4142
|
nonce: BigNumberish;
|
|
4912
4143
|
accountDeploymentData: BigNumberish[];
|
|
4913
|
-
nonceDataAvailabilityMode: EDAMode;
|
|
4914
|
-
feeDataAvailabilityMode: EDAMode;
|
|
4915
|
-
resourceBounds: ResourceBounds$
|
|
4144
|
+
nonceDataAvailabilityMode: EDAMode$1;
|
|
4145
|
+
feeDataAvailabilityMode: EDAMode$1;
|
|
4146
|
+
resourceBounds: ResourceBounds$2;
|
|
4916
4147
|
tip: BigNumberish;
|
|
4917
4148
|
paymasterData: BigNumberish[];
|
|
4918
4149
|
};
|
|
@@ -4923,7 +4154,7 @@ type CalcV2DeployAccountTxHashArgs = {
|
|
|
4923
4154
|
classHash: BigNumberish;
|
|
4924
4155
|
constructorCalldata: Calldata;
|
|
4925
4156
|
salt: BigNumberish;
|
|
4926
|
-
version: `${ETransactionVersion2}`;
|
|
4157
|
+
version: `${ETransactionVersion2$1}`;
|
|
4927
4158
|
maxFee: BigNumberish;
|
|
4928
4159
|
chainId: StarknetChainId;
|
|
4929
4160
|
nonce: BigNumberish;
|
|
@@ -4933,12 +4164,12 @@ type CalcV3DeployAccountTxHashArgs = {
|
|
|
4933
4164
|
classHash: BigNumberish;
|
|
4934
4165
|
compiledConstructorCalldata: Calldata;
|
|
4935
4166
|
salt: BigNumberish;
|
|
4936
|
-
version: `${ETransactionVersion3}`;
|
|
4167
|
+
version: `${ETransactionVersion3$1}`;
|
|
4937
4168
|
chainId: StarknetChainId;
|
|
4938
4169
|
nonce: BigNumberish;
|
|
4939
|
-
nonceDataAvailabilityMode: EDAMode;
|
|
4940
|
-
feeDataAvailabilityMode: EDAMode;
|
|
4941
|
-
resourceBounds: ResourceBounds$
|
|
4170
|
+
nonceDataAvailabilityMode: EDAMode$1;
|
|
4171
|
+
feeDataAvailabilityMode: EDAMode$1;
|
|
4172
|
+
resourceBounds: ResourceBounds$2;
|
|
4942
4173
|
tip: BigNumberish;
|
|
4943
4174
|
paymasterData: BigNumberish[];
|
|
4944
4175
|
};
|
|
@@ -5027,23 +4258,23 @@ declare namespace index$1 {
|
|
|
5027
4258
|
*/
|
|
5028
4259
|
|
|
5029
4260
|
declare function hashDAMode(nonceDAMode: BigNumberish, feeDAMode: BigNumberish): bigint;
|
|
5030
|
-
declare function hashFeeField(tip: BigNumberish, bounds: ResourceBounds$
|
|
5031
|
-
declare function calculateTransactionHashCommon$1(txHashPrefix: TransactionHashPrefix, version: BigNumberish, senderAddress: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, tip: BigNumberish, paymasterData: BigNumberish[], nonceDataAvailabilityMode: EDAMode, feeDataAvailabilityMode: EDAMode, resourceBounds: ResourceBounds$
|
|
4261
|
+
declare function hashFeeField(tip: BigNumberish, bounds: ResourceBounds$2): bigint;
|
|
4262
|
+
declare function calculateTransactionHashCommon$1(txHashPrefix: TransactionHashPrefix, version: BigNumberish, senderAddress: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, tip: BigNumberish, paymasterData: BigNumberish[], nonceDataAvailabilityMode: EDAMode$1, feeDataAvailabilityMode: EDAMode$1, resourceBounds: ResourceBounds$2, additionalData?: BigNumberish[]): string;
|
|
5032
4263
|
/**
|
|
5033
4264
|
* Calculate v3 deploy_account transaction hash
|
|
5034
4265
|
* @returns format: hex-string
|
|
5035
4266
|
*/
|
|
5036
|
-
declare function calculateDeployAccountTransactionHash$1(contractAddress: BigNumberish, classHash: BigNumberish, compiledConstructorCalldata: Calldata, salt: BigNumberish, version: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, nonceDataAvailabilityMode: EDAMode, feeDataAvailabilityMode: EDAMode, resourceBounds: ResourceBounds$
|
|
4267
|
+
declare function calculateDeployAccountTransactionHash$1(contractAddress: BigNumberish, classHash: BigNumberish, compiledConstructorCalldata: Calldata, salt: BigNumberish, version: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, nonceDataAvailabilityMode: EDAMode$1, feeDataAvailabilityMode: EDAMode$1, resourceBounds: ResourceBounds$2, tip: BigNumberish, paymasterData: BigNumberish[]): string;
|
|
5037
4268
|
/**
|
|
5038
4269
|
* Calculate v3 declare transaction hash
|
|
5039
4270
|
* @returns format: hex-string
|
|
5040
4271
|
*/
|
|
5041
|
-
declare function calculateDeclareTransactionHash$1(classHash: string, compiledClassHash: string, senderAddress: BigNumberish, version: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, accountDeploymentData: BigNumberish[], nonceDataAvailabilityMode: EDAMode, feeDataAvailabilityMode: EDAMode, resourceBounds: ResourceBounds$
|
|
4272
|
+
declare function calculateDeclareTransactionHash$1(classHash: string, compiledClassHash: string, senderAddress: BigNumberish, version: BigNumberish, chainId: StarknetChainId, nonce: BigNumberish, accountDeploymentData: BigNumberish[], nonceDataAvailabilityMode: EDAMode$1, feeDataAvailabilityMode: EDAMode$1, resourceBounds: ResourceBounds$2, tip: BigNumberish, paymasterData: BigNumberish[]): string;
|
|
5042
4273
|
/**
|
|
5043
4274
|
* Calculate v3 invoke transaction hash
|
|
5044
4275
|
* @returns format: hex-string
|
|
5045
4276
|
*/
|
|
5046
|
-
declare function calculateInvokeTransactionHash(senderAddress: BigNumberish, version: BigNumberish, compiledCalldata: Calldata, chainId: StarknetChainId, nonce: BigNumberish, accountDeploymentData: BigNumberish[], nonceDataAvailabilityMode: EDAMode, feeDataAvailabilityMode: EDAMode, resourceBounds: ResourceBounds$
|
|
4277
|
+
declare function calculateInvokeTransactionHash(senderAddress: BigNumberish, version: BigNumberish, compiledCalldata: Calldata, chainId: StarknetChainId, nonce: BigNumberish, accountDeploymentData: BigNumberish[], nonceDataAvailabilityMode: EDAMode$1, feeDataAvailabilityMode: EDAMode$1, resourceBounds: ResourceBounds$2, tip: BigNumberish, paymasterData: BigNumberish[]): string;
|
|
5047
4278
|
|
|
5048
4279
|
declare const v3_calculateInvokeTransactionHash: typeof calculateInvokeTransactionHash;
|
|
5049
4280
|
declare const v3_hashDAMode: typeof hashDAMode;
|
|
@@ -5130,6 +4361,17 @@ declare namespace json {
|
|
|
5130
4361
|
/**
|
|
5131
4362
|
* Test if string is hex-string
|
|
5132
4363
|
* @param hex hex-string
|
|
4364
|
+
* @returns {boolean} True if the input string is a hexadecimal string, false otherwise
|
|
4365
|
+
* @example
|
|
4366
|
+
* ```typescript
|
|
4367
|
+
* const hexString1 = "0x2fd23d9182193775423497fc0c472e156c57c69e4089a1967fb288a2d84e914";
|
|
4368
|
+
* const result1 = isHex(hexString1);
|
|
4369
|
+
* // result1 = true
|
|
4370
|
+
*
|
|
4371
|
+
* const hexString2 = "2fd23d9182193775423497fc0c472e156c57c69e4089a1967fb288a2d84e914";
|
|
4372
|
+
* const result2 = isHex(hexString2);
|
|
4373
|
+
* // result2 = false
|
|
4374
|
+
* ```
|
|
5133
4375
|
*/
|
|
5134
4376
|
declare function isHex(hex: string): boolean;
|
|
5135
4377
|
/**
|
|
@@ -5176,6 +4418,20 @@ declare const cleanHex: (hex: string) => string;
|
|
|
5176
4418
|
* Asserts input is equal to or greater then lowerBound and lower then upperBound.
|
|
5177
4419
|
*
|
|
5178
4420
|
* The `inputName` parameter is used in the assertion message.
|
|
4421
|
+
* @param input Value to check
|
|
4422
|
+
* @param lowerBound Lower bound value
|
|
4423
|
+
* @param upperBound Upper bound value
|
|
4424
|
+
* @param inputName Name of the input for error message
|
|
4425
|
+
* @Throws Error if input is out of range
|
|
4426
|
+
* @example
|
|
4427
|
+
* ```typescript
|
|
4428
|
+
* const input1:BigNumberish = 10;
|
|
4429
|
+
* assertInRange(input1, 5, 20, 'value')
|
|
4430
|
+
*
|
|
4431
|
+
* const input2: BigNumberish = 25;
|
|
4432
|
+
* assertInRange(input2, 5, 20, 'value');
|
|
4433
|
+
* // Throws Error: Message not signable, invalid value length.
|
|
4434
|
+
* ```
|
|
5179
4435
|
*/
|
|
5180
4436
|
declare function assertInRange(input: BigNumberish, lowerBound: BigNumberish, upperBound: BigNumberish, inputName?: string): void;
|
|
5181
4437
|
/**
|
|
@@ -5195,11 +4451,27 @@ declare const isStringWholeNumber: (value: string) => boolean;
|
|
|
5195
4451
|
/**
|
|
5196
4452
|
* Convert string to decimal string
|
|
5197
4453
|
* @returns format: decimal string
|
|
4454
|
+
* @example
|
|
4455
|
+
* ```typescript
|
|
4456
|
+
* const result = getDecimalString("0x1a");
|
|
4457
|
+
* // result = "26"
|
|
4458
|
+
*
|
|
4459
|
+
* const result2 = getDecimalString("Hello");
|
|
4460
|
+
* // Throws Error: "Hello need to be hex-string or whole-number-string"
|
|
4461
|
+
* ```
|
|
5198
4462
|
*/
|
|
5199
4463
|
declare function getDecimalString(value: string): string;
|
|
5200
4464
|
/**
|
|
5201
4465
|
* Convert string to hexadecimal string
|
|
5202
4466
|
* @returns format: hex-string
|
|
4467
|
+
* @example
|
|
4468
|
+
* ```typescript
|
|
4469
|
+
* const result = getHexString("123");
|
|
4470
|
+
* // result = "0x7b"
|
|
4471
|
+
*
|
|
4472
|
+
* const result2 = getHexString("Hello");
|
|
4473
|
+
* // Throws Error: Hello need to be hex-string or whole-number-string
|
|
4474
|
+
* ```
|
|
5203
4475
|
*/
|
|
5204
4476
|
declare function getHexString(value: string): string;
|
|
5205
4477
|
/**
|
|
@@ -5209,6 +4481,16 @@ declare function getHexString(value: string): string;
|
|
|
5209
4481
|
declare function getHexStringArray(value: Array<string>): string[];
|
|
5210
4482
|
/**
|
|
5211
4483
|
* Convert boolean to "0" or "1"
|
|
4484
|
+
* @param value The boolean value to be converted.
|
|
4485
|
+
* @returns {boolean} Returns true if the value is a number, otherwise returns false.
|
|
4486
|
+
* @example
|
|
4487
|
+
* ```typescript
|
|
4488
|
+
* const result = toCairoBool(true);
|
|
4489
|
+
* // result ="1"
|
|
4490
|
+
*
|
|
4491
|
+
* const result2 = toCairoBool(false);
|
|
4492
|
+
* // result2 = "0"
|
|
4493
|
+
* ```
|
|
5212
4494
|
*/
|
|
5213
4495
|
declare const toCairoBool: (value: boolean) => string;
|
|
5214
4496
|
/**
|
|
@@ -5227,6 +4509,15 @@ declare function addPercent(number: BigNumberish, percent: number): bigint;
|
|
|
5227
4509
|
* Check if a value is a number.
|
|
5228
4510
|
*
|
|
5229
4511
|
* @param {unknown} value - The value to check.
|
|
4512
|
+
* @returns {boolean} Returns true if the value is a number, otherwise returns false.
|
|
4513
|
+
* @example
|
|
4514
|
+
* ```typescript
|
|
4515
|
+
* const result = isNumber(123);
|
|
4516
|
+
* // result = true
|
|
4517
|
+
*
|
|
4518
|
+
* const result2 = isNumber("123");
|
|
4519
|
+
* // result2 = false
|
|
4520
|
+
* ```
|
|
5230
4521
|
* @return {boolean} Returns true if the value is a number, otherwise returns false.
|
|
5231
4522
|
*/
|
|
5232
4523
|
declare function isNumber(value: unknown): value is number;
|
|
@@ -5234,6 +4525,15 @@ declare function isNumber(value: unknown): value is number;
|
|
|
5234
4525
|
* Checks if a given value is of boolean type.
|
|
5235
4526
|
*
|
|
5236
4527
|
* @param {unknown} value - The value to check.
|
|
4528
|
+
* @returns {boolean} - True if the value is of boolean type, false otherwise.
|
|
4529
|
+
* @example
|
|
4530
|
+
* ```typescript
|
|
4531
|
+
* const result = isBoolean(true);
|
|
4532
|
+
* // result = true
|
|
4533
|
+
*
|
|
4534
|
+
* const result2 = isBoolean(false);
|
|
4535
|
+
* // result2 = false
|
|
4536
|
+
* ```
|
|
5237
4537
|
* @return {boolean} - True if the value is of boolean type, false otherwise.
|
|
5238
4538
|
*/
|
|
5239
4539
|
declare function isBoolean(value: unknown): value is boolean;
|
|
@@ -5295,6 +4595,14 @@ declare const fromCallsToExecuteCalldata_cairo1: (calls: Call[]) => Calldata;
|
|
|
5295
4595
|
* Create `__execute__` Calldata from Calls based on Cairo versions
|
|
5296
4596
|
*/
|
|
5297
4597
|
declare const getExecuteCalldata: (calls: Call[], cairoVersion?: CairoVersion) => Calldata;
|
|
4598
|
+
/**
|
|
4599
|
+
* Builds a UDCCall object.
|
|
4600
|
+
*
|
|
4601
|
+
* @param {UniversalDeployerContractPayload | UniversalDeployerContractPayload[]} payload - The payload data for the UDCCall. Can be a single payload object or an array of payload objects
|
|
4602
|
+
*.
|
|
4603
|
+
* @param {string} address - The address to be used in the UDCCall.
|
|
4604
|
+
* @returns {{ calls: Array, addresses: Array }} - The UDCCall object containing an array of calls and an array of addresses.
|
|
4605
|
+
*/
|
|
5298
4606
|
declare function buildUDCCall(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], address: string): {
|
|
5299
4607
|
calls: {
|
|
5300
4608
|
contractAddress: string;
|
|
@@ -5307,9 +4615,9 @@ declare function buildUDCCall(payload: UniversalDeployerContractPayload | Univer
|
|
|
5307
4615
|
* Return transaction versions based on version type, default version type is 'transaction'
|
|
5308
4616
|
*/
|
|
5309
4617
|
declare function getVersionsByType(versionType?: 'fee' | 'transaction'): {
|
|
5310
|
-
v1: ETransactionVersion;
|
|
5311
|
-
v2: ETransactionVersion;
|
|
5312
|
-
v3: ETransactionVersion;
|
|
4618
|
+
v1: ETransactionVersion$1;
|
|
4619
|
+
v2: ETransactionVersion$1;
|
|
4620
|
+
v3: ETransactionVersion$1;
|
|
5313
4621
|
};
|
|
5314
4622
|
|
|
5315
4623
|
declare const transaction_buildUDCCall: typeof buildUDCCall;
|
|
@@ -5364,8 +4672,30 @@ declare function signatureToHexArray(sig?: Signature): ArraySignatureType;
|
|
|
5364
4672
|
* Convert estimated fee to max fee with overhead
|
|
5365
4673
|
*/
|
|
5366
4674
|
declare function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead?: number): bigint;
|
|
5367
|
-
|
|
5368
|
-
|
|
4675
|
+
/**
|
|
4676
|
+
* Calculates the maximum resource bounds for fee estimation.
|
|
4677
|
+
*
|
|
4678
|
+
* @param {FeeEstimate|0n} estimate - The estimate for the fee. If a BigInt is provided,
|
|
4679
|
+
* the returned bounds will be set to '0x0'.
|
|
4680
|
+
* @param {number} [amountOverhead=feeMarginPercentage.L1_BOUND_MAX_AMOUNT] - The percentage
|
|
4681
|
+
* overhead added to
|
|
4682
|
+
* the gas consumed or
|
|
4683
|
+
* overall fee amount.
|
|
4684
|
+
* @param {number} [priceOverhead=feeMarginPercentage.L1_BOUND_MAX_PRICE_PER_UNIT] - The percentage
|
|
4685
|
+
* overhead added to
|
|
4686
|
+
* the gas price per unit.
|
|
4687
|
+
* @throws {Error} If the estimate object is undefined or does not have the required properties.
|
|
4688
|
+
* @returns {ResourceBounds} The maximum resource bounds for fee estimation.
|
|
4689
|
+
*/
|
|
4690
|
+
declare function estimateFeeToBounds(estimate: FeeEstimate | 0n, amountOverhead?: number, priceOverhead?: number): ResourceBounds$2;
|
|
4691
|
+
/**
|
|
4692
|
+
* Converts the data availability mode from EDataAvailabilityMode to EDAMode.
|
|
4693
|
+
*
|
|
4694
|
+
* @param {EDataAvailabilityMode} dam - The data availability mode to be converted.
|
|
4695
|
+
* @return {EDAMode} The converted data availability mode.
|
|
4696
|
+
* @throws {Error} If the data availability mode is not a valid value.
|
|
4697
|
+
*/
|
|
4698
|
+
declare function intDAM(dam: EDataAvailabilityMode$1): EDAMode$1;
|
|
5369
4699
|
/**
|
|
5370
4700
|
* Convert to ETransactionVersion or throw an error.
|
|
5371
4701
|
* Return providedVersion is specified else return defaultVersion
|
|
@@ -5373,12 +4703,12 @@ declare function intDAM(dam: EDataAvailabilityMode): EDAMode;
|
|
|
5373
4703
|
* @param providedVersion BigNumberish | undefined
|
|
5374
4704
|
* @returns ETransactionVersion
|
|
5375
4705
|
*/
|
|
5376
|
-
declare function toTransactionVersion(defaultVersion: BigNumberish, providedVersion?: BigNumberish): ETransactionVersion;
|
|
4706
|
+
declare function toTransactionVersion(defaultVersion: BigNumberish, providedVersion?: BigNumberish): ETransactionVersion$1;
|
|
5377
4707
|
/**
|
|
5378
4708
|
* Convert Transaction version to Fee version or throw an error
|
|
5379
4709
|
* @param providedVersion BigNumberish | undefined
|
|
5380
4710
|
*/
|
|
5381
|
-
declare function toFeeVersion(providedVersion?: BigNumberish): ETransactionVersion.F0 | ETransactionVersion.F1 | ETransactionVersion.F2 | ETransactionVersion.F3 | undefined;
|
|
4711
|
+
declare function toFeeVersion(providedVersion?: BigNumberish): ETransactionVersion$1.F0 | ETransactionVersion$1.F1 | ETransactionVersion$1.F2 | ETransactionVersion$1.F3 | undefined;
|
|
5382
4712
|
/**
|
|
5383
4713
|
* Return provided or default v3 tx details
|
|
5384
4714
|
*/
|
|
@@ -5386,9 +4716,9 @@ declare function v3Details(details: UniversalDetails): {
|
|
|
5386
4716
|
tip: BigNumberish;
|
|
5387
4717
|
paymasterData: BigNumberish[];
|
|
5388
4718
|
accountDeploymentData: BigNumberish[];
|
|
5389
|
-
nonceDataAvailabilityMode: EDataAvailabilityMode;
|
|
5390
|
-
feeDataAvailabilityMode: EDataAvailabilityMode;
|
|
5391
|
-
resourceBounds: RESOURCE_BOUNDS_MAPPING
|
|
4719
|
+
nonceDataAvailabilityMode: EDataAvailabilityMode$1;
|
|
4720
|
+
feeDataAvailabilityMode: EDataAvailabilityMode$1;
|
|
4721
|
+
resourceBounds: SPEC.RESOURCE_BOUNDS_MAPPING;
|
|
5392
4722
|
};
|
|
5393
4723
|
/**
|
|
5394
4724
|
* It will reduce V2 to V1, else (V3) stay the same
|
|
@@ -5397,7 +4727,7 @@ declare function v3Details(details: UniversalDetails): {
|
|
|
5397
4727
|
* F3 -> F3
|
|
5398
4728
|
* V3 -> V3
|
|
5399
4729
|
*/
|
|
5400
|
-
declare function reduceV2(providedVersion: ETransactionVersion): ETransactionVersion.V0 | ETransactionVersion.V1 | ETransactionVersion.V3 | ETransactionVersion.F0 | ETransactionVersion.F1 | ETransactionVersion.F3;
|
|
4730
|
+
declare function reduceV2(providedVersion: ETransactionVersion$1): ETransactionVersion$1.V0 | ETransactionVersion$1.V1 | ETransactionVersion$1.V3 | ETransactionVersion$1.F0 | ETransactionVersion$1.F1 | ETransactionVersion$1.F3;
|
|
5401
4731
|
|
|
5402
4732
|
declare const stark_compressProgram: typeof compressProgram;
|
|
5403
4733
|
declare const stark_decompressProgram: typeof decompressProgram;
|
|
@@ -5661,7 +4991,20 @@ interface Context {
|
|
|
5661
4991
|
parent?: string;
|
|
5662
4992
|
key?: string;
|
|
5663
4993
|
}
|
|
4994
|
+
/**
|
|
4995
|
+
* Prepares the selector for use.
|
|
4996
|
+
*
|
|
4997
|
+
* @param {string} selector - The selector to be prepared.
|
|
4998
|
+
* @returns {string} The prepared selector.
|
|
4999
|
+
*/
|
|
5664
5000
|
declare function prepareSelector(selector: string): string;
|
|
5001
|
+
/**
|
|
5002
|
+
* Checks if the given Starknet type is a Merkle tree type.
|
|
5003
|
+
*
|
|
5004
|
+
* @param {StarknetType} type - The StarkNet type to check.
|
|
5005
|
+
*
|
|
5006
|
+
* @returns {boolean} - True if the type is a Merkle tree type, false otherwise.
|
|
5007
|
+
*/
|
|
5665
5008
|
declare function isMerkleTreeType(type: StarknetType): type is StarknetMerkleType;
|
|
5666
5009
|
/**
|
|
5667
5010
|
* Get the dependencies of a struct type. If a struct has the same dependency multiple times, it's only included once
|
|
@@ -5715,42 +5058,115 @@ declare namespace typedData {
|
|
|
5715
5058
|
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 };
|
|
5716
5059
|
}
|
|
5717
5060
|
|
|
5061
|
+
/**
|
|
5062
|
+
* Decodes an array of BigInts into a string using the given algorithm.
|
|
5063
|
+
* @param {bigint[]} encoded - The encoded array of BigInts.
|
|
5064
|
+
* @return {string} The decoded string.
|
|
5065
|
+
*/
|
|
5718
5066
|
declare function useDecoded(encoded: bigint[]): string;
|
|
5067
|
+
/**
|
|
5068
|
+
* Encodes a string into a bigint value.
|
|
5069
|
+
*
|
|
5070
|
+
* @param {string} decoded - The string to be encoded.
|
|
5071
|
+
* @returns {bigint} - The encoded bigint value.
|
|
5072
|
+
*/
|
|
5719
5073
|
declare function useEncoded(decoded: string): bigint;
|
|
5720
5074
|
declare const enum StarknetIdContract {
|
|
5721
5075
|
MAINNET = "0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678",
|
|
5722
|
-
TESTNET = "0x3bab268e932d2cecd1946f100ae67ce3dff9fd234119ea2f6da57d16d29fce",
|
|
5723
5076
|
TESTNET_SEPOLIA = "0x0707f09bc576bd7cfee59694846291047e965f4184fe13dac62c56759b3b6fa7"
|
|
5724
5077
|
}
|
|
5078
|
+
/**
|
|
5079
|
+
* Returns the Starknet ID contract address based on the provided chain ID.
|
|
5080
|
+
*
|
|
5081
|
+
* @param {StarknetChainId} chainId - The chain ID of the Starknet network.
|
|
5082
|
+
* @return {string} The Starknet ID contract address.
|
|
5083
|
+
* @throws {Error} Throws an error if the Starknet ID contract is not deployed on the network.
|
|
5084
|
+
*/
|
|
5725
5085
|
declare function getStarknetIdContract(chainId: StarknetChainId): string;
|
|
5726
5086
|
declare const enum StarknetIdIdentityContract {
|
|
5727
5087
|
MAINNET = "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
|
|
5728
|
-
TESTNET = "0x783a9097b26eae0586373b2ce0ed3529ddc44069d1e0fbc4f66d42b69d6850d",
|
|
5729
5088
|
TESTNET_SEPOLIA = "0x070DF8B4F5cb2879f8592849fA8f3134da39d25326B8558cc9C8FE8D47EA3A90"
|
|
5730
5089
|
}
|
|
5090
|
+
/**
|
|
5091
|
+
* Returns the Starknet ID identity contract address for the given chain ID.
|
|
5092
|
+
*
|
|
5093
|
+
* @param {StarknetChainId} chainId - The chain ID for the specified network.
|
|
5094
|
+
*
|
|
5095
|
+
* @return {string} - The Starknet ID identity contract address for the specified network.
|
|
5096
|
+
*
|
|
5097
|
+
* @throws {Error} - If the Starknet ID verifier contract is not deployed on the network.
|
|
5098
|
+
*/
|
|
5731
5099
|
declare function getStarknetIdIdentityContract(chainId: StarknetChainId): string;
|
|
5732
5100
|
declare const StarknetIdMulticallContract = "0x034ffb8f4452df7a613a0210824d6414dbadcddce6c6e19bf4ddc9e22ce5f970";
|
|
5101
|
+
/**
|
|
5102
|
+
* Returns the Starknet.id multicall contract address based on the provided chainId.
|
|
5103
|
+
*
|
|
5104
|
+
* @param {StarknetChainId} chainId - The chainId of the network.
|
|
5105
|
+
* @return {string} - The address of the Starknet.id multicall contract.
|
|
5106
|
+
* @throws {Error} - If the Starknet.id multicall contract is not deployed on the network.
|
|
5107
|
+
*/
|
|
5733
5108
|
declare function getStarknetIdMulticallContract(chainId: StarknetChainId): string;
|
|
5734
5109
|
declare const enum StarknetIdVerifierContract {
|
|
5735
5110
|
MAINNET = "0x07d14dfd8ee95b41fce179170d88ba1f0d5a512e13aeb232f19cfeec0a88f8bf",
|
|
5736
|
-
TESTNET = "0x057c942544063c3aea6ea6c37009cc9d1beacd750cb6801549a129c7265f0f11",
|
|
5737
5111
|
TESTNET_SEPOLIA = "0x0182EcE8173C216A395f4828e1523541b7e3600bf190CB252E1a1A0cE219d184"
|
|
5738
5112
|
}
|
|
5113
|
+
/**
|
|
5114
|
+
* Returns the address of the Starknet ID Verifier contract based on the specified chain ID.
|
|
5115
|
+
*
|
|
5116
|
+
* @param {StarknetChainId} chainId - The ID of the Starknet chain.
|
|
5117
|
+
* @return {string} - The address of the Starknet ID Verifier contract.
|
|
5118
|
+
* @throws {Error} - If the Starknet ID Verifier contract is not deployed on the specified network.
|
|
5119
|
+
*/
|
|
5739
5120
|
declare function getStarknetIdVerifierContract(chainId: StarknetChainId): string;
|
|
5740
5121
|
declare const enum StarknetIdPfpContract {
|
|
5741
5122
|
MAINNET = "0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7",
|
|
5742
|
-
TESTNET = "0x03cac3228b434259734ee0e4ff445f642206ea11adace7e4f45edd2596748698",
|
|
5743
5123
|
TESTNET_SEPOLIA = "0x058061bb6bdc501eE215172c9f87d557C1E0f466dC498cA81b18f998Bf1362b2"
|
|
5744
5124
|
}
|
|
5125
|
+
/**
|
|
5126
|
+
* Retrieves the contract address of the Starknet.id profile picture verifier contract based on the given chain ID.
|
|
5127
|
+
*
|
|
5128
|
+
* @param {StarknetChainId} chainId - The chain ID of the network.
|
|
5129
|
+
* @returns {string} - The contract address of the Starknet.id profile picture verifier contract.
|
|
5130
|
+
* @throws {Error} - Throws an error if the Starknet.id profile picture verifier contract is not yet deployed on the network.
|
|
5131
|
+
*/
|
|
5745
5132
|
declare function getStarknetIdPfpContract(chainId: StarknetChainId): string;
|
|
5746
5133
|
declare const enum StarknetIdPopContract {
|
|
5747
5134
|
MAINNET = "0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4",
|
|
5748
|
-
TESTNET = "0x03528caf090179e337931ee669a5b0214041e1bae30d460ff07d2cea2c7a9106",
|
|
5749
5135
|
TESTNET_SEPOLIA = "0x0023FE3b845ed5665a9eb3792bbB17347B490EE4090f855C1298d03BB5F49B49"
|
|
5750
5136
|
}
|
|
5137
|
+
/**
|
|
5138
|
+
* Retrieves the Starknet ID Proof of Personhood (IdPop) verifier contract address for the given chain ID.
|
|
5139
|
+
*
|
|
5140
|
+
* @param {StarknetChainId} chainId - The chain ID of the Starknet network.
|
|
5141
|
+
* @return {string} - The Starknet ID Pop contract address.
|
|
5142
|
+
* @throws {Error} - If the Starknet ID Pop contract is not deployed on the specified network.
|
|
5143
|
+
*/
|
|
5751
5144
|
declare function getStarknetIdPopContract(chainId: StarknetChainId): string;
|
|
5145
|
+
/**
|
|
5146
|
+
* Executes a method and returns a CairoCustomEnum object.
|
|
5147
|
+
*
|
|
5148
|
+
* Functions to build CairoCustomEnum for multicall contracts
|
|
5149
|
+
* @param {Object} staticEx - An optional object defining the "Static" value of the CairoCustomEnum.
|
|
5150
|
+
* @param {number[]} ifEqual - An optional array defining the "IfEqual" value of the CairoCustomEnum.
|
|
5151
|
+
* @param {number[]} ifNotEqual - An optional array defining the "IfNotEqual" value of the CairoCustomEnum.
|
|
5152
|
+
* @return {CairoCustomEnum} - The created CairoCustomEnum object.
|
|
5153
|
+
*/
|
|
5752
5154
|
declare function execution(staticEx: {} | undefined, ifEqual?: number[] | undefined, ifNotEqual?: number[] | undefined): CairoCustomEnum;
|
|
5155
|
+
/**
|
|
5156
|
+
* Creates a new instance of CairoCustomEnum.
|
|
5157
|
+
*
|
|
5158
|
+
* @param {BigNumberish | undefined} hardcoded - The hardcoded value for the CairoCustomEnum.
|
|
5159
|
+
* @param {number[] | undefined} reference - The reference array for the CairoCustomEnum.
|
|
5160
|
+
* @returns {CairoCustomEnum} The new instance of CairoCustomEnum.
|
|
5161
|
+
*/
|
|
5753
5162
|
declare function dynamicFelt(hardcoded: BigNumberish | undefined, reference?: number[] | undefined): CairoCustomEnum;
|
|
5163
|
+
/**
|
|
5164
|
+
* Creates a new instance of CairoCustomEnum with the given parameters.
|
|
5165
|
+
* @param {BigNumberish | undefined} hardcoded - The hardcoded value.
|
|
5166
|
+
* @param {BigNumberish[] | undefined} [reference] - The reference value (optional).
|
|
5167
|
+
* @param {BigNumberish[] | undefined} [arrayReference] - The array reference value (optional).
|
|
5168
|
+
* @return {CairoCustomEnum} - The new instance of CairoCustomEnum.
|
|
5169
|
+
*/
|
|
5754
5170
|
declare function dynamicCallData(hardcoded: BigNumberish | undefined, reference?: BigNumberish[] | undefined, arrayReference?: BigNumberish[] | undefined): CairoCustomEnum;
|
|
5755
5171
|
|
|
5756
5172
|
type starknetId_StarknetIdContract = StarknetIdContract;
|
|
@@ -5811,6 +5227,15 @@ declare function formatHash(hashValue: BigNumberish): string;
|
|
|
5811
5227
|
*/
|
|
5812
5228
|
declare function txIdentifier(txHash?: BigNumberish, txId?: BigNumberish): string;
|
|
5813
5229
|
declare const validBlockTags: BlockTag[];
|
|
5230
|
+
/**
|
|
5231
|
+
* hex string and BigInt are detected as block hashes. identifier return { block_hash: hash }
|
|
5232
|
+
*
|
|
5233
|
+
* decimal string and number are detected as block numbers. identifier return { block_number: number }
|
|
5234
|
+
*
|
|
5235
|
+
* text string are detected as block tag. identifier return tag
|
|
5236
|
+
*
|
|
5237
|
+
* null is detected as 'pending' block tag. identifier return 'pending'
|
|
5238
|
+
*/
|
|
5814
5239
|
declare class Block {
|
|
5815
5240
|
hash: BlockIdentifier;
|
|
5816
5241
|
number: BlockIdentifier;
|
|
@@ -5823,7 +5248,20 @@ declare class Block {
|
|
|
5823
5248
|
valueOf: () => BlockIdentifier;
|
|
5824
5249
|
toString: () => BlockIdentifier;
|
|
5825
5250
|
}
|
|
5251
|
+
/**
|
|
5252
|
+
* Check if the given transaction details is a V3 transaction.
|
|
5253
|
+
*
|
|
5254
|
+
* @param {InvocationsDetailsWithNonce} details - The transaction details to be checked.
|
|
5255
|
+
* @return {boolean} - Returns true if the transaction is a V3 transaction, otherwise false.
|
|
5256
|
+
*/
|
|
5826
5257
|
declare function isV3Tx(details: InvocationsDetailsWithNonce): details is V3TransactionDetails;
|
|
5258
|
+
/**
|
|
5259
|
+
* Determines if the given response matches the specified version.
|
|
5260
|
+
*
|
|
5261
|
+
* @param {('0.5' | '0.6' | '0.7')} version - The version to compare against the response.
|
|
5262
|
+
* @param {string} response - The response to check against the version.
|
|
5263
|
+
* @returns {boolean} - True if the response matches the version, false otherwise.
|
|
5264
|
+
*/
|
|
5827
5265
|
declare function isVersion(version: '0.5' | '0.6' | '0.7', response: string): boolean;
|
|
5828
5266
|
/**
|
|
5829
5267
|
* Guard Pending Block
|
|
@@ -5857,15 +5295,22 @@ declare namespace provider {
|
|
|
5857
5295
|
export { provider_Block as Block, provider_createSierraContractClass as createSierraContractClass, provider_formatHash as formatHash, provider_getDefaultNodeUrl as getDefaultNodeUrl, provider_isPendingBlock as isPendingBlock, provider_isPendingStateUpdate as isPendingStateUpdate, provider_isPendingTransaction as isPendingTransaction, provider_isV3Tx as isV3Tx, provider_isVersion as isVersion, provider_parseContract as parseContract, provider_txIdentifier as txIdentifier, provider_validBlockTags as validBlockTags, provider_wait as wait };
|
|
5858
5296
|
}
|
|
5859
5297
|
|
|
5298
|
+
/**
|
|
5299
|
+
* Retrieves the events from the given ABI.
|
|
5300
|
+
*
|
|
5301
|
+
* @param {Abi} abi - The ABI to extract events from.
|
|
5302
|
+
* @return {AbiEvents} - An object containing the extracted events.
|
|
5303
|
+
*/
|
|
5860
5304
|
declare function getAbiEvents(abi: Abi): AbiEvents;
|
|
5861
5305
|
/**
|
|
5862
5306
|
* Parse raw events and structure them into response object based on a contract structs and defined events
|
|
5863
5307
|
* @param providerReceivedEvents ProviderEvent[] - Array of raw events
|
|
5864
5308
|
* @param abiEvents AbiEvents - Events defined in the abi
|
|
5865
5309
|
* @param abiStructs AbiStructs - Structs defined in the abi
|
|
5310
|
+
* @param abiEnums
|
|
5866
5311
|
* @return ParsedEvents - parsed events corresponding to the abi
|
|
5867
5312
|
*/
|
|
5868
|
-
declare function parseEvents(providerReceivedEvents: Event[], abiEvents: AbiEvents, abiStructs: AbiStructs, abiEnums: AbiEnums): ParsedEvents;
|
|
5313
|
+
declare function parseEvents(providerReceivedEvents: Event$1[], abiEvents: AbiEvents, abiStructs: AbiStructs, abiEnums: AbiEnums): ParsedEvents;
|
|
5869
5314
|
|
|
5870
5315
|
declare const index_getAbiEvents: typeof getAbiEvents;
|
|
5871
5316
|
declare const index_parseEvents: typeof parseEvents;
|
|
@@ -5954,14 +5399,38 @@ declare class CairoUint512 {
|
|
|
5954
5399
|
* Format a hex number to '0x' and 64 characters, adding leading zeros if necessary.
|
|
5955
5400
|
* @param {BigNumberish} address
|
|
5956
5401
|
* @returns {string} Hex string : 0x followed by 64 characters. No upper case characters in the response.
|
|
5402
|
+
* @example
|
|
5403
|
+
* ```typescript
|
|
5404
|
+
* const address = "0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf";
|
|
5405
|
+
* const result = addAddressPadding(address);
|
|
5406
|
+
* // result = "0x0000090591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf"
|
|
5407
|
+
* ```
|
|
5957
5408
|
*/
|
|
5958
5409
|
declare function addAddressPadding(address: BigNumberish): string;
|
|
5959
5410
|
/**
|
|
5960
5411
|
* Check the validity of a Starknet address, and format it as a hex number : '0x' and 64 characters, adding leading zeros if necessary.
|
|
5961
5412
|
* @param {BigNumberish} address
|
|
5962
5413
|
* @returns {string} Hex string : 0x followed by 64 characters. No upper case characters in the response.
|
|
5414
|
+
* @example
|
|
5415
|
+
* ```typescript
|
|
5416
|
+
* const address = "0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf";
|
|
5417
|
+
* const result = validateAndParseAddress(address);
|
|
5418
|
+
* // result = "0x0000090591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf"
|
|
5419
|
+
* ```
|
|
5963
5420
|
*/
|
|
5964
5421
|
declare function validateAndParseAddress(address: BigNumberish): string;
|
|
5422
|
+
/**
|
|
5423
|
+
* Convert an address to her checksum representation which uses a specific pattern of uppercase and lowercase letters within
|
|
5424
|
+
* a given address to reduce the risk of errors introduced from typing an address or cut and paste issues.
|
|
5425
|
+
* @param {BigNumberish} address
|
|
5426
|
+
* @returns {string} Hex string : 0x followed by 64 characters. Mix of uppercase and lowercase
|
|
5427
|
+
* @example
|
|
5428
|
+
* ```typescript
|
|
5429
|
+
* const address = "0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf";
|
|
5430
|
+
* const result = getChecksumAddress(address);
|
|
5431
|
+
* // result = "0x0000090591D9fA3EfC87067d95a643f8455E0b8190eb8Cb7bFd39e4fb7571fDF"
|
|
5432
|
+
* ```
|
|
5433
|
+
*/
|
|
5965
5434
|
declare function getChecksumAddress(address: BigNumberish): string;
|
|
5966
5435
|
/**
|
|
5967
5436
|
* If the casing of an address is mixed, it is a Checksum Address, which uses a specific pattern of uppercase and lowercase letters within
|
|
@@ -5970,13 +5439,43 @@ declare function getChecksumAddress(address: BigNumberish): string;
|
|
|
5970
5439
|
* @param address string
|
|
5971
5440
|
*
|
|
5972
5441
|
* @returns true if the ChecksumAddress is valid
|
|
5442
|
+
* @example
|
|
5443
|
+
* ```typescript
|
|
5444
|
+
* const address = "0x0000090591D9fA3EfC87067d95a643f8455E0b8190eb8Cb7bFd39e4fb7571fDF";
|
|
5445
|
+
* const result = validateChecksumAddress(address);
|
|
5446
|
+
* // result = true
|
|
5447
|
+
* ```
|
|
5973
5448
|
*/
|
|
5974
5449
|
declare function validateChecksumAddress(address: string): boolean;
|
|
5975
5450
|
|
|
5976
5451
|
/**
|
|
5977
5452
|
* Loosely validate a URL `string`.
|
|
5453
|
+
*
|
|
5454
|
+
* @param {string} s - The URL to check for
|
|
5455
|
+
* @return {boolean} `true` if url is valid, `false` otherwise
|
|
5456
|
+
* @example
|
|
5457
|
+
* ```typescript
|
|
5458
|
+
* const s = "https://starknetjs.com/docs";
|
|
5459
|
+
* const result = isUrl(s);
|
|
5460
|
+
* // result == true
|
|
5978
5461
|
*/
|
|
5979
5462
|
declare function isUrl(s?: string): boolean;
|
|
5463
|
+
/**
|
|
5464
|
+
* Builds a URL using the provided base URL, default path, and optional URL or path.
|
|
5465
|
+
*
|
|
5466
|
+
* @param {string} baseUrl - The base URL of the URL being built.
|
|
5467
|
+
* @param {string} defaultPath - The default path to use if no URL or path is provided.
|
|
5468
|
+
* @param {string} [urlOrPath] - The optional URL or path to append to the base URL.
|
|
5469
|
+
* @return {string} The built URL.
|
|
5470
|
+
* @example
|
|
5471
|
+
* ```typescript
|
|
5472
|
+
* const baseUrl = "https://starknetjs.com";
|
|
5473
|
+
* const defaultPath = "/";
|
|
5474
|
+
* const urlOrPath = "/docs";
|
|
5475
|
+
* const result = buildUrl(baseUrl, defaultPath, urlOrPath);
|
|
5476
|
+
*
|
|
5477
|
+
* result = "https://starknetjs.com/docs"
|
|
5478
|
+
*/
|
|
5980
5479
|
declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string;
|
|
5981
5480
|
|
|
5982
5481
|
declare abstract class AbiParserInterface {
|
|
@@ -5999,25 +5498,134 @@ declare abstract class AbiParserInterface {
|
|
|
5999
5498
|
abstract getLegacyFormat(): Abi;
|
|
6000
5499
|
}
|
|
6001
5500
|
|
|
5501
|
+
/**
|
|
5502
|
+
* Checks if the given name ends with "_len".
|
|
5503
|
+
*
|
|
5504
|
+
* @param {string} name - The name to be checked.
|
|
5505
|
+
* @returns - True if the name ends with "_len", false otherwise.
|
|
5506
|
+
*/
|
|
6002
5507
|
declare const isLen: (name: string) => boolean;
|
|
5508
|
+
/**
|
|
5509
|
+
* Checks if a given type is felt.
|
|
5510
|
+
*
|
|
5511
|
+
* @param {string} type - The type to check.
|
|
5512
|
+
* @returns - True if the type is felt, false otherwise.
|
|
5513
|
+
*/
|
|
6003
5514
|
declare const isTypeFelt: (type: string) => boolean;
|
|
5515
|
+
/**
|
|
5516
|
+
* Checks if the given type is an array type.
|
|
5517
|
+
*
|
|
5518
|
+
* @param {string} type - The type to check.
|
|
5519
|
+
* @returns - `true` if the type is an array type, `false` otherwise.
|
|
5520
|
+
*/
|
|
6004
5521
|
declare const isTypeArray: (type: string) => boolean;
|
|
5522
|
+
/**
|
|
5523
|
+
* Checks if the given type is a tuple type.
|
|
5524
|
+
*
|
|
5525
|
+
* @param {string} type - The type to be checked.
|
|
5526
|
+
* @returns - `true` if the type is a tuple type, otherwise `false`.
|
|
5527
|
+
*/
|
|
6005
5528
|
declare const isTypeTuple: (type: string) => boolean;
|
|
5529
|
+
/**
|
|
5530
|
+
* Checks whether a given type is a named tuple.
|
|
5531
|
+
*
|
|
5532
|
+
* @param {string} type - The type to be checked.
|
|
5533
|
+
* @returns - True if the type is a named tuple, false otherwise.
|
|
5534
|
+
*/
|
|
6006
5535
|
declare const isTypeNamedTuple: (type: string) => boolean;
|
|
5536
|
+
/**
|
|
5537
|
+
* Checks if a given type is a struct.
|
|
5538
|
+
*
|
|
5539
|
+
* @param {string} type - The type to check for existence.
|
|
5540
|
+
* @param {AbiStructs} structs - The collection of structs to search in.
|
|
5541
|
+
* @returns - True if the type exists in the structs, false otherwise.
|
|
5542
|
+
*/
|
|
6007
5543
|
declare const isTypeStruct: (type: string, structs: AbiStructs) => boolean;
|
|
5544
|
+
/**
|
|
5545
|
+
* Checks if a given type is an enum.
|
|
5546
|
+
*
|
|
5547
|
+
* @param {string} type - The type to check.
|
|
5548
|
+
* @param {AbiEnums} enums - The enumeration to search in.
|
|
5549
|
+
* @returns - True if the type exists in the enumeration, otherwise false.
|
|
5550
|
+
*/
|
|
6008
5551
|
declare const isTypeEnum: (type: string, enums: AbiEnums) => boolean;
|
|
5552
|
+
/**
|
|
5553
|
+
* Determines if the given type is an Option type.
|
|
5554
|
+
*
|
|
5555
|
+
* @param {string} type - The type to check.
|
|
5556
|
+
* @returns - True if the type is an Option type, false otherwise.
|
|
5557
|
+
*/
|
|
6009
5558
|
declare const isTypeOption: (type: string) => boolean;
|
|
5559
|
+
/**
|
|
5560
|
+
* Checks whether a given type starts with 'core::result::Result::'.
|
|
5561
|
+
*
|
|
5562
|
+
* @param {string} type - The type to check.
|
|
5563
|
+
* @returns - True if the type starts with 'core::result::Result::', false otherwise.
|
|
5564
|
+
*/
|
|
6010
5565
|
declare const isTypeResult: (type: string) => boolean;
|
|
5566
|
+
/**
|
|
5567
|
+
* Checks if the given value is a valid Uint type.
|
|
5568
|
+
*
|
|
5569
|
+
* @param {string} type - The value to check.
|
|
5570
|
+
* @returns - Returns true if the value is a valid Uint type, otherwise false.
|
|
5571
|
+
*/
|
|
6011
5572
|
declare const isTypeUint: (type: string) => boolean;
|
|
5573
|
+
/**
|
|
5574
|
+
* Checks if the given type is `uint256`.
|
|
5575
|
+
*
|
|
5576
|
+
* @param {string} type - The type to be checked.
|
|
5577
|
+
* @returns - Returns true if the type is `uint256`, otherwise false.
|
|
5578
|
+
*/
|
|
6012
5579
|
declare const isTypeUint256: (type: string) => boolean;
|
|
5580
|
+
/**
|
|
5581
|
+
* Checks if the given type is a literal type.
|
|
5582
|
+
*
|
|
5583
|
+
* @param {string} type - The type to check.
|
|
5584
|
+
* @returns - True if the type is a literal type, false otherwise.
|
|
5585
|
+
*/
|
|
6013
5586
|
declare const isTypeLiteral: (type: string) => boolean;
|
|
5587
|
+
/**
|
|
5588
|
+
* Checks if the given type is a boolean type.
|
|
5589
|
+
*
|
|
5590
|
+
* @param {string} type - The type to be checked.
|
|
5591
|
+
* @returns - Returns true if the type is a boolean type, otherwise false.
|
|
5592
|
+
*/
|
|
6014
5593
|
declare const isTypeBool: (type: string) => boolean;
|
|
5594
|
+
/**
|
|
5595
|
+
* Checks if the provided type is equal to 'core::starknet::contract_address::ContractAddress'.
|
|
5596
|
+
* @param {string} type - The type to be checked.
|
|
5597
|
+
* @returns - true if the type matches 'core::starknet::contract_address::ContractAddress', false otherwise.
|
|
5598
|
+
*/
|
|
6015
5599
|
declare const isTypeContractAddress: (type: string) => boolean;
|
|
5600
|
+
/**
|
|
5601
|
+
* Determines if the given type is an Ethereum address type.
|
|
5602
|
+
*
|
|
5603
|
+
* @param {string} type - The type to check.
|
|
5604
|
+
* @returns - Returns true if the given type is 'core::starknet::eth_address::EthAddress', otherwise false.
|
|
5605
|
+
*/
|
|
6016
5606
|
declare const isTypeEthAddress: (type: string) => boolean;
|
|
5607
|
+
/**
|
|
5608
|
+
* Checks if the given type is 'core::bytes_31::bytes31'.
|
|
5609
|
+
*
|
|
5610
|
+
* @param {string} type - The type to check.
|
|
5611
|
+
* @returns - True if the type is 'core::bytes_31::bytes31', false otherwise.
|
|
5612
|
+
*/
|
|
6017
5613
|
declare const isTypeBytes31: (type: string) => boolean;
|
|
5614
|
+
/**
|
|
5615
|
+
* Checks if the given type is equal to the 'core::byte_array::ByteArray'.
|
|
5616
|
+
*
|
|
5617
|
+
* @param {string} type - The type to check.
|
|
5618
|
+
* @returns - True if the given type is equal to 'core::byte_array::ByteArray', false otherwise.
|
|
5619
|
+
*/
|
|
6018
5620
|
declare const isTypeByteArray: (type: string) => boolean;
|
|
6019
5621
|
declare const isTypeSecp256k1Point: (type: string) => boolean;
|
|
6020
5622
|
declare const isCairo1Type: (type: string) => boolean;
|
|
5623
|
+
/**
|
|
5624
|
+
* Retrieves the array type from the given type string.
|
|
5625
|
+
*
|
|
5626
|
+
* @param {string} type - The type string.
|
|
5627
|
+
* @returns - The array type.
|
|
5628
|
+
*/
|
|
6021
5629
|
declare const getArrayType: (type: string) => string;
|
|
6022
5630
|
/**
|
|
6023
5631
|
* Test if an ABI comes from a Cairo 1 contract
|
|
@@ -6120,7 +5728,7 @@ declare namespace cairo {
|
|
|
6120
5728
|
declare function stringFromByteArray(myByteArray: ByteArray): string;
|
|
6121
5729
|
/**
|
|
6122
5730
|
* convert a JS string to a Cairo ByteArray
|
|
6123
|
-
* @param
|
|
5731
|
+
* @param targetString a JS string
|
|
6124
5732
|
* @returns Cairo representation of a LongString
|
|
6125
5733
|
* @example
|
|
6126
5734
|
* ```typescript
|
|
@@ -6141,6 +5749,17 @@ declare namespace byteArray {
|
|
|
6141
5749
|
export { byteArray_byteArrayFromString as byteArrayFromString, byteArray_stringFromByteArray as stringFromByteArray };
|
|
6142
5750
|
}
|
|
6143
5751
|
|
|
5752
|
+
/**
|
|
5753
|
+
* Parse one field of the calldata by using input field from the abi for that method
|
|
5754
|
+
*
|
|
5755
|
+
* @param argsIterator - Iterator for value of the field
|
|
5756
|
+
* @param input - input(field) information from the abi that will be used to parse the data
|
|
5757
|
+
* @param structs - structs from abi
|
|
5758
|
+
* @param enums - enums from abi
|
|
5759
|
+
* @return {string | string[]} - parsed arguments in format that contract is expecting
|
|
5760
|
+
*/
|
|
5761
|
+
declare function parseCalldataField(argsIterator: Iterator<any>, input: AbiEntry, structs: AbiStructs, enums: AbiEnums): string | string[];
|
|
5762
|
+
|
|
6144
5763
|
declare class CallData {
|
|
6145
5764
|
abi: Abi;
|
|
6146
5765
|
parser: AbiParserInterface;
|
|
@@ -6158,7 +5777,7 @@ declare class CallData {
|
|
|
6158
5777
|
* Compile contract callData with abi
|
|
6159
5778
|
* Parse the calldata by using input fields from the abi for that method
|
|
6160
5779
|
* @param method string - method name
|
|
6161
|
-
* @param
|
|
5780
|
+
* @param argsCalldata RawArgs - arguments passed to the method. Can be an array of arguments (in the order of abi definition), or an object constructed in conformity with abi (in this case, the parameter can be in a wrong order).
|
|
6162
5781
|
* @return Calldata - parsed arguments in format that contract is expecting
|
|
6163
5782
|
* @example
|
|
6164
5783
|
* ```typescript
|
|
@@ -6227,7 +5846,22 @@ declare class CallData {
|
|
|
6227
5846
|
decodeParameters(typeCairo: AllowArray<string>, response: string[]): AllowArray<Result>;
|
|
6228
5847
|
}
|
|
6229
5848
|
|
|
5849
|
+
/**
|
|
5850
|
+
* Checks if a given contract is in Sierra (Safe Intermediate Representation) format.
|
|
5851
|
+
*
|
|
5852
|
+
* @param {CairoContract | string} contract - The contract to check. Can be either a CairoContract object or a string representation of the contract.
|
|
5853
|
+
* @return {boolean} - Returns true if the contract is a Sierra contract, otherwise false.
|
|
5854
|
+
*/
|
|
6230
5855
|
declare function isSierra(contract: CairoContract | string): contract is SierraContractClass | CompiledSierra;
|
|
5856
|
+
/**
|
|
5857
|
+
* Extracts contract hashes from `DeclareContractPayload`.
|
|
5858
|
+
*
|
|
5859
|
+
* @param {DeclareContractPayload} payload - The payload containing contract information.
|
|
5860
|
+
*
|
|
5861
|
+
* @return {CompleteDeclareContractPayload} - The `CompleteDeclareContractPayload` with extracted contract hashes.
|
|
5862
|
+
*
|
|
5863
|
+
* @throws {Error} - If extraction of compiledClassHash or classHash fails.
|
|
5864
|
+
*/
|
|
6231
5865
|
declare function extractContractHashes(payload: DeclareContractPayload): CompleteDeclareContractPayload;
|
|
6232
5866
|
/**
|
|
6233
5867
|
* Helper to redeclare response Cairo0 contract
|
|
@@ -6257,12 +5891,12 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
|
|
|
6257
5891
|
* @param silentMode false: request user interaction allowance. true: return only pre-allowed
|
|
6258
5892
|
* @returns allowed accounts addresses
|
|
6259
5893
|
*/
|
|
6260
|
-
declare function requestAccounts(swo: StarknetWindowObject,
|
|
5894
|
+
declare function requestAccounts(swo: StarknetWindowObject, silent_mode?: boolean): Promise<string[]>;
|
|
6261
5895
|
/**
|
|
6262
5896
|
* Request Permission for wallet account
|
|
6263
5897
|
* @returns allowed accounts addresses
|
|
6264
5898
|
*/
|
|
6265
|
-
declare function getPermissions(swo: StarknetWindowObject): Promise<
|
|
5899
|
+
declare function getPermissions(swo: StarknetWindowObject): Promise<[] | RPCSPEC07.Permission[]>;
|
|
6266
5900
|
/**
|
|
6267
5901
|
* Request adding ERC20 Token to Wallet List
|
|
6268
5902
|
* @param asset WatchAssetParameters
|
|
@@ -6280,51 +5914,61 @@ declare function addStarknetChain(swo: StarknetWindowObject, chain: AddStarknetC
|
|
|
6280
5914
|
* @param chainId StarknetChainId
|
|
6281
5915
|
* @returns boolean
|
|
6282
5916
|
*/
|
|
6283
|
-
declare function switchStarknetChain(swo: StarknetWindowObject, chainId:
|
|
5917
|
+
declare function switchStarknetChain(swo: StarknetWindowObject, chainId: ChainId$1): Promise<boolean>;
|
|
6284
5918
|
/**
|
|
6285
5919
|
* Request the current chain ID from the wallet.
|
|
6286
5920
|
* @returns The current Starknet chain ID.
|
|
6287
5921
|
*/
|
|
6288
|
-
declare function requestChainId(swo: StarknetWindowObject): Promise<
|
|
5922
|
+
declare function requestChainId(swo: StarknetWindowObject): Promise<string>;
|
|
6289
5923
|
/**
|
|
6290
5924
|
* Get deployment data for a contract.
|
|
6291
5925
|
* @returns The deployment data result.
|
|
6292
5926
|
*/
|
|
6293
|
-
declare function deploymentData(swo: StarknetWindowObject): Promise<
|
|
5927
|
+
declare function deploymentData(swo: StarknetWindowObject): Promise<RPCSPEC07.AccountDeploymentData>;
|
|
6294
5928
|
/**
|
|
6295
5929
|
* Add an invoke transaction to the wallet.
|
|
6296
5930
|
* @param params The parameters required for the invoke transaction.
|
|
6297
5931
|
* @returns The result of adding the invoke transaction.
|
|
6298
5932
|
*/
|
|
6299
|
-
declare function addInvokeTransaction(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<
|
|
5933
|
+
declare function addInvokeTransaction(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<RPCSPEC07.AddInvokeTransactionResult>;
|
|
6300
5934
|
/**
|
|
6301
5935
|
* Add a declare transaction to the wallet.
|
|
6302
5936
|
* @param params The parameters required for the declare transaction.
|
|
6303
5937
|
* @returns The result of adding the declare transaction.
|
|
6304
5938
|
*/
|
|
6305
|
-
declare function addDeclareTransaction(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<
|
|
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>;
|
|
5939
|
+
declare function addDeclareTransaction(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<RPCSPEC07.AddDeclareTransactionResult>;
|
|
6312
5940
|
/**
|
|
6313
5941
|
* Sign typed data using the wallet.
|
|
6314
|
-
* @param
|
|
5942
|
+
* @param swo the starknet (wallet) window object to request the signature.
|
|
5943
|
+
* @param typedData The typed data to sign.
|
|
6315
5944
|
* @returns An array of signatures as strings.
|
|
6316
5945
|
*/
|
|
6317
|
-
declare function signMessage(swo: StarknetWindowObject, typedData: TypedData): Promise<
|
|
5946
|
+
declare function signMessage(swo: StarknetWindowObject, typedData: TypedData): Promise<SPEC.SIGNATURE>;
|
|
6318
5947
|
/**
|
|
6319
5948
|
* Get the list of supported specifications.
|
|
6320
5949
|
* @returns An array of supported specification strings.
|
|
6321
5950
|
*/
|
|
6322
5951
|
declare function supportedSpecs(swo: StarknetWindowObject): Promise<string[]>;
|
|
5952
|
+
/**
|
|
5953
|
+
* Attaches an event handler function to the "accountsChanged" event of a StarknetWindowObject.
|
|
5954
|
+
* When the accounts are changed, the specified callback function will be called.
|
|
5955
|
+
*
|
|
5956
|
+
* @param {StarknetWindowObject} swo - The StarknetWindowObject to attach the event handler to.
|
|
5957
|
+
* @param {AccountChangeEventHandler} callback - The function to be called when the accounts are changed.
|
|
5958
|
+
* It will receive the changed accounts as a parameter.
|
|
5959
|
+
* @returns {void}
|
|
5960
|
+
*/
|
|
6323
5961
|
declare function onAccountChange(swo: StarknetWindowObject, callback: AccountChangeEventHandler): void;
|
|
5962
|
+
/**
|
|
5963
|
+
* Register a callback function to be called when the network is changed.
|
|
5964
|
+
*
|
|
5965
|
+
* @param {StarknetWindowObject} swo - The StarknetWindowObject instance.
|
|
5966
|
+
* @param {NetworkChangeEventHandler} callback - The callback function to be called when the network is changed.
|
|
5967
|
+
* @return {void}
|
|
5968
|
+
*/
|
|
6324
5969
|
declare function onNetworkChanged(swo: StarknetWindowObject, callback: NetworkChangeEventHandler): void;
|
|
6325
5970
|
|
|
6326
5971
|
declare const connect_addDeclareTransaction: typeof addDeclareTransaction;
|
|
6327
|
-
declare const connect_addDeployAccountTransaction: typeof addDeployAccountTransaction;
|
|
6328
5972
|
declare const connect_addInvokeTransaction: typeof addInvokeTransaction;
|
|
6329
5973
|
declare const connect_addStarknetChain: typeof addStarknetChain;
|
|
6330
5974
|
declare const connect_deploymentData: typeof deploymentData;
|
|
@@ -6338,7 +5982,7 @@ declare const connect_supportedSpecs: typeof supportedSpecs;
|
|
|
6338
5982
|
declare const connect_switchStarknetChain: typeof switchStarknetChain;
|
|
6339
5983
|
declare const connect_watchAsset: typeof watchAsset;
|
|
6340
5984
|
declare namespace connect {
|
|
6341
|
-
export { connect_addDeclareTransaction as addDeclareTransaction,
|
|
5985
|
+
export { connect_addDeclareTransaction as addDeclareTransaction, 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
5986
|
}
|
|
6343
5987
|
|
|
6344
5988
|
/**
|
|
@@ -6348,4 +5992,4 @@ declare namespace connect {
|
|
|
6348
5992
|
/** @deprecated prefer the 'num' naming */
|
|
6349
5993
|
declare const number: typeof num;
|
|
6350
5994
|
|
|
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 };
|
|
5995
|
+
export { type Abi, type AbiEntry, type AbiEnums, type AbiEvents, type AbiInterfaces, 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 InterfaceAbi, 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, type 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, parseCalldataField, 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 };
|