Code Monkey home page Code Monkey logo

jam's Introduction

Jam: Your sats. Your privacy. Your profit. Jam: Your sats. Your privacy. Your profit.

⚠️ Jam is beta software. Use with caution. ⚠️


Jam is a web interface for JoinMarket focusing on user-friendliness and ease-of-use. It aims to provide sensible defaults and be easy to use for beginners while still having the features advanced users expect.

📸

Jam Screenshot Jam Screenshot

📦 Installation

We're aiming to make Jam available for different node systems to make installation as painless as possible. If your node system of choice is missing, feel free to integrate it and let us know so we can add it here.

RaspiBlitz LogoRaspiBlitz Logo Umbrel Logo Citadel Logo MyNode Logo Start9 Logo RaspiBolt Logo
RaspiBlitz: v1.7.2* Umbrel: v0.4.15 Citadel: v0.0.1 MyNode: v0.3.05 Start9: v0.3.3 RaspiBolt: v3

Refer to the installation docs for more information on integrations as well as manual installation instructions.

🍊 Features

  • Spending from the wallet
  • Spending from the wallet via collaborative transactions
  • Running the yield generator
  • Scheduled transactions
  • Viewing the orderbook
  • Support for fidelity bonds
  • PayJoin support

Refer to the milestones for a rough roadmap. Feature requests are tracked as issues.

🧑‍💻 Contribute

This is a free and open-source software project and we love receiving pull-requests, bug reports, ideas, and feedback from everyone.

There are many ways you can contribute: testing, sharing ideas, writing documentation, creating tutorials, and—of course—writing code. Refer to the general contribution guidelines to get started.

🛠️ Development

Want to get your hands dirty with code? Great! CONTRIBUTING.md and docs/developing.md are where it's at.

🏛️ History

This project builds upon the jm-web-client which was developed by Shobhitaa, Abhishek, and waxwing himself. Many people contributed over time, some of which are listed here.

Jam and JoinMarket are separate projects. For more information on JoinMarket, see the JoinMarket GitHub Page.

jam's People

Contributors

abhishek0405 avatar adamisz avatar benalleng avatar bitcoinmechanic avatar dayvvo avatar dennisreimann avatar dependabot[bot] avatar dergigi avatar djo1e avatar dlggr avatar httpiga avatar jared-dahlke avatar koreacomk avatar kristapsk avatar neb-b avatar openoms avatar overload3910 avatar reneaaron avatar secondl1ght avatar shobhitaa avatar tehelsper avatar theborakompanioni avatar zmjohnso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jam's Issues

Umbrel integration

Make the JoinMarket Web UI available as an app in the Umbrel app store.

See Umbrel App Framework

Timeline

  • Create Draft Pull Request in Umbrel Repo (getumbrel/umbrel#1216)
  • JM server version v0.9.5 is released
  • Web UI version v0.0.3 is released
  • Release a standalone image of server v0.9.5 and client v0.0.3
  • Remove Draft status of Pull Request in Umbrel Repo
  • Pull Request is merged

Onboarding Flow

Cover screen and onboarding flow to be shown upon first use.

See Figma for a rough sketch:

Screenshot 2022-01-24 at 23 37 22

Revamp wallet view: display "accounts" as privacy levels

See the current design in Figma:

Screenshot 2022-01-28 at 15 53 21

In short:

  • Hide derivation paths and addresses from the user
  • What is currently called "Account 0" is the lowest level, i.e. "one shield"

We can add the complexity that this will hide later on if we like, but the current view is all kinds of confusing, so this would be an improvement.

Note that this concept/design is by no means final, since we can't always map "privacy level" to "accounts" (mixdepths) in a truthful one-to-one manner. But again: it's a big improvement from the current UI and should be easier to understand than mixdepths.

Revamp Send, Receive, Earn Screens

See Figma. That'll make the screens blend in better with the rest of the fancy new UI.

This is also a good opportunity to think about wording on those screens. E.g. how should we deal with / call the concepts of "Accounts" on the send screen? See discussion here.

  • Send. See #76.
  • Receive See #85.
  • Earn See #82.
Screenshot 2022-02-07 at 11 09 36 Screenshot 2022-02-07 at 11 09 47 Screenshot 2022-02-07 at 11 09 51

More prominent "Alpha/Beta" disclaimer

We currently have an "this is alpha software, be prepared to loose everything" disclaimer—but it's hidden somewhere in the onboarding reel so most users probably won't read it.

We should have a more dominant disclaimer that's visible in the app (at least on the send page but I would even show it on all pages). The disclaimer should make it clear that this is not "top-notch privacy for your bitcoin" (yet). We need to be careful not to make false promises in these early stages where we offer only limited features (e.g. no tumbler, only simple spend-joins) Especially, since we're targeting a less technical audience we need to be careful not to make them believe that a simple spend with 2 collaborators makes their coins perfectly private for example. See also the recent discussions in our group chat.

Adding this to the 0.0.3 release I think it's important to discuss before we release the first (alpha/beta) version.

List of little annoyances and other stuff

A small list of things that stood out during testing and trial.

Please expand it according to your own assessment and let's talk about which are important before the first beta version is released.
Feel free to give an estimated priority as well.

  • Inform user about coinjoin state immediately after coinjoin is initiated. Preferably via Websocket Fetch /session immediately after starting taker (otherwise user might wait up to 10 seconds to know what is going on) - #46
  • #83
  • #87
  • From @AdamISZ : When the maker is started without coins it says "maker cannot start, no coins", but it's important that it should say "no confirmed coins". See #34 (comment) - PR opened JoinMarket-Org/joinmarket-clientserver#1190
  • #157
  • Improve wording of error message when trying to send to an "invalid" address: "Invalid request format." is not meaningful. (400 InvalidRequestFormat on all assertion errors.. see wallep_rpc.py#L548)
  • Prevent user from starting taker with insufficient funds (?): #155
    • Might be that a taker operation is started and then aborted - either unconfirmed or too little funds available (takes 60s to be resolved)
  • Balance shown on Send page might not be spendable (e.g. utxo is frozen) #78

(This list should not contain missing features (e.g. "display spendable funds" or "ability to sweep"), but rather just document odd behaviour or possible improvements for existing ones.)

App stops responding

After opening and closing the wallet a few times the service stops responding and no further interaction is possible (api stops responding).
This happens rather quickly and can be reproduced on my side after locking/unlocking the wallet four to five times.

In this state, when reloading the page, the app stops rendering completely.

Server logs do not give a strong hint about what might be wrong.

> root@edd0ae308a67:~/.joinmarket/logs# tail -f jmwalletd_stdout.log -n 200
<Request at 0x7f7e2d385b80 method=POST uri=/api/v1/wallet/t.jmdat/unlock clientproto=HTTP/1.1> [...]
2022-02-01 10:49:37,349 [DEBUG]  rpc: listaddressgroupings []
2022-02-01 10:49:37,353 [INFO]  Detected new wallet, performing initial import
2022-02-01 10:49:37,353 [DEBUG]  requesting detailed wallet history
2022-02-01 10:49:38,254 [DEBUG]  rpc: listlabels []
2022-02-01 10:49:38,255 [DEBUG]  rpc: getaddressesbylabel ['joinmarket-wallet-d4ef50']
2022-02-01 10:49:38,273 [DEBUG]  got used indices: {0: [0, 0, 0, 0], 1: [0, 0, 0, 0], 2: [0, 0, 0, 0], 3: [0, 0, 0, 0], 4: [0, 0, 0, 0]}
2022-02-01 10:49:38,352 [DEBUG]  rpc: listlabels []
2022-02-01 10:49:38,354 [DEBUG]  rpc: getaddressesbylabel ['joinmarket-wallet-d4ef50']
2022-02-01 10:49:38,362 [DEBUG]  Wallet successfully synced
2022-02-01 10:49:38,363 [DEBUG]  rpc: listunspent []
2022-02-01 10:49:38,371 [DEBUG]  bitcoind sync_unspent took 0.008394718170166016sec
2022-02-01 10:49:38,382 [INFO]  Starting transaction monitor in walletservice
<Request at 0x7f7e2d3f6c40 method=GET uri=/api/v1/wallet/t.jmdat/display clientproto=HTTP/1.1> [...]
<Request at 0x7f7e2d3f6df0 method=GET uri=/api/v1/wallet/t.jmdat/lock clientproto=HTTP/1.1> [...]
<Request at 0x7f7e2d396a00 method=POST uri=/api/v1/wallet/t.jmdat/unlock clientproto=HTTP/1.1> [...]
2022-02-01 10:49:44,289 [DEBUG]  rpc: listaddressgroupings []
2022-02-01 10:49:44,292 [INFO]  Detected new wallet, performing initial import
2022-02-01 10:49:44,292 [DEBUG]  requesting detailed wallet history
2022-02-01 10:49:45,208 [DEBUG]  rpc: listlabels []
2022-02-01 10:49:45,219 [DEBUG]  rpc: getaddressesbylabel ['joinmarket-wallet-d4ef50']
2022-02-01 10:49:45,239 [DEBUG]  got used indices: {0: [0, 0, 0, 0], 1: [0, 0, 0, 0], 2: [0, 0, 0, 0], 3: [0, 0, 0, 0], 4: [0, 0, 0, 0]}
2022-02-01 10:49:45,309 [DEBUG]  rpc: listlabels []
2022-02-01 10:49:45,311 [DEBUG]  rpc: getaddressesbylabel ['joinmarket-wallet-d4ef50']
2022-02-01 10:49:45,318 [DEBUG]  Wallet successfully synced
2022-02-01 10:49:45,319 [DEBUG]  rpc: listunspent []
2022-02-01 10:49:45,326 [DEBUG]  bitcoind sync_unspent took 0.00782322883605957sec
2022-02-01 10:49:45,342 [INFO]  Starting transaction monitor in walletservice

Maybe Starting transaction monitor in walletservice causes problems on the server, but this is just unfounded speculation.
Seems like there cannot be much done on the client side, except for better handling of the unresponsiveness of the server maybe.

DRY up app layout

Currently we repeat the same layout container (<rb.Col md={10} lg={8} xl={6}>) in almost all pages. We should move this container to a higher level and then render pages as children inside this container. That way we don't have to repeat it on every page. See Layout Routes in React Router.

Documentation for `joinmarket.cfg`

The full joinmarket.cfg config file contains many settings and multiple sections (daemon, blockchain, messaging, logging, timeout, policy, payjoin, yield generator), not all of which are immediately relevant to most users.

We should understand and document all settings, and break them down into two or three different sections, e.g. basic / advanced / expert.

Rough tasks list:

  • Research joinmarket.cfg
  • Rank-order by importance and/or use-case
  • Write copy, find proper names and descriptions for settings (in cooperation with @GBKS)
  • Update the JM docs upstream

All of the above should serve as a base for implementing #12

Add quiz to make sure that seed was written down

Multiple ways to do this, an easy one would be to show an additional screen, pick 3 words at random, force the user to enter these 3 words.

We could also do it a later point, as suggested in the bitcoin.design guide:

We recommend that the optimal phase to hint the user to perform the backup should be after the wallet has received funds for the first time. This way, we avoid overwhelming the user with an unnecessary task, as it makes more sense to backup a wallet with funds on it.

Source: https://bitcoin.design/guide/onboarding/backing-up-a-wallet/

Dark Mode

Dark Mode support is basically required nowadays, otherwise the dark mode maximalists will rip us apart. A day/night toggle should be good for starters. We can also do day/night/dusk as seen in the Thunderhub UI:

Screenshot 2022-01-24 at 11 37 31

Basic settings screen

No designs or mockups of this screen yet, but it could contain something like:

  • Web UI settings (denomination, theme, sat symbol)
  • JoinMarket settings (txFee, cjFee, cjSize, etc.)

We could think about breaking down the 2nd point—the JoinMarket settings—into three different views, e.g. basic / advanced / expert.

The full joinmarket.cfg config file contains many settings and multiple sections (daemon, blockchain, messaging, logging, timeout, policy, payjoin, yield generator), not all of which are immediately relevant to most users.

Clicking the gear icon in the top right will open up this screen.

Screenshot 2022-01-24 at 23 10 06

Brainstorm: fancy name for the app?

Since we want to put this thing in all the nodes, and "JoinMarket Web UI" feels a bit clunky, we might want to use these early days to come up with a fancy name that is short and sweet and cool and all the rest of it.

The name should be:

  • Easy to pronounce
  • Unambiguous, both in writing and when you hear it spoken (not "muun with two u's")
  • Short enough
  • Distinct
  • Related to JoinMarket or the concepts that we implement

Examples that I like from the Bitcoin and Lightning world:

  • ThunderHub
  • SatSale
  • Nodl
  • Zeus
  • Voltage

Yesterday night "Jam" popped into my head, since I've been writing "JM" a lot, and it also works because it's kind of a liquid (which is a good metaphor for what is happening on a technical level, as in "Whirlpool"). You can also think of it as "jamming" the signal that chain analysis tries to decipher.

We could also lean into the "Raspi" theme or the "orange" theme.
Screenshot 2022-01-27 at 10 04 35 Screenshot 2022-01-27 at 10 05 30

I also like the "Fusion" concept that came up in call 4. But we might as well make jam 😜

If you have suggestions, drop them!

Add shields to other views

We talked about in the call today adding the shields to wherever the Accounts are referenced to create a visual link between the accounts and the privacy levels. I just wanted to check that this is what was decided before implementing anything.

Sat symbol

Instead of writing "sat" use the sat symbol. There is also "the sat" in case we want to provide the user with more options.

i18n support

English only is probably fine for a long while, but at some point having the UI available in multiple languages would be good.

  • Apply for Transifex open-source license (Done. Project created: joinmarket/jam)
  • Integrate i18next (Done. See #153)
  • Replace hard-coded language with translation strings (Done. See #174)

Parts of an address might be rendered as math

Just noticed a small issue: if an address contains an "x" between two numbers it will be rendered as a mathematical symbol:

Screenshot 2022-02-15 at 11 18 21

An easy fix would be to render every address inside a <code> tag or something, like this: bcrt1q6wyvqnm2daajashl0jdl8l84ghwadsg4g37x30

Improve connection indicator

We have a connection indicator already, but it only shows up if the UI can't connect to the API. It currently looks like this:
Screenshot 2022-01-28 at 17 07 06

Once a connection is established, it will look like this:
Screenshot 2022-01-28 at 17 07 16

I'd propose a connection indicator either in the header or the footer, something like a simple green/red dot and some text that says "Connected" or "Disconnected".

Unify API access

Currently, each API request is assembled and sent by every component itself. As a developer, it would be nice if this could happen clearly from a single service. This makes it easier to understand when, where and why requests are made.

See the Open API spec for jmwalletd.

I already tried to generate a client from the specification with openapi-generator. Namely used generator javascript,
javascript-flowtyped, typescript, typescript-axios, typescript-fetch. But these look very verbose and bloated, the easiest way is probably just to move all API accesses in one file for now.

What do you think? Any benefits of generating the client at this stage of development? Or is a simple, single file better for now?

Take `minimum_makers` config var value into account on Send page

When initiating a collaborative transaction the number of collaborators can be provided.
It seems, based on these comments, this value must not be less than what is specified in config variable minimum_makers. Default is 4.

A viable solution is to GET the value of this variable and use it as min value for the form on the Send page.

Maker service not stopping

As a user with a balance of zero, when I start the Maker service it shows the error Maker could not start, no coins. (request results in 409 Conflict).
However, the service starts anyway. When subsequently clicking "stop", it will display a success message The service is stopping. (request is even resulting in 202 Accepted).
Nevertheless, the service is not stopped and will stay this way indefinitely.

I do not know if we can do anything on the client, as this seems to be a server issue.
Just want to keep it here as reference - I will investigate the server code and open an issue in their repo if needed.

No connection to backend: Gateway Timeout

thank you all for spending time and effort to build this. the webUI looks great and I'm excited to test!

I followed the installation instructions and webUI loads locally, however it cannot connect to backend.

No connection to backend: Gateway Timeout.
image

SSL certificate is created and API service is running
2022-02-12 22:19:48,932 [INFO] Starting jmwalletd on port: 28183
2022-02-12 22:19:48,946 [INFO] Joinmarket daemon listening on port 27183

Joinmarket version: v.0.9.4.-85-gfd5871b

In local terminal, two errors show up after
npm start

the second error is recurring

[HPM] Error occurred while proxying request localhost:3000/api/v1/wallet/all to https://localhost:28183/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)

[HPM] Error occurred while proxying request localhost:3000/api/v1/session to https://localhost:28183/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)

The error comes up no matter if API Service is running or not, and error occurs when requesting to to https://localhost:28183/ - however shouldn't the request be to raspiblitz 192.168.0.103:28183 ?

Citadel integration

Make JoinMarket Web UI available as an app for Citadel.

Probably related to #17, as the underlying architecture should be the same.

Release process

I'd love to somehow document how we want to handle releases (mostly so that we can automate the process as much as possible).

Basically what we'll need to do for a release is:

  1. Bump the version (npm version)
  2. Update the changelog (see #103; we can automatically run this as a "post script" for npm version)
  3. Since master is protected we'll need to pull-request the version bump and changelog to master.
  4. Tag the release and create a GitHub release
  5. Docker files will automatically update once we tag a release in the web-ui repo.

If that is correct, my question would be: Where should we add the tag? We can either:

  1. Tag the "bump and changelog branch"
  2. Tag master after the "bump and changelog" branch was pull-requested and merged (we could even do that automated via GitHub actions, i.e. "everytome a pull request with the release label gets merged, create a tag and a release").

I think I'd prefer option 2. since having tags on master feels clean to me and a pull-request before a release is probably not the worst thing to do.

Any thoughts? Did I forget anything important?

Initial settings error

User opening the app for the first time will have no default config stored in local storage leading to display issues (e.g. when showing balances).

Reproduce: Delete local storage data and reload.
Fix: Always take default values into account when initializing the settings for the first time.

Suggestion: reorder and update right navbar icons

This is a small suggestion that I have, I think the icons on the right of the navbar (settings, wallets) should be reordered so that settings is on the right and wallets on the left. I think users will want to access the wallets page more often than the settings so it should be the first one.

One other observation is that the current wallets icon doesn't really let the user know that it links to the wallets page very well. I think it would be better to update this icon to be consistent with other references to the wallets by using the same wallet icon.

Let me know what you guys think about these ideas! Thanks

image

Improve UI for account balance in send page

See discussion in #76 (comment).

The balance that's shown when selecting which account to send from, is currently hard coded to whatever is returned from the server. That means it is always shown in BTC and can't be changed to sats.

That's because the <option> element only allows text children so we can't use the <Balance> component.

Maybe there's a way to fix this though? 🤷‍♂️

Screenshot 2022-02-09 at 16 29 22

Improve error message server responds with `text/html`

Improve error message when server returns 500 Internal Server Error as text/html (e.g. when trying to send with too little funds ) - we display "JSON.parse: unexpected character at line 1 column 1 of the JSON data" as we try to parse json.

Orderbook parsing

As discussed in Call 2, it would be interesting to do some automatic parsing of the orderbook to let the user choose sane defaults instead of fiddling with various fee settings.

Not sure if it's feasible or easily possible, so consider this an idea more than a feature that has to be implemented.

Listen to the call recording and have a look at the JM orderbook docs and an online orderbook to get an idea of what data is in the orderbook and what settings could be automatically set or hidden from the user.

Empty page is rendered for `/wallet` when wallet is locked

When the wallet is locked, all paths except / will render an empty page.

This is true for paths that usually lead to something, such as /wallet, /send, /earn, /receive, /settings, but also for non-existent paths such as /this-is-a-path-that-leads-nowhere.

We should either:

  • Show a 404 page, or
  • Redirect the user to the wallets page, i.e. /

Screenshot:
Screenshot 2022-02-09 at 21-52-13 JoinMarket

Test suite

I don't have much experience with testing react apps but I think we could at least do some basic UI tests now that we have a working regtest environment.

Not super urgent right now but once the UI is somewhat settled in this is something we could add.

Adding this to the last milestone, feel free to change that!

Add Contributing Guidelines

I am aware that we have the dev docs, which are great, but we should probably also add a CONTRIBUTING.md file for people who are new to tracking bugs and stuff like that.

Here is a very simple one that I like. In general, every template that is older than 5 years should be good as a guideline. Most newer templates are as long as they are woke, and I feel like we can do without adding additional wokeness to this world.

Additional protection for web interface (access control)

Issue raised by Mr. Kukks and briefly discussed in Call 8.

The Web UI endpoint might be exposed publicly, e.g. via Umbrel, since everything that runs on Umbrel might be exposed and accessible via <public-ip> - so anyone might go to <public-ip>/joinmarket and access the interface.

By default, all wallets are password protected and locked, so this might not be as critical as one might think at first, but some access control might be good in any case. See RTL, Thunderhub, et. al. They all have the same problem and solve it in a similar way.


This Umbrel announcement might be relevant: https://community.getumbrel.com/t/umbrel-0-4-8-is-out-with-cryptographically-secure-default-app-passwords/4696

Improve wording

We could/should go over the whole app and double check wording as most of it was done ad hoc during development. At least I didn't really put a lot of thought into it while developing. 😅

Fix websocket connection

Bring back the non-functional websocket connection, which got removed in #45.

When I converted the prototype I couldn't figure out whether it is a problem in the web server/proxy or in the API's web socket which makes it fail. However, making this web socket connection work would be great, so that we can receive event updates via the API.

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.