forked from dfinity/agent-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog.html
428 lines (427 loc) · 16.6 KB
/
changelog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Changelog</title>
</head>
<body>
<h1>Agent-JS Changelog</h1>
<section>
<h2>Version x.x.x</h2>
<ul>
<li>chore: limit npm version to 9 in ci for compatibility with node 16</li>
<li>
Adds more helpful error message for when principal is undefined during actor creation
</li>
</ul>
<h2>Version 0.19.2</h2>
<ul>
<li>
fix: subdomains on icp0.io and ic0.app were incorrectly sending requests to icp-api and
encountering CSP issues
</li>
</ul>
<h2>Version 0.19.1</h2>
<ul>
<li>fix: default host logic fixed and tests added</li>
</ul>
<h2>Version 0.19.0</h2>
<ul>
<li>
feat: replaces the `js-sha256` library with `@noble/hashes` due to a breaking bug in
Chrome
</li>
<li>Fix: add `@dfinity/principal` as a peerDependency to `assets` and `candid`.</li>
<li>
Feat: HttpAgent now uses a default address of https://icp-api.io. Users will be warned for
not setting a host, but the code will default to mainnet.
</li>
<li>
Feat: use webcrypto or node crypto instead of Math.random for nonce generation if
available
</li>
</ul>
<h2>Version 0.18.1</h2>
<ul>
<li>fix: fix composite query in actor.ts</li>
<li>
fix: handle new update call errors (<a
href="https://github.com/dfinity/interface-spec/pull/143"
>IC-1462</a
>)
</li>
<li>
chore: updates engines in package.json and recommended node version for development in
nvmrc to support node 18+
</li>
<li>chore: corrections to publishing docs</li>
<li>
fix: typo in JsonnableWebAuthnIdentitiy, breaking change that requires users to update
their imports to JsonnableWebAuthnIdentity when this type is used
</li>
<li>
fix: fix a bug in decoding service types, when function types come after the service type
in the type table
</li>
<li>feat: support composite_query in candid</li>
<li>
fix: fix a bug in decoding service types, when function types come after the service type
in the type table
</li>
<li>feat: include boundary node http details to query and update calls</li>
<li>feat: adds method for actor creation that includes boundary node http details</li>
</ul>
<h2>Version 0.15.7</h2>
<ul>
<li>
Do not use `Headers` struct during init of HttpAgent for Node compatibility. Note: still
supports use of Headers in application code
</li>
<li></li>
<li>
fix: finish all tasks before calling onSuccess auth callback in @dfinity/auth-client
</li>
</ul>
<h2>Version 0.15.6</h2>
<ul>
<li>feat: retry failed `read_state` requests</li>
</ul>
<h2>Version 0.15.5</h2>
<ul>
<li>
add support for WebAuthn level 3
<a href="https://w3c.github.io/webauthn/#dom-publickeycredential-authenticatorattachment"
>authenticatorAttachment</a
>
</li>
</ul>
<h2>Version 0.15.4</h2>
<ul>
<li>removes more circular dependencies in agent, actor, proxy, and pollingstrategy</li>
<li>chore: updates distro for lint and prettier checks</li>
<li>removes more circular dependencies in agent, actor, proxy, and pollingstrategy</li>
<li>
feat: adds keyType option for AuthClient, allowing users to specify whether to use an
ed25519 or ECDSAKey. This is important for custom storage providers that can't store
CryptoKey objects
</li>
<li>chore: removes a circular dependency on index for canisterStatus</li>
<li>chore: documents usage of fetch and fetchOptions for HttpAgent</li>
</ul>
<h2>Version 0.15.3</h2>
<ul>
<li>reverts the X-IC-Request-ID header until we coordinate cors support with icx-proxy</li>
</ul>
<h2>Version 0.15.2</h2>
<ul>
<li>
Corrects some dev dependencies incorrectly listed as dependencies in auth-client
package.json
</li>
<li>
introduces X-IC-Request-ID header to more easily identify retried requests. Also uses a
standard Headers constructor to manage headers
</li>
<ul>
Changes default stored key for auth-client to use ECDSAKey
<li>Also updates the storage interface types to support CryptoKeyPair</li>
</ul>
<li>updates link to identity-secp256k1 in docs site</li>
</ul>
<h2>Version 0.15.1</h2>
<ul>
<li>fixes a package configuration issue with @dfinity/identity-secp256k1</li>
</ul>
<h2>Version 0.15.0</h2>
<ul>
<li>
<em>Breaking change:</em> Moves Secp256k1KeyIdentity to its own package.
<pre>@dfinity/identity-secp256k1</pre>
</li>
<li>
<em>Breaking change:</em> Deprecates
<pre>@dfinity/authentication</pre>
. If you relied on the
<pre>isDelegationValid</pre>
check, it has been moved to
<pre>@dfinity/identity</pre>
</li>
<li>
Deprecates
<pre>@dfinity/identity-ledgerhq</pre>
. Use
<pre>@zondax/ledger-icp</pre>
instead.
</li>
<li>chore: links assets docs in index</li>
<li>chore: sets up new size-limit job for packages, in preparation for CI</li>
</ul>
<h2>Version 0.14.1</h2>
<ul>
<li>
feat: secp256k1 now supports a `fromSeedPhrase` method that will reproduce the same
identity across agent-js, dfx, and quill
</li>
<li>chore: configures unpkg to use esmodules</li>
<li>chore: removes unused lint shell script</li>
<li>chore: adds js-sha256 dependency to principal</li>
<li>
bug: fixes idlemanager initializing - now either requires createOptions.identity or
authClient.login to be called before starting idle timeout
</li>
</ul>
<h2>Version 0.14.0</h2>
<ul>
<li>
Adds retry logic to HttpAgent. By default, retries three times before throwing an error,
to offer a more cohesive workflow
</li>
<li>Improves and truncates error messages in Candid</li>
<li>fixes flaky tests for syncTime</li>
<li>
Adds a top-level <code>fetchCandid()</code> function which retrieves the Candid interface
for a given canister id.
</li>
<li>chore: auth-client expose storage constant keys</li>
<li>
bug: auth-client resolves window.open issue in login function in safari due to async
storage call
</li>
<li>
New package: @dfinity/assets. This package provides an asset manager to manage assets on
an assets canister.
</li>
<li>bug: auth-client storage wrapper returns after resolve to avoid idb to be recreated</li>
</ul>
<h2>Version 0.13.3</h2>
<ul>
<li>
New package: @dfinity/bls-verify. This package provides a pure-js implementation of BLS
verification using the miracl-core package. This can be used to polyfill BLS verification
for agent-js, but it is notably very slow (~3s per verification). Optimization may be
possible with a significant refactoring
</li>
<li>adds ability to polyfill bls verification in Certificate</li>
<li>
Auth Client moves key fallback generation to the create method instead of login and makes
the _key non-nullable. This fixes a regression with async window.open behavior in Safari
</li>
<li>
HttpAgent now offers a method to sync time with the replica, provided a specific canister.
This can be used to set proper Expiry times when a device has fallen out of sync with the
replica.
</li>
<li>
Fixes a candid bug where when decoding, optional fields could be skipped if the data on
the wire contains additional fields.
</li>
</ul>
<h2>Version 0.13.2</h2>
<ul>
<li>auth-client avoids localstorage global and can be used in a web worker or nodejs</li>
<li>bug: auth-client logout now awaits clearing storage</li>
</ul>
<h2>Version 0.13.1</h2>
<ul>
<li>fixes a bug with the localstorage migration strategy</li>
</ul>
<h2>Version 0.13.0</h2>
<ul>
<li>
AuthClient now uses IndexedDb by default. To use localStorage, import LocalStorage
provider and pass it during AuthClient.create().
</li>
<ul>
<li>Also offers a generic Indexed Db keyval store, IdbKeyVal</li>
</ul>
<li>AuthClient migrates gracefully from localstorage to IDB when upgrading</li>
</ul>
<h2>Version 0.12.2</h2>
<ul>
<li>
Support for the SubtleCrypto interface in @dfinity/identity using the new ECDSAKeyIdentity
</li>
<li>CanisterStatus no longer suppresses rootKey errors</li>
<li>Readme's point to https://agent-js.icp.xyz</li>
</ul>
<h2>Version 0.12.1</h2>
<ul>
<li>Adds inline sourcemaps to packages</li>
<li>
Pulls lint out to a separate job now that Node 12 is failing with latest eslint
dependencies
</li>
<li>Adds UTF-8 as an encoding option for CanisterStatus custom paths</li>
<li>
Adds a public method "createReadStateRequest" that creates the request for "readState".
</li>
<li>
Add an extra parameter to "readState" to pass a created request. If this parameter is
passed, the method does the request directly without creating a new one.
</li>
<li>
Use the "createReadStateRequest" and the extra parameter when polling for the response to
avoid signing requests during polling.
</li>
<li>
Adds derivationOrigin to auth-client login to support the ability to login using the
identity derived from a different origin. See
<a
href="https://github.com/dfinity/internet-identity/pull/724/files#diff-44c106928503ccfb1b3f09f02513578552f66b68dea01c5ec4bd2de858bbba1a"
>proposed changes</a
>
</li>
</ul>
<h2>Version 0.12.0</h2>
<ul>
<li>
Changed the certificate verification interface and fixed its logic. The public constructor
is now static and asynchronous. There is no separate verification method, the check is
done automatically in the constructor and newly also checks that the delegation is
authoritative for the given canister ID, as required by the Internet Computer interface
specification.
</li>
</ul>
<h2>Version 0.11.2</h2>
<ul>
<li>
Adds a default callback to the IdleManager that will refresh the page after clearing the
storage
</li>
<li>
Adds a new utility method,
<pre>canisterStatus</pre>
, to @agent/js. Canister status now allows you to query paths from the canister
certificate with a simple interface, using the API from the<a
href="https://internetcomputer.org/docs/current/references/ic-interface-spec#state-tree-canister-information"
>interface specification</a
><br />
Comes with nicely configured options for
<pre>time</pre>
,
<pre>controllers</pre>
,
<pre>subnet</pre>
,
<pre>module_hash</pre>
, and
<pre>candid</pre>
. Additionally, has a utility for reading custom MetaData set using
<a href="https://github.com/dfinity/ic-wasm">ic-wasm</a>, as well as generic custom paths
in the format of ArrayBuffers.
</li>
<li>updates to package.json files for metadata in npm</li>
</ul>
<h2>Version 0.11.1</h2>
<ul>
<li>Fix for a corner case that could lead to incorrect decoding of record types.</li>
</ul>
<h2>Version 0.11.0</h2>
<ul>
<li>
makeNonce now returns unique values. Previously only the first byte of the nonce was
populated.
</li>
<li>
Introduces IdleManager to the auth-client. You can now use it to detect when the user has
been idle for a configurable amount of time, and then to register callbacks for the sake
of logging the user out and prompting re-authentication. See the @dfinity/auth-client
Readme for more details
</li>
<li>Reduces the maxTimeToLive default setting from 24 hours to 8</li>
<li>
Versioning tool now sets patch version to 0 for minor version updates, or patch and minor
versions to 0 for major version updates
</li>
<li>Removes jest-expect-message, which was making test error messages less useful</li>
<li>
<p>
HttpAgent now generates a nonce to ensure that calls are unique by default. If you want
to opt out or provide your own nonce logic, you can now pass an option of
<code>disableNonce: true</code>during the agent initialization.
</p>
<p>
If you are currently using
<code>agent.addTransform(makeNonceTransform())</code>
, please note that you should remove that logic, or add the <code>disableNonce</code>
option to your agent when upgrading.
</p>
</li>
</ul>
<h2>Version 0.10.3</h2>
<ul>
<li>
Candid now allows optional records to be omitted. See
https://github.com/dfinity/agent-js/issues/524
</li>
<li>
In auth-client, login onSuccess callback and onError callback now supports async pattern.
</li>
<li>
Updates npm dependencies to resolve warnings for typedoc and node-fetch. No runtime
dependencies were affected.
</li>
</ul>
<h2>Version 0.10.2</h2>
<ul>
<li>
Security enhancement - adds a rewrite for urls to subdomains of
<pre>*.ic0.app/api</pre>
to
<pre>ic0.app/api</pre>
</li>
<li>Improves error messages for when HttpAgent cannot infer fetch implementation</li>
</ul>
<h2>Version 0.10.1</h2>
<ul>
<li>
Fix for the auth-client identity option and added JSDOC comment for the timeToLive option
</li>
<li>
Sets the default Internet Identity expiration to 1 day for the authClient, up from 15
minutes
</li>
<li>
No longer checks instanceof Principal in @dfinity/agent, which should allow non-identical
versions of packages to interoperate, as long as they share the same API
</li>
</ul>
<h2>Version 0.10.0</h2>
<ul>
<li>Adds changelog for agent-js packages</li>
<li>
Buffer and Pipe refactor
<ul>
<li>
In previous versions of dfinity packages, we relied on Buffer, a polyfilled version of
the Node.js Buffer utility. In a significant refactor, we have removed all cases of
this, along with Pipe and the nonstandard Blob packages, in favor of ArrayBuffer,
Uint8Array, and DataView
</li>
<li>Utility methods such as <code>blobToUint8Array</code> have been removed.</li>
<li>
Interfaces that relied on Buffer and related packages have been updated to accept
ArrayBuffer, and the type interfaces are updated to reflect this
</li>
</ul>
</li>
<li>
Secp256k1 Support
<ul>
<li>
Adds two new exports to @dfinity/identity - Secp256k1KeyIdentity and
Secp256k1PublicKey
</li>
<li>
API mirrors the ed25519 components, and relies on the
<a href="https://www.npmjs.com/package/secp256k1">secp256k1</a> npm package for
signing and verification.
</li>
</ul>
</li>
</ul>
</section>
</body>
</html>