aboutsummaryrefslogtreecommitdiffstats
path: root/lib/autoprovider.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-14 19:01:11 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-14 19:01:11 +0800
commit12bdb5f5509c205a7a868e02964ed25d10f4b000 (patch)
treea27f0a6f91434a5920719ed2209e524fe6982d19 /lib/autoprovider.js
parent8d1f96cc0aa608c319a48af5a3c2397b694d5930 (diff)
downloadgo-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar.gz
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar.bz2
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar.lz
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar.xz
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.tar.zst
go-tangerine-12bdb5f5509c205a7a868e02964ed25d10f4b000.zip
providers documentation
Diffstat (limited to 'lib/autoprovider.js')
-rw-r--r--lib/autoprovider.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/autoprovider.js b/lib/autoprovider.js
index 8460a144f..a2c265ccb 100644
--- a/lib/autoprovider.js
+++ b/lib/autoprovider.js
@@ -33,13 +33,16 @@ if (process.env.NODE_ENV !== 'build') {
var web3 = require('./web3'); // jshint ignore:line
}
-/// Automatically tries to setup correct provider
-/// First it checkes if we are ethereum browser (if navigator.qt object is available)
-/// if yes, we are using QtProvider
-/// if no, we check if it is possible to establish websockets connection with ethereum (ws://localhost:40404/eth is default)
-/// if it's not possible, we are using httprpc provider (http://localhost:8080)
-/// The constructor allows you to specify uris on which we are trying to connect over http or websockets
-/// You can do that by passing objects with fields httrpc and websockets
+/**
+ * AutoProvider object prototype is implementing 'provider protocol'
+ * Automatically tries to setup correct provider(Qt, WebSockets or HttpRpc)
+ * First it checkes if we are ethereum browser (if navigator.qt object is available)
+ * if yes, we are using QtProvider
+ * if no, we check if it is possible to establish websockets connection with ethereum (ws://localhost:40404/eth is default)
+ * if it's not possible, we are using httprpc provider (http://localhost:8080)
+ * The constructor allows you to specify uris on which we are trying to connect over http or websockets
+ * You can do that by passing objects with fields httrpc and websockets
+ */
var AutoProvider = function (userOptions) {
if (web3.haveProvider()) {
return;