Coder Social home page Coder Social logo

Add nostr-tools dependecy about nostros HOT 5 CLOSED

arejula27 avatar arejula27 commented on May 13, 2024
Add nostr-tools dependecy

from nostros.

Comments (5)

arejula27 avatar arejula27 commented on May 13, 2024 1

On this case i think you made the correct decision, good luck. I cant wait for using nostros :D

from nostros.

arejula27 avatar arejula27 commented on May 13, 2024

I saw you want to manage the ws connections after a long inactivity time, with this library it is possible too, you can develop the logic and call connect/ close connection on each relay

from nostros.

KoalaSat avatar KoalaSat commented on May 13, 2024

Hi @arejula27, Nostros already does a limited use of nostr-tools

import { decrypt } from 'nostr-tools/nip04'

Initially I wanted to use it as base library of the app, but I ended up facing 2 main problems:

  • nostr-tools implements a version of ECMAScript not compatible with Android. If I remember correctly, it requires 2021 and Android is limited to 2019.
  • React-Native has a single thread to manage everything related to JS (views included), so doing an intensive use of background tasks (for example relays communication) affected really badly to the performance resulting even in the app completely freezing for seconds.

This is why I decided to re-implement everything that can be parallelized in Java, it was the only way to have a good performance.

from nostros.

dskvr avatar dskvr commented on May 13, 2024

Have you tried @jb55's nostr-js?

from nostros.

KoalaSat avatar KoalaSat commented on May 13, 2024

Yes I did but it was missing some functions I needed, I assumed nostr-tools was a most recent version and decide to go forward with the Java version. The main problem as I said is that the background jobs with JS affects a lot the UX

from nostros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.