-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from kehiy/5970
add event pow delegation kind 5970.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters