Typescript-version of the incubed client/server
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode added License Oct 26, 2018
doc updated readme Oct 26, 2018
proxy added License Oct 26, 2018
src changed default to mainnet Oct 29, 2018
test added License Oct 26, 2018
.gitignore added logger May 9, 2018
.gitlab-ci.yml added Docker-image Oct 2, 2018
.npmignore changed default to mainnet Oct 29, 2018
.tslintignore added inital alpha-impl Mar 13, 2018
Dockerfile added License Oct 26, 2018
LICENSE fixed npm-release Oct 26, 2018
README.md more content in README Oct 29, 2018
package-lock.json updated readme Oct 26, 2018
package.json fixed npm-release Oct 26, 2018
tsconfig.json added proxy Oct 2, 2018
tslint.json added inital alpha-impl Mar 13, 2018



INCUBED = A trustless INcentivized remote Node Network = IN3

This is the Typescript-version of the incubed client.

Build Status

Getting started

npm install --save in3

In your code:

// import in3-Module
import In3Client from 'in3'
import * as web3 from 'web3'

// use the In3Client as Http-Provider
const web3 = new Web3(new In3Client({
    proof: true,
    signatureCount: 1,
    requestCount : 2,
    chainId: 'mainnet'

// use the web3 
const block = await web.eth.getBlockByNumber('latest')


In order to start the incubed-client as a standalone client (allowing others none-js-application to connect to it), you can start the container as

docker run -d -p 8545:8545  slockit/in3:latest --chainId=kovan

The application would then accept the following arguments:

param description
--nodeLimit the limit of nodes to store in the client.
--keepIn3 if true, the in3-section of thr response will be kept. Otherwise it will be removed after validating the data. This is useful for debugging or if the proof should be used afterwards.
--format the format for sending the data to the client. Default is json, but using cbor means using only 30-40% of the payload since it is using binary encoding
--autoConfig if true the config will be adjusted depending on the request
--retryWithoutProof if true the request may be handled without proof in case of an error. (use with care!)
--includeCode if true, the request should include the codes of all accounts. otherwise only the codeHash is returned. In this case the client may ask by calling eth_getCode() afterwards
--maxCodeCache number of max bytes used to cache the code in memory
--maxBlockCache number of number of blocks cached in memory
--verifiedHashes if the client sends a array of blockhashes the server will not deliver any signatures or blockheaders for these blocks, but only return a string with a number. This is automaticly updated by the cache, but can be overriden per request.
--proof if true the nodes should send a proof of the response
--signatureCount number of signatures requested
--minDeposit min stake of the server. Only nodes owning at least this amount will be chosen.
--replaceLatestBlock if specified, the blocknumber latest will be replaced by blockNumber- specified value
--requestCount the number of request send when getting a first answer
--timeout specifies the number of milliseconds before the request times out. increasing may be helpful if the device uses a slow connection.
--chainId servers to filter for the given chain. The chain-id based on EIP-155.
--chainRegistry main chain-registry contract
--mainChain main chain-id, where the chain registry is running.
--autoUpdateList if true the nodelist will be automaticly updated if the lastBlock is newer
--cacheStorage a cache handler offering 2 functions ( setItem(string,string), getItem(string) )
--loggerUrl a url of RES-Endpoint, the client will log all errors to. The client will post to this endpoint JSON like { id?, level, message, meta? }


The following docuemntations are available:


Currently incubed is deployed on the following chains:


Registry : 0xFdb0eA8AB08212A1fFfDB35aFacf37C3857083ca
ChainId : 0x1 (alias mainnet)
Status : https://in3.slock.it?n=mainnet
NodeList: https://in3.slock.it/mainnet/nd-3


Registry : 0x27a37a1210df14f7e058393d026e2fb53b7cf8c1
ChainId : 0x2a (alias kovan)
Status : https://in3.slock.it?n=kovan
NodeList: https://in3.slock.it/kovan/nd-3


Registry : 0x845E484b505443814B992Bf0319A5e8F5e407879
ChainId : 0x44d (alias tobalaba)
Status : https://in3.slock.it?n=tobalaba
NodeList: https://in3.slock.it/tobalaba/nd-3


Registry : 0x85613723dB1Bc29f332A37EeF10b61F8a4225c7e
ChainId : 0x4b1 (alias evan)
Status : https://in3.slock.it?n=evan
NodeList: https://in3.slock.it/evan/nd-3


Registry : 0xf0fb87f4757c77ea3416afe87f36acaa0496c7e9
ChainId : 0x7d0 (alias ipfs)
Status : https://in3.slock.it?n=ipfs
NodeList: https://in3.slock.it/ipfs/nd-3

Registering a own in3-node

If you want to participate in this network and also register a node, you need to send a transaction to the registry-contract calling registerServer(string _url, uint _props).

ABI of the registry:


To run a incubed node, you simply use docker-compose:

version: '2'
    image: slockit/in3-server:latest
    - $PWD/keys:/secure                                     # directory where the private key is stored 
    - 8500:8500/tcp                                         # open the port 8500 to be accessed by public
    - --privateKey=/secure/myKey.json                       # internal path to the key
    - --privateKeyPassphrase=dummy                          # passphrase to unlock the key
    - --chain=0x2a                                          # chain (kovan)
    - --rpcUrl=http://incubed-parity:8545                   # url of the kovan-client
    - --registry=0x85613723dB1Bc29f332A37EeF10b61F8a4225c7e # url of the incubed-registry 
    - --autoRegistry-url=http://in3.server:8500             # check or register this node for this url
    - --autoRegistry-deposit=2                              # deposit to use when registering

    image: slockit/parity-in3:v2.2                          # parity-image with the getProof-function implemented
    - --auto-update=none                                    # do not automaticly update the client
    - --pruning=archive 
    - --pruning-memory=30000                                # limit storage
    - --testnet                                             # kovan