Commit Graph

5 Commits (f92cfbbb31879db2f9da789f895cf085d52ef039)

Author SHA1 Message Date
OFF0 aec72b6c62
refactor: function to es6 arrow functions
so that it doesnt depend on function hoisting.
2 years ago
OFF0 2d46687e12
refactor: type events.ts, url.ts and crypto.ts 2 years ago
OFF0 87cd5f21b3
relays: type and upgrade to nostr-tools@1.6.0
move and typed relay related code to relays.ts

upgrade nostr-tools to latest greatest, major version with
breaking changes:

- relayPool is gone in favor of SimplePool, but this commit just
  used relayInit directly as relays should become configurable at
  some point
2 years ago
OFF0 d5e9ef18c7
nip-13: add timeout and show user facing error if it exceeds
mining may take a long time if the mining difficulty is high.

calculating pow for text notes, upvotes and profile meta
data now has a timeout of 10s. if the timeout exceeds a user
facing error is shown with the option to try again.

the error is currently very basic, and only displays timeout -
something went wrong, cancel and try again button.
2 years ago
OFF0 a1b1f3baee
nip-13: mine pow async in worker any only invoke noxy with pow
added pow to text notes, reactions and metadata events. pow is
mined async in a worker so that the main process does not freeze.

noxy profile images, link and image previews are now now only
invoked if an event has some valid work proof. noxy can decide
if there is enough work and whether or not to serve data for a
certain event.

target difficulty can be implemented in a later step, this change
only check if there is any valid nonce tag with commitment target
greater than 0.
2 years ago