starknet 4.16.0 → 4.17.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 +11 -0
- package/__tests__/account.test.ts +2 -0
- package/__tests__/contract.test.ts +14 -2
- package/__tests__/defaultProvider.test.ts +4 -2
- package/__tests__/fixtures.ts +1 -1
- package/__tests__/rpcProvider.test.ts +2 -6
- package/dist/index.d.ts +8 -45
- package/dist/index.global.js +4128 -4106
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +199 -177
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -177
- package/dist/index.mjs.map +1 -1
- package/index.d.ts +8 -45
- package/index.global.js +4128 -4106
- package/index.global.js.map +1 -1
- package/index.js +199 -177
- package/index.js.map +1 -1
- package/index.mjs +199 -177
- package/index.mjs.map +1 -1
- package/package.json +4 -3
- package/src/contract/contractFactory.ts +13 -6
- package/src/contract/default.ts +11 -226
- package/src/provider/default.ts +2 -2
- package/src/provider/interface.ts +2 -2
- package/src/utils/calldata.ts +250 -0
- package/www/docs/API/account.md +50 -24
- package/www/docs/API/contract.md +20 -6
- package/www/docs/API/contractFactory.md +7 -3
- package/www/docs/API/provider.md +126 -44
- package/www/docs/API/signer.md +14 -4
- package/www/docs/API/utils.md +23 -5
package/www/docs/API/account.md
CHANGED
|
@@ -24,6 +24,8 @@ The address of the account contract.
|
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
27
|
+
### getNonce()
|
|
28
|
+
|
|
27
29
|
account.**getNonce(blockIdentifier)** => _Promise < BigNumberish >_
|
|
28
30
|
|
|
29
31
|
Gets the nonce of the account with respect to a specific block.
|
|
@@ -32,7 +34,9 @@ _blockIdentifier_ - optional blockIdentifier. Defaults to 'pending'.
|
|
|
32
34
|
|
|
33
35
|
Returns the nonce of the account.
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### estimateInvokeFee()
|
|
36
40
|
|
|
37
41
|
account.**estimateInvokeFee**(calls [ , estimateFeeDetails ]) => _Promise < EstimateFeeResponse >_
|
|
38
42
|
|
|
@@ -59,7 +63,9 @@ The _estimateFeeDetails_ object may include any of:
|
|
|
59
63
|
}
|
|
60
64
|
```
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### estimateDeclareFee()
|
|
63
69
|
|
|
64
70
|
account.**estimateDeclareFee**(contractPayload [ , estimateFeeDetails ]) => _Promise < EstimateFeeResponse >_
|
|
65
71
|
|
|
@@ -85,7 +91,9 @@ The _estimateFeeDetails_ object may include any of:
|
|
|
85
91
|
}
|
|
86
92
|
```
|
|
87
93
|
|
|
88
|
-
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### estimateAccountDeployFee()
|
|
89
97
|
|
|
90
98
|
account.**estimateAccountDeployFee**(contractPayload [ , estimateFeeDetails ]) => _Promise < EstimateFeeResponse >_
|
|
91
99
|
|
|
@@ -111,7 +119,9 @@ The _estimateFeeDetails_ object may include any of:
|
|
|
111
119
|
}
|
|
112
120
|
```
|
|
113
121
|
|
|
114
|
-
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### execute()
|
|
115
125
|
|
|
116
126
|
account.**execute**(transactions [ , abi , transactionsDetail ]) => _Promise < InvokeFunctionResponse >_
|
|
117
127
|
|
|
@@ -140,9 +150,9 @@ The _transactionsDetail_ object may include any of:
|
|
|
140
150
|
};
|
|
141
151
|
```
|
|
142
152
|
|
|
143
|
-
|
|
153
|
+
---
|
|
144
154
|
|
|
145
|
-
###
|
|
155
|
+
### declare()
|
|
146
156
|
|
|
147
157
|
account.**declare**(contractPayload [ , transactionsDetail ]) => _Promise < DeclareContractResponse >_
|
|
148
158
|
|
|
@@ -180,13 +190,13 @@ const declareTx = await account.declare({
|
|
|
180
190
|
};
|
|
181
191
|
```
|
|
182
192
|
|
|
183
|
-
|
|
193
|
+
---
|
|
184
194
|
|
|
185
|
-
###
|
|
195
|
+
### deploy()
|
|
186
196
|
|
|
187
197
|
Deploys a given compiled contract (json) to starknet, wrapper around _execute_ invoke function
|
|
188
198
|
|
|
189
|
-
|
|
199
|
+
account.**deploy**(deployContractPayload [ , transactionsDetail ]) => _Promise < InvokeFunctionResponse >_
|
|
190
200
|
|
|
191
201
|
@param object **_deployContractPayload_**
|
|
192
202
|
|
|
@@ -226,14 +236,14 @@ Example multi-call:
|
|
|
226
236
|
TODO Example with multi-call
|
|
227
237
|
```
|
|
228
238
|
|
|
229
|
-
|
|
239
|
+
---
|
|
230
240
|
|
|
231
|
-
###
|
|
241
|
+
### deployContract()
|
|
232
242
|
|
|
233
243
|
✅ NEW
|
|
234
244
|
High level wrapper for deploy. Doesn't require waitForTransaction. Response similar to deprecated provider deployContract.
|
|
235
245
|
|
|
236
|
-
|
|
246
|
+
account.**deployContract**(payload [ , details ]) => _Promise < DeployContractUDCResponse >_
|
|
237
247
|
|
|
238
248
|
@param object **_payload_** UniversalDeployerContractPayload
|
|
239
249
|
|
|
@@ -273,14 +283,14 @@ Example:
|
|
|
273
283
|
});
|
|
274
284
|
```
|
|
275
285
|
|
|
276
|
-
|
|
286
|
+
---
|
|
277
287
|
|
|
278
|
-
###
|
|
288
|
+
### declareDeploy()
|
|
279
289
|
|
|
280
290
|
✅ NEW
|
|
281
291
|
High level wrapper for declare & deploy. Doesn't require waitForTransaction. Functionality similar to deprecated provider deployContract. Declare and Deploy contract using single function.
|
|
282
292
|
|
|
283
|
-
|
|
293
|
+
account.**declareDeploy**(payload [ , details ]) => _Promise < DeclareDeployUDCResponse >_
|
|
284
294
|
|
|
285
295
|
@param object **_payload_** DeclareDeployContractPayload
|
|
286
296
|
|
|
@@ -311,7 +321,7 @@ High level wrapper for declare & deploy. Doesn't require waitForTransaction. Fun
|
|
|
311
321
|
- calldata_len
|
|
312
322
|
- calldata
|
|
313
323
|
- salt
|
|
314
|
-
|
|
324
|
+
***
|
|
315
325
|
|
|
316
326
|
Example:
|
|
317
327
|
|
|
@@ -330,7 +340,9 @@ Example:
|
|
|
330
340
|
const erc20Address = declareDeploy.deploy.contract_address;
|
|
331
341
|
```
|
|
332
342
|
|
|
333
|
-
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
### deployAccount()
|
|
334
346
|
|
|
335
347
|
account.**deployAccount**(contractPayload [ , transactionsDetail ]) => _Promise < DeployContractResponse >_
|
|
336
348
|
|
|
@@ -360,7 +372,9 @@ The _transactionsDetail_ object may include any of:
|
|
|
360
372
|
};
|
|
361
373
|
```
|
|
362
374
|
|
|
363
|
-
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
### signMessage()
|
|
364
378
|
|
|
365
379
|
account.**signMessage**(typedData) => _Promise < Signature >_
|
|
366
380
|
|
|
@@ -374,7 +388,9 @@ _typedData_ - JSON object to be signed
|
|
|
374
388
|
string[];
|
|
375
389
|
```
|
|
376
390
|
|
|
377
|
-
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### hashMessage()
|
|
378
394
|
|
|
379
395
|
account.**hashMessage**(typedData) => _Promise < string >_
|
|
380
396
|
|
|
@@ -384,7 +400,9 @@ _typedData_ - JSON object to be signed
|
|
|
384
400
|
|
|
385
401
|
Returns the hash of the JSON object.
|
|
386
402
|
|
|
387
|
-
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
### verifyMessageHash()
|
|
388
406
|
|
|
389
407
|
account.**verifyMessageHash**(hash, signature) => _Promise < boolean >_
|
|
390
408
|
|
|
@@ -394,7 +412,9 @@ Verify a signature of a given hash.
|
|
|
394
412
|
>
|
|
395
413
|
> This method is not recommended, use `verifyMessage` instead
|
|
396
414
|
|
|
397
|
-
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
### verifyMessage()
|
|
398
418
|
|
|
399
419
|
account.**verifyMessage**(typedData, signature) => _Promise < boolean >_
|
|
400
420
|
|
|
@@ -405,7 +425,9 @@ _signature_ - signature of the JSON object
|
|
|
405
425
|
|
|
406
426
|
Returns true if the signature is valid, false otherwise
|
|
407
427
|
|
|
408
|
-
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
### getSuggestedMaxFee()
|
|
409
431
|
|
|
410
432
|
account.**getSuggestedMaxFee**(estimateFeeAction, details) => _Promise < BigNumberish >_
|
|
411
433
|
|
|
@@ -416,7 +438,9 @@ The _details_ object may include any of:
|
|
|
416
438
|
- details.**blockIdentifier**
|
|
417
439
|
- details.**nonce**
|
|
418
440
|
|
|
419
|
-
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### getStarkName()
|
|
420
444
|
|
|
421
445
|
account.**getStarkName**(StarknetIdContract) => _Promise<string | Error>_
|
|
422
446
|
|
|
@@ -426,7 +450,9 @@ The _StarknetIdContract_ argument can be undefined, if it is, the function will
|
|
|
426
450
|
|
|
427
451
|
Returns directly a string (Example: `vitalik.stark`).
|
|
428
452
|
|
|
429
|
-
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
### getAddressFromStarkName()
|
|
430
456
|
|
|
431
457
|
account.**getAddressFromStarkName**(name, StarknetIdContract) => _Promise<string | Error>_
|
|
432
458
|
|
package/www/docs/API/contract.md
CHANGED
|
@@ -36,43 +36,57 @@ If the Contract object is the result of a ContractFactory deployment, this is th
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
+
### attach()
|
|
40
|
+
|
|
39
41
|
contract.**attach**(address) => void
|
|
40
42
|
|
|
41
43
|
Saves the address of the contract deployed on network that will be used for interaction.
|
|
42
44
|
|
|
43
45
|
_address_ - address of the contract.
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### connect()
|
|
46
50
|
|
|
47
51
|
contract.**connect**(providerOrAccount) => void
|
|
48
52
|
|
|
49
53
|
Attaches to new Provider or Account
|
|
50
54
|
|
|
51
|
-
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### deployed()
|
|
52
58
|
|
|
53
59
|
contract.**deployed**() => _Promise < Contract >_
|
|
54
60
|
|
|
55
61
|
If the Contract object is the result of a ContractFactory deployment, this method will wait for the transaction to be resolved.
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### call()
|
|
58
66
|
|
|
59
67
|
contract.**call**(method, args, options) => _Promise < Result >_
|
|
60
68
|
|
|
61
69
|
Calls a method on a contract.
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### invoke()
|
|
64
74
|
|
|
65
75
|
contract.**invoke**(method, args, options) => _Promise < InvokeFunctionResponse >_
|
|
66
76
|
|
|
67
77
|
Invokes a method on a contract.
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### estimate()
|
|
70
82
|
|
|
71
83
|
contract.**estimate**(method, args, options) => _Promise < any >_
|
|
72
84
|
|
|
73
85
|
Estimates a method on a contract.
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### populate()
|
|
76
90
|
|
|
77
91
|
contract.**populate**(method, args, options) => _Invocation_
|
|
78
92
|
|
|
@@ -28,14 +28,18 @@ contractFactory.**abi** => _Abi_ (the ABI the contractFactory was constructed wi
|
|
|
28
28
|
|
|
29
29
|
## Methods
|
|
30
30
|
|
|
31
|
+
### attach()
|
|
32
|
+
|
|
31
33
|
contractFactory.**attach**( address ) ⇒ _Contract_
|
|
32
34
|
|
|
33
35
|
Return an instance of a _Contract_ attached to address. This is the same as using the _Contract_ constructor with address and this _compiledContract_ and _account_ passed in when creating the ContractFactory.
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### deploy()
|
|
36
40
|
|
|
37
|
-
contractFactory.**deploy**(
|
|
41
|
+
contractFactory.**deploy**( args, addressSalt ) ⇒ _Promise < Contract >_
|
|
38
42
|
|
|
39
|
-
Uses the provider to deploy the Contract with
|
|
43
|
+
Uses the provider to deploy the Contract with _args_ passed into the constructor and returns a _Contract_ which is attached to the address where this contract will be deployed.
|
|
40
44
|
|
|
41
45
|
The transaction hash can be found at _contract.deployTransactionHash_, and no interactions should be made until the transaction is resolved.
|
package/www/docs/API/provider.md
CHANGED
|
@@ -57,13 +57,15 @@ These are also the default options for the Provider constructor with `network: '
|
|
|
57
57
|
|
|
58
58
|
### Methods
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
#### getChainId()
|
|
61
61
|
|
|
62
62
|
provider.**getChainId**() => _Promise < StarknetChainId >_
|
|
63
63
|
|
|
64
64
|
Returns the chain Id for the current network.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
#### callContract()
|
|
67
69
|
|
|
68
70
|
provider.**callContract**(call [ , blockIdentifier ]) => _Promise < CallContractResponse >_
|
|
69
71
|
|
|
@@ -83,7 +85,9 @@ The call object structure:
|
|
|
83
85
|
}
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
#### getBlock()
|
|
87
91
|
|
|
88
92
|
provider.**getBlock**(blockIdentifier) => _Promise < GetBlockResponse >_
|
|
89
93
|
|
|
@@ -107,7 +111,9 @@ Gets the block information.
|
|
|
107
111
|
}
|
|
108
112
|
```
|
|
109
113
|
|
|
110
|
-
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
#### getClassAt()
|
|
111
117
|
|
|
112
118
|
provider.**getClassAt**(contractAddress, blockIdentifier) => _Promise < ContractClass >_
|
|
113
119
|
|
|
@@ -123,7 +129,9 @@ Gets the contract class of the deployed contract.
|
|
|
123
129
|
}
|
|
124
130
|
```
|
|
125
131
|
|
|
126
|
-
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
#### getInvokeEstimateFee()
|
|
127
135
|
|
|
128
136
|
provider.**getInvokeEstimateFee**(invocationWithTxType, invocationDetails, blockIdentifier) => _Promise < EstimateFeeResponse >_
|
|
129
137
|
|
|
@@ -139,19 +147,25 @@ Estimate fee for invoke transaction.
|
|
|
139
147
|
}
|
|
140
148
|
```
|
|
141
149
|
|
|
142
|
-
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
#### getNonceForAddress()
|
|
143
153
|
|
|
144
154
|
provider.**getNonceForAddress**(contractAddress, blockIdentifier) => _Promise < BigNumberish >_
|
|
145
155
|
|
|
146
156
|
Gets the nonce of the provided contractAddress. This was renamed from `getNonce` to `getNonceForAddress` to avoid confusion when inheriting an Account from the Provider class.
|
|
147
157
|
|
|
148
|
-
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
#### getStorageAt()
|
|
149
161
|
|
|
150
162
|
provider.**getStorageAt**(contractAddress, key, blockIdentifier) => _Promise < string >_
|
|
151
163
|
|
|
152
164
|
Gets the contract's storage variable at a specific key.
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
#### getTransactionReceipt()
|
|
155
169
|
|
|
156
170
|
provider.**getTransactionReceipt**(txHash) => _Promise < GetTransactionReceiptResponse >_
|
|
157
171
|
|
|
@@ -171,7 +185,9 @@ Gets the status of a transaction.
|
|
|
171
185
|
}
|
|
172
186
|
```
|
|
173
187
|
|
|
174
|
-
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
#### getTransaction()
|
|
175
191
|
|
|
176
192
|
provider.**getTransaction**(txHash) => _Promise < GetTransactionResponse >_
|
|
177
193
|
|
|
@@ -194,7 +210,9 @@ Gets the transaction information from a tx hash.
|
|
|
194
210
|
}
|
|
195
211
|
```
|
|
196
212
|
|
|
197
|
-
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
#### declareContract()
|
|
198
216
|
|
|
199
217
|
provider.**declareContract**(transaction, details) => _Promise < DeclareContractResponse >_
|
|
200
218
|
|
|
@@ -209,7 +227,9 @@ Declare a contract on Starknet.
|
|
|
209
227
|
};
|
|
210
228
|
```
|
|
211
229
|
|
|
212
|
-
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
#### getDeclareEstimateFee()
|
|
213
233
|
|
|
214
234
|
provider.**getDeclareEstimateFee**(transaction, details, blockIdentifier) => _Promise < EstimateFeeResponse >_
|
|
215
235
|
|
|
@@ -225,9 +245,9 @@ Estimate fee for declare transaction.
|
|
|
225
245
|
};
|
|
226
246
|
```
|
|
227
247
|
|
|
228
|
-
|
|
248
|
+
---
|
|
229
249
|
|
|
230
|
-
|
|
250
|
+
#### waitForTransaction()
|
|
231
251
|
|
|
232
252
|
provider.**waitForTransaction**(txHash [ , retryInterval]) => _Promise < GetTransactionReceiptResponse >_
|
|
233
253
|
|
|
@@ -265,7 +285,9 @@ const provider = new starknet.SequencerProvider({
|
|
|
265
285
|
|
|
266
286
|
### Methods
|
|
267
287
|
|
|
268
|
-
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
#### getContractAddresses()
|
|
269
291
|
|
|
270
292
|
provider.**getContractAddresses**() => _Promise < GetContractAddressesResponse >_
|
|
271
293
|
|
|
@@ -280,7 +302,9 @@ Gets the smart contract address on the network.
|
|
|
280
302
|
}
|
|
281
303
|
```
|
|
282
304
|
|
|
283
|
-
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
#### getCode()
|
|
284
308
|
|
|
285
309
|
provider.**getCode**(contractAddress, blockIdentifier) => _Promise < GetCodeResponse >_
|
|
286
310
|
|
|
@@ -295,7 +319,9 @@ Gets the smart contract address on the network.
|
|
|
295
319
|
}
|
|
296
320
|
```
|
|
297
321
|
|
|
298
|
-
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
#### estimateMessageFee()
|
|
299
325
|
|
|
300
326
|
provider.**estimateMessageFee**(CallL1Handler, blockIdentifier) => _Promise < EstimateFeeResponse >_
|
|
301
327
|
|
|
@@ -322,7 +348,9 @@ type CallL1Handler = {
|
|
|
322
348
|
}
|
|
323
349
|
````
|
|
324
350
|
|
|
325
|
-
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
#### getTransactionStatus()
|
|
326
354
|
|
|
327
355
|
provider.**getTransactionStatus**(txHash) => _Promise < GetTransactionStatusResponse >_
|
|
328
356
|
|
|
@@ -342,7 +370,9 @@ Gets the status of a transaction.
|
|
|
342
370
|
}
|
|
343
371
|
```
|
|
344
372
|
|
|
345
|
-
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
#### getTransactionTrace()
|
|
346
376
|
|
|
347
377
|
provider.**getTransactionTrace**(txHash) => _Promise < GetTransactionTraceResponse >_
|
|
348
378
|
|
|
@@ -399,21 +429,29 @@ const provider = new starknet.RpcProvider({
|
|
|
399
429
|
|
|
400
430
|
### Methods
|
|
401
431
|
|
|
402
|
-
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
#### fetch()
|
|
403
435
|
|
|
404
436
|
provider.**fetch**(method: any, params: any) => _Promise < any >_
|
|
405
437
|
|
|
406
438
|
Generic method for users to be able to experiment with RPC methods.
|
|
407
439
|
|
|
408
|
-
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
#### getChainId()
|
|
409
443
|
|
|
410
444
|
provider.**getChainId**() => _Promise < any >_
|
|
411
445
|
|
|
412
|
-
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
#### getBlock()
|
|
413
449
|
|
|
414
450
|
provider.**getBlock**(blockIdentifier) => _Promise < GetBlockResponse >_
|
|
415
451
|
|
|
416
|
-
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
#### getBlockHashAndNumber()
|
|
417
455
|
|
|
418
456
|
provider.**getBlockHashAndNumber**() => _Promise < BlockHashAndNumber >_
|
|
419
457
|
|
|
@@ -426,7 +464,9 @@ provider.**getBlockHashAndNumber**() => _Promise < BlockHashAndNumber >_
|
|
|
426
464
|
}
|
|
427
465
|
```
|
|
428
466
|
|
|
429
|
-
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
#### getBlockWithTxHashes()
|
|
430
470
|
|
|
431
471
|
provider.**getBlockWithTxHashes**(blockIdentifier) => _Promise < GetBlockWithTxHashesResponse >_
|
|
432
472
|
|
|
@@ -436,7 +476,9 @@ provider.**getBlockWithTxHashes**(blockIdentifier) => _Promise < GetBlockWithTxH
|
|
|
436
476
|
OPENRPC.BlockWithTxHashes
|
|
437
477
|
```
|
|
438
478
|
|
|
439
|
-
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
#### getBlockWithTxs()
|
|
440
482
|
|
|
441
483
|
provider.**getBlockWithTxs**(blockIdentifier) => _Promise < GetBlockWithTxs >_
|
|
442
484
|
|
|
@@ -446,23 +488,31 @@ provider.**getBlockWithTxs**(blockIdentifier) => _Promise < GetBlockWithTxs >_
|
|
|
446
488
|
OPENRPC.BlockWithTxs
|
|
447
489
|
```
|
|
448
490
|
|
|
449
|
-
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
#### getClassHashAt()
|
|
450
494
|
|
|
451
495
|
provider.**getClassHashAt**(blockIdentifier) => _Promise < ContractAddress >_
|
|
452
496
|
|
|
453
|
-
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
#### getTransactionCount()
|
|
454
500
|
|
|
455
501
|
provider.**getTransactionCount**(blockIdentifier) => _Promise < number >_
|
|
456
502
|
|
|
457
503
|
Gets the transaction count from a block.
|
|
458
504
|
|
|
459
|
-
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
#### getBlockNumber()
|
|
460
508
|
|
|
461
509
|
provider.**getBlockNumber**() => _Promise < number >_
|
|
462
510
|
|
|
463
511
|
Gets the latest block number.
|
|
464
512
|
|
|
465
|
-
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
#### getPendingTransactions()
|
|
466
516
|
|
|
467
517
|
provider.**getPendingTransactions**() => _Promise < PendingTransactions >_
|
|
468
518
|
|
|
@@ -472,7 +522,9 @@ provider.**getPendingTransactions**() => _Promise < PendingTransactions >_
|
|
|
472
522
|
OPENRPC.PendingTransactions;
|
|
473
523
|
```
|
|
474
524
|
|
|
475
|
-
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
#### getStateUpdate()
|
|
476
528
|
|
|
477
529
|
provider.**getStateUpdate**(blockIdentifier) => _Promise < StateUpdate >_
|
|
478
530
|
|
|
@@ -482,15 +534,21 @@ provider.**getStateUpdate**(blockIdentifier) => _Promise < StateUpdate >_
|
|
|
482
534
|
OPENRPC.StateUpdate;
|
|
483
535
|
```
|
|
484
536
|
|
|
485
|
-
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
#### getStorageAt()
|
|
486
540
|
|
|
487
541
|
provider.**getStorageAt**(contractAddress, key, blockIdentifier) => _Promise < BigNumberish >_
|
|
488
542
|
|
|
489
|
-
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
#### getTransaction()
|
|
490
546
|
|
|
491
547
|
provider.**getTransaction**(txHash) => _Promise < GetTransactionResponse >_
|
|
492
548
|
|
|
493
|
-
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
#### getTransactionByHash()
|
|
494
552
|
|
|
495
553
|
provider.**getTransactionByHash**(txHash) => _Promise < GetTransactionByHashResponse >_
|
|
496
554
|
|
|
@@ -500,7 +558,9 @@ provider.**getTransactionByHash**(txHash) => _Promise < GetTransactionByHashResp
|
|
|
500
558
|
OPENRPC.Transaction;
|
|
501
559
|
```
|
|
502
560
|
|
|
503
|
-
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
#### getTransactionByBlockIdAndIndex()
|
|
504
564
|
|
|
505
565
|
provider.**getTransactionByBlockIdAndIndex**(blockIdentifier, index) => _Promise < GetTransactionByBlockIdAndIndex >_
|
|
506
566
|
|
|
@@ -510,11 +570,15 @@ provider.**getTransactionByBlockIdAndIndex**(blockIdentifier, index) => _Promise
|
|
|
510
570
|
OPENRPC.Transaction;
|
|
511
571
|
```
|
|
512
572
|
|
|
513
|
-
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
#### getTransactionReceipt()
|
|
514
576
|
|
|
515
577
|
provider.**getTransactionReceipt**(txHash) => _Promise < GetTransactionReceiptResponse >_
|
|
516
578
|
|
|
517
|
-
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
#### getClass()
|
|
518
582
|
|
|
519
583
|
provider.**getClass**(classHash) => _Promise < ContractClass >_
|
|
520
584
|
|
|
@@ -524,7 +588,9 @@ provider.**getClass**(classHash) => _Promise < ContractClass >_
|
|
|
524
588
|
OPENRPC.ContractClass;
|
|
525
589
|
```
|
|
526
590
|
|
|
527
|
-
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
#### getClassAt()
|
|
528
594
|
|
|
529
595
|
provider.**getClassAt**(contractAddress, blockIdentifier) => _Promise < ContractClass >_
|
|
530
596
|
|
|
@@ -534,7 +600,9 @@ provider.**getClassAt**(contractAddress, blockIdentifier) => _Promise < Contract
|
|
|
534
600
|
OPENRPC.ContractClass;
|
|
535
601
|
```
|
|
536
602
|
|
|
537
|
-
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
#### getInvokeEstimateFee()
|
|
538
606
|
|
|
539
607
|
provider.**getInvokeEstimateFee**(invocation, invocationDetails, blockIdentifier) => _Promise < EstimateFeeResponse >_
|
|
540
608
|
|
|
@@ -546,7 +614,9 @@ provider.**getInvokeEstimateFee**(invocation, invocationDetails, blockIdentifier
|
|
|
546
614
|
gas_price?: BN;
|
|
547
615
|
```
|
|
548
616
|
|
|
549
|
-
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
#### getDeclareEstimateFee()
|
|
550
620
|
|
|
551
621
|
provider.**getDeclareEstimateFee**(DeclareContractTransaction, details, blockIdentifier) => _Promise < EstimateFeeResponse >_
|
|
552
622
|
|
|
@@ -558,7 +628,9 @@ provider.**getDeclareEstimateFee**(DeclareContractTransaction, details, blockIde
|
|
|
558
628
|
gas_price?: BN;
|
|
559
629
|
```
|
|
560
630
|
|
|
561
|
-
|
|
631
|
+
---
|
|
632
|
+
|
|
633
|
+
#### declareContract()
|
|
562
634
|
|
|
563
635
|
provider.**declareContract**(DeclareContractTransaction, details) => _Promise < DeclareContractResponse >_
|
|
564
636
|
|
|
@@ -569,11 +641,15 @@ provider.**declareContract**(DeclareContractTransaction, details) => _Promise <
|
|
|
569
641
|
class_hash: string;
|
|
570
642
|
```
|
|
571
643
|
|
|
572
|
-
|
|
644
|
+
---
|
|
645
|
+
|
|
646
|
+
#### callContract()
|
|
573
647
|
|
|
574
648
|
provider.**callContract**(call, blockIdentifier) => _Promise < CallContractResponse >_
|
|
575
649
|
|
|
576
|
-
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
#### getContractAddresses()
|
|
577
653
|
|
|
578
654
|
provider.**traceTransaction**(transactionHash) => _Promise < Trace >_
|
|
579
655
|
|
|
@@ -583,7 +659,9 @@ provider.**traceTransaction**(transactionHash) => _Promise < Trace >_
|
|
|
583
659
|
OPENRPC.Trace;
|
|
584
660
|
```
|
|
585
661
|
|
|
586
|
-
|
|
662
|
+
---
|
|
663
|
+
|
|
664
|
+
#### traceBlockTransactions()
|
|
587
665
|
|
|
588
666
|
provider.**traceBlockTransactions**(blockHash) => _Promise < Traces >_
|
|
589
667
|
|
|
@@ -593,7 +671,9 @@ provider.**traceBlockTransactions**(blockHash) => _Promise < Traces >_
|
|
|
593
671
|
OPENRPC.Traces;
|
|
594
672
|
```
|
|
595
673
|
|
|
596
|
-
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
#### getSyncingStats()
|
|
597
677
|
|
|
598
678
|
provider.**getSyncingStats**() => _Promise < GetSyncingStatsResponse >_
|
|
599
679
|
|
|
@@ -613,7 +693,9 @@ boolean |
|
|
|
613
693
|
}
|
|
614
694
|
```
|
|
615
695
|
|
|
616
|
-
|
|
696
|
+
---
|
|
697
|
+
|
|
698
|
+
#### getEvents()
|
|
617
699
|
|
|
618
700
|
provider.**getEvents**(eventFilter) => _Promise < GetEventsResponse >_
|
|
619
701
|
|