1.0.8 • Published 2 years ago

sedock v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

sedock.js

ES Version Node Version

This is the main package of sedock.js.

web3 contains the ideal setup for a Web3.js package.

Installation

You can install the package either using NPM or using Yarn

Using NPM

npm install sedock

Using Yarn

yarn add sedock

Using rpc requests

How to send transaction

    const sedoc = new Sedock("https://rpcnodeaddress")
    sedoc.eth.sendTransaction("device", "user", "some data")

How to get amount of created blocks on device

    const sedoc = new Sedock("https://rpcnodeaddress")
    sedoc.eth.getBlockNumber("device")

How to get block data

    const sedoc = new Sedock("https://rpcnodeaddress")
    sedoc.eth.getBlock("blocknumber", "device")

How to subscribe on blockchain events

    const sedoc = new Sedock("https://rpcnodeaddress")
    sedoc.ws.connect("ws://wsaddress:8001")

    sedoc.ws.subscribe((status, block) => {
        console.log(status, block)
    })
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago