3 Commits

Author SHA1 Message Date
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