Getting StartedΒΆ

  1. Install Archon from NPM

Note

As of v2.0.0 web3.js is a peer-dependency and should be installed alongside @kleros/archon.

yarn add '@kleros/archon@^2.0.0' 'web3@^1.4.0'
  1. Import Archon into your project
var Archon = require('@kleros/archon')
  1. Initialize an instance of Archon using an Ethereum Provider and, optionally, an IPFS Gateway.
// By default Archon uses 'https://gateway.ipfs.io' as the default IPFS gateway. To use your own gateway, pass the gateway URI as the 2nd parameter to Archon.
var archon = new Archon('https://mainnet.infura.io')

Note

A provider is needed so that the codebase knows how to connect to the Ethereum network. You can use a connection to your own node, or to a hosted node such as infura. web3.js will make RPC calls to the provider to fetch data from the blockchain.

Note

A gateway is needed to access IPFS files that might be referenced in evidence or metaEvidence.

Now you are all set! Use your Archon object to interact with arbitrable and arbitrator smart contracts on the blockchain.