mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-12-08 16:18:50 +00:00
replace jsonc syntax highlighting for javascript (#2100)
This commit is contained in:
14
60.md
14
60.md
@@ -22,7 +22,7 @@ This NIP doesn't deal with users' *receiving* money from someone else, it's just
|
||||
3. A user has `kind:7376` events that represent the spending history of the wallet -- This history is for informational purposes only and is completely optional.
|
||||
|
||||
### Wallet Event
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 17375,
|
||||
"content": nip44_encrypt([
|
||||
@@ -45,7 +45,7 @@ Token events are used to record unspent proofs.
|
||||
|
||||
There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event.
|
||||
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7375,
|
||||
"content": nip44_encrypt({
|
||||
@@ -78,7 +78,7 @@ The `kind:5` _delete event_ created in the [NIP-09](09.md) process MUST have a t
|
||||
### Spending History Event
|
||||
Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes.
|
||||
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7376,
|
||||
"content": nip44_encrypt([
|
||||
@@ -115,7 +115,7 @@ From those relays, the client should fetch wallet and token events.
|
||||
|
||||
### Spending token
|
||||
If Alice spends 4 sats from this token event
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7375,
|
||||
"id": "event-id-1",
|
||||
@@ -134,7 +134,7 @@ If Alice spends 4 sats from this token event
|
||||
|
||||
Her client:
|
||||
* MUST roll over the unspent proofs:
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7375,
|
||||
"id": "event-id-2",
|
||||
@@ -153,7 +153,7 @@ Her client:
|
||||
* MUST delete event `event-id-1`
|
||||
* SHOULD add the `event-id-1` to the `del` array of deleted token-ids.
|
||||
* SHOULD create a `kind:7376` event to record the spend
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7376,
|
||||
"content": nip44_encrypt([
|
||||
@@ -171,7 +171,7 @@ When creating a quote at a mint, an event can be used to keep the state of the q
|
||||
|
||||
However, application developers SHOULD use local state when possible and only publish this event when it makes sense in the context of their application.
|
||||
|
||||
```jsonc
|
||||
```javascript
|
||||
{
|
||||
"kind": 7374,
|
||||
"content": nip44_encrypt("quote-id"),
|
||||
|
||||
Reference in New Issue
Block a user