@aztec/key-store 5.0.0-rc.1 → 5.0.0-rc.2

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/dest/key_store.js CHANGED
@@ -72,7 +72,7 @@ import { KEY_PREFIXES, computeAppSecretKey, deriveKeys, derivePublicKeyFromSecre
72
72
  const allMapKeys = await toArray(this.#keys.keysAsync());
73
73
  // We return account addresses based on the map keys that end with '-ivsk_m'
74
74
  const accounts = allMapKeys.filter((key)=>key.endsWith('-ivsk_m')).map((key)=>key.split('-')[0]);
75
- return accounts.map((account)=>AztecAddress.fromString(account));
75
+ return accounts.map((account)=>AztecAddress.fromStringUnsafe(account));
76
76
  }
77
77
  /** Checks whether an account is registered in the key store. */ async hasAccount(account) {
78
78
  return !!await this.#keys.getAsync(`${account.toString()}-ivsk_m`);
@@ -249,7 +249,7 @@ import { KEY_PREFIXES, computeAppSecretKey, deriveKeys, derivePublicKeyFromSecre
249
249
  if (Buffer.from(val).equals(valueBuffer)) {
250
250
  for (const prefix of KEY_PREFIXES){
251
251
  if (key.includes(`-${prefix}`)) {
252
- const account = AztecAddress.fromString(key.split('-')[0]);
252
+ const account = AztecAddress.fromStringUnsafe(key.split('-')[0]);
253
253
  return [
254
254
  prefix,
255
255
  account
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/key-store",
3
- "version": "5.0.0-rc.1",
3
+ "version": "5.0.0-rc.2",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "typedocOptions": {
@@ -57,10 +57,10 @@
57
57
  ]
58
58
  },
59
59
  "dependencies": {
60
- "@aztec/constants": "5.0.0-rc.1",
61
- "@aztec/foundation": "5.0.0-rc.1",
62
- "@aztec/kv-store": "5.0.0-rc.1",
63
- "@aztec/stdlib": "5.0.0-rc.1",
60
+ "@aztec/constants": "5.0.0-rc.2",
61
+ "@aztec/foundation": "5.0.0-rc.2",
62
+ "@aztec/kv-store": "5.0.0-rc.2",
63
+ "@aztec/stdlib": "5.0.0-rc.2",
64
64
  "tslib": "^2.4.0"
65
65
  },
66
66
  "devDependencies": {
package/src/key_store.ts CHANGED
@@ -109,7 +109,7 @@ export class KeyStore {
109
109
  const allMapKeys = await toArray(this.#keys.keysAsync());
110
110
  // We return account addresses based on the map keys that end with '-ivsk_m'
111
111
  const accounts = allMapKeys.filter(key => key.endsWith('-ivsk_m')).map(key => key.split('-')[0]);
112
- return accounts.map(account => AztecAddress.fromString(account));
112
+ return accounts.map(account => AztecAddress.fromStringUnsafe(account));
113
113
  }
114
114
 
115
115
  /** Checks whether an account is registered in the key store. */
@@ -340,7 +340,7 @@ export class KeyStore {
340
340
  if (Buffer.from(val).equals(valueBuffer)) {
341
341
  for (const prefix of KEY_PREFIXES) {
342
342
  if (key.includes(`-${prefix}`)) {
343
- const account = AztecAddress.fromString(key.split('-')[0]);
343
+ const account = AztecAddress.fromStringUnsafe(key.split('-')[0]);
344
344
  return [prefix, account];
345
345
  }
346
346
  }