···
92
-
it('does not allow key types that we do not support', async () => {
93
-
// an ed25519 key which we don't yet support
92
+
it('does not allow *rotation* key types that we do not yet support', async () => {
93
+
// an ed25519 key, which we don't yet support
94
+
const newRotationKey =
95
+
'did:key:z6MkjwbBXZnFqL8su24wGL2Fdjti6GSLv9SWdYGswfazUPm9'
97
+
const promise = client.updateRotationKeys(did, rotationKey1, [
101
+
await expect(promise).rejects.toThrow(PlcClientError)
104
+
it('allows *service* key types that we do not explicitly support', async () => {
105
+
// an ed25519 key, which we don't explicitly support
'did:key:z6MkjwbBXZnFqL8su24wGL2Fdjti6GSLv9SWdYGswfazUPm9'
97
-
const promise = client.updateAtprotoKey(did, rotationKey1, newSigningKey)
109
+
await client.updateAtprotoKey(did, rotationKey1, newSigningKey)
112
+
it('does not allow syntactically invalid service keys', async () => {
113
+
const promise = client.updateAtprotoKey(
116
+
'did:banana', // a malformed did:key
await expect(promise).rejects.toThrow(PlcClientError)
100
-
const promise2 = client.updateRotationKeys(did, rotationKey1, [
119
+
const promise2 = client.updateAtprotoKey(
122
+
'blah', // an even more malformed did:key
await expect(promise2).rejects.toThrow(PlcClientError)