Skip to content

feat: Implement NIP-89 for DVM to Advertise ZK Proof Generation Services #11

@AbdelStark

Description

@AbdelStark

Description

We need to implement NIP-89 (Recommended Application Handlers) for our Data Vending Machine (DVM) to advertise its Zero-Knowledge (ZK) proof generation services over the Nostr network. This will allow Nostr clients to discover our DVM as a handler for specific event kinds related to ZK proof generation.

Objectives

  1. Implement the creation and publishing of kind:31990 events to describe our DVM's capabilities.
  2. Create a system for updating and managing these events as our DVM's capabilities change.
  3. Implement handling of incoming requests based on our NIP-89 advertisements.
  4. Integrate this functionality with our existing DVM infrastructure.

Implementation Details

1. Create Handler Information Events (kind:31990)

  • Implement a function to generate kind:31990 events for our DVM.
  • Define the specific event kinds our DVM supports for ZK proof generation and verification.
  • Create separate kind:31990 events for different types of ZK proofs if necessary.

2. Event Management System

  • Develop a system to manage our kind:31990 events:
    • Store current advertisements
    • Update advertisements when our capabilities change
    • Periodically republish to ensure visibility

3. Integration with Existing DVM Infrastructure

  • Connect the NIP-89 handling system with our existing DVM proof generation and verification systems.
  • Ensure that our DVM can scale to handle potential increased load from Nostr-based discovery.

4. Testing

  • Develop unit tests for kind:31990 event creation and parsing.
  • Create integration tests to ensure proper handling of incoming requests.
  • Perform end-to-end tests simulating discovery and usage of our DVM through Nostr.

6. Documentation

  • Update our API documentation to include information about our NIP-89 implementation.
  • Create user guides explaining how to discover and use our DVM through Nostr.

Tasks

  1. Implement kind:31990 event creation function
  2. Define supported event kinds for ZK proof operations
  3. Develop event management system
  4. Integrate NIP-89 system with existing DVM infrastructure
  5. Write unit tests for event creation and parsing
  6. Create integration tests for request handling
  7. Perform end-to-end tests
  8. Update API documentation
  9. Create user guides for Nostr-based discovery and usage

Considerations

  • Security: Ensure that exposing our DVM through Nostr doesn't introduce new vulnerabilities.
  • Privacy: Consider the implications of advertising our services on the Nostr network.
  • Scalability: Prepare for potential increased usage resulting from easier discovery.
  • Interoperability: Ensure our implementation works with a variety of Nostr clients.

Success Criteria

  • Our DVM successfully publishes kind:31990 events advertising its ZK proof services.
  • Nostr clients can discover our DVM and its capabilities through NIP-89.
  • Users can successfully request ZK proof generation and verification through the advertised services.
  • The system handles updates to our capabilities gracefully.
  • Performance remains stable under increased load from Nostr-based discovery.

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions