@aztec/node-keystore 2.0.0-nightly.20250902 → 3.0.0-canary.a9708bd

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/schemas.js CHANGED
@@ -13,8 +13,8 @@ const remoteSignerConfigSchema = z.union([
13
13
  urlSchema,
14
14
  z.object({
15
15
  remoteSignerUrl: urlSchema,
16
- certPath: z.string().optional(),
17
- certPass: z.string().optional()
16
+ certPath: z.string().nullish(),
17
+ certPass: z.string().nullish()
18
18
  })
19
19
  ]);
20
20
  // Remote signer account schema
@@ -22,23 +22,23 @@ const remoteSignerAccountSchema = z.union([
22
22
  ethAddressSchema,
23
23
  z.object({
24
24
  address: ethAddressSchema,
25
- remoteSignerUrl: urlSchema.optional(),
26
- certPath: z.string().optional(),
27
- certPass: z.string().optional()
25
+ remoteSignerUrl: urlSchema.nullish(),
26
+ certPath: z.string().nullish(),
27
+ certPass: z.string().nullish()
28
28
  })
29
29
  ]);
30
30
  // JSON V3 keystore schema
31
31
  const jsonKeyFileV3Schema = z.object({
32
32
  path: z.string(),
33
- password: z.string().optional()
33
+ password: z.string().nullish()
34
34
  });
35
35
  // Mnemonic config schema
36
36
  const mnemonicConfigSchema = z.object({
37
37
  mnemonic: z.string().min(1, 'Mnemonic cannot be empty'),
38
- addressIndex: z.number().int().min(0).optional(),
39
- accountIndex: z.number().int().min(0).optional(),
40
- addressCount: z.number().int().min(1).optional(),
41
- accountCount: z.number().int().min(1).optional()
38
+ addressIndex: z.number().int().min(0).default(0),
39
+ accountIndex: z.number().int().min(0).default(0),
40
+ addressCount: z.number().int().min(1).default(1),
41
+ accountCount: z.number().int().min(1).default(1)
42
42
  });
43
43
  // EthAccount schema
44
44
  const ethAccountSchema = z.union([
@@ -63,18 +63,18 @@ const proverKeyStoreSchema = z.union([
63
63
  // Validator keystore schema
64
64
  const validatorKeyStoreSchema = z.object({
65
65
  attester: ethAccountsSchema,
66
- coinbase: ethAddressSchema.optional(),
67
- publisher: ethAccountsSchema.optional(),
66
+ coinbase: ethAddressSchema.nullish(),
67
+ publisher: ethAccountsSchema.nullish(),
68
68
  feeRecipient: aztecAddressSchema,
69
69
  remoteSigner: remoteSignerConfigSchema.nullish()
70
70
  });
71
71
  // Main keystore schema
72
72
  export const keystoreSchema = z.object({
73
73
  schemaVersion: z.literal(1),
74
- validators: z.array(validatorKeyStoreSchema).optional(),
75
- slasher: ethAccountsSchema.optional(),
74
+ validators: z.array(validatorKeyStoreSchema).nullish(),
75
+ slasher: ethAccountsSchema.nullish(),
76
76
  remoteSigner: remoteSignerConfigSchema.nullish(),
77
- prover: proverKeyStoreSchema.optional()
77
+ prover: proverKeyStoreSchema.nullish()
78
78
  }).refine((data)=>data.validators || data.prover, {
79
79
  message: 'Keystore must have at least validators or prover configuration',
80
80
  path: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/node-keystore",
3
- "version": "2.0.0-nightly.20250902",
3
+ "version": "3.0.0-canary.a9708bd",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -62,9 +62,9 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@aztec/ethereum": "2.0.0-nightly.20250902",
66
- "@aztec/foundation": "2.0.0-nightly.20250902",
67
- "@aztec/stdlib": "2.0.0-nightly.20250902",
65
+ "@aztec/ethereum": "3.0.0-canary.a9708bd",
66
+ "@aztec/foundation": "3.0.0-canary.a9708bd",
67
+ "@aztec/stdlib": "3.0.0-canary.a9708bd",
68
68
  "@ethersproject/wallet": "^5.7.0",
69
69
  "tslib": "^2.4.0",
70
70
  "viem": "2.23.7",
package/src/schemas.ts CHANGED
@@ -19,8 +19,8 @@ const remoteSignerConfigSchema = z.union([
19
19
  urlSchema,
20
20
  z.object({
21
21
  remoteSignerUrl: urlSchema,
22
- certPath: z.string().optional(),
23
- certPass: z.string().optional(),
22
+ certPath: z.string().nullish(),
23
+ certPass: z.string().nullish(),
24
24
  }),
25
25
  ]);
26
26
 
@@ -29,25 +29,25 @@ const remoteSignerAccountSchema = z.union([
29
29
  ethAddressSchema,
30
30
  z.object({
31
31
  address: ethAddressSchema,
32
- remoteSignerUrl: urlSchema.optional(),
33
- certPath: z.string().optional(),
34
- certPass: z.string().optional(),
32
+ remoteSignerUrl: urlSchema.nullish(),
33
+ certPath: z.string().nullish(),
34
+ certPass: z.string().nullish(),
35
35
  }),
36
36
  ]);
37
37
 
38
38
  // JSON V3 keystore schema
39
39
  const jsonKeyFileV3Schema = z.object({
40
40
  path: z.string(),
41
- password: z.string().optional(),
41
+ password: z.string().nullish(),
42
42
  });
43
43
 
44
44
  // Mnemonic config schema
45
45
  const mnemonicConfigSchema = z.object({
46
46
  mnemonic: z.string().min(1, 'Mnemonic cannot be empty'),
47
- addressIndex: z.number().int().min(0).optional(),
48
- accountIndex: z.number().int().min(0).optional(),
49
- addressCount: z.number().int().min(1).optional(),
50
- accountCount: z.number().int().min(1).optional(),
47
+ addressIndex: z.number().int().min(0).default(0),
48
+ accountIndex: z.number().int().min(0).default(0),
49
+ addressCount: z.number().int().min(1).default(1),
50
+ accountCount: z.number().int().min(1).default(1),
51
51
  });
52
52
 
53
53
  // EthAccount schema
@@ -73,8 +73,8 @@ const proverKeyStoreSchema = z.union([
73
73
  // Validator keystore schema
74
74
  const validatorKeyStoreSchema = z.object({
75
75
  attester: ethAccountsSchema,
76
- coinbase: ethAddressSchema.optional(),
77
- publisher: ethAccountsSchema.optional(),
76
+ coinbase: ethAddressSchema.nullish(),
77
+ publisher: ethAccountsSchema.nullish(),
78
78
  feeRecipient: aztecAddressSchema,
79
79
  remoteSigner: remoteSignerConfigSchema.nullish(),
80
80
  });
@@ -83,10 +83,10 @@ const validatorKeyStoreSchema = z.object({
83
83
  export const keystoreSchema = z
84
84
  .object({
85
85
  schemaVersion: z.literal(1),
86
- validators: z.array(validatorKeyStoreSchema).optional(),
87
- slasher: ethAccountsSchema.optional(),
86
+ validators: z.array(validatorKeyStoreSchema).nullish(),
87
+ slasher: ethAccountsSchema.nullish(),
88
88
  remoteSigner: remoteSignerConfigSchema.nullish(),
89
- prover: proverKeyStoreSchema.optional(),
89
+ prover: proverKeyStoreSchema.nullish(),
90
90
  })
91
91
  .refine(data => data.validators || data.prover, {
92
92
  message: 'Keystore must have at least validators or prover configuration',