Skip to content

Commit

Permalink
Merge pull request #33 from kehiy/5970
Browse files Browse the repository at this point in the history
add event pow delegation kind 5970.
  • Loading branch information
believethehype authored Dec 26, 2024
2 parents f4abc44 + cbf5d08 commit 5e9a5b5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
49 changes: 49 additions & 0 deletions kinds/5970.md
Original file line number Diff line number Diff line change
@@ -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", "<stringified-event-json>", "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": 6970,
"content": "<stringified-event-json-with-pow>"
}
```

# Security

A costumer may encrypt their event with providers public key and expect the content to be encrypted as well as per NIP-90.
4 changes: 4 additions & 0 deletions ranges/59xx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
---

0 comments on commit 5e9a5b5

Please sign in to comment.