feat: Update contract types with NIP-32 label structure

- Added NIP-32 instruction for label structure in the "Types" section.
- Updated the definitions for Contract, Covenant, and Agreement.
This commit is contained in:
Sergio Ovalle 2023-09-03 11:08:15 -06:00
parent 03ee3a3334
commit ae2708a4f5

27
79.md
View File

@ -4,7 +4,7 @@ NIP-79
Digital Contracts Digital Contracts
----------------- -----------------
`draft` `optional` `author:vpirato` `author:vitorpamplona` `draft` `optional` `author:vpirato` `collaborator:vitorpamplona` `collaborator:brandenespinoza`
### Abstract ### Abstract
@ -16,14 +16,14 @@ As digital transactions, promises, and agreements become more prevalent, it's es
### Specification ### Specification
1. **Types**: 1. **Types**(Following NIP-32 for label structure):
- **Contract**: A legally binding agreement between two or more parties. - **Contract**: A legally binding agreement between two or more parties.
- **Covenant**: A written promise or restriction within a contract or agreement. - **Covenant**: A written promise or restriction within a contract or agreement.
- **Agreement**: A mutual understanding between parties regarding their relative rights and responsibilities. - **Agreement**: A mutual understanding between parties regarding their relative rights and responsibilities.
2. **Format**: Following NIP-23 (Long-form Content), the content should be in Markdown format to structure and present the content in a human-readable manner. 2. **Format**: Following NIP-23 (Long-form Content), the content should be in Markdown format to structure and present the content in a human-readable manner.
3. **Metadata**: Using NIP-78 (Application-specific data), specific application metadata fields can be added to the event, such as: 3. **Metadata**: Specific application metadata fields can be added to the event, such as:
- `title`: Title of the contract, covenant, or agreement. - `title`: Title of the contract, covenant, or agreement.
- `parties`: Parties involved. - `parties`: Parties involved.
- `signed_date`: Date it was signed. - `signed_date`: Date it was signed.
@ -52,10 +52,11 @@ As digital transactions, promises, and agreements become more prevalent, it's es
["summary", "<Short Description>"], // Optional: Short Description for preview ["summary", "<Short Description>"], // Optional: Short Description for preview
["valid_from", "Timestamp"], // Optional: Start date of the contract ["valid_from", "Timestamp"], // Optional: Start date of the contract
["valid_to", "Timestamp"], // Optional: End date of the contract ["valid_to", "Timestamp"], // Optional: End date of the contract
["type", "Contract"], ["L", "nostr_contracts"],
["party_pubkey", "<party's 1 pubkey>"], ["l", "Contract", "nostr_contracts"], // One could use "Covenant", "Agreement", or another type according to your specifications.
["party_pubkey", "<party's 2 pubkey>"], ["p", "party", "<party's 1 pubkey>"],
["party_pubkey", "<party's 3 pubkey>"], ["p", "party", "<party's 2 pubkey>"],
["p", "party", "<party's 3 pubkey>"],
["expiration", "<Time stamp limit to sign>"], ["expiration", "<Time stamp limit to sign>"],
], ],
"pubkey": "[Signer's Public Key]", "pubkey": "[Signer's Public Key]",
@ -113,12 +114,12 @@ The contract execution represents the finalization and activation of the contrac
["valid_from", "Timestamp"], // Optional: Start date of the contract ["valid_from", "Timestamp"], // Optional: Start date of the contract
["valid_to", "Timestamp"], // Optional: End date of the contract ["valid_to", "Timestamp"], // Optional: End date of the contract
["e", "<Contract's (kind:900) Event ID>" ], // Base text. ["e", "<Contract's (kind:900) Event ID>" ], // Base text.
["party_pubkey", "<party's 1 pubkey>", "Stringified JSON of the signed kind:901"], ["p", "party", "<party's 1 pubkey>", "Stringified JSON of the signed kind:901"],
["party_pubkey", "<party's 2 pubkey>", "Stringified JSON of the signed kind:901"], ["p", "party", "<party's 2 pubkey>", "Stringified JSON of the signed kind:901"],
["party_pubkey", "<party's 3 pubkey>", "Stringified JSON of the signed kind:901"], ["p", "party", "<party's 3 pubkey>", "Stringified JSON of the signed kind:901"],
["witness_pubkey", "<party's 4 pubkey>", "Stringified JSON of the signed kind:902"], ["p", "witness", "<party's 4 pubkey>", "Stringified JSON of the signed kind:902"],
["witness_pubkey", "<party's 5 pubkey>", "Stringified JSON of the signed kind:902"], ["p", "witness", "<party's 5 pubkey>", "Stringified JSON of the signed kind:902"],
["witness_pubkey", "<party's 6 pubkey>", "Stringified JSON of the signed kind:902"] ["p", "witness", "<party's 6 pubkey>", "Stringified JSON of the signed kind:902"]
], ],
"pubkey": "[Signer's Public Key]", "pubkey": "[Signer's Public Key]",
"id": "[Event ID]", "id": "[Event ID]",