November 2018
Intermediate to advanced
528 pages
13h 21m
English
Web3.js is designed to work with a local RPC node, and all of its functions use synchronous HTTP requests by default. If you want to make an asynchronous request, you can pass an optional callback as the last parameter to most functions. All callbacks us an error-first callback pattern, as follows:
web3.eth.foo(argument1,..,argumentn, function(error, result) { if (!error) { console.log(result); }});
Read now
Unlock full access