NIP-79 ====== Digital Contracts ----------------- `draft` `optional` `author:vpirato` `collaborator:vitorpamplona` `collaborator:brandenespinoza` ### Abstract This NIP proposes a new event type, `kind:900`, to represent digital contracts, covenants, and agreements within the Nostr protocol. These classifications are conceptual and aim to categorize the content of the contract. These can be signed, verified, and referenced by other events in the protocol. ### Motivation As digital transactions, promises, and agreements become more prevalent, it's essential to have a standardized representation of contracts, covenants, and agreements in Nostr. This NIP aims to provide a structure and guidelines for creating, signing, and managing these within Nostr. ### Specification 1. **Types**: Following [NIP-32](32.md) for label structure: - **Contract**: A legally binding agreement between two or more parties. - **Covenant**: A written promise or restriction within a contract or agreement. - **Agreement**: A mutual understanding between parties regarding their relative rights and responsibilities. 2. **Format**: Following [NIP-23](23.md) (Long-form Content), the content should be in Markdown format to structure and present the content in a human-readable manner. 3. **Metadata**: Specific application metadata fields can be added to the event, such as: - `title`: Title of the contract, covenant, or agreement. - `parties`: Parties involved. - `signed_date`: Date it was signed. - `expiry_date`: Expiration date, if applicable. - `type`: Whether it's a Contract, Covenant, or Agreement. 4. **Timestamping with OpenTimestamps**: Following [NIP-03](03.md) (OpenTimestamps Attestations for Events), once signed, OpenTimestamps can be used to create a cryptographic proof of existence at a specific moment. This proof is stored on the Bitcoin blockchain, providing immutable evidence of the date and time of signing. For those unfamiliar with OpenTimestamps, it's a system for creating provable timestamps recorded on the Bitcoin blockchain. 5. **References and Linking**: Can reference other events in Nostr, such as annexes, terms and conditions, or any other relevant document. 6. **New `kind` Definitions**: - `kind:900` for Contract Invitation - `kind:901` for Signature - `kind:902` for Signing Witness - `kind:903` for Contract Execution ### Contract Signing Invitation ```json { "kind": 900, "created_at": [Creation Timestamp], "content": "[Content in Markdown]", "tags": [ ["title", ""], ["summary", ""], // Optional: Short Description for preview ["valid_from", "Timestamp"], // Optional: Start date of the contract ["valid_to", "Timestamp"], // Optional: End date of the contract ["L", "nostr_contracts"], ["l", "Contract", "nostr_contracts"], // One could use "Covenant", "Agreement", or another type according to your specifications. ["p", "party", ""], ["p", "party", ""], ["p", "party", ""], ["expiration", "