Skip to content
You are reading Codefi Orchestrate development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.

How to connect Orchestrate to a Blockchain network

Use the Orchestrate Gateway API to connect Orchestrate to blockchain networks. Orchestrate is compatible with all Ethereum Blockchain networks (public or private) and supports connection to multiple networks simultaneously. For example, you could connect to the Ethereum mainnet and Rinkeby testnet on the same Orchestrate instance.

Connecting to a Blockchain network serves three purposes:

Tip

Check the REST API Reference or the JS SDK Reference for a detailed description of all endpoints.

Register a chain

Register a chain using the Orchestrate Gateway API by sending a POST request to the /chains endpoint.

Example

{
  "name": "mainnet",
  "urls": ["https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e"],
  "listener": {
    "backOffDuration": "1s",
    "depth": 0,
    "externalTxEnabled": false,
    "fromBlock": "latest"
  }
}
const chain = await client.registerChain({
  name: 'mainnet',
  urls: ['https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e'],
  listener: {
    fromBlock: 'latest',
    backoffDuration: '1s',
    depth: 0,
    externalTxEnabled: false,
  }
})
{
  "uuid": "b4374e6f-b28a-4bad-b4fe-bda36eaf849c"
  "chainID": "1",
  "name": "mainnet",
  "urls": ["https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e"],
  "listenerBackOffDuration": "5s",
  "listenerCurrentBlock": 0,
  "listenerDepth": 0,
  "listenerExternalTxEnabled": false,
  "listenerStartingBlock": 5000,
  "tenantID": "tenant",
  "createdAt": "2020-07-09T12:35:42.115395Z",
  "updatedAt": "2020-07-09T12:35:42.115395Z",
}
  • name - name of the chain. Must be unique.
  • urls - list of URLs of Ethereum nodes to connect to
  • listener (optional) - Transaction Listener configuration
    • fromBlock - block from which the Transaction Listener should start processing transactions (default latest)
    • backoffDuration - time to wait before trying to fetch a new mined block (for example 1s or 1m, default is 5s)
    • depth - block depth after which the Transaction Listener considers a block final and processes it (default 0)
    • externalTxEnabled - whether to listen to external transactions, meaning not crafted by Orchestrate (default false)

Register a private GoQuorum (Tessera) chain

To send private transactions using GoQuorum, you will have to register a private transaction manager when creating a chain.

Example

{
  "name": "mainnet",
  "urls": ["https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e"],
  "listener": {
    "backOffDuration": "1s",
    "depth": 0,
    "externalTxEnabled": false,
    "fromBlock": "latest"
  },
  "privateTxManager": {
    "type": "Tessera",
    "url": "http://tessera:3000",
  },
}
const chain = await client.registerChain({
  name: 'mainnet',
  urls: ['https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e'],
  listener: {
    fromBlock: 'latest',
    backoffDuration: '1s',
    depth: 0,
    externalTxEnabled: false,
  },
  "privateTxManager": {
    "type": "Tessera",
    "url": "http://tessera:3000",
  },
})
{
  "uuid": "b4374e6f-b28a-4bad-b4fe-bda36eaf849c"
  "chainID": "1",
  "name": "mainnet",
  "urls": ["https://mainnet.infura.io/v3/a73136601e6f4924a0baa4ed880b535e"],
  "listenerBackOffDuration": "5s",
  "listenerCurrentBlock": 0,
  "listenerDepth": 0,
  "listenerExternalTxEnabled": false,
  "listenerStartingBlock": 5000,
  "privateTxManager": {
    "uuid": "a4374e6f-b28a-4bad-b4fe-bda36eaf849c"
    "chainUUID": "b4374e6f-b28a-4bad-b4fe-bda36eaf849c",
    "createdAt": "2020-07-09T12:35:42.115395Z",
    "type": "Tessera",
    "url": "http://tessera:3000",
  },
  "tenantID": "tenant",
  "createdAt": "2020-07-09T12:35:42.115395Z",
  "updatedAt": "2020-07-09T12:35:42.115395Z",
}
  • privateTxManager(optional) - to be used for GoQuorum (Tessera) private transactions
    • url - transaction manager endpoint
    • type - currently only supports Tessera

Tip

If using Hyperledger Besu private transactions, configuring the private transaction manager is not required.

ConsenSys has acquired Quorum from J.P. Morgan. Please read the FAQ.
Questions or feedback? You can obtain paid professional support by Consensys at orchestrate@consensys.net