We are team - Stream.

Inspiration

As a neural network engineer and open source enthusiast, Phillip is interested in encouraging neural network engineers to publish their models for public use. He figured, what better way to encourage people than to pay them? Rather than the UX challenge of convincing users to give up their credit card information, what could happen if users can connect to the service and stream bitcoin payments directly to the service providers? It would mean users only pay for what they need, can pay by code, and pay instantly for any services that they use — even machines could be programmed to make these payments automatically! The emergent properties of such a network of easy payments could be tremendous.

To pare the exercise down to a weekend inside, we decided to focus on the streaming payments part of this puzzle.

What it does

This repository allows python programmers to interact with a local lightning network node to create invoices, send, and pay them, all from python. This way any python developer can integrate payments and payment streaming into their libraries and services.

How we built it

We first spun up a lightning node — lightning is a speedy payment layer built on top of the bitcoin blockchain. Our lightning node used the bitcoin testnet as it’s settlement layer. We learned how to connect with one another as peers, allowing us to send and pay invoices between one another using the lightning CLI from LND. Then we wrapped these CLI commands into Python functions by having python send and receive data from the terminal. Finally we set up socket connections between client and server to give us a space to establish “trade agreements”, so that the client and server can negotiate a price per byte or price per second of processing time before automatically sending and paying lightning invoices between one another.

Challenges we ran into

LND (the open source golang implementation of a lightning node) was a Blackbox before we started using it, and the majority of our time was spent learning how to get it operational on our local machines, and figuring out how to interact with bitcoin main net and test net blockchains, along with tiny but important details like where we’ll receive blockchain data from.

For example, it was untenable for us to try to download the bitcoin blockchain locally for this hackathon (it’s so big!!!) so we figured out how to connect to “neutrino”, a public bitcoin node implantation. We ran into a problem that our neutrino connection was actually a test net implementation, yet we were running a main net LND node, and we misplaced some bitcoin in the confusion.

After funding our nodes, we had to open up ports on our laptop and open a channel with one another. This means having LND write a special “time lock” transaction to the blockchain, and having other lightning nodes recognize our connection (and waiting for our time lock transaction to be confirmed on the bitcoin test net)

After getting the LND channel open, we had to learn how to interact with them to create and pay invoices. Then we learned how to interact with them programmatically from python using the quick hack of reading and writing to std.in

Our final challenge was in architecting a connection pattern, so that a server and client can “handshake” one another before deciding to send a stream of payments.

Accomplishments that we're proud of

I can’t count the number of high fives we shared! Getting LND running on multiple laptops, opening up a channel with one another, our first sent and paid invoice, having invoices being sent and received using python! We’re so proud of one another for our curiosity and our effort knocking down these barriers :)

What we learned

We learned all of the above— lightning node operation, channel operation, interacting with LND using python, and working as a team.

What's next for Stream

Stream is just a seed of a much larger vision. It’s first priority is to make streaming payments mindlessly easy for python developers to implement into their tools and platforms.

From there, the only question is what we can build on top of it — and more importantly, what the open source community and economy of web can build with it!


Problem: Developers and Neural network models builders find it really hard to stream their models on pay per usage basis

Solution: We help developers to get access of developer tool for streaming payments so that they get autonomy to show their neural network models or videos on pay per usage basis. These creators will get access to lightning Network and will be able to stream payments. This tool will give to access of developer tool for streaming payments to developers so that they can stream neural network models or videos by streaming payments on pay per usage basis.

Stream helps in getting Access to lightning network and stream payments. It provides:

  • Faster payments
  • Convenience
  • Security
  • Simplicity
  • Multiple applications - example: developers can build platforms for content video creators where these creators can stream content using payment stream on pay per usage basis
  • Machine readable

Link of video: https://tinyurl.com/2wzaxk8b

Github link: https://github.com/blakeelias/streaming-payments

Presentation link: https://drive.google.com/file/d/1wxsule6fmlfo8kUGfRJj9xhoeFquQGyp/view?usp=sharing

Built With

  • lightning
Share this project:

Updates