We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nostr-zapper
sell::verify_zap
the mine JSON-RPC method allows a buyer to submit:
mine
$ curl -s -X POST \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "mine", "params": { "event": { "pubkey": "98590c0f4959a49f3524b7c009c190798935eeaa50b1232ba74195b419eaa2f2", "created_at": 1668680774, "kind": 1, "tags": [], "content": "hello world" }, "difficulty": 15, "zap": "f481897ee877321783bb76133622b3cc344d691bb79cd6be88f44e819c3b2306" }, "id": 1 }' \ http://localhost:1337
it is assumed that the buyer has previously called the quote JSON-RPC method, so they know how many sats they should send in the zap.
quote
but maybe they send an invalid zap, or the zap does not have enough sats.
so the JSON-RPC handler needs to validate the zap before it starts mining:
notemine_hw/src/lib/service.rs
Lines 101 to 111 in ade25cb
currently, verify_zap has a dummy placeholder implementation:
verify_zap
notemine_hw/src/lib/sell.rs
Lines 7 to 25 in 7591774
this implementation should leverage nostr-zapper crate to actually verify if:
zap
pow_price
only if those two verifications are succesful, should we start mining
The text was updated successfully, but these errors were encountered:
https://nostr.how/en/zaps
Sorry, something went wrong.
No branches or pull requests
the
mine
JSON-RPC method allows a buyer to submit:it is assumed that the buyer has previously called the
quote
JSON-RPC method, so they know how many sats they should send in the zap.but maybe they send an invalid zap, or the zap does not have enough sats.
so the JSON-RPC handler needs to validate the zap before it starts mining:
notemine_hw/src/lib/service.rs
Lines 101 to 111 in ade25cb
currently,
verify_zap
has a dummy placeholder implementation:notemine_hw/src/lib/sell.rs
Lines 7 to 25 in 7591774
this implementation should leverage
nostr-zapper
crate to actually verify if:zap
is validzap
contains more sats thanpow_price
only if those two verifications are succesful, should we start mining
The text was updated successfully, but these errors were encountered: