@metamask-previews/eth-snap-keyring 4.3.2-preview-7b3e0a5

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +344 -0
  2. package/README.md +71 -0
  3. package/package.json +70 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,344 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [4.3.2]
11
+
12
+ ### Changed
13
+
14
+ - Bump `@metamask/eth-sig-util` from `^7.0.1` to `^7.0.3` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311))
15
+ - Bump `@metamask/keyring-api` from `^8.0.0` to `^8.0.1` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311))
16
+ - Bump `@metamask/snaps-controllers` from `^8.1.1` to `^9.3.0` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311), [#363](https://github.com/MetaMask/eth-snap-keyring/pull/363))
17
+ - Bump `@metamask/snaps-sdk` from `^4.2.0` to `^6.1.0` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311), [#363](https://github.com/MetaMask/eth-snap-keyring/pull/363))
18
+ - Bump `@metamask/snaps-utils` from `^7.4.0` to `^7.8.0` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311), [#363](https://github.com/MetaMask/eth-snap-keyring/pull/363))
19
+ - Bump `@metamask/utils` from `^8.4.0` to `^9.1.0` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311))
20
+ - Set tsconfig options `module`, `moduleResolution` to `Node16` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311))
21
+
22
+ ### Fixed
23
+
24
+ - Replace `superstruct` with ESM-compatible `@metamask/superstruct` `^3.1.0` ([#311](https://github.com/MetaMask/eth-snap-keyring/pull/311))
25
+ - This fixes the issue of this package being unusable by any TypeScript project that uses `Node16` or `NodeNext` as its `moduleResolution` option.
26
+
27
+ ## [4.3.1]
28
+
29
+ ### Changed
30
+
31
+ - Bump @metamask/keyring-api from 6.3.1 to 8.0.0 ([#331](https://github.com/MetaMask/eth-snap-keyring/pull/331)).
32
+
33
+ ## [4.3.0]
34
+
35
+ ### Added
36
+
37
+ - Export `KeyringSnapControllerClient` ([#328](https://github.com/MetaMask/eth-snap-keyring/pull/328)).
38
+
39
+ ### Changed
40
+
41
+ - Bump @metamask/snaps-utils from 7.4.1 to 7.5.0 ([#326](https://github.com/MetaMask/eth-snap-keyring/pull/326)).
42
+ - Bump @metamask/snaps-controllers from 8.3.1 to 8.4.0 ([#325](https://github.com/MetaMask/eth-snap-keyring/pull/325)).
43
+ - Bump @metamask/snaps-sdk from 4.4.1 to 4.4.2 ([#327](https://github.com/MetaMask/eth-snap-keyring/pull/327)).
44
+ - Bump @metamask/rpc-errors from 6.2.1 to 6.3.0 ([#322](https://github.com/MetaMask/eth-snap-keyring/pull/322)).
45
+ - Bump @metamask/snaps-controllers from 8.2.0 to 8.3.1 ([#321](https://github.com/MetaMask/eth-snap-keyring/pull/321)).
46
+ - Bump @metamask/snaps-sdk from 4.3.0 to 4.4.1 ([#314](https://github.com/MetaMask/eth-snap-keyring/pull/314)).
47
+ - Bump @metamask/permission-controller from 9.1.0 to 9.1.1 ([#316](https://github.com/MetaMask/eth-snap-keyring/pull/316)).
48
+ - Bump @metamask/snaps-utils from 7.4.0 to 7.4.1 ([#319](https://github.com/MetaMask/eth-snap-keyring/pull/319)).
49
+ - Bump @metamask/keyring-api from 6.3.1 to 6.4.0 ([#315](https://github.com/MetaMask/eth-snap-keyring/pull/315)).
50
+ - Bump @metamask/json-rpc-middleware-stream from 7.0.1 to 7.0.2 ([#317](https://github.com/MetaMask/eth-snap-keyring/pull/317)).
51
+ - Bump @metamask/phishing-controller from 9.0.3 to 9.0.4 ([#318](https://github.com/MetaMask/eth-snap-keyring/pull/318)).
52
+ - Bump @metamask/snaps-rpc-methods from 9.1.0 to 9.1.2 ([#320](https://github.com/MetaMask/eth-snap-keyring/pull/320)).
53
+ - Bump @lavamoat/allow-scripts@^2.3.1->^3.0.4 ([#296](https://github.com/MetaMask/eth-snap-keyring/pull/296)).
54
+ - Bump @metamask/key-tree from 9.1.0 to 9.1.1 ([#298](https://github.com/MetaMask/eth-snap-keyring/pull/298)).
55
+ - Bump @metamask/phishing-controller from 9.0.2 to 9.0.3 ([#302](https://github.com/MetaMask/eth-snap-keyring/pull/302)).
56
+ - Bump @metamask/json-rpc-engine from 8.0.1 to 8.0.2 ([#291](https://github.com/MetaMask/eth-snap-keyring/pull/291)).
57
+ - Bump @metamask/snaps-controllers from 8.1.1 to 8.2.0 ([#307](https://github.com/MetaMask/eth-snap-keyring/pull/307)).
58
+
59
+ ## [4.2.1]
60
+
61
+ ### Changed
62
+
63
+ - Fixed 4337 methods enum ([#312](https://github.com/MetaMask/eth-snap-keyring/pull/312))
64
+ - Bump @metamask/post-message-stream from 8.0.0 to 8.1.0 ([#297](https://github.com/MetaMask/eth-snap-keyring/pull/297))
65
+ - Bump @metamask/permission-controller from 9.0.2 to 9.1.0 ([#306](https://github.com/MetaMask/eth-snap-keyring/pull/306))
66
+ - Bump @metamask/snaps-sdk from 4.2.0 to 4.3.0 ([#308](https://github.com/MetaMask/eth-snap-keyring/pull/308))
67
+
68
+ ## [4.2.0]
69
+
70
+ ### Added
71
+
72
+ - Add `accountNameSuggestion` and `displayConfirmation` options handling for `"notify:accountCreated"` ([#300](https://github.com/MetaMask/eth-snap-keyring/pull/300))
73
+ - Bump @metamask/keyring-api from 6.1.1 to 6.2.1 ([#304](https://github.com/MetaMask/eth-snap-keyring/pull/304))
74
+
75
+ ## [4.1.1]
76
+
77
+ ### Changed
78
+
79
+ - Bump @metamask/snaps-\* and @metamask/keyring-api ([#294](https://github.com/MetaMask/eth-snap-keyring/pull/294))
80
+ - Bump @metamask/key-tree from 9.0.0 to 9.1.0 ([#293](https://github.com/MetaMask/eth-snap-keyring/pull/293))
81
+
82
+ ## [4.1.0]
83
+
84
+ ### Changed
85
+
86
+ - Bump @metamask/keyring-api to version 6.1.0 and introduce btc account types ([#285](https://github.com/MetaMask/eth-snap-keyring/pull/285))
87
+ - Bump @metamask/phishing-controller from 9.0.1 to 9.0.2 ([#279](https://github.com/MetaMask/eth-snap-keyring/pull/279))
88
+ - Bump @metamask/base-controller from 5.0.1 to 5.0.2 ([#280](https://github.com/MetaMask/eth-snap-keyring/pull/280))
89
+ - Bump @metamask/eth-sig-util from 7.0.1 to 7.0.2 ([#281](https://github.com/MetaMask/eth-snap-keyring/pull/281))
90
+ - Bump @metamask/approval-controller from 6.0.1 to 6.0.2 ([#282](https://github.com/MetaMask/eth-snap-keyring/pull/282))
91
+ - Bump @metamask/providers from 16.0.0 to 16.1.0 ([#283](https://github.com/MetaMask/eth-snap-keyring/pull/283))
92
+ - Bump @metamask/snaps-controllers from 7.0.1 to 8.0.0 ([#278](https://github.com/MetaMask/eth-snap-keyring/pull/278))
93
+ - Bump @metamask/snaps-utils from 7.1.0 to 7.2.0 ([#277](https://github.com/MetaMask/eth-snap-keyring/pull/277))
94
+
95
+ ## [4.0.0]
96
+
97
+ ### Changed
98
+
99
+ - **BREAKING**: Bump @metamask/keyring-api to version 6.0.0 ([#275](https://github.com/MetaMask/eth-snap-keyring/pull/275))
100
+ - Bump @metamask/snaps-controllers from 6.0.3 to 7.0.1 and @metamask/snaps-sdk 3.1.1 to 4.0.1 ([#272](https://github.com/MetaMask/eth-snap-keyring/pull/272))
101
+ - Bump @metamask/snaps-utils from 7.0.4 to 7.1.0 ([#268](https://github.com/MetaMask/eth-snap-keyring/pull/268))
102
+ - Bump @metamask/controller-utils from 9.0.2 to 9.1.0 ([#270](https://github.com/MetaMask/eth-snap-keyring/pull/270))
103
+ - Bump @metamask/snaps-controllers from 6.0.3 to 6.0.4 ([#266](https://github.com/MetaMask/eth-snap-keyring/pull/266))
104
+ - Bump @metamask/snaps-registry from 3.0.1 to 3.1.0 ([#265](https://github.com/MetaMask/eth-snap-keyring/pull/265))
105
+ - Bump @metamask/snaps-rpc-methods from 7.0.1 to 7.0.2 ([#264](https://github.com/MetaMask/eth-snap-keyring/pull/264))
106
+ - Bump @metamask/snaps-utils from 7.0.3 to 7.0.4 ([#263](https://github.com/MetaMask/eth-snap-keyring/pull/263))
107
+ - Bump @metamask/snaps-sdk from 3.1.1 to 3.2.0 ([#262](https://github.com/MetaMask/eth-snap-keyring/pull/262))
108
+
109
+ ## [3.0.0]
110
+
111
+ ### Added
112
+
113
+ - Add logger and now log Snap requests ([#254](https://github.com/MetaMask/eth-snap-keyring/pull/254))
114
+
115
+ ### Changed
116
+
117
+ - **BREAKING**: Add KeyringExecutionContext to user ops methods ([#253](https://github.com/MetaMask/eth-snap-keyring/pull/253))
118
+ - Bump @metamask/utils from 8.3.0 to 8.4.0
119
+ ([#260](https://github.com/MetaMask/eth-snap-keyring/pull/260))
120
+ ([#256](https://github.com/MetaMask/eth-snap-keyring/pull/256))
121
+ - Bump @metamask/keyring-api from 5.0.0 to 5.1.0 ([#259](https://github.com/MetaMask/eth-snap-keyring/pull/259))
122
+ - Bump @metamask/keyring-api from 4.0.2 to 5.0.0 ([#255](https://github.com/MetaMask/eth-snap-keyring/pull/255))
123
+
124
+ ## [2.2.2]
125
+
126
+ ### Changed
127
+
128
+ - Bump @metamask/safe-event-emitter from 3.1.0 to 3.1.1 ([#251](https://github.com/MetaMask/eth-snap-keyring/pull/251))
129
+ - Bump dependencies ([#246](https://github.com/MetaMask/eth-snap-keyring/pull/246))
130
+ - Bump @metamask/safe-event-emitter from 3.0.0 to 3.1.0 ([#245](https://github.com/MetaMask/eth-snap-keyring/pull/245))
131
+ - Fix enforcing responses of `prepareUserOperation` and `patchUserOperation` to be synchronous ([#243](https://github.com/MetaMask/eth-snap-keyring/pull/243))
132
+ - Bump @metamask/snaps-registry from 3.0.0 to 3.0.1 ([#244](https://github.com/MetaMask/eth-snap-keyring/pull/244))
133
+
134
+ ## [2.2.1]
135
+
136
+ ### Changed
137
+
138
+ - Bump @metamask dependencies ([#236](https://github.com/MetaMask/eth-snap-keyring/pull/236))
139
+ - Extract logic in 'submitRequest' ([#232](https://github.com/MetaMask/eth-snap-keyring/pull/232))
140
+ - Bump @metamask/controller-utils from 8.0.3 to 8.0.4 ([#233](https://github.com/MetaMask/eth-snap-keyring/pull/233))
141
+ - Bump @metamask/json-rpc-engine from 7.3.2 to 7.3.3 ([#234](https://github.com/MetaMask/eth-snap-keyring/pull/234))
142
+ - Bump @metamask/approval-controller from 5.1.2 to 5.1.3 ([#235](https://github.com/MetaMask/eth-snap-keyring/pull/235))
143
+ - Bump update Snap and dev dependencies ([#230](https://github.com/MetaMask/eth-snap-keyring/pull/230))
144
+ - Bump @metamask/rpc-errors from 6.2.0 to 6.2.1 ([#223](https://github.com/MetaMask/eth-snap-keyring/pull/223))
145
+ - Bump @metamask/snaps-utils from 6.1.0 to 7.0.0 ([#224](https://github.com/MetaMask/eth-snap-keyring/pull/224))
146
+ - Bump @metamask/rpc-errors from 6.1.0 to 6.2.0 ([#219](https://github.com/MetaMask/eth-snap-keyring/pull/219))
147
+ - Bump ip from 2.0.0 to 2.0.1 ([#218](https://github.com/MetaMask/eth-snap-keyring/pull/218))
148
+
149
+ ### Fixed
150
+
151
+ - Add `chainId` to Keyring API requests (transaction/typed message) ([#231](https://github.com/MetaMask/eth-snap-keyring/pull/231))
152
+ - Enforce async request redirect URL is in the snaps 'allowedOrigins' ([#228](https://github.com/MetaMask/eth-snap-keyring/pull/228))
153
+
154
+ ## [2.2.0]
155
+
156
+ ### Changed
157
+
158
+ - Bump dependencies ([#220](https://github.com/MetaMask/eth-snap-keyring/pull/220))
159
+ - @metamask/snaps-controllers from ^4.1.0 to ^5.0.1
160
+ - @metamask/snaps-sdk from ^1.4.0 to ^2.1.0
161
+ - @metamask/snaps-utils from ^5.2.0 to ^6.1.0
162
+ - @metamask/utils from ^8.1.0 to ^8.3.0
163
+ - @metamask/keyring-api from ^2.0.0 to ^4.0.0
164
+
165
+ ## [2.1.2]
166
+
167
+ ### Fixed
168
+
169
+ - Fixed inconsistent signature signing ([#200](https://github.com/MetaMask/eth-snap-keyring/pull/200))
170
+
171
+ ## [2.1.1]
172
+
173
+ ### Fixed
174
+
175
+ - Reject unsupported account methods ([#190](https://github.com/MetaMask/eth-snap-keyring/pull/190))
176
+
177
+ ## [2.1.0]
178
+
179
+ ### Added
180
+
181
+ - Add methods to support ERC-4337 accounts ([#180](https://github.com/MetaMask/eth-snap-keyring/pull/180)).
182
+
183
+ ### Changed
184
+
185
+ - Use a `snapId`-indexed map ([#172](https://github.com/MetaMask/eth-snap-keyring/pull/172)).
186
+ - Update CODEOWNERS and run CI on merge queues ([#165](https://github.com/MetaMask/eth-snap-keyring/pull/165)).
187
+ - Bump min Node version to 18.18 and use LTS for dev ([#183](https://github.com/MetaMask/eth-snap-keyring/pull/183)).
188
+
189
+ ## [2.0.0]
190
+
191
+ ### Changed
192
+
193
+ - **BREAKING**: Remove async from `listAccounts` and `getAccountByAddress` ([#148](https://github.com/MetaMask/eth-snap-keyring/pull/148)).
194
+
195
+ ## [1.0.0]
196
+
197
+ ### Changed
198
+
199
+ - Bump `@metamask/keyring-api` to 1.0.0 ([#145](https://github.com/MetaMask/eth-snap-keyring/pull/145)).
200
+ - Bump `semver` and `word-wrap` dependencies ([#144](https://github.com/MetaMask/eth-snap-keyring/pull/144)).
201
+ - Bump @metamask/rpc-errors from 6.0.0 to 6.1.0 ([#143](https://github.com/MetaMask/eth-snap-keyring/pull/143)).
202
+
203
+ ## [1.0.0-rc.2]
204
+
205
+ ### Added
206
+
207
+ - Add `redirectUser` callback ([#136](https://github.com/MetaMask/eth-snap-keyring/pull/136)).
208
+
209
+ ## [1.0.0-rc.1]
210
+
211
+ ### Added
212
+
213
+ - Add `getAccountByAddress` method ([#134](https://github.com/MetaMask/eth-snap-keyring/pull/134)).
214
+
215
+ ### Changed
216
+
217
+ - Bump `word-wrap` and `semver` ([#140](https://github.com/MetaMask/eth-snap-keyring/pull/140)).
218
+ - Bump `@metamask/scure-bip39` from 2.1.0 to 2.1.1 ([#133](https://github.com/MetaMask/eth-snap-keyring/pull/133)).
219
+ - Bump `postcss` from 8.4.20 to 8.4.31 ([#137](https://github.com/MetaMask/eth-snap-keyring/pull/137)).
220
+ - Bump `@metamask` dependencies ([#139](https://github.com/MetaMask/eth-snap-keyring/pull/139)).
221
+
222
+ ## [0.3.1]
223
+
224
+ ### Added
225
+
226
+ - Add the `getAccountsBySnapId` method ([#122](https://github.com/MetaMask/eth-snap-keyring/pull/122)).
227
+
228
+ ### Fixed
229
+
230
+ - Remove the `removeAccountsBySnapId` method ([#121](https://github.com/MetaMask/eth-snap-keyring/pull/121)).
231
+ - Call external function with lowercase address ([#120](https://github.com/MetaMask/eth-snap-keyring/pull/120)).
232
+
233
+ ## [0.3.0]
234
+
235
+ ### Changed
236
+
237
+ - Handle approval when adding/removing account with `handleUserInput` callback ([#99](https://github.com/MetaMask/eth-snap-keyring/pull/99)).
238
+
239
+ ## [0.2.3]
240
+
241
+ ### Added
242
+
243
+ - Add method to remove all accounts given a snap ID ([#116](https://github.com/MetaMask/eth-snap-keyring/pull/116)).
244
+
245
+ ### Fixed
246
+
247
+ - Don't allow duplicate accounts to be added ([#115](https://github.com/MetaMask/eth-snap-keyring/pull/115)).
248
+ - Ignore event if account was already removed ([#101](https://github.com/MetaMask/eth-snap-keyring/pull/101)).
249
+
250
+ ## [0.2.2]
251
+
252
+ ### Changed
253
+
254
+ - Add `removeAccount` callback to constructor ([#96](https://github.com/MetaMask/eth-snap-keyring/pull/96)).
255
+
256
+ ## [0.2.1]
257
+
258
+ ### Changed
259
+
260
+ - Add `callbacks` argument to constructor ([#82](https://github.com/MetaMask/eth-snap-keyring/pull/82)).
261
+ - Increase minimum Node.js version to 16 (default to 18) ([#83](https://github.com/MetaMask/eth-snap-keyring/pull/83)).
262
+ - Migrate to the new `keyring-api` ([#78](https://github.com/MetaMask/eth-snap-keyring/pull/78)).
263
+ - Upgrade dependencies.
264
+
265
+ ## [0.2.0]
266
+
267
+ ### Changed
268
+
269
+ - Add account and snap metadata ([#75](https://github.com/MetaMask/eth-snap-keyring/pull/75)).
270
+ - Rename files to be more idiomatic ([#42](https://github.com/MetaMask/eth-snap-keyring/pull/42)).
271
+ - Move internal state from objects to maps ([#41](https://github.com/MetaMask/eth-snap-keyring/pull/41)).
272
+
273
+ ### Fixed
274
+
275
+ - Remove promise if `submitRequest()` throws ([#43](https://github.com/MetaMask/eth-snap-keyring/pull/43)).
276
+
277
+ ## [0.1.4]
278
+
279
+ ### Changed
280
+
281
+ - **BREAKING**: Add `callbacks` that will be used to inject dependencies ([#79](https://github.com/MetaMask/eth-snap-keyring/pull/79), [MetaMask/snaps#1725](https://github.com/MetaMask/snaps/pull/1725), [MetaMask/metamask-extension#20786](https://github.com/MetaMask/metamask-extension/pull/20786)).
282
+
283
+ ## [0.1.3]
284
+
285
+ ### Fixed
286
+
287
+ - Remove account from maps before calling the snap ([#39](https://github.com/MetaMask/eth-snap-keyring/pull/39)).
288
+
289
+ ## [0.1.2]
290
+
291
+ ### Changed
292
+
293
+ - Remove unused `#listAccounts()` method ([#35](https://github.com/MetaMask/eth-snap-keyring/pull/35)).
294
+
295
+ ### Fixed
296
+
297
+ - Sync all accounts on snap notificaiton ([#36](https://github.com/MetaMask/eth-snap-keyring/pull/36)).
298
+ - Don't sync accounts twice on deletion ([#32](https://github.com/MetaMask/eth-snap-keyring/pull/32)).
299
+
300
+ ## [0.1.1]
301
+
302
+ ### Changed
303
+
304
+ - Use objects in snap -> controller methods ([#28](https://github.com/MetaMask/eth-snap-keyring/pull/28)).
305
+ - Fix circular call when handling `'read'` requests ([#27](https://github.com/MetaMask/eth-snap-keyring/pull/27)).
306
+ - Remove `saveSnapKeyring` argument from `handleKeyringSnapMessage` ([#26](https://github.com/MetaMask/eth-snap-keyring/pull/26)).
307
+
308
+ ## [0.1.0]
309
+
310
+ ### Added
311
+
312
+ - Initial release.
313
+
314
+ [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.3.2...HEAD
315
+ [4.3.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.3.1...@metamask/eth-snap-keyring@4.3.2
316
+ [4.3.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.3.0...@metamask/eth-snap-keyring@4.3.1
317
+ [4.3.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.2.1...@metamask/eth-snap-keyring@4.3.0
318
+ [4.2.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.2.0...@metamask/eth-snap-keyring@4.2.1
319
+ [4.2.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.1.1...@metamask/eth-snap-keyring@4.2.0
320
+ [4.1.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.1.0...@metamask/eth-snap-keyring@4.1.1
321
+ [4.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@4.0.0...@metamask/eth-snap-keyring@4.1.0
322
+ [4.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@3.0.0...@metamask/eth-snap-keyring@4.0.0
323
+ [3.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.2.2...@metamask/eth-snap-keyring@3.0.0
324
+ [2.2.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.2.1...@metamask/eth-snap-keyring@2.2.2
325
+ [2.2.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.2.0...@metamask/eth-snap-keyring@2.2.1
326
+ [2.2.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.1.2...@metamask/eth-snap-keyring@2.2.0
327
+ [2.1.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.1.1...@metamask/eth-snap-keyring@2.1.2
328
+ [2.1.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.1.0...@metamask/eth-snap-keyring@2.1.1
329
+ [2.1.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@2.0.0...@metamask/eth-snap-keyring@2.1.0
330
+ [2.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@1.0.0...@metamask/eth-snap-keyring@2.0.0
331
+ [1.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@1.0.0-rc.2...@metamask/eth-snap-keyring@1.0.0
332
+ [1.0.0-rc.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@1.0.0-rc.1...@metamask/eth-snap-keyring@1.0.0-rc.2
333
+ [1.0.0-rc.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.3.1...@metamask/eth-snap-keyring@1.0.0-rc.1
334
+ [0.3.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.3.0...@metamask/eth-snap-keyring@0.3.1
335
+ [0.3.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.2.3...@metamask/eth-snap-keyring@0.3.0
336
+ [0.2.3]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.2.2...@metamask/eth-snap-keyring@0.2.3
337
+ [0.2.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.2.1...@metamask/eth-snap-keyring@0.2.2
338
+ [0.2.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.2.0...@metamask/eth-snap-keyring@0.2.1
339
+ [0.2.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.1.4...@metamask/eth-snap-keyring@0.2.0
340
+ [0.1.4]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.1.3...@metamask/eth-snap-keyring@0.1.4
341
+ [0.1.3]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.1.2...@metamask/eth-snap-keyring@0.1.3
342
+ [0.1.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.1.1...@metamask/eth-snap-keyring@0.1.2
343
+ [0.1.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-snap-keyring@0.1.0...@metamask/eth-snap-keyring@0.1.1
344
+ [0.1.0]: https://github.com/MetaMask/accounts/releases/tag/@metamask/eth-snap-keyring@0.1.0
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # Snap Keyring
2
+
3
+ This keyring acts as a bridge between the `KeyringController` and a snap.
4
+
5
+ ## Installation
6
+
7
+ `yarn add @metamask/eth-snap-keyring`
8
+
9
+ or
10
+
11
+ `npm install @metamask/eth-snap-keyring`
12
+
13
+ ## API
14
+
15
+ See our documentation:
16
+
17
+ - [Latest published API documentation](https://metamask.github.io/eth-snap-keyring/latest/)
18
+ - [Latest development API documentation](https://metamask.github.io/eth-snap-keyring/staging/)
19
+
20
+ ## Contributing
21
+
22
+ ### Setup
23
+
24
+ - Install [Node.js](https://nodejs.org) version 18
25
+ - If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you.
26
+ - Install [Yarn v3](https://yarnpkg.com/getting-started/install)
27
+ - Run `yarn install` to install dependencies and run any required post-install scripts
28
+
29
+ ### Testing and Linting
30
+
31
+ Run `yarn test` to run the tests once. To run tests on file changes, run `yarn test:watch`.
32
+
33
+ Run `yarn lint` to run the linter, or run `yarn lint:fix` to run the linter and fix any automatically fixable issues.
34
+
35
+ ### Release & Publishing
36
+
37
+ The project follows the same release process as the other libraries in the MetaMask organization. The GitHub Actions [`action-create-release-pr`](https://github.com/MetaMask/action-create-release-pr) and [`action-publish-release`](https://github.com/MetaMask/action-publish-release) are used to automate the release process; see those repositories for more information about how they work.
38
+
39
+ 1. Choose a release version.
40
+
41
+ - The release version should be chosen according to SemVer. Analyze the changes to see whether they include any breaking changes, new features, or deprecations, then choose the appropriate SemVer version. See [the SemVer specification](https://semver.org/) for more information.
42
+
43
+ 2. If this release is backporting changes onto a previous release, then ensure there is a major version branch for that version (e.g. `1.x` for a `v1` backport release).
44
+
45
+ - The major version branch should be set to the most recent release with that major version. For example, when backporting a `v1.0.2` release, you'd want to ensure there was a `1.x` branch that was set to the `v1.0.1` tag.
46
+
47
+ 3. Trigger the [`workflow_dispatch`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event [manually](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow) for the `Create Release Pull Request` action to create the release PR.
48
+
49
+ - For a backport release, the base branch should be the major version branch that you ensured existed in step 2. For a normal release, the base branch should be the main branch for that repository (which should be the default value).
50
+ - This should trigger the [`action-create-release-pr`](https://github.com/MetaMask/action-create-release-pr) workflow to create the release PR.
51
+
52
+ 4. Update the changelog to move each change entry into the appropriate change category ([See here](https://keepachangelog.com/en/1.0.0/#types) for the full list of change categories, and the correct ordering), and edit them to be more easily understood by users of the package.
53
+
54
+ - Generally any changes that don't affect consumers of the package (e.g. lockfile changes or development environment changes) are omitted. Exceptions may be made for changes that might be of interest despite not having an effect upon the published package (e.g. major test improvements, security improvements, improved documentation, etc.).
55
+ - Try to explain each change in terms that users of the package would understand (e.g. avoid referencing internal variables/concepts).
56
+ - Consolidate related changes into one change entry if it makes it easier to explain.
57
+ - Run `yarn auto-changelog validate --rc` to check that the changelog is correctly formatted.
58
+
59
+ 5. Review and QA the release.
60
+
61
+ - If changes are made to the base branch, the release branch will need to be updated with these changes and review/QA will need to restart again. As such, it's probably best to avoid merging other PRs into the base branch while review is underway.
62
+
63
+ 6. Squash & Merge the release.
64
+
65
+ - This should trigger the [`action-publish-release`](https://github.com/MetaMask/action-publish-release) workflow to tag the final release commit and publish the release on GitHub.
66
+
67
+ 7. Publish the release on npm.
68
+
69
+ - Wait for the `publish-release` GitHub Action workflow to finish. This should trigger a second job (`publish-npm`), which will wait for a run approval by the [`npm publishers`](https://github.com/orgs/MetaMask/teams/npm-publishers) team.
70
+ - Approve the `publish-npm` job (or ask somebody on the npm publishers team to approve it for you).
71
+ - Once the `publish-npm` job has finished, check npm to verify that it has been published.
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@metamask-previews/eth-snap-keyring",
3
+ "version": "4.3.2-preview-7b3e0a5",
4
+ "description": "Snaps keyring bridge.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/MetaMask/eth-snap-keyring.git"
8
+ },
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "files": [
12
+ "dist/"
13
+ ],
14
+ "scripts": {
15
+ "build": "yarn workspace $(jq -r '.name' ../keyring-api/package.json) build:force && tsc --build tsconfig.build.json",
16
+ "build:clean": "rimraf dist && yarn build",
17
+ "build:docs": "typedoc",
18
+ "build:force": "tsc --build tsconfig.build.json --force",
19
+ "changelog:update": "../../scripts/update-changelog.sh @metamask/eth-snap-keyring",
20
+ "changelog:validate": "../../scripts/validate-changelog.sh @metamask/eth-snap-keyring",
21
+ "prepack": "./scripts/prepack.sh",
22
+ "publish:preview": "yarn npm publish --tag preview",
23
+ "test": "jest && jest-it-up",
24
+ "test:clean": "jest --clearCache",
25
+ "test:verbose": "jest --verbose",
26
+ "test:watch": "jest --watch"
27
+ },
28
+ "dependencies": {
29
+ "@ethereumjs/tx": "^4.2.0",
30
+ "@metamask/eth-sig-util": "^7.0.3",
31
+ "@metamask/keyring-api": "^8.0.2",
32
+ "@metamask/snaps-controllers": "^9.3.0",
33
+ "@metamask/snaps-sdk": "^6.1.0",
34
+ "@metamask/snaps-utils": "^7.8.0",
35
+ "@metamask/superstruct": "^3.1.0",
36
+ "@metamask/utils": "^9.1.0",
37
+ "@types/uuid": "^9.0.1",
38
+ "deepmerge": "^4.2.2",
39
+ "uuid": "^9.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@lavamoat/allow-scripts": "^3.0.4",
43
+ "@metamask/auto-changelog": "^3.4.4",
44
+ "@types/jest": "^28.1.6",
45
+ "@types/node": "^17.0.23",
46
+ "depcheck": "^1.4.3",
47
+ "jest": "^28.1.3",
48
+ "jest-it-up": "^2.0.2",
49
+ "rimraf": "^3.0.2",
50
+ "ts-jest": "^28.0.7",
51
+ "ts-node": "^10.7.0",
52
+ "typedoc": "^0.23.15",
53
+ "typescript": "~4.8.4"
54
+ },
55
+ "engines": {
56
+ "node": "^18.18 || >=20"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public",
60
+ "registry": "https://registry.npmjs.org/"
61
+ },
62
+ "lavamoat": {
63
+ "allowScripts": {
64
+ "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>keccak": false,
65
+ "@metamask/snaps-utils>@metamask/permission-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>secp256k1": false,
66
+ "@metamask/snaps-controllers>@metamask/phishing-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>keccak": false,
67
+ "@metamask/snaps-controllers>@metamask/phishing-controller>@metamask/controller-utils>ethereumjs-util>ethereum-cryptography>secp256k1": false
68
+ }
69
+ }
70
+ }