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.
@@ -12,11 +12,15 @@ The **Signer** API allows you to sign transactions and messages, and also allows
12
12
 
13
13
  ## Methods
14
14
 
15
+ ### getPubKey()
16
+
15
17
  signer.**getPubKey**() => _Promise < string >_
16
18
 
17
19
  Returns the public key of the signer.
18
20
 
19
- <hr />
21
+ ---
22
+
23
+ ### signTransaction()
20
24
 
21
25
  signer.**signTransaction**(transactions, transactionsDetail [ , abi ]) => _Promise < Signature >_
22
26
 
@@ -36,7 +40,9 @@ _abi_ - (optional) the abi of the contract for better displaying
36
40
  string[]
37
41
  ```
38
42
 
39
- <hr />
43
+ ---
44
+
45
+ ### signMessage()
40
46
 
41
47
  signer.**signMessage**(typedData, accountAddress) => _Promise < Signature >_
42
48
 
@@ -51,7 +57,9 @@ _accountAddress_ - calldata to be passed in deploy constructor
51
57
  string[]
52
58
  ```
53
59
 
54
- <hr />
60
+ ---
61
+
62
+ ### signDeployAccountTransaction()
55
63
 
56
64
  signer.**signDeployAccountTransaction**(transaction) => _Promise < Signature >_
57
65
 
@@ -73,7 +81,9 @@ The _transactions_ object for write methods may include any of:
73
81
  string[]
74
82
  ```
75
83
 
76
- <hr />
84
+ ---
85
+
86
+ ### signDeclareTransaction()
77
87
 
78
88
  signer.**signDeclareTransaction**(transaction, transactionsDetail [ , abi ]) => _Promise < Signature >_
79
89
 
@@ -41,7 +41,7 @@ This function validates the checksum address.
41
41
 
42
42
  Returns true if the address is valid, false otherwise.
43
43
 
44
- <hr />
44
+ ---
45
45
 
46
46
  ## **stark**
47
47
 
@@ -102,7 +102,7 @@ Function that calculates and returns maximum fee based on the previously estimat
102
102
 
103
103
  Returns a BN.
104
104
 
105
- <hr />
105
+ ---
106
106
 
107
107
  ## **number**
108
108
 
@@ -190,7 +190,7 @@ const signature = await this.signer.signTransaction(transactions, signerDetails)
190
190
 
191
191
  Convert BigNumberish array to hexadecimal string array. Used for signature conversion.
192
192
 
193
- <hr />
193
+ ---
194
194
 
195
195
  ## **uint256**
196
196
 
@@ -222,7 +222,7 @@ Function to check if `BN` is smaller or equal to `2**256-1`.
222
222
 
223
223
  Function to convert `BN` to `Uint256`.
224
224
 
225
- <hr />
225
+ ---
226
226
 
227
227
  ## **hash**
228
228
 
@@ -301,7 +301,7 @@ Function that calculates contract address from hash.
301
301
 
302
302
  Returns a string.
303
303
 
304
- <hr />
304
+ ---
305
305
 
306
306
  ## **ellipticCurve**
307
307
 
@@ -354,3 +354,21 @@ keyPair should be an KeyPair with a valid public key.
354
354
  sig should be an Signature.
355
355
 
356
356
  Returns true if the verification succeeds.
357
+
358
+ <hr />
359
+
360
+ ## **calldata**
361
+
362
+ Functions to compile and validate arguments passed in invoke, call and deploy functions.
363
+
364
+ ### compile
365
+
366
+ `compileCalldata(args: Array<any>, inputs: AbiEntry[]): Calldata`
367
+
368
+ Parse the calldata by using input fields from the abi for that method.
369
+
370
+ ### validate
371
+
372
+ `validateMethodAndArgs(type: 'INVOKE' | 'CALL' | 'DEPLOY', method: string, args: Array<any> = [])`
373
+
374
+ Validates if all arguments that are passed to the method are corresponding to the ones in the abi.