+5
.changeset/nine-doodles-pull.md
+5
.changeset/nine-doodles-pull.md
+15
packages/identity/did-plc/lib/typedefs.ts
+15
packages/identity/did-plc/lib/typedefs.ts
···
92
92
return v.ok(input);
93
93
}),
94
94
verificationMethods: v.record(permissiveDidKeyString).chain((input) => {
95
+
const length = Object.keys(input).length;
96
+
97
+
if (length > 10) {
98
+
return v.err(`too many verification method entries (max 10)`);
99
+
}
100
+
95
101
for (const id in input) {
102
+
const key = input[id];
103
+
96
104
if (id.length > 32) {
97
105
return v.err({
98
106
message: `verification method id too long (max 32 characters)`,
107
+
path: [id],
108
+
});
109
+
}
110
+
111
+
if (key.length > 256) {
112
+
return v.err({
113
+
message: `verification method key too long (max 256 characters)`,
99
114
path: [id],
100
115
});
101
116
}