mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
Merge branch 'master' into vending-machine
This commit is contained in:
commit
c88a620fe7
2
03.md
2
03.md
|
@ -13,7 +13,6 @@ This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](
|
|||
"kind": 1040
|
||||
"tags": [
|
||||
["e", <event-id>, <relay-url>],
|
||||
["block", <block-height-as-string>, <block-hash>],
|
||||
["alt", "opentimestamps attestation"]
|
||||
],
|
||||
"content": <base64-encoded OTS file data>
|
||||
|
@ -21,7 +20,6 @@ This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](
|
|||
```
|
||||
|
||||
- The OpenTimestamps proof MUST prove the referenced `e` event id as its digest.
|
||||
- The `block` tag is optional, it exists to establish a minimum date since which the given event has existed.
|
||||
- The `content` MUST be the full content of an `.ots` file containing at least one Bitcoin attestation. This file SHOULD contain a **single** Bitcoin attestation and no reference to "pending" attestations since they are useless in this context.
|
||||
|
||||
### Example OpenTimestamps proof verification flow
|
||||
|
|
3
07.md
3
07.md
|
@ -12,7 +12,7 @@ That object must define the following methods:
|
|||
|
||||
```
|
||||
async window.nostr.getPublicKey(): string // returns a public key as hex
|
||||
async window.nostr.signEvent(event: Event): Event // takes an event object, adds `id`, `pubkey` and `sig` and returns it
|
||||
async window.nostr.signEvent(event: { created_at: number, kind: number, tags: string[][], content: string }): Event // takes an event object, adds `id`, `pubkey` and `sig` and returns it
|
||||
```
|
||||
|
||||
Aside from these two basic above, the following functions can also be implemented optionally:
|
||||
|
@ -34,3 +34,4 @@ async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext
|
|||
- [TokenPocket](https://www.tokenpocket.pro/) (Android, IOS, Chrome and derivatives)
|
||||
- [Nostrmo](https://github.com/haorendashu/nostrmo_faq#download) (Android, IOS)
|
||||
- [Spring Browser](https://spring.site) (Android)
|
||||
- [nodestr](https://github.com/lightning-digital-entertainment/nodestr) (NodeJS polyfill)
|
||||
|
|
Loading…
Reference in New Issue
Block a user