starknet 5.13.2 → 5.14.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 +56 -109
- package/dist/index.d.ts +24 -0
- package/dist/index.global.js +17 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,56 +1,37 @@
|
|
|
1
|
+
# [5.14.0](https://github.com/0xs34n/starknet.js/compare/v5.13.2...v5.14.0) (2023-06-21)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- add isCairo1 utility methods ([78e9f87](https://github.com/0xs34n/starknet.js/commit/78e9f874e0d812a9d1c896846e5ec6c95a6cffca))
|
|
6
|
+
|
|
1
7
|
## [5.13.2](https://github.com/0xs34n/starknet.js/compare/v5.13.1...v5.13.2) (2023-06-16)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
4
10
|
|
|
5
|
-
-
|
|
11
|
+
- conform storage key to RPC specification ([6c66202](https://github.com/0xs34n/starknet.js/commit/6c66202a966003509460dedf91e98177f7f4af27))
|
|
6
12
|
|
|
7
13
|
## [5.13.1](https://github.com/0xs34n/starknet.js/compare/v5.13.0...v5.13.1) (2023-06-14)
|
|
8
14
|
|
|
9
15
|
### Bug Fixes
|
|
10
16
|
|
|
11
|
-
- common
|
|
17
|
+
- introduce common ABI type for contract class response ([55a8d98](https://github.com/0xs34n/starknet.js/commit/55a8d981be4ee4d861c7a3f988c012801af3d905))
|
|
12
18
|
|
|
13
19
|
# [5.13.0](https://github.com/0xs34n/starknet.js/compare/v5.12.0...v5.13.0) (2023-06-12)
|
|
14
20
|
|
|
15
|
-
###
|
|
21
|
+
### Info: Skipped tests during the release pipeline
|
|
16
22
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
- type not requested anymore ([4446acb](https://github.com/0xs34n/starknet.js/commit/4446acbe8ab06fa981a8ccecb7fad67b2df73899))
|
|
24
|
-
- typescript wrong types for getStateUpdate ([0c309d5](https://github.com/0xs34n/starknet.js/commit/0c309d5c1e3450fa274e8fb798c510984b6467b5))
|
|
25
|
-
- uncomment sequencer simulate transaction test ([9a60b9f](https://github.com/0xs34n/starknet.js/commit/9a60b9ffae9a67a17b307aa5bbbffe897416ccab))
|
|
26
|
-
- update rpc versions, small fixes ([4f8b24f](https://github.com/0xs34n/starknet.js/commit/4f8b24fcd402b033415af9902f5e0137e03c5db9))
|
|
27
|
-
- wip simulate type cleanup, version bugfix ([045bb25](https://github.com/0xs34n/starknet.js/commit/045bb251a095ff1f7ec8eaa141547c247f3fabb2))
|
|
28
|
-
|
|
29
|
-
### Features
|
|
30
|
-
|
|
31
|
-
- accountInvocationsFactory ([acdaab4](https://github.com/0xs34n/starknet.js/commit/acdaab4458406b8bb55238cb9400c16724486da0))
|
|
32
|
-
- add EVENTS_CHUNK (PR 70 from starknet-specs) ([2f15593](https://github.com/0xs34n/starknet.js/commit/2f155932a748400d37926b45e4abe6fa894ae9b3))
|
|
33
|
-
- add replaced classes and rename properties (PR 76 from starknet-specs), rpc.ts fix coming next ([eb095c5](https://github.com/0xs34n/starknet.js/commit/eb095c583fe93a9e8157c5157885cbb19de8a00d))
|
|
34
|
-
- add simulate_transaction and sierra support (untested) ([47bca37](https://github.com/0xs34n/starknet.js/commit/47bca377f2f4cde658a467143cc54f80c385bc93))
|
|
35
|
-
- added missing TOO_MANY_KEYS_IN_FILTER error (PR 55 from starknet-specs) ([32e2bf5](https://github.com/0xs34n/starknet.js/commit/32e2bf5521461402b5d524311e1a53a7f434f314))
|
|
36
|
-
- consolidation of invokes in provider, except basic transactions ([92c2a98](https://github.com/0xs34n/starknet.js/commit/92c2a985538486065328b3243d22fc578b726ea6))
|
|
37
|
-
- fix remaining issues ([23d0a96](https://github.com/0xs34n/starknet.js/commit/23d0a96a525f7e2317021db5cfb9a2cf5a5ff9cf))
|
|
38
|
-
- implemented estimateFeeOriginal ([aba6707](https://github.com/0xs34n/starknet.js/commit/aba67074cadab64389908f0102bdfc904064ae5e))
|
|
39
|
-
- make transaction type explicit (PR 68 from starknet-specs) ([8857e08](https://github.com/0xs34n/starknet.js/commit/8857e08696df1e4ed8ca16ed922326350f74dc67))
|
|
40
|
-
- multiple updates and fixes for simulate and estimate, interface, wip ([12ed49b](https://github.com/0xs34n/starknet.js/commit/12ed49bf182da6ecfdb6560fd10d0659ad2acae9))
|
|
41
|
-
- simulate transaction implementation wip ([b604de0](https://github.com/0xs34n/starknet.js/commit/b604de005148a53d6ee6ac5f67e2e004e5222be5))
|
|
42
|
-
- simulate transaction rpc & sequencer ([8a47562](https://github.com/0xs34n/starknet.js/commit/8a475623799778a97f385b935d7f951f388cff13))
|
|
43
|
-
- starknet 0.11.0 adjustments (PR 65 from starknet-specs), rpc.ts fix coming next ([cffdaca](https://github.com/0xs34n/starknet.js/commit/cffdacaa66fe944dcbf050d8572d1e053d59480c))
|
|
44
|
-
- state update response split to pending/none pending (PR 74 from starknet-specs) ([2c6945f](https://github.com/0xs34n/starknet.js/commit/2c6945f03c9bd8ab5787cc2505a0fd803d0bbe72))
|
|
45
|
-
- supported multiple values in event filters (PR 55 from starknet-specs) ([4492704](https://github.com/0xs34n/starknet.js/commit/4492704224632f51990b1ba3b3138f4e4c902e65))
|
|
46
|
-
- supported new required properties (PR 67 from starknet-specs) ([1759ac4](https://github.com/0xs34n/starknet.js/commit/1759ac4c84d8bcea8460745f4e48518511976835))
|
|
47
|
-
- supported the new api bulk for estimateFee on existing rpc methods ([b8dd210](https://github.com/0xs34n/starknet.js/commit/b8dd2107ab614e0d5c99545d0fe61cbd727db5ab))
|
|
23
|
+
- Devnet partial support RPC v0.3.0 (simulate)
|
|
24
|
+
- Infura (Pathfinder) default node on RPC v0.2.x
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
- adapt RPC methods to v0.3.0 specification ([32188fb](https://github.com/0xs34n/starknet.js/commit/32188fba03506f45c82b61e24574e6a8fb0a5c1f))
|
|
48
29
|
|
|
49
30
|
# [5.12.0](https://github.com/0xs34n/starknet.js/compare/v5.11.1...v5.12.0) (2023-06-12)
|
|
50
31
|
|
|
51
32
|
### Features
|
|
52
33
|
|
|
53
|
-
-
|
|
34
|
+
- update Account.populate() to accept RawArgs type ([6b539a3](https://github.com/0xs34n/starknet.js/commit/6b539a37815ecafb6c8b738b8585dd75d534b3cf))
|
|
54
35
|
|
|
55
36
|
## [5.11.1](https://github.com/0xs34n/starknet.js/compare/v5.11.0...v5.11.1) (2023-05-30)
|
|
56
37
|
|
|
@@ -68,62 +49,58 @@
|
|
|
68
49
|
|
|
69
50
|
### Bug Fixes
|
|
70
51
|
|
|
71
|
-
-
|
|
52
|
+
- repair Uint256 array handling for calldata compilation ([969b3c1](https://github.com/0xs34n/starknet.js/commit/969b3c1670902d7cc55156d5b3f6a8e7d45c731b))
|
|
72
53
|
|
|
73
54
|
## [5.10.1](https://github.com/0xs34n/starknet.js/compare/v5.10.0...v5.10.1) (2023-05-16)
|
|
74
55
|
|
|
75
56
|
### Bug Fixes
|
|
76
57
|
|
|
77
|
-
-
|
|
58
|
+
- ensure valid Cairo1 property order for call execution ([d86057c](https://github.com/0xs34n/starknet.js/commit/d86057cefe9e4053dac6d45d043401605246d3ed))
|
|
78
59
|
|
|
79
60
|
# [5.10.0](https://github.com/0xs34n/starknet.js/compare/v5.9.2...v5.10.0) (2023-05-10)
|
|
80
61
|
|
|
81
62
|
### Bug Fixes
|
|
82
63
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- ts getClassHashAt oprional blockid ([f54bfd0](https://github.com/0xs34n/starknet.js/commit/f54bfd0e9591d1ec1dccf20668de68272834fa46))
|
|
64
|
+
- repair nested 2d array handling ([cccf518](https://github.com/0xs34n/starknet.js/commit/cccf518acc950bfed7579513c812df33cebb774d))
|
|
65
|
+
- mark getClassHashAt blockIdentifier parameter as optional ([f54bfd0](https://github.com/0xs34n/starknet.js/commit/f54bfd0e9591d1ec1dccf20668de68272834fa46))
|
|
86
66
|
|
|
87
67
|
### Features
|
|
88
68
|
|
|
89
|
-
- declareIfNot
|
|
69
|
+
- introduce declareIfNot utility Account method ([494dbb8](https://github.com/0xs34n/starknet.js/commit/494dbb8a84608415a279b2bfa84103667321a84e))
|
|
90
70
|
- improve usage by extending RawCalldata to RawArgs in all major flows ([0ef1ec8](https://github.com/0xs34n/starknet.js/commit/0ef1ec8624e294a526f8e97d856e70b6426a9ae3))
|
|
91
71
|
- make cairoVersion a property of Account ([b6a7d38](https://github.com/0xs34n/starknet.js/commit/b6a7d38e98c65e24cffac5485819797560b5571c))
|
|
92
72
|
|
|
93
73
|
## [5.9.2](https://github.com/0xs34n/starknet.js/compare/v5.9.1...v5.9.2) (2023-05-03)
|
|
94
74
|
|
|
95
|
-
###
|
|
75
|
+
### Info
|
|
96
76
|
|
|
97
|
-
-
|
|
77
|
+
- _no changes_
|
|
98
78
|
|
|
99
79
|
## [5.9.1](https://github.com/0xs34n/starknet.js/compare/v5.9.0...v5.9.1) (2023-05-02)
|
|
100
80
|
|
|
101
81
|
### Bug Fixes
|
|
102
82
|
|
|
103
|
-
-
|
|
104
|
-
- correct test ([a35548e](https://github.com/0xs34n/starknet.js/commit/a35548e4d9892630645645bb43737ea2e2ae79a5))
|
|
105
|
-
- uint256 in contract call ([0cc05e0](https://github.com/0xs34n/starknet.js/commit/0cc05e073bc025c2afdc5105b5b87e5d23c1d487))
|
|
83
|
+
- repair Uint256 contract call handling ([0cc05e0](https://github.com/0xs34n/starknet.js/commit/0cc05e073bc025c2afdc5105b5b87e5d23c1d487))
|
|
106
84
|
|
|
107
85
|
# [5.9.0](https://github.com/0xs34n/starknet.js/compare/v5.8.0...v5.9.0) (2023-04-28)
|
|
108
86
|
|
|
109
87
|
### Features
|
|
110
88
|
|
|
111
|
-
- complex
|
|
112
|
-
-
|
|
89
|
+
- support complex Cairo1 Struct with forced ABI and complex Cairo1 arrays, refactor parser ([8f28462](https://github.com/0xs34n/starknet.js/commit/8f2846290a88c7b3b2985f32c61446a378566679))
|
|
90
|
+
- add toHex and expand Calldata and executeCallData helpers, allow entrypoint compilation ([a452d64](https://github.com/0xs34n/starknet.js/commit/a452d64f1aa4e1005378bbba4d7748a054cae2be))
|
|
113
91
|
|
|
114
92
|
# [5.8.0](https://github.com/0xs34n/starknet.js/compare/v5.7.0...v5.8.0) (2023-04-26)
|
|
115
93
|
|
|
116
94
|
### Bug Fixes
|
|
117
95
|
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
- lapsus lingua, dangling, cleanup 🚀 ([a79d55c](https://github.com/0xs34n/starknet.js/commit/a79d55c2990e81bc6b0e58583142d3eb7bbddfa2))
|
|
96
|
+
- clean up Contract interfaces ([02c6b72](https://github.com/0xs34n/starknet.js/commit/02c6b72ec41016fdd75537044889e7cffd624b27))
|
|
97
|
+
- clean up ContractFactory and Contract interfaces ([b25047e](https://github.com/0xs34n/starknet.js/commit/b25047ece2eed313eaa776b2a132b9a04c3fbc2f))
|
|
121
98
|
- prevent missusage of cairoVersion on deploy ([d920dbe](https://github.com/0xs34n/starknet.js/commit/d920dbe6144006438c917727b153a043fec2531b))
|
|
122
99
|
- remove unused cairoVersion from Contract ([e4fcf24](https://github.com/0xs34n/starknet.js/commit/e4fcf244fa1dfd01301addfa7492bf90dac5a854))
|
|
123
100
|
|
|
124
101
|
### Features
|
|
125
102
|
|
|
126
|
-
- boolean to felt
|
|
103
|
+
- add boolean to felt support for Cairo1 ([ef34e0a](https://github.com/0xs34n/starknet.js/commit/ef34e0a25a52be7a6ac76714bda43233a2f1a6f1))
|
|
127
104
|
- remove deprecated compileCalldata ([e5adca4](https://github.com/0xs34n/starknet.js/commit/e5adca449a9d1142339d5e63adb857698c5913d6))
|
|
128
105
|
|
|
129
106
|
# [5.7.0](https://github.com/0xs34n/starknet.js/compare/v5.6.1...v5.7.0) (2023-04-25)
|
|
@@ -136,44 +113,42 @@
|
|
|
136
113
|
|
|
137
114
|
### Bug Fixes
|
|
138
115
|
|
|
139
|
-
-
|
|
140
|
-
- uint256, view bool, compiled in contract.call ([346cd51](https://github.com/0xs34n/starknet.js/commit/346cd5197d377966d148a8b218e6ee03af7170f2))
|
|
116
|
+
- fix support for Cairo1 Uint256 types ([e2b03b2](https://github.com/0xs34n/starknet.js/commit/e2b03b2c587cc774bba9c6961d710aac782f829f))
|
|
141
117
|
|
|
142
118
|
# [5.6.0](https://github.com/0xs34n/starknet.js/compare/v5.5.0...v5.6.0) (2023-04-19)
|
|
143
119
|
|
|
144
120
|
### Bug Fixes
|
|
145
121
|
|
|
146
|
-
- optional param in contract invoke ([da094e4](https://github.com/0xs34n/starknet.js/commit/da094e4172ed43ce93604e92adbba2a5ecb1498e))
|
|
122
|
+
- mark optional param in contract invoke ([da094e4](https://github.com/0xs34n/starknet.js/commit/da094e4172ed43ce93604e92adbba2a5ecb1498e))
|
|
147
123
|
|
|
148
124
|
### Features
|
|
149
125
|
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
- felt252 implementation ([3d20ea4](https://github.com/0xs34n/starknet.js/commit/3d20ea44b49d1c7ba90d8a46a307f54e737c3285))
|
|
153
|
-
- uint
|
|
126
|
+
- add Cairo1 bool implementation ([52fed30](https://github.com/0xs34n/starknet.js/commit/52fed30f04b70bcce80f829dba6975101f6f3644))
|
|
127
|
+
- support Cairo1 array, fix invoke response ([4637cd7](https://github.com/0xs34n/starknet.js/commit/4637cd74481ba85b3164ddb93c258b9ca8b9b949))
|
|
128
|
+
- add felt252 implementation ([3d20ea4](https://github.com/0xs34n/starknet.js/commit/3d20ea44b49d1c7ba90d8a46a307f54e737c3285))
|
|
129
|
+
- support uint parsing and validation ([c1acd29](https://github.com/0xs34n/starknet.js/commit/c1acd298d63758ba27fc20bcb4b0c00cca82078f))
|
|
154
130
|
|
|
155
131
|
# [5.5.0](https://github.com/0xs34n/starknet.js/compare/v5.4.2...v5.5.0) (2023-04-10)
|
|
156
132
|
|
|
157
133
|
### Bug Fixes
|
|
158
134
|
|
|
159
|
-
- update DeclareAndDeploy with
|
|
135
|
+
- update DeclareAndDeploy with Cairo1 declare ([71072cf](https://github.com/0xs34n/starknet.js/commit/71072cffadb8ac118780cec21cb8c4f83e74d7ae))
|
|
160
136
|
|
|
161
137
|
### Features
|
|
162
138
|
|
|
163
|
-
- response parsing and types ([09a46af](https://github.com/0xs34n/starknet.js/commit/09a46af02e88376dc49e0aa39468fded99b94ee2))
|
|
139
|
+
- expand Cairo1 response parsing and types ([09a46af](https://github.com/0xs34n/starknet.js/commit/09a46af02e88376dc49e0aa39468fded99b94ee2))
|
|
164
140
|
|
|
165
141
|
## [5.4.2](https://github.com/0xs34n/starknet.js/compare/v5.4.1...v5.4.2) (2023-04-04)
|
|
166
142
|
|
|
167
143
|
### Bug Fixes
|
|
168
144
|
|
|
169
|
-
- implement custom ts error
|
|
145
|
+
- implement custom ts error locally ([fa90a3e](https://github.com/0xs34n/starknet.js/commit/fa90a3e7dcbe8c0952b0681be903dffb4b4c74c6))
|
|
170
146
|
|
|
171
147
|
## [5.4.1](https://github.com/0xs34n/starknet.js/compare/v5.4.0...v5.4.1) (2023-04-03)
|
|
172
148
|
|
|
173
149
|
### Bug Fixes
|
|
174
150
|
|
|
175
|
-
-
|
|
176
|
-
- signature tight flexible resolution ([4990cd8](https://github.com/0xs34n/starknet.js/commit/4990cd8a4d6fd8b87c3016fd27c7eb1b2d5a4a8a))
|
|
151
|
+
- fix call response type and signature type ([c6c42e0](https://github.com/0xs34n/starknet.js/commit/c6c42e06ab7dd464e472b319cc16f52c75bef7cb))
|
|
177
152
|
|
|
178
153
|
# [5.4.0](https://github.com/0xs34n/starknet.js/compare/v5.3.0...v5.4.0) (2023-04-03)
|
|
179
154
|
|
|
@@ -183,28 +158,28 @@
|
|
|
183
158
|
|
|
184
159
|
### Features
|
|
185
160
|
|
|
186
|
-
- support
|
|
161
|
+
- support Cairo1 execute calldata ([1f7f001](https://github.com/0xs34n/starknet.js/commit/1f7f00155ae89ff871cdf987cd3b5238377d5450))
|
|
187
162
|
|
|
188
163
|
# [5.3.0](https://github.com/0xs34n/starknet.js/compare/v5.2.0...v5.3.0) (2023-03-29)
|
|
189
164
|
|
|
190
165
|
### Features
|
|
191
166
|
|
|
192
167
|
- declare v2 from account ([bc861b7](https://github.com/0xs34n/starknet.js/commit/bc861b753b443b4f75f9af7d1d9eb1a350273376))
|
|
193
|
-
- declare v2
|
|
168
|
+
- declare v2 intermediate ([a8fdfe3](https://github.com/0xs34n/starknet.js/commit/a8fdfe3e6f00ee08f7aec55a8babda46043f1783))
|
|
194
169
|
- get_compiled_class_by_class_hash, get_class_by_hash, ContractClass, rpc hotfix ([fc33d19](https://github.com/0xs34n/starknet.js/commit/fc33d196adadbf899e450aec88ef9d8d7365f726))
|
|
195
170
|
- get_state_update, fix types, fix responseParser, fix BigNumberish api response, fix OPENRPC ([50a2c29](https://github.com/0xs34n/starknet.js/commit/50a2c29b53feb960a6b2a0eea7651c55cff5fc0b))
|
|
196
|
-
-
|
|
171
|
+
- update contract address to sender address parameters ([7cec344](https://github.com/0xs34n/starknet.js/commit/7cec344c5b9a70bac9597354b20773388e5a4145))
|
|
197
172
|
- remove version 0 invoke and declare ([08bd65c](https://github.com/0xs34n/starknet.js/commit/08bd65cf20d6db0fecb1fb014b2464f19dc64a6c))
|
|
198
|
-
- skipValidate
|
|
173
|
+
- implement skipValidate ([8b20e2e](https://github.com/0xs34n/starknet.js/commit/8b20e2e461ae73b9b6840972ea6c17a00b3efddc))
|
|
199
174
|
- update hashing to cairo-lang 0.11.0, cairo 1.0.0.alpha-6 ([b6669b5](https://github.com/0xs34n/starknet.js/commit/b6669b577b159bd98369a16e295ba847eea55688))
|
|
200
175
|
|
|
201
176
|
# [5.2.0](https://github.com/0xs34n/starknet.js/compare/v5.1.1...v5.2.0) (2023-03-14)
|
|
202
177
|
|
|
203
178
|
### Features
|
|
204
179
|
|
|
205
|
-
- compiledClassHash
|
|
206
|
-
-
|
|
207
|
-
- unify classHash for
|
|
180
|
+
- implement compiledClassHash ([485793c](https://github.com/0xs34n/starknet.js/commit/485793ce6fd0763e3da56d0d11a50bffc9bab984))
|
|
181
|
+
- compute chassHash for Cairo1 contract - computeSieraContractClassHash ([e20c1c5](https://github.com/0xs34n/starknet.js/commit/e20c1c5d01ce1d8abe2de527233a8396f7b9316d))
|
|
182
|
+
- unify classHash for Sierra and legacy ([fac2bfe](https://github.com/0xs34n/starknet.js/commit/fac2bfe92e074207132296a0d3f73dae2ddaf735))
|
|
208
183
|
|
|
209
184
|
## [5.1.1](https://github.com/0xs34n/starknet.js/compare/v5.1.0...v5.1.1) (2023-03-07)
|
|
210
185
|
|
|
@@ -230,57 +205,29 @@
|
|
|
230
205
|
### Bug Fixes
|
|
231
206
|
|
|
232
207
|
- add new starknet id contracts (testnet) ([343cf78](https://github.com/0xs34n/starknet.js/commit/343cf78a678b088ab4915407fe86f28fa91db6ea))
|
|
233
|
-
- devnet tests ([8a5866e](https://github.com/0xs34n/starknet.js/commit/8a5866ee24b1a88ae3914fd7700d8a6e785979f1))
|
|
234
208
|
|
|
235
209
|
# [5.0.0](https://github.com/0xs34n/starknet.js/compare/v4.22.0...v5.0.0) (2023-02-22)
|
|
236
210
|
|
|
237
211
|
### Bug Fixes
|
|
238
212
|
|
|
239
|
-
-
|
|
240
|
-
- bnToUint256
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
- imports ([a151afc](https://github.com/0xs34n/starknet.js/commit/a151afce77eb175e39982fbf8bfcbe25001ee6db))
|
|
244
|
-
- imports ([43f0e25](https://github.com/0xs34n/starknet.js/commit/43f0e25f22106da510a0152c65084b1ee677cc6f))
|
|
245
|
-
- invoke contract ([18b6337](https://github.com/0xs34n/starknet.js/commit/18b6337e9e87a9b35d585a68f76896dfe01983c6))
|
|
246
|
-
- options split for edge case ([acfab34](https://github.com/0xs34n/starknet.js/commit/acfab34f3cdca670ecd1793954a9bf53104ae4f1))
|
|
247
|
-
- post beta merge fixes ([aa6046f](https://github.com/0xs34n/starknet.js/commit/aa6046f2080e5f8c46e4cee7930d851b97312c3f))
|
|
248
|
-
- sequencer fetchEndpoint ([7206d77](https://github.com/0xs34n/starknet.js/commit/7206d776a497cab833f5bf2e00b9f2eb695e3c71))
|
|
249
|
-
- strict tuple rule, type bugfix, basic tuple validator ([1c97279](https://github.com/0xs34n/starknet.js/commit/1c9727963d00dc3143af08d7479c040c0d171e5f))
|
|
250
|
-
- tests ([3b34c0c](https://github.com/0xs34n/starknet.js/commit/3b34c0c37c0cca3da087e5ff2a881fba8959bf4e))
|
|
251
|
-
- tests ([85535e5](https://github.com/0xs34n/starknet.js/commit/85535e507cdc8307b4268ce7cef9c9fa4eb3c270))
|
|
252
|
-
- **tests:** signature in account tests ([c8bc860](https://github.com/0xs34n/starknet.js/commit/c8bc8604d74d0e0556468afa3475150fe3579e7a))
|
|
253
|
-
- transaction status fix ([2cfcb69](https://github.com/0xs34n/starknet.js/commit/2cfcb690f25f0025cd08734e31167c1c969056f9))
|
|
254
|
-
- trying fixing tests for sequencer ([480e20d](https://github.com/0xs34n/starknet.js/commit/480e20de6b8d3f8eb3048a84430380d73fe46dcc))
|
|
255
|
-
- update lockfile ([ecf9ead](https://github.com/0xs34n/starknet.js/commit/ecf9ead06d137bd2b43816a75f66dca0626e9ecd))
|
|
256
|
-
- use hex array for RPC signatures ([aa73351](https://github.com/0xs34n/starknet.js/commit/aa73351b024daf75af2bc997b78cbde56de567e9))
|
|
257
|
-
- weierstrass import ([c963f90](https://github.com/0xs34n/starknet.js/commit/c963f900cc0f3ffcadce16a704f7b9e592a014e1))
|
|
258
|
-
|
|
259
|
-
- chore!: account and signer updates ([be0cbe8](https://github.com/0xs34n/starknet.js/commit/be0cbe88b409fa9db20de8125319e10d1e29677e))
|
|
213
|
+
- remove the chain id property from the provider interface ([425b223](https://github.com/0xs34n/starknet.js/commit/425b22339118a7c3743ee1de8cc1683d2998bbdc))
|
|
214
|
+
- repair bnToUint256 ([baa9d61](https://github.com/0xs34n/starknet.js/commit/baa9d611b18725ba269818631f668183212988df))
|
|
215
|
+
- repair and unify transaction retrieval error ([ea5e646](https://github.com/0xs34n/starknet.js/commit/ea5e64651bf47824b254ae73ed8aa88998a5be44))
|
|
216
|
+
- remove hex prefix should work insensitive, for both 0x and 0X ([53323d4](https://github.com/0xs34n/starknet.js/commit/53323d434d5edbeee03c4262935676c950a761d3))
|
|
260
217
|
|
|
261
218
|
### Features
|
|
262
219
|
|
|
263
|
-
-
|
|
264
|
-
-
|
|
220
|
+
- switch to native BigInt support ([ec56c29](https://github.com/0xs34n/starknet.js/commit/ec56c29672c2e09e00d6ce5d500e4b10b6598269))
|
|
221
|
+
- expose elliptic curve utility methods ([649e0aa](https://github.com/0xs34n/starknet.js/commit/649e0aa032d77ba714fe5cb8d31252590e9eb7f4))
|
|
265
222
|
- add public sequencer fetch method ([1dab230](https://github.com/0xs34n/starknet.js/commit/1dab2302d64f5f3f1df84c225a93e6007592090d))
|
|
266
|
-
- add tests and make RawArgs more flexible ([db9f274](https://github.com/0xs34n/starknet.js/commit/db9f2745d2f55767acd0b3ded4a028d103a0d249))
|
|
267
223
|
- allow BigNumberish in RawCallData ([9b897c7](https://github.com/0xs34n/starknet.js/commit/9b897c7fb653ae1830b3795b29bd35c8be8e2d22))
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
- implement longText aka. long string into calldata, remove toFelt and resolve circular ref ([da58b5a](https://github.com/0xs34n/starknet.js/commit/da58b5a5a089a7ec82cf37c78f11bd1bf44144ff))
|
|
271
|
-
- initial commit to ue faster hashing ([722717d](https://github.com/0xs34n/starknet.js/commit/722717dcf23f6b62a528e58e9483f868f658ebf3))
|
|
272
|
-
- initial poc ([eb26fbd](https://github.com/0xs34n/starknet.js/commit/eb26fbddc02d54bb1f9ecf12192f484122ab5df4))
|
|
273
|
-
- make class hash optional for Declare Txn ([624ca8b](https://github.com/0xs34n/starknet.js/commit/624ca8b8d1885d9b9a405a31f05d869fdfc03c9c))
|
|
274
|
-
- make compile work with already compiled data, complete test ([7e80837](https://github.com/0xs34n/starknet.js/commit/7e8083728c96efceb7b7163f2fe59293ebd63f04))
|
|
275
|
-
- response formatter, refactored call method resturn object ([77ee9f4](https://github.com/0xs34n/starknet.js/commit/77ee9f434fb2ed66703976c97e348663f672fadb))
|
|
276
|
-
- response parse tuple, moved to calldata class, test ([dbe04de](https://github.com/0xs34n/starknet.js/commit/dbe04de5ff2d026afeb20c09d1898caae3d6b708))
|
|
277
|
-
- update declareAndDeploy method ([a47fbd5](https://github.com/0xs34n/starknet.js/commit/a47fbd5f523a375b988f912a5631c181e3a7159b))
|
|
278
|
-
- use ec internally ([3392d03](https://github.com/0xs34n/starknet.js/commit/3392d0362af48f283ff414bc7387586ba44ad9a2))
|
|
279
|
-
- use yarn ([ec1101e](https://github.com/0xs34n/starknet.js/commit/ec1101e6edaf53446e76181fa0cf4530befb9463))
|
|
224
|
+
- rework contract interaction API ([2ee199e](https://github.com/0xs34n/starknet.js/commit/2ee199e16c4fa2aa4432816482930a418e41b327))
|
|
225
|
+
- rework waitForTransaction API ([e17ff17](https://github.com/0xs34n/starknet.js/commit/e17ff1744d0ff9f93d7228e48168dc2bbaf63652))
|
|
280
226
|
|
|
281
227
|
### BREAKING CHANGES
|
|
282
228
|
|
|
283
|
-
-
|
|
229
|
+
- multiple BN values replaced by BigInt
|
|
230
|
+
- major API refactoring
|
|
284
231
|
|
|
285
232
|
# [5.0.0-beta.6](https://github.com/0xs34n/starknet.js/compare/v5.0.0-beta.5...v5.0.0-beta.6) (2023-02-22)
|
|
286
233
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3017,6 +3017,16 @@ declare abstract class ContractInterface {
|
|
|
3017
3017
|
* @returns Invocation object
|
|
3018
3018
|
*/
|
|
3019
3019
|
abstract populate(method: string, args?: ArgsOrCalldata): Invocation;
|
|
3020
|
+
/**
|
|
3021
|
+
* tells if the contract comes from a Cairo 1 contract
|
|
3022
|
+
*
|
|
3023
|
+
* @returns TRUE if the contract comes from a Cairo1 contract
|
|
3024
|
+
* @example
|
|
3025
|
+
* ```typescript
|
|
3026
|
+
* const isCairo1: boolean = myContract.isCairo1();
|
|
3027
|
+
* ```
|
|
3028
|
+
*/
|
|
3029
|
+
abstract isCairo1(): boolean;
|
|
3020
3030
|
}
|
|
3021
3031
|
|
|
3022
3032
|
declare const splitArgsAndOptions: (args: ArgsOrCalldataWithOptions) => {
|
|
@@ -3067,6 +3077,7 @@ declare class Contract implements ContractInterface {
|
|
|
3067
3077
|
invoke(method: string, args?: ArgsOrCalldata, { parseRequest, maxFee, nonce, signature }?: InvokeOptions): Promise<InvokeFunctionResponse>;
|
|
3068
3078
|
estimate(method: string, args?: ArgsOrCalldata): Promise<EstimateFeeResponse>;
|
|
3069
3079
|
populate(method: string, args?: RawArgs): Call;
|
|
3080
|
+
isCairo1(): boolean;
|
|
3070
3081
|
}
|
|
3071
3082
|
|
|
3072
3083
|
declare class ContractFactory {
|
|
@@ -3665,6 +3676,17 @@ declare const isTypeBool: (type: string) => boolean;
|
|
|
3665
3676
|
declare const isTypeContractAddress: (type: string) => boolean;
|
|
3666
3677
|
declare const isCairo1Type: (type: string) => boolean;
|
|
3667
3678
|
declare const getArrayType: (type: string) => string;
|
|
3679
|
+
/**
|
|
3680
|
+
* tells if an ABI comes from a Cairo 1 contract
|
|
3681
|
+
*
|
|
3682
|
+
* @param abi representing the interface of a Cairo contract
|
|
3683
|
+
* @returns TRUE if it is an ABI from a Cairo1 contract
|
|
3684
|
+
* @example
|
|
3685
|
+
* ```typescript
|
|
3686
|
+
* const isCairo1: boolean = isCairo1Abi(myAbi: Abi);
|
|
3687
|
+
* ```
|
|
3688
|
+
*/
|
|
3689
|
+
declare function isCairo1Abi(abi: Abi): boolean;
|
|
3668
3690
|
/**
|
|
3669
3691
|
* named tuple are described as js object {}
|
|
3670
3692
|
* struct types are described as js object {}
|
|
@@ -3687,6 +3709,7 @@ type cairo_Uint = Uint;
|
|
|
3687
3709
|
declare const cairo_Uint: typeof Uint;
|
|
3688
3710
|
declare const cairo_felt: typeof felt;
|
|
3689
3711
|
declare const cairo_getArrayType: typeof getArrayType;
|
|
3712
|
+
declare const cairo_isCairo1Abi: typeof isCairo1Abi;
|
|
3690
3713
|
declare const cairo_isCairo1Type: typeof isCairo1Type;
|
|
3691
3714
|
declare const cairo_isLen: typeof isLen;
|
|
3692
3715
|
declare const cairo_isTypeArray: typeof isTypeArray;
|
|
@@ -3705,6 +3728,7 @@ declare namespace cairo {
|
|
|
3705
3728
|
cairo_Uint as Uint,
|
|
3706
3729
|
cairo_felt as felt,
|
|
3707
3730
|
cairo_getArrayType as getArrayType,
|
|
3731
|
+
cairo_isCairo1Abi as isCairo1Abi,
|
|
3708
3732
|
cairo_isCairo1Type as isCairo1Type,
|
|
3709
3733
|
cairo_isLen as isLen,
|
|
3710
3734
|
cairo_isTypeArray as isTypeArray,
|
package/dist/index.global.js
CHANGED
|
@@ -5613,6 +5613,7 @@ var starknet = (() => {
|
|
|
5613
5613
|
Uint: () => Uint,
|
|
5614
5614
|
felt: () => felt,
|
|
5615
5615
|
getArrayType: () => getArrayType,
|
|
5616
|
+
isCairo1Abi: () => isCairo1Abi,
|
|
5616
5617
|
isCairo1Type: () => isCairo1Type,
|
|
5617
5618
|
isLen: () => isLen,
|
|
5618
5619
|
isTypeArray: () => isTypeArray,
|
|
@@ -5682,6 +5683,19 @@ var starknet = (() => {
|
|
|
5682
5683
|
}
|
|
5683
5684
|
return type.replace("*", "");
|
|
5684
5685
|
};
|
|
5686
|
+
function isCairo1Abi(abi) {
|
|
5687
|
+
const firstFunction = abi.find((entry) => entry.type === "function");
|
|
5688
|
+
if (!firstFunction) {
|
|
5689
|
+
throw new Error(`Error in ABI. No function in ABI.`);
|
|
5690
|
+
}
|
|
5691
|
+
if (firstFunction.inputs.length) {
|
|
5692
|
+
return isCairo1Type(firstFunction.inputs[0].type);
|
|
5693
|
+
}
|
|
5694
|
+
if (firstFunction.outputs.length) {
|
|
5695
|
+
return isCairo1Type(firstFunction.outputs[0].type);
|
|
5696
|
+
}
|
|
5697
|
+
throw new Error(`Error in ABI. No input/output in function ${firstFunction.name}`);
|
|
5698
|
+
}
|
|
5685
5699
|
var uint256 = (it) => {
|
|
5686
5700
|
const bn = BigInt(it);
|
|
5687
5701
|
if (!isUint256(bn))
|
|
@@ -14211,6 +14225,9 @@ ${res.tx_failure_reason.error_message}` : res.tx_status;
|
|
|
14211
14225
|
calldata
|
|
14212
14226
|
};
|
|
14213
14227
|
}
|
|
14228
|
+
isCairo1() {
|
|
14229
|
+
return cairo_exports.isCairo1Abi(this.abi);
|
|
14230
|
+
}
|
|
14214
14231
|
};
|
|
14215
14232
|
|
|
14216
14233
|
// src/contract/interface.ts
|