cmd
325adae009
Add method for deriving HMAC keys from the private key.
...
I ran into an issue where I want to derive child-keys from the parent private key, but there is currently no way to do this with the current spec.
I propose adding a `window.nostr.getDerivedKey(key: string): string` method to the spec, which is a simple HMAC method using the private key and a user supplied key. HMAC has wide-spread support in the WebCrypto spec, and is easy to implement.
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
Here is some reference code for performing a simple HMAC operation using WebCrypto API:
```ts
async function hmac (
// Perform an HMAC signing operation.
key : Uint8Array,
data : Uint8Array,
fmt : string = 'SHA-256'
) : Promise<Uint8Array> {
const cryptoKey = await importKey(key, fmt)
return crypto.subtle
.sign('HMAC', cryptoKey, data)
.then((buffer) => new Uint8Array(buffer))
}
async function importKey (
// Create a CryptoKey from the
// supplied key and format string.
key : Uint8Array,
fmt : string = 'SHA-256'
) : Promise<CryptoKey> {
const config = { name: 'HMAC', hash: fmt }
return crypto.subtle.importKey(
'raw', key, config, false, ['sign', 'verify']
)
}
```
2023-02-03 15:50:58 -06:00
Jeff Jing
025beb332c
fix: typo
2023-02-03 10:40:57 -03:00
Ben Hayward
38074f6643
NIP-26: Advice on using after operators in conditions query string ( #199 )
...
Co-authored-by: Ben Hayward <ben@minds.com>
2023-02-01 09:05:25 -03:00
Luiz Picanço
57d758b07f
Fix NIP-50 typo
2023-02-01 07:06:25 -03:00
Zack Wynne
3b1cd96798
NIP-26: fixing typo in conditions query string section
2023-01-27 15:58:44 -03:00
Semisol
524ff9b805
Bech32 encoded relay entities ( #196 )
2023-01-27 14:49:43 -03:00
Artur Brugeman
f89187a258
Change name to 'search capability'
2023-01-27 12:30:16 -03:00
Artur Brugeman
6708a73bbc
Rewrite, keywords renamed to search
2023-01-27 12:30:16 -03:00
Zack Wynne
95fa5a4a5f
NIP-26: adding section documenting valid fields and operators for conditions string ( #194 )
2023-01-27 08:11:27 -03:00
fiatjaf
5901fe0b87
add NIP-50 to README.
2023-01-27 07:47:12 -03:00
fiatjaf
744bc8ceab
Merge pull request #175 from brugeman/master
2023-01-27 07:45:05 -03:00
Artur Brugeman
f6cf3b6c3c
Fix: change lud18 to lud16
2023-01-26 15:14:44 +03:00
Ben Franks
8362ff8f79
Update NIP-01 to clarify since and until filters
...
The since and until filters does not clarify integer format and some relays fail to recognize filters with a float based timestamp.
2023-01-25 14:21:52 -03:00
fiatjaf
d82599bc7f
add list of standardized tags.
2023-01-25 13:20:36 -03:00
fiatjaf
45649d7b4d
add NIP-21, nostr:
url scheme.
2023-01-25 13:08:20 -03:00
Artur Brugeman
d534df39c0
Add hint about client-side filtering
2023-01-25 14:46:28 +03:00
Semisol
d179cd9758
NIP-33: d
tag requirements
2023-01-24 15:54:57 -03:00
Semisol
54b6c0090d
NIP-33: Add example for more than one value
2023-01-24 15:54:57 -03:00
Artur Brugeman
a5a4f312cc
Add mention of supported_nips by mikedilger
2023-01-24 09:03:59 +03:00
monlovesmango
9682e43ee0
update Parameterized Replaceable Events range
2023-01-22 21:31:27 -06:00
Leo Wandersleb
6aa694c2e7
Merge pull request #181 from thesimplekid/patch-1
2023-01-22 12:57:20 -03:00
thesimplekid
b58efb08a0
NIP-28 Add missing comma's in tags
2023-01-22 09:51:36 -05:00
fiatjaf
69685588f0
specify lowercase on nip01 event hex fields.
2023-01-21 07:36:44 -03:00
Mike Dilger
8b18e7818e
Several NIP examples (3, 11) weren't quoting the field keys (JSON keys must be quoted)
2023-01-18 09:42:32 -03:00
Artur Brugeman
086d224e1d
NIP-50: Keywords Filter
2023-01-17 18:49:10 +03:00
marc@roosoft.com
1840c5cbdf
removed kind 6 since NIP-18 has been removed from the spec
2023-01-16 16:57:43 -03:00
fiatjaf
7349643069
remove NIP-18, it is not really a standard.
...
closes https://github.com/nostr-protocol/nips/issues/173
2023-01-16 15:58:53 -03:00
fiatjaf
be0a426745
Merge pull request #141 from nostr-protocol/auth
2023-01-16 08:28:02 -03:00
fiatjaf
e5ae318984
add nos2x-fox to NIP-07 implementations.
2023-01-15 20:05:52 -03:00
Vasilios Daskalopoulos
7d79205537
fix erroneous reference to pubkey
2023-01-15 17:53:34 -03:00
Vasilios Daskalopoulos
132100fd16
fix minor typo
2023-01-15 17:53:34 -03:00
fiatjaf
230f63dd5f
nip-07 extensions to also add .id and .pubkey when signing.
2023-01-15 15:37:42 -03:00
monlovesmango
f0842438c1
clarify top level reply behavior
2023-01-15 09:18:15 -03:00
monlovesmango
6f5f9856b9
define 'mention' tag
2023-01-15 09:18:15 -03:00
monlovesmango
5355edb9cb
add 'mention' marker
...
I think that adding a mention marker would eliminate ambiguity for clients supporting both the deprecated and preferred conventions. I also think that this would allow for extensibility in adding new types of event mentions (for example if we want to add context for a note).
2023-01-15 09:18:15 -03:00
benthecarman
0019a206a3
NIP25: allow for emojis to be considered dislikes
2023-01-11 17:47:26 -03:00
Leo Wandersleb
6074116053
Update 42.md
...
Co-authored-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
2023-01-11 00:05:15 -03:00
kdmukai
e55c86d207
NIP-26: Change example condition to expire at a future date ( #157 )
...
also Regenerate example PKs and improve organization/presentation.
2023-01-07 20:12:48 -03:00
fiatjaf
6a70967f0e
add challenge from relay.
2023-01-07 19:53:42 -03:00
Jeff Thibault
741ac01b97
NIP-22: use nip-20; minor updates
2023-01-07 17:53:24 -03:00
Luke Childs
01a3090c6a
NIP05 Improve CORS header check command
2023-01-06 12:18:20 -03:00
fiatjaf
8c3c421715
merge NIP-35 into NIP-05.
2023-01-04 10:34:24 -03:00
fiatjaf
4472f9bbd9
add NIP-33 to README.
2023-01-04 10:26:08 -03:00
fiatjaf
50faceef09
clarify created_at
and auth session duration.
2023-01-04 10:24:37 -03:00
Semisol
018c45966e
Add NIP-33 Parameterized replaceable events ( #54 )
...
Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com>
Co-authored-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
2023-01-04 10:20:27 -03:00
fiatjaf
4a5202646a
use "OK" message.
2023-01-02 17:26:41 -03:00
fiatjaf
c80be21cd4
drastically simplify @semisol's auth NIP.
2023-01-02 16:56:44 -03:00
Semisol
b9467cb428
nip41: allow for delegated events
2023-01-02 16:53:10 -03:00
Semisol
df28376064
nip41: fix outdated kind
2023-01-02 16:53:10 -03:00
Semisol
a04da3f176
nip-41: fix kind mismatch on example event
2023-01-02 16:53:10 -03:00