Provider
BaseProvider
Kind: global class
.requestId() ⇒
string
.request(data) ⇒
Promise.<*>
.call(method, ...params) ⇒
Promise.<*>
.send(method, [params]) ⇒
Promise.<*>
.batch(array) ⇒
Promise.<Array>
new BaseProvider([options])
baseProvider.requestId() ⇒ string
string
Gen a random json rpc id. It is used in call
method, overwrite it to gen your own id.
Kind: instance method of BaseProvider
baseProvider.request(data) ⇒ Promise.<*>
Promise.<*>
Call a json rpc method with params
Kind: instance method of BaseProvider
Returns: Promise.<*>
- Json rpc method return value.
Example
baseProvider.call(method, ...params) ⇒ Promise.<*>
Promise.<*>
Call a json rpc method with params
Kind: instance method of BaseProvider
Returns: Promise.<*>
- Json rpc method return value.
Example
baseProvider.send(method, [params]) ⇒ Promise.<*>
Promise.<*>
Send a json rpc method request
Kind: instance method of BaseProvider
Returns: Promise.<*>
- Json rpc method return value.
Example
baseProvider.batch(array) ⇒ Promise.<Array>
Promise.<Array>
Batch call json rpc methods with params
Kind: instance method of BaseProvider
Example
Last updated