Giter VIP home page Giter VIP logo

twelvecash's Introduction

Twelve Cash

โš ๏ธ Caution: This is alpha software. Seeking feedback and reviews.

This is an attempt to encode bitcoin payment instructions, specifically BOLT 12 offers, into DNS records. For users, this means something that looks like [email protected], but resolves to a BOLT12 offer when a BOLT12 supporting wallet attempts to pay to it.

This work was inspired by Bastien Teinturier's post Lightning Address in a Bolt 12 world. From there, we have incorporated further ideas from Matt Corallo and Bastien Teinturier's BIP Draft for DNS Payment Instructions.

This does not currently support DNSSEC as outlined in the BIP draft, but adding that is part of our roadmap.

How to Use

Create a User Name

Hit the API endpoint https://twelve.cash/record with a POST request containing the payload:

{
    "localPart": "satoshi",
    "bolt12": "lno1...9uuq"
}

Lookup a User Name

You can verify that this worked by opening a shell and running:

dig txt satoshi.user._bitcoin-payment.twelve.cash

The expected output should be:

satoshi.user._bitcoin-payment.twelve.cash. 3600 IN TXT "bitcoin:?lno=lno1pgtyymmvwscnygzsv9uk6etwwssyzerywfjhxuckyypme4su43qu44v09r28p6whddr62zkyuj68ha68kky2za4zrdu9uuq"

Validate a User Name

For this, we rely on the dnssec-prover tool from TheBlueMatt. THis (or something like it) should be built into any tool that facilitates payments to Twelve Cash addresses. However, we have exposed this on our website frontend so you can experiment and validate these addresses.

Roadmap

  • Create API for adding bitcoin payment instructions to DNS records
  • Create Web UI for creating user names
  • Integrate API into popular bitcoin wallet - Zeus
  • Add support for DNSSEC
  • Follow BIP Draft progress and update TwelveCash as the spec matures
  • Create easy way for users to edit/update their Twelve Cash user name

Development

You can use this tool with Cloudflare or Digital OCean DNS. However, if you want to properly implement human-readable addresses BIP, you will need to use Cloudflare sicne they support DNSSEC.

Cloudflare

  • Setup your domain with DNSSEC - Docs
  • Create an API token in Cloudflare, giving it access to your domain name
  • In the .env file, set PROVIDER="cloudflare" and add your Cloudflare API token and domain ID (which you can find by clicking on your domain name in Cloudflare and scrolling down the page)

Digital Ocean

  • Create a personal access token on Digital Ocean and add it to .env.local
  • In the .env file, set PROVIDER="digitalocean" and add your Digital Ocean API token

Running the Dev Server

Run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

twelvecash's People

Contributors

sbddesign avatar chdwlch 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.