Giter VIP home page Giter VIP logo

bitcoin-connect's People

Contributors

alan-ac7 avatar bumi avatar depfu[bot] avatar hirenchauhan2 avatar hzrd149 avatar jankoegel avatar moritzka avatar reneaaron avatar rolznz avatar sunilsimar 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

Watchers

 avatar  avatar  avatar

bitcoin-connect's Issues

Cleanup & Optimize svgs

Currently SVGs are unoptimized, but we also set colors inside them and sometimes classes. This is quite a mess.

Add contributing guide

  • how to add a new connector
  • how to add a new wrapper package for a different framework
  • how to make improvements to the library

Add mobile wallet connector

Users who see the bitcoin connect button SHOULD in some way be able to connect the wallet they have on their phone and helps build a connection there because the user thinks they should be able to use the wallet they already have. Maybe it does not work in all cases where realtime/frequent payments are required (like Zappy Bird), but for many cases it is OK. We can also somehow notify the user that their wallet does not support some features.

Once clicked, the enable() function would just return true. Some webln functions would be disabled (we can notify there). This would also be a huge timer saver for developers who just want a way to allow users to pay invoices, no matter what method they choose.

We would need to maintain a list of all popular mobile wallets, but hopefully we can start it off and the community can help there if we setup a nice contributing guide.

Bitrefill has something similar in their checkout:

  • Pick the wallet
  • Some wallets have unique schemes to immediately open them on the right payment page, otherwise a lightning link, or the worst fallback is just "copy invoice".

Another issue: If the user makes a payment from their mobile wallet, how does the site update?

  • A backend may receive a webhook from the lightning service (e.g. Alby).
  • The backend could send something to the frontend via a websocket.
  • The frontend should be able to programmatically call Bitcoin Connect to close or show a success screen.

This is required because there is currently no standard to check a status of an invoice.

Add loading state

Should show connecting animation when connector is initializing (should work with both list and modal)

Add react-specific package

  • So callbacks can be set on the components rather than relying on window events
  • So components can be typed without ts-ignore

Landing page design

  • Connect directly on the page
    • maybe when they connect we can do something?
  • Cool animation so people can see it in action - maybe we have both a desktop and mobile example running in parallel
  • Basic info about what it is and what it can do
  • Directory of apps where you can try it
  • UI Customization
  • Package size info
  • Info for developers

Update logo

I propose using gradient only on our landing/branding. But within the customizable UI there's only one custom branding color. SVGs were optimized. Plain color version is in 2 versions: with B filled and B cut out.

Custom band
Custom brand, not filled
Gradient
Horizontal, custom brand
Horizontal, gradient

No bg (not visable on white bg): No bg

Too many colors

From W3modal: they only allow you to set one accent color, everything else is generated.
Now we have many colors, new shades for the ruler lines and help.

How can we make a nice API for users that can easily add 1 or 2 colors and it just looks great? it's too easy for a developer to make something that looks bad right now.

Deploy package

requires repository to be cleaned up a bit and made public

Modal should handle open/closed state

Currently we cannot render the modal on its own - an example, in Nostrudel when you zap on the main page, it should open the modal without the button having to be visible.

  1. Button should be able to pass the open state as an attribute to the modal?
  2. Modal should also be able to have its own state, so you can render a modal on its own: <lwc-modal open></lwc-modal>

How to programmatically control the open state:

  • using React: just control the open property
  • using pure JS: document.querySelector("lwc-modal").setAttribute('open', true);

Improve dev build experience

Currently it uses the browserify build so the compile speeds are super slow on changes.

The dev site should import the index.modern.js file instead, or run a vite build or something?

Add README image

add a nice header image for the README, maybe something like the below:

image

Add tests

Currently there are only tests for the example component

Update README

  • what is LWC?
  • add screenshots
  • add info about how to install and use LWC in different environments with simple code examples (codepen, React, Vue, ...)
  • add info about how to use different components (button (to launch modal), modal, list, render individual buttons)

Reduce bundle size

From hzrd149/nostrudel#11

Currently we depend on nostr-tools and some other packages, which are more bloated than necessary. We might be able to replace these with more cut-down versions or implement the code ourselves.

This will get worse when we add further integrations which require their own packages such as LNC.

Add skeleton loader for modal connecting state

Currently shows just a spinner which doesn't look good and causes the modal height to jump. Instead it should show the connected content, with skeleton loaders for any content that is loading.

Add Help screen

There should be a help button on the modal.

Also consider routing for e.g. Generic NWC URL input screen

Balance should update when payments are made

The button currently stays showing the initial balance. On successful payment, should it update? I don't think we can do periodic re-syncs because these could cause unwanted popups in the extension.

add internal components to reduce duplication

for example, button. Does this work overriding the existing button, or do we need to use a unique tag?

import {html} from 'lit';
import {withTwind} from '../twind/withTwind';
import {LwcElement} from '../lwc-element';
import {color} from '../css/colors';
import {gradientText} from '../css/gradientText';

export class Button extends withTwind()(LwcElement) {
  override render() {
    return html`<button
      @click=${this.click}
      class="relative mt-4 h-8 px-3 font-medium font-sans shadow rounded-lg flex gap-2 justify-center items-center"
    >
      <div
        class="absolute -z-10 top-0 left-0 w-full h-full border-2 border-solid border-transparent rounded-lg"
        style="
              background-image: linear-gradient(${color('bg-primary')}, ${color(
          'bg-primary'
        )}), linear-gradient(to bottom, ${color('primary')}, ${color(
          'secondary'
        )});
              background-origin: border-box;
              background-clip: content-box, border-box;"
      ></div>
    </button>`;
  }
}

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.