mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 06:18:19 +01:00
refactor: 🚚 Add algorithm, rename fields in public keys
This commit is contained in:
parent
f62c2b3a19
commit
290b6f96e9
|
|
@ -31,4 +31,6 @@ This page lists changes since Working Draft 03. {{ className: 'lead' }}
|
|||
- Renamed `Undo` to [Delete](/entities/delete).
|
||||
- Added [Unfollow](/entities/unfollow) entity.
|
||||
- Completely rework `ServerMetadata`, and rename to [InstanceMetadata](/entities/instance-metadata).
|
||||
- Remove Server Actors, and move instance public keys to [InstanceMetadata](/entities/instance-metadata).
|
||||
- Remove Server Actors, and move instance public keys to [InstanceMetadata](/entities/instance-metadata).
|
||||
- Add `algorithm` to [Users](/entities/user) and [InstanceMetadata](/entities/instance-metadata)'s public keys for future use (only `ed25519` is allowed for now).
|
||||
- Renamed the second `public_key` to `key`.
|
||||
|
|
@ -70,11 +70,13 @@ On all entities that have an `author` field, the `author` can be `null` to repre
|
|||
|
||||
```typescript
|
||||
type PublicKey = {
|
||||
public_key: string;
|
||||
algorithm: string;
|
||||
key: string;
|
||||
}
|
||||
```
|
||||
|
||||
- `public_key`: Public key of the instance. Must follow the [Versia Public Key](/signatures) format.
|
||||
|
||||
- `algorithm`: Algorithm used for the public key. Can only be `ed25519` for now.
|
||||
- `key`: Public key of the instance. Must follow the [Versia Public Key](/signatures) format.
|
||||
</Property>
|
||||
<Property name="moderators" type="URI" required={false}>
|
||||
URI to [Collection](/structures/collection) of instance moderators.
|
||||
|
|
@ -134,7 +136,8 @@ On all entities that have an `author` field, the `author` can be `null` to repre
|
|||
}
|
||||
},
|
||||
"public_key": {
|
||||
"public_key": "MCowBQYDK2VwAyEA9zhEMtQZetRl4QrLcz99i7jOa6ZVjX7aLfRUsMuKByI="
|
||||
"algorithm": "ed25519",
|
||||
"key": "MCowBQYDK2VwAyEA9zhEMtQZetRl4QrLcz99i7jOa6ZVjX7aLfRUsMuKByI="
|
||||
},
|
||||
"banner": null,
|
||||
"extensions": {
|
||||
|
|
|
|||
|
|
@ -73,12 +73,15 @@ Instance **must** be the host of the instance the user is on (hostname with opti
|
|||
<Property name="public_key" type="PublicKey" required={true}>
|
||||
The user's public key. Must follow the [Versia Public Key](/signatures) format. `actor` may be a URI to another user's profile, in which case this key may allow the user to act on behalf of the other user (see [delegation](/delegation)).
|
||||
|
||||
`algorithm` must be `ed25519` for now.
|
||||
|
||||
```typescript
|
||||
type URI = string;
|
||||
|
||||
type PublicKey = {
|
||||
actor: URI;
|
||||
public_key: string;
|
||||
algorithm: string;
|
||||
key: string;
|
||||
}
|
||||
```
|
||||
</Property>
|
||||
|
|
@ -181,7 +184,8 @@ Instance **must** be the host of the instance the user is on (hostname with opti
|
|||
"manually_approves_followers": false,
|
||||
"public_key": {
|
||||
"actor": "https://versia.social/users/018ec082-0ae1-761c-b2c5-22275a611771",
|
||||
"public_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
"algorithm": "ed25519",
|
||||
"key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||
},
|
||||
"username": "aprl"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue