bitcoinrpc · PyPI

Write your own Bitcoin RPC API in Javascript (Node.js and React)

If you are running a full node, it's easy to setup an app that interfaces with it using a backend API such as Node, Python, etc. There's a good tutorial here about it if you want to build Node/React Javascript apps on top of Bitcoin Core! You can make a block explorer, testnet wallet, node dashboard, and more.
https://medium.com/@peterjd42/build-your-own-bitcoin-api-using-node-js-and-bitcoin-core-251e613623db
submitted by FunOptimizer42 to Bitcoin [link] [comments]

RiB Newsletter #14 – Are We Smart (Contract) Yet?

We’re seeing a bunch of interesting Rust blockchain and crypto projects, so this month the “Interesting Things” section is loaded up with news, papers, and project links.
This month, Elrond, appeared on our radar with the launch of their mainnet. Although not written in Rust, it runs Rust smart contracts on its Arwen WASM VM, which itself is based on the Rust Wasmer VM. Along with NEAR, Nervos, and Enigma (and probably others), this continues an encouraging trend of blockchains enabling smart contracts in Rust. See the “Interesting Things” section for examples of Elrond’s Rust contracts.
Rust continues to be popular for research into zero-knowledge proofs, with Microsoft releasing Spartan, a zk-SNARK system without trusted setup.
In RiB news, we published a late one-year anniversary blog post. It has some reflection on the changes to, and growth of, RiB over the last year.
The Awesome Blockchain Rust project, which is maintained by Sun under the rust-in-blockchain GitHub org, has received a stream of updates recently, and is now published as the Awesome-RiB page on rustinblockchain.org.
It’s a pretty good resource for finding blockchain-related Rust projects, with links to many of the more prominent and mature projects noted in the RiB newsletter. It could use more eyes on it though.

Project Spotlight

Each month we like to shine a light on a notable Rust blockchain project. This month that project is…
ethers.rs
ethers.rs is an Ethereum & Celo library and wallet implementation, implemented as a port of the ethers.js library to Rust.
Ethereum client programming is usually done in JavaScript with either web3.js or ethers.js, with ethers.js being the newer of the two. These clients communicate to an Ethereum node, typically via JSON-RPC (or, when in the browser, via an “injected” client provider that follows EIP-1193, like MetaMask).
ethers.rs then provides a strongly-typed alternative for writing software that interacts with the Ethereum network.
As of now it is only suited for non-browser use cases, but if you prefer hacking in Rust to JavaScript, as some of us surely do, it is worth looking into for your next Ethereum project.
The author of ethers.rs, Georgios Konstantopoulos, accepts donations to sponsor their work.
Note that there is also a Rust alternative to web3.js, rust-web3.

Interesting Things

News

Blog Posts

Papers

Projects

Podcasts and Videos


Read more: https://rustinblockchain.org/newsletters/2020-08-05-are-we-smart-contract-yet/
submitted by Aimeedeer to rust [link] [comments]

Adding Monero support to a P2P game, need some advice

Hello everyone,
I'm currently in the process of adding Monero support to a peer-to-peer game I've been working on and would like to ask this community for some advice.
The application has a few hard requirements that must be met:
  1. The Monero integration must be done using JavaScript (primarily for Node but browser's okay too).
  2. The application must be able to create addresses and accompanying private keys internally (no CLI or external API). Preferably, these should be derived addresses using a master or main one (like HD wallets in Bitcoin).
  3. The application must be able to generate raw transactions internally -- no CLI or or external API. For this part let's assume that the input UTXOs are going to be available somehow (from a database, for example).
  4. The application must be able to sign raw transactions internally -- no CLI or or external API.
When I say "no CLI", I mean no RPC wallet or daemon; no external API calls either.
Essentially, I should be able to do the above offline, using JavaScript only, and then just post the signed transactions later (this part can be done via CLI or API). These are core requirements for the project otherwise I'd just use RPC or a service and save myself a lot of work.
So my question is: is there a documented JavaScript library that supports all of the above functionality?
I found a project called mymonero-core-js which appears to do what I'd need, but there doesn't seem to be any accompanying documentation (the included unit tests don't offer much information). Does this documentation exist?
There's also an offline wallet generator but it's also undocumented and kinda unwieldy (one huge file).
The game (my project), already supports Bitcoin and Bitcoin Cash using these constraints, and I've done fairly extensive work with Ethereum, smart contracts, and crypto in general (not just cryptocurrencies, I mean), so I shouldn't need much hand-holding.
Thanks muchly in advance!
P.S. It's not my intention to advertise my project so I haven't posted a link but I'll be happy to share if anyone asks.
submitted by monican_agent to Monero [link] [comments]

New Ethereum Developer Course

Hey All! We've been working heads down on a new developer curriculum for the last year. We're excited to announce it's finally here.
This curriculum is composed primarily of in-browser coding tutorials and challenges (no need to install any dependencies!). It also includes videos and guides which will help you apply what you learned in your local development environment when you're done with the course.
The full course includes:
Learning JavaScript: A collection of JavaScript coding tutorials and challenges which thoroughly teach JS from scratch with the latest ECMAScript features. Networking: Writing Asynchronous Code and communicating with servers through APIs Data Structures: Building and understanding data structures that are important to blockchain programming (especially trees and linked lists) Blockchain: Understanding Bitcoin, Proof-Of-Work, Digital Signatures and building core blockchain data structures. As well as learning about Ethereum, the EVM, ethers.js, and the Ethereum Node JSON-RPC API. Smart Contracts: Our largest section! This includes 21 coding tutorials and challenges thoroughly teaching the latest Solidity version 0.6.x from the very basics. Decentralized Applications: Deploy Smart Contracts and interact with them through ethers.js. You'll have three new working decentralized applications at the end of this section which you'll be able to extend upon to build bigger projects!
You can find the full listing here: https://www.chainshot.com/curriculum
The course is available through a monthly subscription. We'll also be starting live coding classes next month for all subscribers!
We hope you'll choose to learn with us. Let us know if you have any questions/concerns. All feedback is welcome. :)
submitted by dan-nolan to ethdev [link] [comments]

Monthly Nano News: December 2019 + Year Recap Special

This is what NANO has been up to lately. I don't think I lie if I say it has been quite an amazing year!
See you soon and happy new year! Something nice is coming soon that I have been working on for a while, stay tuned..

December 2019

November 2019

October 2019

September 2019

August 2019

July 2019

June 2019

May 2019

Apr 2019

Mar 2019

Feb 2019

Jan 2019


More news here: https://nanolinks.info/news

https://preview.redd.it/9sw5nkoxlt741.png?width=749&format=png&auto=webp&s=3426d4eafb9430c0304a6d161596102536df4318
submitted by Joohansson to nanocurrency [link] [comments]

ETHEREUM FRONTEND JAVASCRIPT APIS: WHAT YOU NEED TO KNOW

ETHEREUM FRONTEND JAVASCRIPT APIS: WHAT YOU NEED TO KNOW

https://preview.redd.it/9djdo90nx9051.jpg?width=2400&format=pjpg&auto=webp&s=54ca700da20bac0692ed294a31e75cfefb96f671
Blockchain has emerged as a popular technology, and if you are planning to make a career in this field, then there are various certification programs. When we talk about Blockchain, then it becomes important to mention about Ethereum. It is a cryptocurrency and an open-source platform as well. There has been some great development in this field, and those who are planning to learn about Ethereum must go for a certified Ethereum course.
Blockchain developers who are developing apps on Ethereum must know about the different frontend javascript which can simplify their task. In this blog, we will be highlight three such popular javascript APIs.
Ethereum Overview:
Ethereum emerged after Bitcoin and has now become a popular Blockchain platform. It is a cryptocurrency as well. It is an open-source software platform. Ethereum offers a flexible platform to the developer so that they can develop decentralized apps with ease.
Although scalability is a bit of an issue with Ethereum, in the current scenario, it is one of the best platforms for decentralized application development.
Looking at the broader spectrum and use of Blockchain, it has become a great career opportunity for many. Hence, option for certified Blockchain Developer is the right way to give your career the right boost.
What is API?
API is a set of the protocol which is used of building and integrating the applications across different platforms. APIs eventually simplifies app development and enables seamless interaction of your products and services with the user.
Popular frontend Javascript APIs:
Web3.js- This is a collection of libraries which empowers you to connect with remote Ethereum node. It is achieved by using HTTP or IPC connection. This is used for the following :

  1. Send ether from one account to another
  2. Interact with smart contracts
  3. Retrieve user account
It interacts with Ethereum Blockchain with JSON RPC protocol. A copy of all the data and code is present on the Blockchain. The API requests an individual Ethereum node with JSON RPC to read and write data to the network.
Ethers.js
Another frontend javascript is Ethere.js, which is used by most of the decentralized application developers owing to its features and functionalities. It has the following main features:

  1. It is open source
  2. It is completely safe as it keeps private keys restricted to the clients
  3. You can import and export using JSON wallets which again adds to the security feature
  4. Import and export BIP 39 mnemonic phrases
  5. You can connect to Ethereum nodes via JSON-RPC, MetaMask, INFURA, or Etherscan.
  6. It is completely TypeScript ready
  7. It offers complete functionality for all Ethereym needs
  8. Extensive documentation
  9. It has a huge collection of test cases
  10. It has an MIT Licence.
If you are looking for another API to develop javascript with Ethereum, then you must consider Ether.js. It is loaded with features that any Blockchain developer would require. The library is designed in such a way that it matches the need of the client. With the use of ether.js, it becomes easier to write javascript-based wallets.
Light.js
The third entrant in our list is light.js. It provides high-level tools which are used for developing efficient Dapps on the light client. This is also a great alternative to web3.js. It works with remote nodes and makes it easy for a developer to build decentralized applications with ease.
Here it becomes important to mention that light.js chooses the best pattern which works with light clients, it listens to headers and makes API calls on a new header an ensures that network calls are not extreme.
The end objective is to put up a high-level library such that the decentralized app developers can make use of this and create apps.
Besides, these there are other APIs like Web3-wrapper can also be used by blockchain developer. These APIs aim to simplify the task of the developer so that they can create apps which work seamlessly.
Final Thoughts
If you are working on a decentralized application developed, then you would come across either of these apps or will be using one of them. In case you are new to this field and are looking for gaining comprehensive knowledge in this field, then you must go for a Certified Ethereum Expert online training program by Blockchain Council. This exhaustive program will help you learn about Ethereum, APIs and allied concepts and at the same time, learn how to use them. In case you want to learn how to use smart contracts on Ethereum based applications, then you must opt for Certified Solidity Developer coursesby Blockchain Council. Connect with us today to explore more about Ethereum.
submitted by Blockchain_org to BlockchainStartups [link] [comments]

⚡ Lightning Network Megathread ⚡

Last updated 2018-01-29
This post is a collaboration with the Bitcoin community to create a one-stop source for Lightning Network information.
There are still questions in the FAQ that are unanswered, if you know the answer and can provide a source please do so!

⚡What is the Lightning Network? ⚡

Explanations:

Image Explanations:

Specifications / White Papers

Videos

Lightning Network Experts on Reddit

  • starkbot - (Elizabeth Stark - Lightning Labs)
  • roasbeef - (Olaoluwa Osuntokun - Lightning Labs)
  • stile65 - (Alex Akselrod - Lightning Labs)
  • cfromknecht - (Conner Fromknecht - Lightning Labs)
  • RustyReddit - (Rusty Russell - Blockstream)
  • cdecker - (Christian Decker - Blockstream)
  • Dryja - (Tadge Dryja - Digital Currency Initiative)
  • josephpoon - (Joseph Poon)
  • fdrn - (Fabrice Drouin - ACINQ )
  • pmpadiou - (Pierre-Marie Padiou - ACINQ)

Lightning Network Experts on Twitter

  • @starkness - (Elizabeth Stark - Lightning Labs)
  • @roasbeef - (Olaoluwa Osuntokun - Lightning Labs)
  • @stile65 - (Alex Akselrod - Lightning Labs)
  • @bitconner - (Conner Fromknecht - Lightning Labs)
  • @johanth - (Johan Halseth - Lightning Labs)
  • @bvu - (Bryan Vu - Lightning Labs)
  • @rusty_twit - (Rusty Russell - Blockstream)
  • @snyke - (Christian Decker - Blockstream)
  • @JackMallers - (Jack Mallers - Zap)
  • @tdryja - (Tadge Dryja - Digital Currency Initiative)
  • @jcp - (Joseph Poon)
  • @alexbosworth - (Alex Bosworth - yalls.org)

Medium Posts

Learning Resources

Books

Desktop Interfaces

Web Interfaces

Tutorials and resources

Lightning on Testnet

Lightning Wallets

Place a testnet transaction

Altcoin Trading using Lightning

  • ZigZag - Disclaimer You must trust ZigZag to send to Target Address

Lightning on Mainnet

Warning - Testing should be done on Testnet

Atomic Swaps

Developer Documentation and Resources

Lightning implementations

  • LND - Lightning Network Daemon (Golang)
  • eclair - A Scala implementation of the Lightning Network (Scala)
  • c-lightning - A Lightning Network implementation in C
  • lit - Lightning Network node software (Golang)
  • lightning-onion - Onion Routed Micropayments for the Lightning Network (Golang)
  • lightning-integration - Lightning Integration Testing Framework
  • ptarmigan - C++ BOLT-Compliant Lightning Network Implementation [Incomplete]

Libraries

Lightning Network Visualizers/Explorers

Testnet

Mainnet

Payment Processors

  • BTCPay - Next stable version will include Lightning Network

Community

Slack

IRC

Slack Channel

Discord Channel

Miscellaneous

⚡ Lightning FAQs ⚡

If you can answer please PM me and include source if possible. Feel free to help keep these answers up to date and as brief but correct as possible
Is Lightning Bitcoin?
Yes. You pick a peer and after some setup, create a bitcoin transaction to fund the lightning channel; it’ll then take another transaction to close it and release your funds. You and your peer always hold a bitcoin transaction to get your funds whenever you want: just broadcast to the blockchain like normal. In other words, you and your peer create a shared account, and then use Lightning to securely negotiate who gets how much from that shared account, without waiting for the bitcoin blockchain.
Is the Lightning Network open source?
Yes, Lightning is open source. Anyone can review the code (in the same way as the bitcoin code)
Who owns and controls the Lightning Network?
Similar to the bitcoin network, no one will ever own or control the Lightning Network. The code is open source and free for anyone to download and review. Anyone can run a node and be part of the network.
I’ve heard that Lightning transactions are happening “off-chain”…Does that mean that my bitcoin will be removed from the blockchain?
No, your bitcoin will never leave the blockchain. Instead your bitcoin will be held in a multi-signature address as long as your channel stays open. When the channel is closed; the final transaction will be added to the blockchain. “Off-chain” is not a perfect term, but it is used due to the fact that the transfer of ownership is no longer reflected on the blockchain until the channel is closed.
Do I need a constant connection to run a lightning node?
Not necessarily,
Example: A and B have a channel. 1 BTC each. A sends B 0.5 BTC. B sends back 0.25 BTC. Balance should be A = 0.75, B = 1.25. If A gets disconnected, B can publish the first Tx where the balance was A = 0.5 and B = 1.5. If the node B does in fact attempt to cheat by publishing an old state (such as the A=0.5 and B=1.5 state), this cheat can then be detected on-chain and used to steal the cheaters funds, i.e., A can see the closing transaction, notice it's an old one and grab all funds in the channel (A=2, B=0). The time that A has in order to react to the cheating counterparty is given by the CheckLockTimeVerify (CLTV) in the cheating transaction, which is adjustable. So if A foresees that it'll be able to check in about once every 24 hours it'll require that the CLTV is at least that large, if it's once a week then that's fine too. You definitely do not need to be online and watching the chain 24/7, just make sure to check in once in a while before the CLTV expires. Alternatively you can outsource the watch duties, in order to keep the CLTV timeouts low. This can be achieved both with trusted third parties or untrusted ones (watchtowers). In the case of a unilateral close, e.g., you just go offline and never come back, the other endpoint will have to wait for that timeout to expire to get its funds back. So peers might not accept channels with extremely high CLTV timeouts. -- Source
What Are Lightning’s Advantages?
Tiny payments are possible: since fees are proportional to the payment amount, you can pay a fraction of a cent; accounting is even done in thousandths of a satoshi. Payments are settled instantly: the money is sent in the time it takes to cross the network to your destination and back, typically a fraction of a second.
Does Lightning require Segregated Witness?
Yes, but not in theory. You could make a poorer lightning network without it, which has higher risks when establishing channels (you might have to wait a month if things go wrong!), has limited channel lifetime, longer minimum payment expiry times on each hop, is less efficient and has less robust outsourcing. The entire spec as written today assumes segregated witness, as it solves all these problems.
Can I Send Funds From Lightning to a Normal Bitcoin Address?
No, for now. For the first version of the protocol, if you wanted to send a normal bitcoin transaction using your channel, you have to close it, send the funds, then reopen the channel (3 transactions). In future versions, you and your peer would agree to spend out of your lightning channel funds just like a normal bitcoin payment, allowing you to use your lightning wallet like a normal bitcoin wallet.
Can I Make Money Running a Lightning Node?
Not really. Anyone can set up a node, and so it’s a race to the bottom on fees. In practice, we may see the network use a nominal fee and not change very much, which only provides an incremental incentive to route on a node you’re going to use yourself, and not enough to run one merely for fees. Having clients use criteria other than fees (e.g. randomness, diversity) in route selection will also help this.
What is the release date for Lightning on Mainnet?
Lightning is already being tested on the Mainnet Twitter Link but as for a specific date, Jameson Lopp says it best
Would there be any KYC/AML issues with certain nodes?
Nope, because there is no custody ever involved. It's just like forwarding packets. -- Source
What is the delay time for the recipient of a transaction receiving confirmation?
Furthermore, the Lightning Network scales not with the transaction throughput of the underlying blockchain, but with modern data processing and latency limits - payments can be made nearly as quickly as packets can be sent. -- Source
How does the lightning network prevent centralization?
Bitcoin Stack Exchange Answer
What are Channel Factories and how do they work?
Bitcoin Stack Exchange Answer
How does the Lightning network work in simple terms?
Bitcoin Stack Exchange Answer
How are paths found in Lightning Network?
Bitcoin Stack Exchange Answer
How would the lightning network work between exchanges?
Each exchange will get to decide and need to implement the software into their system, but some ideas have been outlined here: Google Doc - Lightning Exchanges
Note that by virtue of the usual benefits of cost-less, instantaneous transactions, lightning will make arbitrage between exchanges much more efficient and thus lead to consistent pricing across exchange that adopt it. -- Source
How do lightning nodes find other lightning nodes?
Stack Exchange Answer
Does every user need to store the state of the complete Lightning Network?
According to Rusty's calculations we should be able to store 1 million nodes in about 100 MB, so that should work even for mobile phones. Beyond that we have some proposals ready to lighten the load on endpoints, but we'll cross that bridge when we get there. -- Source
Would I need to download the complete state every time I open the App and make a payment?
No you'd remember the information from the last time you started the app and only sync the differences. This is not yet implemented, but it shouldn't be too hard to get a preliminary protocol working if that turns out to be a problem. -- Source
What needs to happen for the Lightning Network to be deployed and what can I do as a user to help?
Lightning is based on participants in the network running lightning node software that enables them to interact with other nodes. This does not require being a full bitcoin node, but you will have to run "lnd", "eclair", or one of the other node softwares listed above.
All lightning wallets have node software integrated into them, because that is necessary to create payment channels and conduct payments on the network, but you can also intentionally run lnd or similar for public benefit - e.g. you can hold open payment channels or channels with higher volume, than you need for your own transactions. You would be compensated in modest fees by those who transact across your node with multi-hop payments. -- Source
Is there anyway for someone who isn't a developer to meaningfully contribute?
Sure, you can help write up educational material. You can learn and read more about the tech at http://dev.lightning.community/resources. You can test the various desktop and mobile apps out there (Lightning Desktop, Zap, Eclair apps). -- Source
Do I need to be a miner to be a Lightning Network node?
No -- Source
Do I need to run a full Bitcoin node to run a lightning node?
lit doesn't depend on having your own full node -- it automatically connects to full nodes on the network. -- Source
LND uses a light client mode, so it doesn't require a full node. The name of the light client it uses is called neutrino
How does the lightning network stop "Cheating" (Someone broadcasting an old transaction)?
Upon opening a channel, the two endpoints first agree on a reserve value, below which the channel balance may not drop. This is to make sure that both endpoints always have some skin in the game as rustyreddit puts it :-)
For a cheat to become worth it, the opponent has to be absolutely sure that you cannot retaliate against him during the timeout. So he has to make sure you never ever get network connectivity during that time. Having someone else also watching for channel closures and notifying you, or releasing a canned retaliation, makes this even harder for the attacker. This is because if he misjudged you being truly offline you can retaliate by grabbing all of its funds. Spotty connections, DDoS, and similar will not provide the attacker the necessary guarantees to make cheating worthwhile. Any form of uncertainty about your online status acts as a deterrent to the other endpoint. -- Source
How many times would someone need to open and close their lightning channels?
You typically want to have more than one channel open at any given time for redundancy's sake. And we imagine open and close will probably be automated for the most part. In fact we already have a feature in LND called autopilot that can automatically open channels for a user.
Frequency will depend whether the funds are needed on-chain or more useful on LN. -- Source
Will the lightning network reduce BTC Liquidity due to "locking-up" funds in channels?
Stack Exchange Answer
Can the Lightning Network work on any other cryptocurrency? How?
Stack Exchange Answer
When setting up a Lightning Network Node are fees set for the entire node, or each channel when opened?
You don't really set up a "node" in the sense that anyone with more than one channel can automatically be a node and route payments. Fees on LN can be set by the node, and can change dynamically on the network. -- Source
Can Lightning routing fees be changed dynamically, without closing channels?
Yes but it has to be implemented in the Lightning software being used. -- Source
How can you make sure that there will be routes with large enough balances to handle transactions?
You won't have to do anything. With autopilot enabled, it'll automatically open and close channels based on the availability of the network. -- Source
How does the Lightning Network stop flooding nodes (DDoS) with micro transactions? Is this even an issue?
Stack Exchange Answer

Unanswered Questions

How do on-chain fees work when opening and closing channels? Who pays the fee?
How does the Lightning Network work for mobile users?
What are the best practices for securing a lightning node?
What is a lightning "hub"?
How does lightning handle cross chain (Atomic) swaps?

Special Thanks and Notes

  • Many links found from awesome-lightning-network github
  • Everyone who submitted a question or concern!
  • I'm continuing to format for an easier Mobile experience!
submitted by codedaway to Bitcoin [link] [comments]

February report on ConsenSys spoke developments

We've got a full report on what the spokes at ConsenSys have been up to. Check out more here.
EDIT: Fixed broken link (Infura - Investing in the Decentralization of Ethereum” - Thanks u/shazow!)

Alethio

A comprehensive suite of blockchain exploration, analysis, and forecasting products for the Ethereum network.

Allinfra

All infrastructure, for all — platform for the tokenization of large scale unlisted infrastructure.

Bounties Network

Freelance task fulfillment, paying out in any Ethereum token upon successful completion.

Decrypt Media

A daily news site covering all things crypto and the advent of the decentralized web.

Endjinn

Simulate your key token mechanisms to get on the awesome future usage timeline.

Fathom

A decentralized peer assessment protocol forming the foundation of a universal academic system.

Gitcoin

The easiest way to leverage the open source community to incentivize or monetize work.

Grid+

Leverages the public Ethereum blockchain to give consumers direct access to wholesale energy markets.

Helena

A decentralized platform for curated fundamental token research and analysis.

Infura

A scalable, standards-based, globally distributed cluster and API endpoint for Ethereum, IPFS, and other infrastructures.

Kaleido

An all-in-one enterprise SaaS platform that radically simplifies the creation and operation of secure blockchain networks and accelerates the journey from PoC to Production.

Kauri

The Ethereum community’s technical knowledge network.

Liquality

Swap cryptocurrencies without middlemen.

LitePaper

A simple knowledge base for the crypto-verse.

Meridio

A blockchain platform for creating, managing, and transferring fractional real estate ownership.

MetaMask

MetaMask is a browser extension that allows you to run Ethereum dApps right in your browser without running a full Ethereum node.

Nethereum

A .NET integration library for Ethereum allowing users to interact with Ethereum clients like Geth or Parity using RPC.

OpenLaw

A blockchain-based protocol for the creation and execution of legal agreements in a user-friendly, compliant way.

PegaSys

A protocol engineering team building Ethereum tech for the public chain community and leading enterprises.

Rhombus

Securely connects smart contracts with accurate, computable real-world data.

Truffle

A development environment, testing framework, and asset pipeline for Ethereum-based smart contracts and dapps.

TruSet

Building multi-sided marketplaces to collect, validate, publish, and commercialize business-critical reference data.

uPort

A self-sovereign identity management platform that allows users to register their own identity on Ethereum, send and request credentials, sign transactions, and securely manage keys and data.
submitted by ConsenSys_Socialite to ethereum [link] [comments]

function return value undefined with node js

Hi guys,

I'm new in the javascript world and now I have a problem with a simple function that returns value because this value is not defined, but if I print the value in the function with console.log, the result is correct

My class with the function
const {createBitcoinRpc} = require('@carnesen/bitcoin-rpc'); module.exports = WrapperRPC; var bitcoinRpc; function WrapperRPC(rpcuser, rpcpassword) { this.rpcuser = rpcuser; this.rpcpassword = rpcpassword; this.rpcHref = 'http://' + this.rpcuser + ':' + this.rpcpassword + '@127.0.0.1:8332'; bitcoinRpc = createBitcoinRpc(this.rpcHref); //TODO settin this variable } WrapperRPC.prototype.getDimensionBlockchain = function(){ console.debug("the url is:" + this.rpcHref); bitcoinRpc("getblockcount").then(result => { console.debug("The result command is: " + result); this.result = result; return this.result; }).catch(exception => { console.error('exception generated: ' + exception) }) }; WrapperRPC.prototype.getHashBlock = function (heightBlock) { console.debug("Run command getblockhash"); bitcoinRpc('getblockhash', { height: heightBlock }).then(result => { console.debug("The result command is: " + result); this.result = result; return this.result; }).catch(exception => { console.error('exception generated: ' + exception) }); } 
My main
const express = require('express'); const app = express(); const port = 3000; const WrapperRPC = require('./model/WrapperRPCBitcoin'); var path = require('path'); app.get('/', function(req, res) { res.sendFile(path.join(__dirname + '/index.html')); console.log("try to run rpc"); let rpc = new WrapperRPC('vincent', 'vincent'); let numbarBlock = rpc.getDimensionBlockchain(); console.debug("height blockchain: " + numbarBlock); for(i = 0; i < numbarBlock; i++){ var hashBlock = rpc.getHashBlock(i); console.debug('Hash block ' + i + ' is: ' + hashBlock); } }); // Console will print the message app.listen(port, () => console.log(`Example app listening on port ${port} at the link http://localhost:${port}/`)); 
My log
Example app listening on port 3000 at the link http://localhost:3000/ try to run rpc the url is:http://vincent:[email protected]:8332 height blockchain: undefined The result command is: 586965 
The log is correct The result command is: 586965 but is printed after the height blockchain: undefined What happens in JavaScript?
submitted by crazyjoker96 to learnjavascript [link] [comments]

🚀launch🚀 of developer.ravencoin.online

Intro

Today i am happy to announce the release of ravencoin.online's new developer platform Developer.ravencoin.online. Featuring the powerful RVNBOX-SDK, REST, GUI for deploying and scaling and a Market for monetizing your work.
committed to helping change the world with Ravencoin by providing a best in class suite of tools for developers to SUPERCHARGE their RVN workflow.

RVNBOX

ravencoin.online’s developer platform is based on the popular RVNBOX javascript framework. Offering utility methods for Mnemonics, HDNodes, ECPairs, Crypto, Address conversion, Transactions and much more.
Learn More...

REST

The RVN JSON RPC over HTTP including a fully documented and interactive GUI which developers can use to test their ideas and confirm their code is making proper API calls.
Learn More...

GUI

BIP44 development wallet. Convert between address Types. Create QR codes for WIF, XPub and XPrivs. Sign and verify messages.
Learn More...

Mastering Ravencoin

Based on Mastering Bitcoin by Andreas M. Antonopoulos, Mastering Ravencoin is the ultimate master level course. Covering topics ranging from "What is Ravencoin?", "How Ravencoin Works", "Keys, Addresses, Wallets", "Transactions", "The Blockchain", "Mining and Consensus" and much more Mastering Ravencoin will take your knowledge from hobbyist to professional step-by-step.
Learn More...

Tutorials

Step by step instructions to build Ravencoin apps from scratch. See real world examples get built and have your own working copies to bootstrap your project from.
Learn More...

Open Source

Spot an error? Want to add something? Developer.ravencoin.online is 100% open source under the MIT Open Source License. Clone the developer.ravencoin.online repo and create a pull request. all tools can be found on our github organization raven-community

Summary

The Ravencoin developer community is growing quickly. Daily new apps launch which push the boundaries of what is possible with blockchain technology. We're committed to continuing to release cutting-edge open source tooling to help developers go from idea to application. Watch this space for blog posts, video streams and more.
submitted by MSFTserver to Ravencoin [link] [comments]

Jaxx - Monero Integration Update #3

Hey Monero Community, Anthony from Jaxx here with another update.
For those of you that don't know we at Decentral recently joined the Monero community and are working on integrating Monero to our Jaxx Wallet. Jaxx is a free multi-token, multi-platform light wallet that's dedicated to uniting the crypto-ecosystem and providing an interface to Blockchain tech (in a similar way the browser unleashed the power of the internet to the masses). Among other things, it is the goal of Jaxx and Decentral to allow people to be in full control of their digital lives. All keys in Jaxx are held client-side and a single 12-word backup phrase allows for the derivation of the keys to all tokens we support, and will ever support. Also, all our products are design and user experience driven as we make stuff for the masses, so that people (like my non-technical Dad) can have a great experience.
One thing I’d like everyone to remember and keep in mind is that we’re still very new to the community and much of the history of the project is not clear to us still. As you read the rest of my message, please keep this in mind and know that we are not trying to call anyone out or cause conflict in the Monero community. We just want to see Monero thrive.
Here we go.
Monero integration has been on a radar for over a year and over the past weeks and months we dove headfirst into XMR and have since spent more than 400 hours working on this particular integration. During this time we have gained massive knowledge on the inner workings of the Monero protocol, and of the Monero development ecosystem. Our goal is to provide a lightweight (~3 meg) solution for the Monero community that will allow them to manage, send and receive XMR on pretty much any platform or device.
As a result of working to integrate other projects, our 3 years of experience developing wallets, through my experience as a founder of Ethereum, as an early Bitcoin adopter and community builder, and via extensive research and code creation we’ve done for Monero, we believe to have determined the critical issues that are leading to problems with Monero growth and that these problems are hindering the adoption and success of the Monero ecosystem.
As such we are putting a call out for support from the Monero development community to help us break through these problems. We are confident that if these roadblocks can be bypassed, Monero has a great chance to flourish. We believe that unless solved, these issues will greatly hinder Monero's ability to compete with projects that have similar features
Before I get into the issues I want to explain and give some background on how our integration process usually works when we tackle a new project, then I'll explain how things are currently working with the Monero Integration.
Our goal is to implement an XMR lightweight wallet in Jaxx that connects with a high level cryptocurrency API. In most cases (with our previous integrations) there is an existing client library to use for the particular token in question. We have a full stack blockchain development team of 9 that can go from modifying cryptocurrencies nodes to providing high level APIs. We first start any project by making feasibility analysis to check how easy or difficult is to integrate a light wallet with a cryptocurrency. When we see critical unsolved issues or roadblocks, we talk with the specific cryptocurrency team as early as possible. If they have the resources they help us to mitigate those issues. When they don’t have the resources to make the necessary changes, we take the responsibility for these tasks but they provide some guidance based on their expertise.
That's how things normally work. Here's how it's working with Monero.
We researched the feasibility of providing a light wallet for Monero and found the main challenges to be:
  1. Non-existing lightweight client library support (for a project as old as Monero its peculiar no dev has done this)
  2. We would have to implement support for anonymization features.
  3. There are RPC (Remote Procedure Calls) API Limitations that would require changes in the Monero daemon
Here's what we've been able to accomplish so far:
  1. Finish a Monero javascript client library
  2. Use the same approach as MyMonero re anonymization (e.g. persisting the viewkeys)
  3. Modify Monero Core to support a lightweight wallet.
Currently we are developing an API on top of monerod to provide additional web services.
Now here's the problem.
We have realized critical issues that are difficult to solve at the RPC API level without the development community's support. Basically we would like to get the global indexes in the transaction output via the RPC API, which are required for sending transactions, but when we call methods such as gettransactions we don't receive this information. We also try to call the *.bin RPC methods as well but they return error code HTTP 404. Ok fine. If this method is not supported in monerod there are two alternatives: 1) either the core team can add them to make it easier for the entire community to build apps on top of Monero, or 2) we can modify the Monero node itself to add support for new RPC methods required for building applications (like the Jaxx wallet or any other wallet).
The problem with us choosing the second method is the amount of time it's going to take us to "instrument" the code is unknown as this would be an intensive research project by people who didn't work on developing any part of Monero. Like a needle in a haystack. Also, should we have to directly hook into the code it could become easily broken in the future as new code gets pushed by the Monero core team. If (and that's a big if) we were to go down this route of instrumenting the code we would need a commitment from the Monero core team to accept the code push and to continue supporting it in the main branch.
Without either of these two options being completed it means that Monero as it is isn't able to bring enough information outside of the node in order to develop a full wallet.
As mentioned in previous update posts, we'd like to thank Fluffypony for providing us with assistance with the integration. But we need more help than he's been able or willing to provide. The issue is that his help has been limited as although he is a main contributor to Monero, he also owns MyMonero and has a profit incentive not to give away his "secret sauce" on the back-end. You see, MyMonero hooks right into the code and this coupled with him being one of the few main contributors on the Monero Github gives MyMonero an upper hand against other projects trying to create similar services.
We understand and accept Fluffypony's motives and situation. He's put a ton or resources and effort into Monero and into MyMonero. What we'd like to do is call on anyone else who may be able to help to break through these barriers. Please email me at anthonyATdecentral.ca if you would like to join our slack channel and see if we can crack the problem’s we’ve identified and are facing. We fear if we don't have more assistance from core Monero devs to act as guides we (or anyone else for that matter) will not be able to bring the products and services necessary for the Monero community to flourish.
Have a great weekend all!
Anthony Diiorio
CEO & Founder
Decentral / jaxx.io
EDIT - We are re-evaluating our transparency and use of Reddit to communicate with the Monero community. The amount of venomous comments and lack of support in response to said comments are really disheartening and don't inspire us to continue working on the Monero integration...but maybe that's what some of those commenting want.
EDIT - After internal discussions we've decided not to use Reddit any more to discuss our Monero plans. Turning out to be more detrimental to our team then its worth. Moving the discussions fully to our Slack channel and our other social media avenues.
submitted by Jaxx_adiiorio to Monero [link] [comments]

A very simple Bitcoin Cash API free for everyone /r/btc

A very simple Bitcoin Cash API free for everyone /btc submitted by BitcoinAllBot to BitcoinAll [link] [comments]

Analysis & graphs of block sizes

I made some useful graphs to help those taking a side in the block size debate make a more informed decision.
First, I only looked at blocks found after approximately 10 minutes, to avoid the time variance from influencing the result.
Then, I split the blocks into three categories (which you can make your own judgement on the relevance of):
The output of this analysis can be seen either here raw, or here with a 2-week rolling average to smooth it. Note the bottom has an adjustable slider to change the size of the graph you are viewing.
To reproduce these results:
  1. Clone my GitHub branch "measureblockchain": git clone -b measureblockchain git://github.com/luke-jbitcoin
  2. Build it like Bitcoin Core is normally built.
  3. Run it instead of your normal Bitcoin Core node. Note it is based on 0.10, so all the usual upgrade/downgrade notes apply. Pipe stderr to a file, usually done by adding to the end of your command: 2>output.txt
  4. Wait for the node to sync, if it isn't already.
  5. Execute the measureblockchain RPC. This always returns 0, but does the analysis and writes to stderr. It takes like half an hour on my PC.
  6. Transform the output to the desired format. I used: perl -mPOSIX -ne 'm/\+),(\d+),(-?\d+)/g or die $_; next unless ($3 > 590 && $3 < 610); $t=$2; $t=POSIX::strftime "%m/%d/%Y %H:%M:%S", gmtime $t;print "$t";@a=();while(m/\G,(\d+),(\d+)/g){push @a,$1}print ",$a[1],$a[2],$a[0]";print "\n"' output-dygraphs.txt
  7. Paste the output from this into the Dygraphs Javascript code; this is pretty simple if you fork the one I used.
tl;dr: We're barely reaching 400k blocks today, and we could get by with 300k blocks if we had to.
submitted by luke-jr to Bitcoin [link] [comments]

Factom Protocol Information

The Factom protocol is an open source general purpose data protocol built by an international group of technology companies that extends the security of blockchain to any type of data. Just as TCP / IP enables the WWW, the Factom Protocol enables countless applications to be built on top of it.
Factom is built from scratch and has novel design implementations that set it apart from all other blockchain protocols. We are confident these features will help propel Factom to become the internet's data integrity layer. You are invited to delve into our ecosystem and we look forward to answering any questions you have.
Token and Tokenomics
While the Factom Protocol is a two token system, only the Factoid (FCT) is transferable and able to be traded on exchanges. Entry Credits (EC) are obtained by burning FCT and are used to enter data into the Factom Protocol. Entry Credits are $.001 each and that price is fixed. Therefore, if FCT is worth $1.00 and you burn it, you receive 1,000 EC. If FCT is worth $10.00 each and you burn one, you receive 10,000 EC. This brilliant two token system allows for:
  1. The value of FCT to theoretically increase the more the Factom Protocol is utilized.
  2. Companies and governments can effectively budget for entering data onto the Protocol based upon their estimated usage.
  3. Subscription systems can be setup with 3rd parties where companies and governments don't have to hold cryptocurrency if they don't want to or can't for compliance reasons. FCT are still burned for EC by the 3rd party company but the subscriber is charged a small markup for the service.
Governance
Community Discussion
Development
Block Explorers
Tools
Testnet Resources
Top Exchanges (by volume)
Education
AMAs
Wallets
Authority Node Operators
Authority Node Operators are the coalition of companies that decentralize the Factom Protocol. .
Committees and Working Groups
As the Factom Protocol is one of the most decentralized blockchain projects in existence with no central authority, committees and working groups have been formed to deal with specific tasks.
Past Newsletters
submitted by DChapman77 to factom [link] [comments]

Qtum GitHub Development Guide

(translated from original on WeChat https://mp.weixin.qq.com/s/ArCd9K8RwVm4g6LKQqAhlQ)
This article will serve as a quick start guide for Qtum developers to develop projects that use Qtum on GitHub.
What is Qtum?
The official developer described Qtum as a decentralized blockchain project that supports smart contracts based on the UTXO model integrated into Qtum's unique Account Abstraction Layer.
Qtum Developer
No matter what product or technical tool you want to develop with Qtum's technical tools, you'll find development tools that will help you get the most out of it. This article will guide you through the basic setup, including setting up a local Qtum network, and will give you a number of tool features, such as showing how to connect to the test network for more detailed testing, how to connect to the main network when preparing for deployment, with QRC20 tokens for example, using a smart contract to issue tokens.
For Qtum developers, the most useful part is how to use the Qtum JS library to manipulate the parts of the smart contract, and even more cool is to use React to create a simple DAPP part.
Read through the entire guide for development in the Qtum environment. http://book.qtum.site/en/
I believe that after using Qtum's series of tools, you will be more interested in exploring Qtum's content and projects for developers. Let's take a look at some of the key GitHub projects that Qtum offers.
Qtum GitHub Developer Project
The following Qtum development tools are very useful for the development of any Qtum DAPP or Qtum-related projects.
Qtum Boilerplate Project
An introductory project created by Qtum developers to help you get started creating DAPPs on Qtum. Follow the code repository instructions to gain insight into many aspects of Qtum and what it means to create a Qtum DAPP. https://github.com/qtumproject/dApp-boilerplate
Qtum Docker
For developers involved in Qtum development, the Qtum docker project is very important. The Qtum team created a docker image so that all developers can run the Qtum network locally, and any operating system is available from the docker hub.
So, if you have already downloaded docker, congratulations, you are already advanced. (If you need help setting up your Qtum regtest environment, you can see the instructions in the connection guide, which explains in detail how to set up the environment: https://steemit.com/qtum/@cryptomindeqtum-blockchain-development-environment-setup)
regtest is easy to use and provides a better understanding of how Qtum works, and whether it's a smart contract or DAPP, it's a key tool for testing projects. https://github.com/qtumproject/qtum-docker
Qmix
Developed as a Qtum version of Ethereum’s remix, Qmix is ​​a browser-based IDE that lets you write the right smart contracts.
Not only can you write contracts and ensure correctness, but you can also deploy and interact directly with the Qmix UI. In order to be able to deploy and interact with smart contracts, you need to connect to the Qtum network. Click on the application's help options to find instructions on how to connect your Qmix to your local regtest network. Once connected, you can thoroughly test smart contracts before actually deploying to the main network. If you plan to develop Qtum DAPPs, you will most likely need to be familiar with this tool.
Qmix was developed as a Qtum contract, so the GitHub repository for this project is not on Qtum's GitHub, but here: https://github.com/spacemanholdings/QMix
Qtum JS
Qtum JS is a JavaScript library specifically developed for Qtum Smart Contracts that is very useful for DAPP development. Use this tool to build an application and interact with a smart contract, or you can interact directly with Qtum RPC using a framework you like (such as react or angular). Find all the operations that use the Qtum JS library in the documentation. https://qtumproject.github.io/qtumjs-doc/?javascript#qtumrpc
Qtum JS Wallet
Similar to Qtum JS, this is a simplified library that helps you build a lean wallet. It extracts from another Qtum project and uses the Qtum explorer API to get information about the Qtum blockchain. It's a simple yet powerful library that meets all your needs for your wallet. https://github.com/qtumproject/qtumjs-wallet
Qtum API
The Qtum API is another very useful tool that you might use in any application. Use the API to get information from the Qtum network that your project might need. On the GitHub page, you can see a complete list of all API calls and the responses they return. For example, Qtum explorer uses this tool and can also use it as a sample project. https://github.com/qtumproject/insight-api
Qtum project under development
If you are interested in participating in the ongoing Qtum project, do your best to learn more. If you find any problems, you can submit a GitHub issue, and look forward to discovering and resolving and providing pull requests, which will help us grow with Qtum.
Other Qtum projects worth studying
Qtum Electrum Lightweight Qtum Wallet. https://github.com/qtumproject/qtum-electrum
Qtum Enterprise (QtumX) is currently under development and is Qtum's enterprise environment, so group companies can run their own alliance chains. https://github.com/qtumproject/qtum-enterprise
Qtum Explorer This is the explorer's GitHub repository discussed earlier in this article. https://github.com/qtumproject/qtum-explorer
Qtum Solar is a prototype project that Qtum is working on to deploy smart contracts. https://github.com/qtumproject/solar
The Qtum x86 team is about to launch exciting new features. The project is a virtual machine that emulates an x86 processor, thus allowing users to write and compile smart contracts on popular programming languages, rather than being limited to Solidity. https://github.com/qtumproject/x86lib
Qtum Lightning is the Qtum implementation of Bitcoin Lightning Network https://github.com/qtumproject/qtum-lightning
Qtum Portal is a web server that allows you to run third-party DAPPS https://github.com/qtumproject/qtumportal
Qtum IOS wallet is a Qtum wallet repository built for iOS. https://github.com/qtumproject/qtum-ios
Qtum android wallet is a Qtum wallet repository that can be found in the Google Store. https://github.com/qtumproject/qtum-android
submitted by realJB395 to Qtum [link] [comments]

Moving Cloud Chain-Technical Demonstration

Moving Cloud Chain-Technical Demonstration

Overview Moving Cloud Chain Platform

As the leading public chain, Moving Cloud Chain is developed under MIT License Agreement with all code and technical data open-sourced. This is initially designed to create a stable and user-friendly developing platform for developers in intelligent industry. In this ecosystem with series of SDK and api connected, it helps developers construct side-chain decentralized application including customerizing side chain, smart contract and application development management. In this case, MCC works as “raw materials” for other coins or DApp projects and the Moving Cloud Coin is a native incentive token for community contributors. Security is maintained on the platform by the use of super network nodes. These network nodes can be controlled by organizations or individual users that are directly taking part in the ecosystem.

Moving Cloud Chain Blockchain Technology

Technical Advantages of Moving Cloud Chain Platform

1. Technical Architecture
Moving Cloud Chain is developed totally under Node.js, an open-sourced and cross-platform JavaScript runt-time environment that executes JavaScript code outside a browser. The back end uses Express.js and front end uses Angular.js with application client structured under Electron framework and Database under SQLite. Applications in both front end and back end are programmed by using Javascript language and the interface programmed HTML5 and CSS3.Node.js. This architecture provides Moving Cloud Chain the advantages in asynchronous processing mechanism and the best suit for digital asset applications interaction in real time. And of course it finally enables Moving Cloud Chain platform the technical guarantee for instant messaging of high-performance.
2. Sidechain Technology
Since the bitcoin network system is limited to only several standard transaction due to the scalability problem, Moving Cloud Chain uses side chain under Ethereum system that supports not only transfer, but also some other smart contract application like in multi-signature, underlying security and lottery.
By using sidechain mechanism, all chains have separate distributed network nodes and independent users, investors and developers. This solves the problems of blocking among chains and also provides a separate set of hedger with customized consensus mechanism, blockchain parameters as well as transaction types.
Besides the separate chain network nodes, developers can also customize a decentralized DApp under Moving Cloud Chain platform. The sidechain can be entrusted under node cluster and forms a sharding mechanism which alleviate chain jam and blocking. All chains would have respective DApp under sidechain whose code logic uses Node.js with back end & front end using Json rpc protocol to communicate.
3. Account
Under bitcoin and other derivative system network, there is no any account for users to storage balance which is achieved via transaction status alteration within network. Moving Cloud Chain is not merely a currency system but also an application platform for varies DApps. And account is comparably a better choice for quicker and lower cost of transaction. All accounts in Moving Cloud Coin consist of a command, public and private key and an address where users can set secondary password. For better mnemonic processing, we provide 128 bit entropy with 12 words. Users themselves keep the commands which cannot found once lost.
4. Relational Database
Currently most blockchain system use some relatively simple irrational database like berkey db, leveldb for data storage which provides some simple data structure such as btree, hashtable, and queue. Although these structures can be processed for digital currency system, it’s far from enough for application platforms especially in fields of finance, banking and e-commerce. There are some advantages on relational database that Moving Cloud Chain is using:
  • Transaction processing
  • Low cost to updating database
  • Support some complex join query
Moving Cloud Chain choose sqlite, a lightweight embedded relational databases with 2T capacity. Within these database, all data information file can be freely shared among nodes that provides great convenience to DApp development.
5. Consensus Mechanism
Moving Cloud Chain use DPOS (Delegated Proof of Stake) consensus algorithm and client election system. Under Moving Cloud System, an effective and practical Byzantine fault-tolerant algorithm greatly reducing the possibility of network branching. No danger of double spending will come out if the total number of evil nodes for hard fork is under one third.
6. Sandbox mechanism
Moving Cloud Chain use VM module under Node.js environment to ensure sandbox mechanism. The VM module is the encapsulation of V8 engine that can process javascript code directly.
However since VM module alone doesn’t support systematic api from nodes like system file and network transmission, it’s really difficult to import data from third party without Require function and even impossible for modularization development. To solve this problem, browerify technology is required so as to pack all frequently-used third-party data in a js file and run DApp project under Moving Cloud Chain system smoothly. As for some system level api needing update, Moving Cloud Chain provides sidechain for interprocess communication to ensure security and function.

Case: Moving Cloud Chain Application

The Moving Cloud Chain is also an application in sports and intelligent fields under Moving Cloud Chain platform. In this application system, the service includes index & verify sports data and wallet service. POE consensus is proof of effort that collects and verifies data based on the sports & exercise from each user. The more participants exercise, the more contributions they make. Our native token asset-Moving Cloud Coin Token (MCC) functions as an incentive mechanism based on POE Mining consensus for network node contributors who facilitate our ecosystem operation. In this case, every single person who uses Moving Cloud products and DApp is doing POE Mining.

Moving Cloud Chain Case Application

Contact Us

【Website】https://www.mcsports.cn/
【Whitepaper】https://www.mcsports.cn/mcblock/
【facebook】https://www.facebook.com/Moving-Cloud-Chain-1973623086244715/
【twitter】https://twitter.com/McsportsM
【LinkedIn】https://www.linkedin.com/company/moving-cloud-chain-mcc/
【Medium】https://medium.com/@McsportsM
【Telegram】https://t.me/movingcloudtech
【Github】https://github.com/MovingCloudChain
submitted by McsportsM to MovingCloudChain_MCC [link] [comments]

BitWhite Photon

As you have been already heard, we are preparing important changes in the existing network architecture. Currently, the active work is under way to create a new update “BitWhite Photon”, you can follow the progress on Github: https://github.com/BTWhite/go-btw-photon
BitWhite Photon Throughout the development of the platform, we have encountered many difficulties related to JavaScript and the insufficiently good architecture embedded in the core of logic. We see a significant decrease in the speed of the network because of this, it does not suit us and we have to think more and more about how to improve the current situation.
BitWhite Photon as a revolutionary step to a truly bright future promises us a new protocol (Photon), which will combine dpos, pos, pow and dag. Photon does not talk only about the census of the current code in a new language, it talks about writing a new protocol. We want to create an infrastructure in which the processing of transactions will be handled only by those who really need it, thereby relieving delegates to a minimum. Despite all, we want to act honestly, so that delegates still pretend to be the managers of the network, we do not want to take away their reward and honor from them. In addition, delegates are the guarantee of decentralization of the project.
Why GO? It is difficult to find a language that would be both fast and simple enough for DAPP developers. Golang is the best option, because it runs tens of times faster than JavaScript and was developed by Google for its not very experienced programmers. Go is good not only with a rich set of built-in libraries, but also by imposing a single style and recommendations for good code, just read about gofmt.
Database In addition to slow JavaScript, we faced with the problem of SQLite (the database that is currently used). Despite the power of your server, this database still specializes in small sites or client bases with a small information flow. In our situation, even the update of information about the feasts of our delegates becomes a problem, and during a closed investigation we found that SQLite updated about 10 records per second during the network operation. It’s too slow, because sometimes we need to do it much faster. Therefore, we are looking towards a hybrid with two databases, one of them must be superfast, for example RocksDB or LevelDB, these low-level NoSQL databases run hundreds of times faster.
In any case, all this will allow creating an efficient and high-speed ecosystem in which a large number of programs can simultaneously work, a platform with which it will be comfortable for both developers and users.
Alpha release First alpha release of Photon Protocol has been already appeared on Github. This version is intended for developers, internal testing, but if you want you can download the archive and try the Protocol on your hardware.
Now it’s just a demonstration of the performance of the future system, the ability to send JSON-RPC requests and get the expected answers. However, this is a demonstration that Photon is already in working version.
The types of queries are described and examples of responses are provided as well, seehttps://github.com/BTWhite/go-btw-photon/blob/mastedocs/RPC-METHODS.md
If you find any issues, please describe them here:https://github.com/BTWhite/go-btw-photon/issues
t.me/WhiteBitcoin https://bitwhite.org/ #BitWhite #BTW
submitted by BitWhite to u/BitWhite [link] [comments]

[uncensored-r/Bitcoin] ? Lightning Network Megathread ?

The following post by codedaway is being replicated because some comments within the post(but not the post itself) have been silently removed.
The original post can be found(in censored form) at this link:
np.reddit.com/ Bitcoin/comments/7ojkoz
The original post's content was as follows:
This post is a collaboration with the Bitcoin community to create a one-stop source for Lightning Network information.
There are still questions in the FAQ that are unanswered, if you know the answer and can provide a source please do so!

?What is the Lightning Network? ?

Explanations:

Specifications / White Papers

Videos

Lightning Network Experts on Reddit

Lightning Network Experts on Twitter

  • @rusty_twit - (Rusty Russell - Blockstream)
  • @starkness - (Elizabeth Stark - Lightning Labs)
  • @roasbeef - (Olaoluwa Osuntokun - Lightning Labs)
  • @snyke - (Christian Decker - Blockstream)
  • @JackMallers - (Jack Mallers - Zap)
  • @tdryja - (Tadge Dryja - Digital Currency Initiative)
  • @jcp - (Joseph Poon - Lightning Labs)
  • @stile65 - (Alex Akselrod - Lightning Labs)
  • @bitconner - (Conner Fromknecht - Lightning Labs)

Medium Posts

Learning Resources

Books

Desktop Interfaces

Web Interfaces

Tutorials and resources

Lightning on Testnet

Lightning Wallet
Place a transaction
Instant Swaps for Altcoins using Lightning

Lightning on Mainnet

Atomic Swaps

Developer Documentation and Resources

Lightning implementations:

  • LND - Lightning Network Daemon (Golang)
  • eclair - A Scala implementation of the Lightning Network (Scala)
  • lit - Lightning Network node software (Golang)
  • c-lightning - A Lightning Network implementation in C
  • lightning-onion - Onion Routed Micropayments for the Lightning Network (Golang)
  • lightning-integration - Lightning Integration Testing Framework
  • ptarmigan - C++ BOLT-Compliant Lightning Network Implementation [Incomplete]

Libraries

submitted by censorship_notifier to noncensored_bitcoin [link] [comments]

[uncensored-r/Bitcoin] ? Lightning Network Megathread ?

The following post by codedaway is being replicated because some comments within the post(but not the post itself) have been silently removed.
The original post can be found(in censored form) at this link:
np.reddit.com/ Bitcoin/comments/7pwna9
The original post's content was as follows:
This post is a collaboration with the Bitcoin community to create a one-stop source for Lightning Network information.
There are still questions in the FAQ that are unanswered, if you know the answer and can provide a source please do so!

?What is the Lightning Network? ?

Explanations:

Image Explanations:

Specifications / White Papers

Videos

Lightning Network Experts on Reddit

  • starkbot - (Elizabeth Stark - Lightning Labs)
  • roasbeef - (Olaoluwa Osuntokun - Lightning Labs)
  • stile65 - (Alex Akselrod - Lightning Labs)
  • cfromknecht - (Conner Fromknecht - Lightning Labs)
  • RustyReddit - (Rusty Russell - Blockstream)
  • cdecker - (Christian Decker - Blockstream)
  • Dryja - (Tadge Dryja - Digital Currency Initiative)
  • josephpoon - (Joseph Poon)
  • fdrn - (Fabrice Drouin - ACINQ )
  • pmpadiou - (Pierre-Marie Padiou - ACINQ)

Lightning Network Experts on Twitter

  • @starkness - (Elizabeth Stark - Lightning Labs)
  • @roasbeef - (Olaoluwa Osuntokun - Lightning Labs)
  • @stile65 - (Alex Akselrod - Lightning Labs)
  • @bitconner - (Conner Fromknecht - Lightning Labs)
  • @johanth - (Johan Halseth - Lightning Labs)
  • @bvu - (Bryan Vu - Lightning Labs)
  • @rusty_twit - (Rusty Russell - Blockstream)
  • @snyke - (Christian Decker - Blockstream)
  • @JackMallers - (Jack Mallers - Zap)
  • @tdryja - (Tadge Dryja - Digital Currency Initiative)
  • @jcp - (Joseph Poon)
  • @alexbosworth - (Alex Bosworth - yalls.org)

Medium Posts

Learning Resources

Books

Desktop Interfaces

Web Interfaces

Tutorials and resources

Lightning on Testnet

Lightning Wallets

Place a testnet transaction

Altcoin Trading using Lightning

  • ZigZag - Disclaimer You must trust ZigZag to send to Target Address

Lightning on Mainnet

  • https://...
submitted by censorship_notifier to noncensored_bitcoin [link] [comments]

[uncensored-r/Bitcoin] Lightning Network Megathread

The following post by codedaway is being replicated because the post has been silently removed.
The original post can be found(in censored form) at this link:
np.reddit.com/ Bitcoin/comments/7npeh6
The original post's content was as follows:
Hi Everyone,
I'm trying to create a post that can be stickied with regards to the Lightning Network. This post should be used to provide as many links to as many resources as organized as possible. This is obviously a large task and I've tried to start it in hopes that I can crowdsource this in the comments to keep adding content to this post. Feel free to recommend any additions but please provide sources for your information. Also please correct myself or anything that appears up here that seems incorrect and I'll do my best to edit quickly.

What is the Lightning Network? ?

Explanations:

Specifications / White Papers

Videos

Lightning Network Experts on Reddit

Medium Posts

Learning Resources

Books

Desktop Interfaces

Web Interfaces

Tutorials and resources

Lightning on Testnet

Lightning Wallet
Place a transaction

Lightning on Mainnet

Atomic Swaps

Developer Documentation and Resources

Lightning implementations:

  • LND - Lightning Network Daemon (Golang)
  • eclair - A Scala implementation of the Lightning Network (Scala)
  • lit - Lightning Network node software (Golang)
  • c-lightning - A Lightning Network implementation in C
  • lightning-onion - Onion Routed Micropayments for the Lightning Network (Golang)
  • lightning-integration - Lightning Integration Testing Framework
  • ptarmigan - C++ BOLT-Compliant Lightning Network Implementation [Incomplete]

Libraries

Lightning Network Visualizer (Testnet)

Community

Slack

IRC

IRC channel

  • #li...
submitted by censorship_notifier to noncensored_bitcoin [link] [comments]

A very simple Bitcoin Cash API free for everyone

Hi everyone! After the split a lot of websites and tools are still using the legacy chain and they typically do not allow you to say "hey let me query Bitcoin Cash"
I'm sure this will get attacked but here is the URL:
https://hashes.download/#api
As it describes the API can be used by simply sending a POST to hashes.download/api with method set to the RPC method you want to call and params optionally set to an array of parameters to pass to the RPC call.
You can use it straight from within Javascript like $.ajax since I allow for cross origin JSON request.
The user interface you see on hashes.download is simply a proof of concept showing how Javascript can explore the blockchain using the API. I understand the user interface / explorer is very primitive, but it will be posted to Github soon anyhow (and all of the "source" to that interface is present by simply viewing source in your browser)
Please consider donating a small amount of Bitcoin Cash to the address given to cover bandwidth.
Thank you everyone for your support. If you want to get involved or have any ideas let me know.
submitted by KayRice to btc [link] [comments]

Why recreational dApps matter and how they can push Ethereum forward

I am the developer of a dApp named KryptoWar, it's a war game based entirely on the Ethereum Blockchain. I wanted to share with you a blog post to talk about recreational decentralized apps and why they matter.
This article was originally published here.
Just a couple of years ago, if you had told me that dApps were going to scale to a massive degree and generate millions of dollars in sales I would have called you crazy. However, 2017 certainly proved the potential of dApps. But how exactly?
Throughout 2017, both blockchain technology’s reputation managed to rapidly grow, as well as a variety of blockchain currencies. With an enhanced reputation, massive user-growth became inevitable. Today, dApps represent (in my opinion) one of the Blockchain's most promising use case.

Overview

Before diving in, I think I should clarify what dApps actually are. For starters, the term is short for decentralized application. If you’re already involved in the blockchain industry, the definition is self-explanatory and you can just skip to the next section. If you’re new, a typical app has a central authority, which is typically the creator of the app. Central authorities can play a negative influence on user-experience and privacy, whether through accessing your information used on the platform, censoring the content you put, and so on. A dApp takes away this central authority and often rewards users for contributing toward the success of the dApp.

How do dApps work?

Decentralized apps have been growing on par with Ethereum’s success as a result of Ethereum’s innate compatibility with developing apps. But the processes aren’t particularly intuitive. Just to clarify, this section is a vast over simplification of the overall process of dApps. To discuss how dApps truly work would require loads of more information and would distract the ultimate focus of this post—the importance of four recreational dApps. To deploy a dApp, it needs to have some sort of connection to the blockchain. Often times, to maintain distance from the main blockchain network—whether it’s for security purposes, performance, etc.—developers use sidechains, a form of decentralized blockchains, for dApps. One major tool used for browsing decentralized apps is known as web3js. The JavaScript API allows people to use dApps with tools like MetaMask or the Cipher Browser. Combined with a UI like the Ethereum test RPC (note: this requires nodeJS), you can use web3js to easily exchange smart contracts. Without further ado, let’s get into the importance of four specific recreational apps, starting with CryptoKitties.

CryptoKitties

This app is very likely the most known recreational dApp. Attracting headlines like “the Beanie Babies of blockchain” and “How one CryptoKitty was flipped for $60,000 in four days,” it is needless to say that CryptoKitties has garned quite a lot of traffic. I’m sure many of you already know about Cryptokitties but for those that don’t, it is an app where you can collect different digital cats. The cats themselves have different “genetic” makeups and so on, which makes each one distinct. The nuances of the game are cool, but the implications of its growth and the increased attention brought about one major “pro” of dApps and one major “con.” First: the good. CryptoKitties traffic is extremely high. In fact, in just a few days of being online, according to TechCrunch, the app already had handled over $1,000,000 in purchases. But that part isn’t as impressive as the next statistic—in the same period of time, nearly 15 percent of all Ethereum traffic was driven toward the game. The growth has proven that blockchain apps have the potential to become adopted at a mainstream degree, as well as become a part of popular culture. Now comes the bad. While Cryptokitties’ growth rate was shocking, the quick attention also brought scrutiny. With its success, it became increasingly clear that the app was not truly decentralized. In fact, in a Medium blog post, the CryptoKitties team explained how their app wouldn’t have been as user-friendly if it were completely decentralized. Specifically, the UI and gene algorithms were centralized. "Completely decentralizing CryptoKitties would have resulted in a game that wasn't as fun, and we would have crippled our efforts to bringing blockchain to the masses." Regardless, as cute of a game as it is, CryptoKitties has serious implications regarding the blockchain—and they are for the best. To best summarize the positive impact of the dApp, Buterin tweeted: “Agree it's not close to fully decentralized in its current form. But I think people see that it can be.” The game isn’t a complete decentralized success story but it’s a giant leap in the right direction.

Smart Billions

Recreational games, of course, include gambling—and, specifically, participating in a blockchain lottery. Smart Billions launched as one of the first decentralized lotteries and made a strong mark in potentially altering a global industry. With smart contracts, the blockchain lottery was able to increase its transparency and decrease the risk of fraud (since there’s no central authority who can skew the outcomes). The platform runs off of Ethereum and seems to show a lot of potential for dApps to be completely decentralized. However, right before launching, they had a big issue: they were hacked. In October, the smart lottery founding team offered a prize of $450,000 in Ether (1,500ETH at the time) to anyone who can hack the system and withdraw funds. It took two days for a couple of hackers to withdraw 400ETH or $120,000 then and win the hackathon. While the contest was for the improvement of Smart Billions, the successful hacking—in my eyes—deterred a lot from being as excited about the launch and instead being more cautious. The overall implication of this is that decentralized apps are a relatively new concept and, like most new concepts, they are susceptible. However, Smart Billion’s quick fix and subsequent launch proves that even when there are technical issues, the blockchain community will just quickly fix them and continue to grow—unlike most new industries, which lose consumer confidence from issues in their early stages.

KryptoWar

As the founder of KryptoWar, I had to talk about our work. Our game started as simple war game but is growing into something more complex where players can purchase factories and schools to sell weapons and certifications to other armies. Our goal with KryptoWar is to build a game completely decentralized so it felt like a great evolution to let players sell weapons to each other instead of getting them to purchase weapons from our smart contract.
At KryptoWar, we don’t use any side chain component. All of the data that runs the game is stored on the Ethereum blockchain. It’s great way to test the Blockchain and to create a completely decentralized experience.

Closing Remarks

As the world is becoming more aware and focused on Ethereum, we can expect the number of developers working on decentralized applications to continue grow rapidly. Even more, developing dApps themselves is also becoming easier with the release of tools like CryptoZombies, which have been largely successful in teaching developers to use Solidity and Web3js. Each of these apps represents a leap in the right direction for the building decentralized apps on the Ethereum blockchain. But it’s important to realize that this is just the beginning—and everyday, dApps are becoming increasingly more advanced. Soon, we will see larger-scale apps that have achieved complete decentralization.
I would love to hear your feedback about this article and your feeling toward recreational decentralized applications. Do you trust them? Have you joined any?
submitted by babaeth to ethereum [link] [comments]

Bitcoin JSON-RPC Tutorial 6 - JSON Parameters and Errors Bitcoin RPC Remote Code Execution Exploit for BitcoinCore 0.9-0.15.1 CVE-2017-9230 How to give your bitcoin node commands using a web server Using EOS with JavaScript RPC Calls Bitcoin JSON-RPC Tutorial 1

Running Bitcoin with the -server argument (or running bitcoind) tells it to function as a HTTP JSON-RPC server, but Basic access authentication must be used when communicating with it, and, for security, by default, the server only accepts connections from other processes on the same machine. If your HTTP or JSON library requires you to specify which 'realm' is authenticated, use 'jsonrpc'. A javascript Bitcoin library for node.js and browsers. Written in TypeScript, but committing the JS files to verify. Released under the terms of the MIT LICENSE. Should I use this in production? If you are thinking of using the master branch of this library in production, stop. Master is not stable; it is our development branch, and only tagged releases may be classified as stable. Can I trust ... Der Original-Bitcoin-Client führt eine korrekte Rundung für alle Werte, die er über das RPC-Interface enthält, durch. Das heißt, dass wenn der Wert 0.1 durch deine JSON-RPC-Library zum Wert "0.099999999999" konvertiert wird, dass dieser Wert wieder zu den nächsten 0.00000001 Bitcoins gerundet und daher korrekt als 0.1 BTC behandelt wird. Wissenswertes über Bitcoins Unser Bitcoin Chart zeigt Ihnen den aktuellen Bitcoin Kurs in Euro (Kürzel: BTC und XBT) sowie die Bitcoin Kursentwicklung (Bitcoincharts).Wenn Sie Bitcoins kaufen möchten, können Sie sich hier anmelden.In unseren Bitcoin.de FAQs und in unserem Tutorial "Mein erster Bitcoin" erfahren Sie, wie Sie Bitcoins verkaufen oder kaufen können. A client library to connect to Bitcoin Core RPC in JavaScript. - bitpay/bitcoind-rpc

[index] [7400] [42221] [19765] [45354] [6056] [36335] [26840] [34720] [1198] [36299]

Bitcoin JSON-RPC Tutorial 6 - JSON Parameters and Errors

How To Create Standalone Bitcoin Javascript Tool - Duration: 20:51. m1xolyd1an 629 views. 20:51 . How the Internet Works in 5 Minutes - Duration: 4:49. Aaron 2,741,060 views. 4:49. How to use ... Bitcoin RPC Remote Code Execution Exploit for BitcoinCore 0.9-0.15.1 CVE-2017-9230 ... Sending Bitcoin Transactions Programmatically with Javascript - Duration: 17:07. Decypher Media 12,074 views ... Bitcoin JSON-RPC tutorial. How to set up bitcoind on a VPS. BTC: 1NPrfWgJfkANmd1jt88A141PjhiarT8d9U HowTo Send a Bitcoin Transaction with JavaScript & Bitcore - Duration: 13:16. CuriousInventor 26,467 views. 13:16 . Predicting the Future of the Web Development (2020 and 2025) - Duration: 29:31 ... An introduction to the Bitcoin JSON-RPC tutorial series. BTC: 1NPrfWgJfkANmd1jt88A141PjhiarT8d9U

#