Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

17
Building Browser-Based Blockchain Applications ( with blockstrap - the complete blockchain developer stack ) Presented by Mark Smalley ( @m_smalley ) at #FOSSAsia, Singapore, March 2015 DIRECTOR’S CUT

Transcript of Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Page 1: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Building Browser-Based Blockchain Applications

( with blockstrap - the complete blockchain developer stack ) !!

Presented by Mark Smalley ( @m_smalley ) at #FOSSAsia, Singapore, March 2015

DIRECTOR’S CUT

Page 2: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

What is bitcoin a blockchain? !

( Disclaimer: I help to organize NoSQL Asia )

Page 3: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• 18 Years in Malaysia - 10 Years in OpenSource Evangelism

• 1st MongoDB Master in Asia, won Award for MongoPress

• Kuala Lumpur MongoDB User Group was Largest in Asia

• Built BrainControl (Firefox OS App) to try to get a job at Mozilla

• Got 16,000 Uniques in 24 days and into 500 Startups instead

!

• In my mind, blockchains are the world’s 1st freely available, always accessible distributed transactional data-stores…

What does NoSQL and Bitcoin have in common?

Page 4: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

But is anyone really using it? !

( NYSE led a US$75 Million investment into Coinbase )

Page 5: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• Reid Hoffman (Founder of Linked-In) has personally invested over US$20 Million into blockchain infrastructure services

• Andreessen Horowitz (renowned VC in SV) has invested over US$100 Million into blockchain startups in the past 12 months

• Peter Thiel (1st Investor in Facebook) has provided scholarship grants to blockchain pioneers (Vilatik of Ethereum) who then raised over US$12 Million from crowd-funding in 30 days

• Bill Gates (Microsoft) calls it a technological tour-deforce!

• “it” being Bitcoin…

Who else is invested or interested in this technology…?

Page 6: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• The Bitcoin Blockchain is currently 30GB (unindexed)

• It is broadcasted by over 6,000 actively distributed nodes

• Handling approximately US$500 Million in daily transactions

• The networking power used to secure the Bitcoin public ledger (underlying database) is more than 1,000 times faster than the top 500 supercomputers combined at 600+ exaFLOPS

• Which leads to there being no surprise that over US$1 Billion is expected to be invested into blockchain startups in 2015

• Bitcoin is just one of countless blockchain “ applications “

Bitcoin: What is really backing it and it’s value?

Page 7: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• Working directly with the blockchains by running your own web-accessible nodes requires extensive infrastructure and security

• It also means having to deal directly with the default QTs using RPC and (or) having to run your own parsers and data stores

• This results in an obvious need for third-party API providers - PS. We have our own public API too :-)!

• Although for the first time in history, we can now:- Safely send “value” instantly from one person to another- Do so anywhere using browsers whilst maintaining ownershipThe complexities of blockchain development continues to grow

Blockchain Development: Why do we need frameworks?

Page 8: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• Sending coins from one person to another (even with an API) requires:

• Cycling through available addresses under your control for any remaining unspent inputs; adding their public keys to an array as you go and until equalling or surpassing the required balance

• You must then add the required outputs to the array, which includes the public keys belonging to the persons you want to send the coins to and the public keys of the place to send back the change

• A single transaction can include multiple inputs and outputs with simple signatures involving sole ownership or even keys with shared ownership

• The array must then be encrypted using the private keys belonging to the addresses used for the inputs and can then be relayed to the network as a simple HEX-based string via direct RPC or web-based API support

• Whoever has possession of the private keys belonging to any unspent inputs can control when and where the value of those inputs can be transferred

Crypto-Currency Transactions: How to send a coin?

Page 9: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Sending coins with Blockstrap is as simple as a single line of code

!$.fn.blockstrap.blockchains.send(to, amount, from, keys, callback, chain)

Page 10: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

our framework brings themes, plugins, hooks and filters to eight different blockchains directly in the browser without any access to private keys

Introducing Blockstrap - http://blockstrap.com

Page 11: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

e27 referred to us as “ The WordPress of Bitcoin ”

!https://angel.co/neuroware-io/activity#press

Page 12: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

• Include a single JS file into HTML header for framework to run

• All dependencies and modules are auto-loaded from config files

• Personal information is used inline to generate deterministic salts

• Salt and all public information is stored in browser’s LocalStorage

• LocalStorage can also be used to cache all imported app assets

• This can be easy exported, imported or recreated on other devices

• JSON end-points used for dynamic data with Mustache templates

• Make everything as modular as possible and available on GitHub

How our framework simplifies blockchain development

Page 13: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Issue Prioritizer (Included with Framework as Sample Theme)

create donation addresses for issues or tasks and allow the community to vote on their priority by making contributions

Page 14: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Multi-Currency Block Explorer - http://blockchains.io

allows you to view and search for blocks, transactions and addresses from within eight different blockchains including bitcoin, litecoin, dogecoin and darkcoin

Page 15: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

Self-Hosted Deterministic Crypto-Currency PayWall for WordPress

assign default pricing per word, post or site and or override each post with its own unique settings without storing any private keys anywhere

Page 16: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

PROJECTS IN OUR OWN PIPELINE!

Anonymous Data Authentication

Browser-Based POS

Decentralized Login & Exchange

!

But there is more coming from other startups who are either using our framework or in some cases just our API

are much more exciting than ours!

COMING SOON

Page 17: Blockstrap at FOSS Asia - 2015 - Building Browser-Based Blockchain Applications

How to get involved…?!!

Version 0.4 was forked eight times with 0.5 released next month having two public contributions and hundreds of outstanding fixes and enhancements

!!

GitHub - http://github.com/blockstrap!Twitter - http://twitter.com/blockstrap

Website - http://blockstrap.com