GithubHelp home page GithubHelp logo

richarddushime / webimint-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elsirion/webimint-rs

0.0 0.0 0.0 20.05 MB

Experimental integration of `fedimint-client` with the Leptos web frontend framework

License: MIT License

JavaScript 0.59% Rust 97.14% CSS 0.81% Nix 1.11% HTML 0.36%

webimint-rs's Introduction

CAUTION: highly experimental, the Database implementation is likely horribly broken

Fedimint Client built with Leptos

This repo contains a proof-of-concept of how to integrate fedimint-client with the Leptos web framework to build a PWA. There are still some bugs being worked out, but there is a demo available at https://webimint.sirion.io/.

Join federation screen Redeem e-cash screen Lightning pay invoice screen
Lightning generate invoice screen Lightning generated invoice was paid screen List all transactions screen

Prerequisites

Check out Fedimint at commit 480ccb5cca9890bb3aa4cda41c7ff7d5d19fc357:

git clone https://github.com/fedimint/fedimint
cd fedimint
git checkout 480ccb5cca9890bb3aa4cda41c7ff7d5d19fc357

Make sure you have set up local dev environment needed to run fedimint locally

Open terminal and run to open development shell:

nix develop

just build
just mprocs

To get an invite code (you'll need it for next steps) select user process and enter fedimint-cli dev invite-code.

Example

bash-5.1$ fedimint-cli dev invite-code
{
  "invite_code": "fed1132h0j84q5t6qzg8vkxk2lj3dmmzw54flqh3m6z4yrf6ryyerrn6sg36nuratsuf0mjvm84svt40cuqq4waen5te0xyerwt3s9cczuvf6xyurzde59ld2c273s3xm3z3ms552g7x2yu0"
}

The invite code is needed in next step Development.

Development

  1. Open terminal and enter:
nix develop

# only once
npm i

trunk serve

Your output will look like this:

fedimint-leptos-test$ nix develop
๐Ÿ’ก Run 'just' for a list of available 'just ...' helper recipes
fedimint-leptos-test$ trunk serve
2023-08-06T12:00:41.373844Z  INFO ๐Ÿ“ฆ starting build
2023-08-06T12:00:41.374062Z  INFO spawning asset pipelines
2023-08-06T12:00:41.522959Z  INFO building fedimint-leptos-test
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
2023-08-06T12:00:41.673972Z  INFO fetching cargo artifacts
2023-08-06T12:00:41.834730Z  INFO processing WASM for fedimint-leptos-test
2023-08-06T12:00:41.933395Z  INFO calling wasm-bindgen for fedimint-leptos-test
2023-08-06T12:00:42.907392Z  INFO copying generated wasm-bindgen artifacts
2023-08-06T12:00:42.919447Z  INFO applying new distribution
2023-08-06T12:00:42.919736Z  INFO โœ… success
2023-08-06T12:00:42.919871Z  INFO ๐Ÿ“ก serving static assets at -> /
2023-08-06T12:00:42.919899Z  INFO ๐Ÿ“ก server listening at http://127.0.0.1:8080
  1. Open http://127.0.0.1:8080 in your browser

  2. Enter invite code into to input and submit. Check Prerequisites above to see how to get it.

To see what's going on underneath open the browser console:

Screenshot of logs shown in browser console

webimint-rs's People

Contributors

elsirion avatar sectore avatar

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.