8 Commits

Author SHA1 Message Date
fiatjaf
2da58356b0 Revert "nip13: crazier and more fun and hopefully slightly more performant nonce encoding."
This reverts commit edbbd6df445dcd2bed8025397c44f2d03661f014.
2024-08-20 17:05:49 -03:00
fiatjaf
edbbd6df44 nip13: crazier and more fun and hopefully slightly more performant nonce encoding. 2024-08-20 13:54:51 -03:00
fiatjaf
437cdecfb1 nip13: CommittedDifficulty() 2024-08-20 13:19:21 -03:00
fiatjaf
0e72540696 nip13: fail when pubkey is not provided -- may help some clueless people like me. 2024-08-20 10:31:52 -03:00
fiatjaf
18dbda437b nip13: superficial changes. 2024-08-20 09:52:35 -03:00
Isaque Veras
0f66883dc7 feat(kind): using constants 2023-09-07 07:05:01 -03:00
fiatjaf
c42059f4b4
tests run (but not pass) and fine-tuning (specially tag filters) on filter_easyjson.go 2023-04-16 16:16:16 -03:00
alex
5bfb398f4d nip13: check and generate proof of work
implementation as per NIP-13
https://github.com/nostr-protocol/nips/blob/e79c84ae/13.md

some benchmark results:

    $ go test -bench . ./nip13
    goos: linux
    goarch: amd64
    pkg: github.com/nbd-wtf/go-nostr/nip13
    cpu: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    BenchmarkCheck-8                        144905385                8.328 ns/op
    BenchmarkGenerateOneIteration-8           467874              2451 ns/op
    BenchmarkGenerate/8bits-8                   4045           1033196 ns/op
    BenchmarkGenerate/16bits-8                    16         101939954 ns/op
    BenchmarkGenerate/24bits-8                     1        11411513764 ns/op
    PASS
    ok      github.com/nbd-wtf/go-nostr/nip13       22.220s
2022-12-26 08:05:40 -03:00