moving keys
All checks were successful
Release to Production / build_and_release (push) Successful in 23s

This commit is contained in:
zver 2024-07-02 09:00:55 +01:00
parent e2dfc37a5e
commit 75460255a8

View File

@ -32,7 +32,6 @@ The Creator prepares an Agreement by creating and signing (but NOT publishing) a
* `viewers` (array) - list of npubs which can view the Agreement * `viewers` (array) - list of npubs which can view the Agreement
* `filehashes` (array) - series of objects containing the file name and file hash * `filehashes` (array) - series of objects containing the file name and file hash
* `zipUrl` (string) - the location of the encrypted zip file (blossom server) * `zipUrl` (string) - the location of the encrypted zip file (blossom server)
* `keys` (object) - for each counterparty, a NIP-44 encrypted string containing the decryption key for the zip file
* `markConfig` (object) - the template by which counterparties will make [Annotations](/#annotations) in any PDFs * `markConfig` (object) - the template by which counterparties will make [Annotations](/#annotations) in any PDFs
This object is formed as follows: This object is formed as follows:
@ -46,16 +45,16 @@ This object is formed as follows:
"hash":"8c4f41e76be536a4d6cc180cf1a6014fa0bacbb6cc5e7a1e12dde41f8f5158a8" "hash":"8c4f41e76be536a4d6cc180cf1a6014fa0bacbb6cc5e7a1e12dde41f8f5158a8"
}], }],
"title": "our amazing agreement", "title": "our amazing agreement",
"zipUrl":"https://blossom.one/asdfafafaer23wsdf343fff4343fs", "zipUrl":"https://blossom.one/asdfafafaer23wsdf343fff4343fs"
"keys": ["npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"]
} }
``` ```
Once the creator has signed, the `meta.json` file will appear as follows: Once the creator has signed, the `meta.json` file will contain the `createObject` (above) and a `keys` object that contains the decryption key for the zip file, NIP-44 encrypted to each counterparty.
```json ```json
{ {
"createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}", "createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}",
"keys": {"npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"},
"docSignatures": { "docSignatures": {
} }
} }
@ -81,6 +80,7 @@ After signing, the `meta.json` can now be updated, eg as follows:
```json ```json
{ {
"createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}", "createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}",
"keys": {"npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"},
"docSignatures": { "docSignatures": {
"npub1d0csynrrxcynkcedktdzrdj6gnras2psg48mf46kxjazs8skrjgq9uzhlq": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"a76fdd0..", "npub1d0csynrrxcynkcedktdzrdj6gnras2psg48mf46kxjazs8skrjgq9uzhlq": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"a76fdd0..",
"npub1nqulzcxcj0d2uesusstgupl5du8pa96xl6uy8xndweeckjkn964qjs23sn": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"585c134.." "npub1nqulzcxcj0d2uesusstgupl5du8pa96xl6uy8xndweeckjkn964qjs23sn": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"585c134.."