From 3c62c8a3a2d0bd69f218fb250f18420e168e461c Mon Sep 17 00:00:00 2001 From: Kay Date: Thu, 26 Dec 2024 22:39:36 +0000 Subject: [PATCH 1/4] add event pow delegation kind 5090. --- kinds/5970.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 kinds/5970.md diff --git a/kinds/5970.md b/kinds/5970.md new file mode 100644 index 0000000..975d3dc --- /dev/null +++ b/kinds/5970.md @@ -0,0 +1,49 @@ +--- +layout: default +title: Event PoW Delegation +description: Delegate PoW of an event to a provider. +--- + +# Input + +Event(s) that need Pow. + +```js +[ "i", "", "text" ] +``` + +# Params + +* `pow` - number of requested leading zeros. + +# Output + +Mined event json with nonce and calculated id. + +# Example + +## Request + +```json +{ + "kind": 5970, + "tags": + [ + [ "i", "{\n \"kind\": 1,\n \"content\": \"do work!\",\n \"created_at\": 1735252123,\n \"tags\": []\n}", "text"], + ["param","pow","21"], + ] +} +``` + +## Response + +```json +{ + "kind": 5970, + "content": "" +} +``` + +# Security + +A costumer may encrypt their event with providers public key in case they are using it for gift-wrapped or seals. and expect the provider to return the result encrypted as well. From 658c3469e5b9b6b40656b660d05f571a9903083b Mon Sep 17 00:00:00 2001 From: Kay Date: Thu, 26 Dec 2024 22:43:30 +0000 Subject: [PATCH 2/4] add event pow delegation kind 5090. --- ranges/59xx.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ranges/59xx.md b/ranges/59xx.md index 9671a26..055a1b7 100644 --- a/ranges/59xx.md +++ b/ranges/59xx.md @@ -30,4 +30,8 @@ grid_navigation: excerpt: "Schedule nostr events for future publishing. Kind 5905" cta: View url: '/kinds/5905' + - title: Event PoW Delegation + excerpt: "Delegate PoW of an event to a provider.. Kind 5970" + cta: View + url: '/kinds/5970' --- From 525a19169c5d353f6cfa76ab057af48e61e2564d Mon Sep 17 00:00:00 2001 From: Kay Date: Thu, 26 Dec 2024 23:14:05 +0000 Subject: [PATCH 3/4] fix response kind. --- kinds/5970.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinds/5970.md b/kinds/5970.md index 975d3dc..b6b866c 100644 --- a/kinds/5970.md +++ b/kinds/5970.md @@ -39,7 +39,7 @@ Mined event json with nonce and calculated id. ```json { - "kind": 5970, + "kind": 6970, "content": "" } ``` From cbf5d08042deab0295b0cd55a4705ff065a70f96 Mon Sep 17 00:00:00 2001 From: Kay Date: Thu, 26 Dec 2024 23:20:36 +0000 Subject: [PATCH 4/4] fix security.. --- kinds/5970.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinds/5970.md b/kinds/5970.md index b6b866c..1db2a86 100644 --- a/kinds/5970.md +++ b/kinds/5970.md @@ -46,4 +46,4 @@ Mined event json with nonce and calculated id. # Security -A costumer may encrypt their event with providers public key in case they are using it for gift-wrapped or seals. and expect the provider to return the result encrypted as well. +A costumer may encrypt their event with providers public key and expect the content to be encrypted as well as per NIP-90.