Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pay for the usage of a resource #1

Open
nodestory opened this issue Mar 17, 2020 · 1 comment
Open

pay for the usage of a resource #1

nodestory opened this issue Mar 17, 2020 · 1 comment

Comments

@nodestory
Copy link

nodestory commented Mar 17, 2020

User story

As a developer, I want to pay for the usage of a resource so I can use it in my program.

Acceptance criteria

  1. The payments are made in BTC through the Lightning network.
  2. The client can retrieve the macaroon upon the payment succeeds.

Suggestions from Blockchain Commons

I would start with understanding LND from lightning labs. You can use btcd, their Go implementation of Bitcoin under it, but would suggest hosting it on top of bitcoind.

If you use Macintosh’s as your desktop development environment, I would suggest you install using Bitcoin Standup which also installs tor.
https://github.com/BlockchainCommons/Bitcoin-Standup At some point we want Bitcoin Standup to optionally install various lightning implementations. PRs welcome :-)

You’ll want testnet first — don’t use real money yet!

Once each of you have LND working on your desktop and laptops, set up some testnet routes, and maybe play with FullyNoded2 over Tor with testnet Bitcoin. Then install some mobile wallets that work with your own personal LND Servers.

@hxw
Copy link

hxw commented Mar 19, 2020

suggested list of tasks

  • main lnd for "bitmark" payment channel (and associated testnet bitcoind)
  • one or more client lnds (perhaps every one on team)
  • server interface accepts request for quantity calculates price & save macaroon in DB
  • lnd interface, given a price asks lnd to make invoice
  • payment (possibly existing wallet that supports lnd testnet: PC/Web/mobile?)
  • interface to monitor for payments on the "bitmark" channel and inform server
  • how to reply with macaroon from DB

Above does not include execution which needs;

  • check macaroon for signature validity
  • extract minimum access permissions from macaroon [set intersection, min(number,…)] involves DB access
  • incorporation of macaroon into testnet API server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants