diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml
index be4057904..dce5bd06a 100644
--- a/.github/workflows/prod.yml
+++ b/.github/workflows/prod.yml
@@ -39,16 +39,6 @@ jobs:
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: 'echo "Successfully connected to $TESTNET_DOMAINNAME: `hostname`";'
- docs:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-python@v2
- with:
- python-version: 3.x
- - run: pip install mkdocs-material
- - run: cd modules/documentation && mkdocs gh-deploy --force && cd ../..
-
utils:
runs-on: ubuntu-20.04
steps:
diff --git a/.gitignore b/.gitignore
index 54f19e4ed..d9de13467 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,7 +47,6 @@ modules/contracts/typechain
# Docs
modules/client/docs
-modules/documentation/site
# IDEs and editors
**/*.launch
@@ -64,8 +63,6 @@ modules/documentation/site
**/*.*_backup
**/*.log
**/*.patch
-cypress/screenshots
-cypress/videos
# OS
**/.bash_history
diff --git a/.prettierignore b/.prettierignore
deleted file mode 100644
index 8435ea9b9..000000000
--- a/.prettierignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Ignored
-modules/documentation/
\ No newline at end of file
diff --git a/modules/documentation/docs/changelog.md b/changelog.md
similarity index 100%
rename from modules/documentation/docs/changelog.md
rename to changelog.md
diff --git a/cypress.json b/cypress.json
deleted file mode 100644
index b8fc98776..000000000
--- a/cypress.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "baseUrl": "http://localhost:3333",
- "env": {
- "NETWORK": "http://localhost:8545",
- "MNEMONIC": "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat",
- "PRIVATE_KEY": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"
- }
-}
\ No newline at end of file
diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json
deleted file mode 100644
index da18d9352..000000000
--- a/cypress/fixtures/example.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "Using fixtures to represent data",
- "email": "hello@cypress.io",
- "body": "Fixtures are a great way to mock data for responses to routes"
-}
\ No newline at end of file
diff --git a/cypress/integration/0_config.spec.js b/cypress/integration/0_config.spec.js
deleted file mode 100644
index ed03fcf32..000000000
--- a/cypress/integration/0_config.spec.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import my from "./utils";
-const carolUrl = "http://localhost:8005"; // Node A
-const daveUrl = "http://localhost:8006"; // Node B
-
-const routerUrl = "http://localhost:8007";
-
-context("GET Config", () => {
- describe("Request", () => {
- it("Get Request from Router", () => {
- my.getConfig(routerUrl);
- });
-
- it("GET Request from Node A: Carol", () => {
- my.getConfig(carolUrl);
- });
-
- it("GET Request from Node B: Dave", () => {
- my.getConfig(daveUrl);
- });
- });
-});
diff --git a/cypress/integration/1_window_web_page.spec.js b/cypress/integration/1_window_web_page.spec.js
deleted file mode 100644
index e8d6fbd0f..000000000
--- a/cypress/integration/1_window_web_page.spec.js
+++ /dev/null
@@ -1,27 +0,0 @@
-context("Web Page Status", () => {
- beforeEach(() => {
- cy.visit("/");
- });
-
- it("Check status of web page", () => {
- cy.contains("Vector Browser Node");
- });
-
- it("cy.window() - get the global window object", () => {
- cy.window().should("have.property", "top");
- });
-
- it("cy.document() - get the document object", () => {
- cy.document()
- .should("have.property", "charset")
- .and("eq", "UTF-8");
- });
-
- it("cy.input() - get the if the field for Mnemonic is empty", () => {
- cy.get("input").should("have.length", 1);
- });
-
- it("cy.random_mnemonic - click to create random mnemonic from generator", () => {
- cy.contains("Generate Random Mnemonic").click();
- });
-});
diff --git a/cypress/integration/2_node_profile_creation.spec.js b/cypress/integration/2_node_profile_creation.spec.js
deleted file mode 100644
index 07f398166..000000000
--- a/cypress/integration/2_node_profile_creation.spec.js
+++ /dev/null
@@ -1,63 +0,0 @@
-context("Node Profile Creation", () => {
- beforeEach(() => {
- cy.clearCookies();
- cy.clearLocalStorage();
- cy.visit("/");
-
- cy.contains("Generate Random Mnemonic").click();
- cy.get("input")
- .invoke("val")
- .should(mnemonic => {
- expect(mnemonic).to.have.length.be.greaterThan(1);
- });
- cy.contains("Setup Node").click();
- });
-
- it("cy.random_mnemonic - click to create random mnemonic", () => {
- cy.contains("Generate Random Mnemonic").click();
- cy.get("input")
- .invoke("val")
- .should(mnemonic => {
- expect(mnemonic).to.have.length.be.greaterThan(1);
- });
- });
-
- context("Setup Node", () => {
- it("cy.setup_channel - click setup node", () => {
- cy.contains("Setup Node").click();
- });
-
- it("cy.public_identifier - check if public identifier is generated", () => {
- cy.get(":nth-child(1) > .ant-list-item-meta > .ant-list-item-meta-content > .ant-list-item-meta-description")
- .invoke("text")
- .should(mnemonic => {
- expect(mnemonic).to.have.length.be.greaterThan(1);
-
- expect(mnemonic).to.be.a("string");
-
- expect(mnemonic).to.include("indra");
- });
- });
-
- it("cy.signer_address - check if signer address is generated", () => {
- cy.get(":nth-child(2) > .ant-list-item-meta > .ant-list-item-meta-content > .ant-list-item-meta-description")
- .invoke("text")
- .should(address => {
- expect(address).to.have.length.be.greaterThan(1);
-
- expect(address).to.be.a("string");
- });
- });
-
- it("cy.drop_down - click show mnemonic", () => {
- cy.get(".ant-collapse-header").click();
- cy.get("p")
- .invoke("text")
- .should(mnemonic => {
- expect(mnemonic).to.have.length.be.greaterThan(1);
- // expect(mnemonic).to.include('indra')
- expect(mnemonic).to.be.a("string");
- });
- });
- });
-});
diff --git a/cypress/integration/3_channel_setup.spec.js b/cypress/integration/3_channel_setup.spec.js
deleted file mode 100644
index 3cadbf09c..000000000
--- a/cypress/integration/3_channel_setup.spec.js
+++ /dev/null
@@ -1,42 +0,0 @@
-describe("Channel Setup", () => {
- beforeEach(() => {
- cy.request("http://localhost:8007/config").as("response");
- cy.wrap("one").as("a");
- cy.visit("/");
-
- cy.contains("Generate Random Mnemonic").click();
- cy.get("input")
- .invoke("val")
- .should(mnemonic => {
- expect(mnemonic).to.have.length.be.greaterThan(1);
- });
- cy.contains("Setup Node").click();
- });
-
- it("Setting up channel", function() {
- // Check if Channel already exist for the node
- // if(cy.get('.ant-statistic-title').contains('Channel Address')){
- // cy.get('.ant-col-8 > .ant-btn').click()
- // }
- cy.get(
- "#deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input",
- ).type(this.response.body[0].publicIdentifier);
- cy.get(
- ":nth-child(5) > .ant-col-24 > #deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input-group-addon > .ant-btn",
- ).click();
- cy.wait(5000);
-
- cy.get(".ant-statistic-content-value")
- .invoke("text")
- .should(channel_address => {
- expect(channel_address).to.have.length.be.greaterThan(1);
-
- expect(channel_address).to.be.a("string");
- });
- });
-
- // after(() => {
- // // clean store once done with the test
- // cy.get(".ant-col-8 > .ant-btn").click();
- // });
-});
diff --git a/cypress/integration/4_deposit_Withdraw.spec.js b/cypress/integration/4_deposit_Withdraw.spec.js
deleted file mode 100644
index 098d18586..000000000
--- a/cypress/integration/4_deposit_Withdraw.spec.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import my from "./utils";
-const depositEth = "0.05";
-const withdrawEth = "1";
-const address = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57";
-
-context("Browser Node Setup", () => {
- beforeEach(() => {
- cy.log("Visit localhost:3333");
- cy.visit("/");
-
- cy.log("Clear IndexedDB");
- cy.contains("Clear Store").click();
-
- cy.log("Generate Random Mnemonic");
- cy.contains("Generate Random Mnemonic").click();
- cy.get("input")
- .invoke("val")
- .should(mnemonic => {
- expect(mnemonic).to.be.a("string");
- expect(mnemonic).to.have.length.be.greaterThan(1);
- });
-
- cy.log("Setup Node");
- cy.contains("Setup Node").click();
- });
-
- describe("Setting up Channel Address", function() {
- beforeEach(() => {
- cy.get(
- "#deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input",
- ).as("channel_setup");
-
- cy.get(
- ":nth-child(5) > .ant-col-24 > #deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input-group-addon > .ant-btn",
- ).as("setup");
-
- cy.log("GET Config");
- cy.request(`http://localhost:8007/config`).then(response => {
- const publicIdentifier = response.body[0].publicIdentifier;
- cy.get("@channel_setup").type(publicIdentifier);
- });
-
- cy.get("@setup").click();
- cy.wait(5000);
-
- cy.get(".ant-statistic-content-value")
- .invoke("text")
- .should(channel_address => {
- expect(channel_address).to.have.length.be.greaterThan(1);
-
- expect(channel_address).to.be.a("string");
- });
- });
- it("Make a deposit", function() {
- cy.log("Deposit to channel address");
- my.deposit(depositEth);
- });
-
- it("Make a withdraw", function() {
- cy.log("Deposit to your address");
- my.withdraw(withdrawEth, address);
- });
- });
-});
diff --git a/cypress/integration/5_transfer.spec.js b/cypress/integration/5_transfer.spec.js
deleted file mode 100644
index 95b63f983..000000000
--- a/cypress/integration/5_transfer.spec.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import my from "./utils";
-import hr from "./http-request";
-
-const carolUrl = "http://localhost:8005"; // Node A
-const daveUrl = "http://localhost:8006"; // Node B
-
-const router = "http://localhost:8007";
-const transferEth = "1000";
-
-context("Browser Node Setup", () => {
- beforeEach(() => {
- cy.log("Visit localhost:3333");
- cy.visit("/");
-
- cy.log("Clear IndexedDB");
- cy.contains("Clear Store").click();
-
- // cy.log("Generate Random Mnemonic");
- // cy.contains("Generate Random Mnemonic").click();
- cy.log("Setup Node");
- cy.contains("Setup Node").click();
- cy.wait(5000);
- });
-
- describe("Setting up Channel Address", function() {
- beforeEach(() => {
- cy.get(
- "#deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input",
- ).as("channel_setup");
-
- cy.get(
- ":nth-child(5) > .ant-col-24 > #deposit > .ant-row > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input-group-addon > .ant-btn",
- ).as("setup");
-
- cy.log("GET Config");
- cy.request(`http://localhost:8007/config`).then(response => {
- const publicIdentifier = response.body[0].publicIdentifier;
- cy.get("@channel_setup").type(publicIdentifier);
- });
-
- cy.get("@setup").click();
- cy.wait(5000);
-
- cy.get(".ant-statistic-content-value")
- .invoke("text")
- .should(channel_address => {
- expect(channel_address).to.have.length.be.greaterThan(1);
-
- expect(channel_address).to.be.a("string");
- });
- });
-
- it("Creating channel for Server & Router Node", () => {
- hr.setupChannel(carolUrl);
- });
-
- it("Make transfer from Browser Node to Serve Node", () => {
- my.transfer(carolUrl, transferEth);
- });
- });
-});
diff --git a/cypress/integration/http-request.js b/cypress/integration/http-request.js
deleted file mode 100644
index 0bad7efaa..000000000
--- a/cypress/integration/http-request.js
+++ /dev/null
@@ -1,161 +0,0 @@
-const carolUrl = "http://localhost:8005"; // Node A
-const daveUrl = "http://localhost:8006"; // Node B
-
-const router = "http://localhost:8007";
-
-const sugerDaddy = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57";
-const assetId = "0x0000000000000000000000000000000000000000";
-const chainId = 1337;
-const amount = "0xDE0B6B3A7640000"; // 1 ETH
-
-const adminToken = "cxt1234";
-
-const hr = {};
-
-// CLEAR STORE
-// POST {{aliceUrl}}/clear-store
-// Content-Type: application/json
-
-// {
-// "adminToken": "{{adminToken}}"
-// }
-hr.clearStore = Url => {
- cy.request({
- method: "POST",
- url: `${Url}/clear-store`,
- adminToken: adminToken,
- });
-};
-
-/// GET CHANNEL
-// GET {{carolUrl}}/{{carolPublicIdentifier}}/channels/{{channelAddress}}
-hr.getChannel = (Url, channelAddress) => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- publicIdentifier = hr.getPublicIdentifier(Url);
- cy.request(`${Url}/${publicIdentifier}/channels/${channelAddress}`).then(response => {
- resolve(response);
- });
- }),
- );
-};
-
-/// GET CHANNEL BY PARTICIPANTS
-// GET {{carolUrl}}/{{carolPublicIdentifier}}/channels/counterparty/{{rogerPublicIdentifier}}/chain-id/{{chainId}}
-hr.getChannelByParticipants = Url => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- const publicIdentifier = hr.getPublicIdentifier(Url);
- const counterpartyIdentifier = hr.getPublicIdentifier(router);
- console.log(publicIdentifier, counterpartyIdentifier);
- cy.request(`${Url}/${publicIdentifier}/channels/counterparty/${counterpartyIdentifier}/chain-id/${chainId}`).then(
- response => {
- resolve(response);
- },
- );
- }),
- );
-};
-
-// Setup Channel
-// POST {{carolUrl}}/setup
-// Content-Type: application/json
-
-// {
-// "counterpartyIdentifier": "{{rogerPublicIdentifier}}",
-// "publicIdentifier": "{{carolPublicIdentifier}}",
-// "chainId": "{{chainId}}",
-// "timeout": "36000"
-// }
-hr.setupChannel = Url => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- const params = {};
- cy.request(`${router}/config`).then(response => {
- console.log(response);
- params.counterpartyIdentifier = response.body[0].publicIdentifier;
- });
- cy.request(`${Url}/config`).then(response => {
- console.log(response);
- params.publicIdentifier = response.body[0].publicIdentifier;
- });
- params.chainId = chainId;
- params.timeout = "36000";
- cy.request({
- method: "POST",
- url: `${Url}/setup`,
- body: params,
- }).then(response => {
- resolve(response);
- });
- }),
- );
-};
-
-// Reconcile Deposit
-// POST {{carolUrl}}/deposit
-// Content-Type: application/json
-
-// {
-// "channelAddress": "0x08d324c5CA1CC52c185f9b026a7ed50994632167",
-// "assetId": "0x0000000000000000000000000000000000000000",
-// "publicIdentifier": "{{carolPublicIdentifier}}"
-// }
-hr.reconcileDeposit = (Url, channelAddress) => {
- cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- const params = {};
- params.channelAddress = channelAddress;
- params.assetId = assetId;
- params.publicIdentifier = hr.getPublicIdentifier(Url);
- cy.request({
- method: "POST",
- url: `${Url}/deposit`,
- body: params,
- }).then(response => {
- resolve(response);
- });
- }),
- );
-};
-
-// # 1 ETH
-// @amount = 0xDE0B6B3A7640000
-
-// ### SEND ETH
-// POST {{ethNode}}
-// Content-Type: application/json
-
-// {
-// "jsonrpc":"2.0",
-// "method":"eth_sendTransaction",
-// "params":[{
-// "from": "{{sugarDaddy}}",
-// "to": "0x08d324c5CA1CC52c185f9b026a7ed50994632167",
-// "value": "{{amount}}",
-// "data": "0x0"
-// }],
-// "id":1
-// }
-
-hr.sendEth = receiver => {
- cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- const tx = {};
- tx.from = sugerDaddy;
- tx.to = receiver;
- tx.value = amount;
- tx.data = "0x0";
- cy.request({
- jsonrpc: "2.0",
- method: "eth_sendTransaction",
- params: [tx],
- id: 1,
- }).then(response => {
- resolve(response);
- });
- }),
- );
-};
-
-export default hr;
diff --git a/cypress/integration/utils.js b/cypress/integration/utils.js
deleted file mode 100644
index 4a8d3a4de..000000000
--- a/cypress/integration/utils.js
+++ /dev/null
@@ -1,157 +0,0 @@
-const eth = require("ethers");
-
-const provider = new eth.providers.JsonRpcProvider(Cypress.env("NETWORK"));
-const funder = eth.Wallet.fromMnemonic(Cypress.env("MNEMONIC")).connect(provider);
-const cashout = eth.Wallet.createRandom().connect(provider);
-// const tokenArtifacts = require("@openzeppelin/contracts/build/contracts/ERC20Mintable.json");
-// const addressBook = require("../../.chaindata/addresses/1337-1338.json");
-// const origin = Cypress.env("publicUrl").substring(Cypress.env("publicUrl").indexOf("://") + 3);
-// const tokenAddress = addressBook["1337"].Token.address.toLowerCase();
-// const token = new eth.Contract(tokenAddress, tokenArtifacts.abi, funder);
-
-// const gasMoney = "0.005";
-const from = "0x627306090abaB3A6e1400e9345bC60c78a8BEf57";
-
-// Exported object, attach anything to this that you want available in tests
-const my = {};
-
-my.getConfig = (Url) => {
- cy.request(`${Url}/config`).should((response) => {
- console.log(response);
- expect(response.status, "Get Request").to.eq(200);
- expect(response, "headers as property").to.have.property("headers");
- expect(response, "duration as property").to.have.property("duration");
- expect(response.body[0], "publicIdentifier as property").to.have.property("publicIdentifier");
- expect(response.body[0].publicIdentifier, "PublicIdentifier should be string").to.be.a("string");
- expect(response.body[0].publicIdentifier, "vector as prefix in publicIdentifier").to.include("vector");
- });
-};
-
-my.getChannelAddress = () => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get(".ant-statistic-content-value")
- .invoke("text")
- .then((address) => {
- cy.log(`Got Channel address: ${address}`);
- resolve(address);
- });
- }),
- );
-};
-
-my.getNodeBalance = () => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get(".ant-table-row > :nth-child(2)")
- .invoke("text")
- .then((balance) => {
- cy.log(`Got Node Balance: ${balance}`);
- resolve(balance);
- });
- }),
- );
-};
-
-my.getCounterpartyBalance = () => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get(".ant-table-row > :nth-child(3)")
- .invoke("text")
- .then((balance) => {
- cy.log(`Got Counterparty Balance: ${balance}`);
- resolve(balance);
- });
- }),
- );
-};
-
-my.getOnchainEtherBalance = (address = cashout.address) => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- return cy.wrap(cashout.provider.getBalance(address)).then((balance) => {
- cy.log(`Onchain ether balance is ${balance.toString()} for ${address}`);
- resolve(balance.toString());
- });
- }),
- );
-};
-
-my.deposit = (value) => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get(
- ":nth-child(1) > .ant-col-18 > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-input-group-wrapper > .ant-input-wrapper > .ant-input-group-addon > .ant-btn",
- ).click();
- my.getChannelAddress().then((address) => {
- cy.log(`Depositing ${value} eth into channel ${address}`);
- return cy
- .wrap(
- funder.sendTransaction({
- to: address,
- value: eth.utils.parseEther(value),
- }),
- )
- .then((tx) => {
- return cy.wrap(funder.provider.waitForTransaction(tx.hash)).then(() => {
- my.getNodeBalance().should("not.contain", "0.00");
- my.getNodeBalance().then(resolve);
- // cy.contains("span", /processing swap/i).should("exist");
- // cy.contains("span", /swap was successful/i).should("exist");
- // cy.resolve(my.getChannelTokenBalance).should("not.contain", "0.00");
- // my.getChannelTokenBalance().then(resolve);
- });
- });
- });
- }),
- );
-};
-
-my.withdraw = (value, address = cashout.address) => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get("#withdraw_assetId").type("0x0000000000000000000000000000000000000000");
- cy.get("#withdraw_recipient").type(address);
- cy.get("#withdraw_amount").type(value);
- cy.get(
- ":nth-child(4) > .ant-col > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-btn",
- ).click();
-
- cy.log(`Withdraw ${value} eth into channel ${address}`);
- my.getOnchainEtherBalance(address).should("not.contain", "0.00");
- return my.getOnchainEtherBalance(address).then(resolve);
- }),
- );
-};
-
-my.transfer = (address, value) => {
- return cy.wrap(
- new Cypress.Promise((resolve, reject) => {
- cy.get("#transfer_assetId").type("0x0000000000000000000000000000000000000000");
- cy.get("#transfer_recipient").type(address);
- cy.get("#transfer_amount").type(value);
- cy.get(
- ":nth-child(7) > .ant-col > .ant-form-item-control-input > .ant-form-item-control-input-content > .ant-btn",
- ).click();
-
- cy.log(`Transfer ${value} eth to receiver ${address}`);
- return my.getCounterpartyBalance().then(resolve);
- }),
- );
-};
-// my.getAddress = () => {
-// return cy.wrap(
-// new Cypress.Promise((resolve, reject) => {
-// my.goToDeposit();
-// cy.contains("button", my.addressRegex)
-// .invoke("text")
-// .then(address => {
-// cy.log(`Got address: ${address}`);
-// my.goBack();
-// resolve(address);
-// });
-// }),
-// );
-// };
-
-export default my;
diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js
deleted file mode 100644
index 974a40fc0..000000000
--- a/cypress/plugins/index.js
+++ /dev/null
@@ -1,27 +0,0 @@
-///
-// ***********************************************************
-// This example plugins/index.js can be used to load plugins
-//
-// You can change the location of this file or turn off loading
-// the plugins file with the 'pluginsFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/plugins-guide
-// ***********************************************************
-
-// This function is called when a project is opened or re-opened (e.g. due to
-// the project's config changing)
-
-/**
- * @type {Cypress.PluginConfig}
- */
-
-module.exports = (on, config) => {
- // on('before:browser:launch', (browser, launchOptions) => {
- // // supply the absolute path to an unpacked extension's folder
- // // NOTE: extensions cannot be loaded in headless Chrome
- // launchOptions.extensions.push('./cypress/metamask_8.1.3_0')
-
- // return launchOptions
- // })
-}
\ No newline at end of file
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
deleted file mode 100644
index ca4d256f3..000000000
--- a/cypress/support/commands.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// ***********************************************
-// This example commands.js shows you how to
-// create various custom commands and overwrite
-// existing commands.
-//
-// For more comprehensive examples of custom
-// commands please read more here:
-// https://on.cypress.io/custom-commands
-// ***********************************************
-//
-//
-// -- This is a parent command --
-// Cypress.Commands.add("login", (email, password) => { ... })
-//
-//
-// -- This is a child command --
-// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
-//
-//
-// -- This is a dual command --
-// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
-//
-//
-// -- This will overwrite an existing command --
-// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
diff --git a/cypress/support/index.js b/cypress/support/index.js
deleted file mode 100644
index d68db96df..000000000
--- a/cypress/support/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// ***********************************************************
-// This example support/index.js is processed and
-// loaded automatically before your test files.
-//
-// This is a great place to put global configuration and
-// behavior that modifies Cypress.
-//
-// You can change the location of this file or turn off
-// automatically serving support files with the
-// 'supportFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/configuration
-// ***********************************************************
-
-// Import commands.js using ES2015 syntax:
-import './commands'
-
-// Alternatively you can use CommonJS syntax:
-// require('./commands')
diff --git a/modules/documentation/README.md b/modules/documentation/README.md
deleted file mode 100644
index f3f09a2b4..000000000
--- a/modules/documentation/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Vector Docs
-
-Documentation for vector uses [MkDocs](https://www.mkdocs.org/) hosted using Github Pages.
-
-**Do not change the file structure of this module** -- it is tightly coupled with the mkdocs theme.
-
-## Running Locally
-
-To run the docs locally, first [install mkdocs-material](https://squidfunk.github.io/mkdocs-material/getting-started/#installation), then run:
-
-```
-mkdocs serve
-```
-
-MkDocs will build and serve a preview site at `http://127.0.0.1:8000/`. Editing the docs will autoreload the preview site.
-
-To build the docs, run:
-
-```
-mkdocs build
-```
-
-## Publishing Changes
-
-Changes are published to https://connext.github.io/vector/.
-
-Hypothetically, changes should be automatically published when you push to master. I may not have set up github actions to do this correctly, however. If that doesn't work, you can publish by doing:
-
-`mkdocs gh-deploy --force`
-
-in the documentation module.
diff --git a/modules/documentation/docs/assets/favicon.png b/modules/documentation/docs/assets/favicon.png
deleted file mode 100644
index a5f964746..000000000
Binary files a/modules/documentation/docs/assets/favicon.png and /dev/null differ
diff --git a/modules/documentation/docs/assets/logo.png b/modules/documentation/docs/assets/logo.png
deleted file mode 100644
index 33962d4b4..000000000
Binary files a/modules/documentation/docs/assets/logo.png and /dev/null differ
diff --git a/modules/documentation/docs/index.md b/modules/documentation/docs/index.md
deleted file mode 100644
index f5c034f88..000000000
--- a/modules/documentation/docs/index.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Welcome
-
-Welcome to the Connext docs!
-
-At Connext, our goal is to build the cross-chain routing and micropayment layer of the decentralized web. Connext sits on top of Ethereum, evm-compatible L2 blockchains, and other turing-complete chains, and enables instant, near free transfers that can be routed **across chains** and over liquidity in **any asset**. Most importantly, it does this without giving up the trust-minimization properties of the underlying chain.
-
-You can think of Connext as a shared standard for blockchains and other decentralized networks to communicate with each other about value.
-
-## Where Do I Start?
-
-Anyone who is interacting with Connext needs to run a Connext node in some capacity. Connext nodes run the protocol, deploy channels to peers, and transfer value within those channels. We have two implementations of the node:
-
-1. The `server-node`, which uses `docker` to package up core logic and exposes `http` and `gRPC` interfaces.
-2. The `browser-node`, which is distributed via `npm` and exposes a typescript/javascript interface.
-
-You can also run the Connext node as an intermediary (we call this a `routing node`), where you forward transfers between different channels. This way, peers can transfer to each other without needing channels directly to one other, but instead by "hopping" value across many different channels through the network. Routing nodes run `server-node`s with an automated module - a `router` - to forward transfers.
-
-- If you're building a browser-based application, check out the [browser-node quick start guide](./quickStart/browserNode.md).
-- If you're building a server application or backend/native infrastructure that runs on docker, check out the [server-node quick start guide](./quickStart/serverNode.md)
-- If you're building a protocol or network that leverages p2p micropayments, you will want to [write custom transfer logic](./node/transfers.md/#custom-transfer-logic), integrate one or both of the two above nodes into user-facing code, and likely [run a router](./router/configure.md) to bootstrap the network.
-- If you want to be a liquidity provider in the network, either to forward transfers or to bridge value across chains, you'll want to [run a router](./router/configure.md).
-
-If you're still confused about where to begin, join us in [our community chat](https://discord.gg/R7yZNmb)! We're **very** responsive and happy to point you to the right resources. :)
-
-## What are State Channels?
-
-Connext is a network of _state channels_. The core concept behind a channel is very simple:
-
-- Suppose you're paying your friend Bob for a metered service at the rate of \$1 every minute.
-- It would be silly to broadcast every transaction to the blockchain, you would incur lots of fees. At the same time, it also doesn't make sense to pay up front or pay at the end, as that would introduce new trust assumptions.
-- Instead, what you can do is send your funds to a 2/2 multisig controlled by you and Bob. Then, rather than sending onchain transactions, you can send Bob ever updating signatures which give Bob _the ability_ to withdraw up to a certain amount from the multisig.
-- Because Bob _can_ get his funds at any time using his unbreakable commitment from you, you complete a new payment to him every time you send a new signature.
-
-![alt text](https://github.com/connext/spacefold/blob/master/public/BasicChannel.png?raw=true)
-
-Connext extends this concept in a couple of ways ways:
-
-1. Updates within the channel can have any arbitrary conditionality to them. This means you could make your payments conditional upon Bob providing a proof of his work, or based on some real world event, or even based on the outcome of a chess game.
-
-2. More importantly: the above paradigm requires you to deploy a new multisig with each new person you transact with. Using the conditionality described above, Connext instead lets you use your channel with Bob to atomically interact with anyone that Bob also has a channel with. For instance, you pay Bob $1, who pays Charlie $0.9999 (Bob takes a microfee), who pays Danielle \$0.9998 (Charlie takes a microfee).
-
-There's a lot more information available publicly on state channels, here are some great resources:
-
-- [State channels for babies](https://medium.com/connext/state-channels-for-babies-c39a8001d9af)
-- [Counterfactual for dummies](https://medium.com/blockchannel/counterfactual-for-dummies-part-1-8ff164f78540)
-- [EthHub](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/state-channels/)
\ No newline at end of file
diff --git a/modules/documentation/docs/node/basics.md b/modules/documentation/docs/node/basics.md
deleted file mode 100644
index 4c3ab84f9..000000000
--- a/modules/documentation/docs/node/basics.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Basics
-
-A Connext node is an implementation of the Connext protocols. Anyone who is using Connext *in any way* should most likely be running a node.
-
-Nodes take in the following:
-- Access to a user key, from which a `ChannelSigner` can be created.
-- etc.
-
-There are two primary node implementations available right now, both written in Typescript:
-- server-node
-- browser-node
-
-## Server-Node vs. Browser-Node
-
-In general, nodes expose very similar interfaces and behave very similarly. There are a few notable differences, however:
-
-| | Server-Node | Browser-Node |
-|:---------------------:|:------------------------------------------------------------------------------------------------------:|:--------------------------------------------:|
-| Interface(s) | gRPC and REST | typescript |
-| Distribution | Docker image | npm |
-| Environment Variables | Passed in via `config-node.json` file | Set via `.env` or passed in on instantiation |
-| Key Management | Takes in a `mnemonic` and supports creating multiple signers by passing in an `index`. See more below. | Takes in a single `ChannelSigner` |
-
-## Server-Node Specific Functionality
-
-### Using the Server Node JS Client
-
-The server-node's HTTP requests are wrapped into a JS [client](./modules/utils/src/serverNode.ts). This can be installed into a standalone Node.js program by installing the `@connext/vector-utils` package. Minimally, the client is instantiated like so (assuming a local setup similar to `make start-node` or `make start-duet`):
-
-```ts
-import { RestServerNodeService } from "@connext/vector-utils";
-import pino from "pino";
-
-const alice = await RestServerNodeService.connect("http://localhost:8001", pino(), undefined, 0);
-```
-
-The client has wrapper methods for the `server-node`'s REST interface, which implement the interface [`IServerNodeService`](./modules/utils/src/serverNode.ts).
-
-Note: because the `browser-node` exposes a TS interface directly, there is no need to do this in the browser.
-
-### Indexed Engines
-
-In most cases, the `server-node` manages a single private key and signs all channel operations with this key.
-
-However, server-nodes *also* possess the ability to handle many different signers in the same stack concurrently. You can do this by specifying an `index` param in the `connect` method.
-
-This functionality is possible in the `server-node` by deriving private keys from the mnemonic in the `server-node`'s config ([more info](https://medium.com/@wolovim/ethereum-201-hd-wallets-11d0c93c87f7)). By default, the `server-node` creates an engine at the index path "0" for convenience.
-
-Below is an example of creating a new Engine instance. The `index` param is an integer between 0 and 2147483647 (2^32):
-
-```http
-POST {{aliceUrl}}/node
-Content-Type: application/json
-
-{
- "index": 1234
-}
-```
-
-The response to this request contains a `signerAddress` and `publicIdentifier`. Additional calls to the server node must include the `publicIdentifier` to specify which `engine` to use.
diff --git a/modules/documentation/docs/node/configure.md b/modules/documentation/docs/node/configure.md
deleted file mode 100644
index 23808fe41..000000000
--- a/modules/documentation/docs/node/configure.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Configuration and Deployment
-
-The `node` stack is configurable via the `config-node.json` file. Note that the `duet` and `trio` stacks are designed exclusively for development/testing so these are not configurable.
-
-There is an additional `config-prod.json` file that can apply to either the node or router but not both. The `config-prod.json` file contains your domain name and, because it's _not_ tracked by git, it's a good place to put overrides for secret values like API keys. A prod-mode deployment using a domain name w https must be exposed on port 443, therefore only a single prod-mode stack can run on a given machine at a time.
-
-## Node Configuration API
-
-`config-node.json` contains the default configuration for the `node` stack: `make start-node`.
-
-Any of these values can be overwritten by providing the same key with a new value to `config-prod.json`.
-
-**Node Config Keys:**
-
-- `adminToken` (type: `string`): Currently, this is only used during development to protect a few admin endpoints eg to reset the database between tests. If/when we add admin-only features in prod, they will only be accessible to those who provide the correct adminToken.
-- `chainAddresses` (type: `object`): Specifies the addresses of all relevant contracts, keyed by `chainId`.
-- `chainProviders` (type: `object`): Specifies the URL to use to connect to each chain's provider, keyed by `chainId`
-- `logLevel` (type: `string`): one of `"debug"`, `"info"`, `"warn"`, `"error"` to specify the maximum log level that will be printed.
-- `messagingUrl` (type: `string`): The url used to access the messaging service
-- `mnemonic` (type: `string`): Optional. If provided, the node will use this mnemonic. If not provided, the node will use a hard coded mnemonic with testnet funds in dev-mode (production=false). If not provided in prod, docker secrets will be used to manage the mnemonic; this is a much safer place to store a mnemonic that eg holds mainnet funds.
-- `port` (type: `number`): The port number on which the stack should be exposed to the outside world.
-
-### Prod Configuration API
-
-Changes to `config-prod.json` aren't tracked by git so this is a good place to store secret API keys, etc.
-
-Be careful, changes to this file will be applied to both `node` & `router` stacks running on this machine.
-
-**Prod Config Keys:**
-
-- `awsAccessId` (type: `string`): An API KEY id that specifies credentials for a remote AWS S3 bucket for storing db backups
-- `awsAccessKey` (type: `string`): An API KEY secret that to authenticate on a remote AWS S3 bucket for storing db backups.
-- `domainName` (type: `string`): If provided, https will be auto-configured & the stack will be exposed on port 443.
-- `production` (type: `boolean`): Enables prod-mode if true. Implications of this flag:
- - if `false`, ops will automatically build anything that isn't available locally before starting up a given stack. If `true`, nothing will be built locally. Instead, all images will be pulled from docker hub.
- - if `false`, the `global` stack will start up 2 local testnet evm.
- - Mnemonic handling is affected, see docs for the `mnemonic` key in node config.
-
-## Single-Container Mode
-
-Using the `start` scripts in the Vector Makefile requires docker-compose. To run a `server-node` as a single container without docker-compose, do the following:
-
-* Create a config file using the above instructions.
-
-* Pull the Docker image from the repo:
-```shell
-$ docker pull connextproject/vector_node
-```
-* Create a volume for the persisted database (can also use a bind-mounted file here):
-```shell
-$ docker volume create vector_node_store
-```
-* Run the node container with the proper env vars (Note: Replace `latest` tag with a released version number in prod!):
-```shell
-$ docker run --env VECTOR_CONFIG="$(cat node.config.json)" --env VECTOR_PROD=true --env VECTOR_SQLITE_FILE="/database/store.db" -p "8000:8000" --mount type=volume,source=vector_node_store,destination=/database --name vector_node --rm connextproject/vector_node:latest
-...
-
-$ curl http://localhost:8000/ping
-pong
-```
diff --git a/modules/documentation/docs/node/events.md b/modules/documentation/docs/node/events.md
deleted file mode 100644
index 5b7de66a9..000000000
--- a/modules/documentation/docs/node/events.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Events
-
-To subscribe to the `server-node`'s event emitter, the JS client uses webhooks. A program that wants to listen for the `server-node`'s events needs to implement an HTTP server that can accept POST requests which the `server-node` POSTs to when events are generated. The JS client uses a mapping of [EVTs](https://www.evt.land) which should be posted to when the HTTP request is received to allow for more powerful filtering capabilities behind an easy to use interface.
-
-A full example can be found in the implementation of the [router module](./modules/router/src), here are relevant snippets:
-
-```ts
-import { Evt } from "evt";
-import fastify from "fastify";
-import { RestServerNodeService } from "@connext/vector-utils";
-import {
- ConditionalTransferCreatedPayload,
- ConditionalTransferResolvedPayload,
- EngineEvents,
-} from "@connext/vector-types";
-
-// using fastify as the web server
-const server = fastify();
-
-// configure event subscriptions
-const serverBase = `http://localhost:3000`; // this server
-// callback paths
-const conditionalTransferCreatedPath = "/conditional-transfer-created";
-const conditionalTransferResolvedPath = "/conditional-transfer-resolved";
-const evts = {
- [EngineEvents.CONDITIONAL_TRANSFER_CREATED]: {
- evt: Evt.create(),
- url: `${routerBase}${conditionalTransferCreatedPath}`,
- },
- [EngineEvents.CONDITIONAL_TRANSFER_RESOLVED]: {
- evt: Evt.create(),
- url: `${routerBase}${conditionalTransferResolvedPath}`,
- },
- [EngineEvents.SETUP]: {},
- [EngineEvents.WITHDRAWAL_CREATED]: {},
- [EngineEvents.WITHDRAWAL_RESOLVED]: {},
- [EngineEvents.WITHDRAWAL_RECONCILED]: {},
- [EngineEvents.DEPOSIT_RECONCILED]: {},
-};
-
-const logger = pino();
-let node: RestServerNodeService | undefined;
-server.addHook("onReady", async () => {
- // asynchronously connect to server node
- node = await RestServerNodeService.connect(
- "http://localhost:8001",
- { 1337: "http://localhost:8545" },
- logger.child({ module: "RestServerNodeService" }), // namespace logs by module
- evts, // event subscription config
- );
-});
-
-// endpoints to receive server-node events
-server.post(conditionalTransferCreatedPath, async (request, response) => {
- // post to the EVT that we pass into the server-node client
- evts[EngineEvents.CONDITIONAL_TRANSFER_CREATED].post(request.body as ConditionalTransferCreatedPayload);
- return response.status(200).send({ message: "success" });
-});
-
-server.post(conditionalTransferResolvedPath, async (request, response) => {
- evts[EngineEvents.CONDITIONAL_TRANSFER_RESOLVED].post(request.body as ConditionalTransferResolvedPayload);
- return response.status(200).send({ message: "success" });
-});
-
-await node.on(
- EngineEvents.CONDITIONAL_TRANSFER_CREATED,
- async data => {
- console.log(`Received conditional transfer: ${JSON.stringify(data)}`);
- },
- data => data.transfer.initiator === "vectorABCD", // can filter on the data here
-);
-```
\ No newline at end of file
diff --git a/modules/documentation/docs/node/transfers.md b/modules/documentation/docs/node/transfers.md
deleted file mode 100644
index a91a79652..000000000
--- a/modules/documentation/docs/node/transfers.md
+++ /dev/null
@@ -1,252 +0,0 @@
-# Transfers
-
-A `transfer` is the primary mechanism by which a Connext channel is updated.
-
-Transfers have a fixed lifecycle:
-
-1. Alice creates a conditional transfer with Bob by calling `conditionalTransfer()`. The function takes in details around the value to be transferred (`amount`, `assetId`, `recipient`), as well as a `transferDefinition` and a `details` object (which is the initial state of the transfer). Doing this locks up Alice's funds corresponding to the `amount` above, making it so that they can only be unlocked by meeting the conditions specified within the `transferDefinition`.
-2. Bob calls `resolveTransfer()` which takes in a globally unique `transferId` associated with the above transfer, as well as a `transferResolver`, which is an object containing data needed to unlock the transfer.
-
-## Transfer Definitions
-
-Transfer definitions specify the logic by which value locked in a transfer can be resolved into an updated set of balances. The ability to specify different `transferDefinitions` when creating a conditional transfer is what makes sending value using Connext programmable!
-
-To remove the need to write custom offchain code when adding support for new types of conditional transfers, we implement `transferDefinition`s as singleton Solidity contracts and pass in their deployed contract address when creating a conditional transfer. Transfer definitions always implement a standard interface:
-
-!!! example "Transfer definition interface"
-
- ```typescript
- interface ITransferDefinition {
- // Validates the initial state of the transfer.
- // Called by validator.ts during `create` updates.
- function create(bytes calldata encodedBalance, bytes calldata) external view returns (bool);
-
- // Performs a state transition to resolve a transfer and returns final balances.
- // Called by validator.ts during `resolve` updates.
- function resolve(
- bytes calldata encodedBalance,
- bytes calldata,
- bytes calldata
- ) external view returns (Balance memory);
-
- // Should also have the following properties
- // string name
- // string stateEncoding
- // string resolverEncoding
- // These properties are included on the transfer specifically
- // to make it easier for implementers to add new transfers by
- // only include a `.sol` file
- function getRegistryInformation() external view returns (RegisteredTransfer memory);
- }
- ```
-
-[Here is an example transfer definition](https://github.com/connext/vector/blob/main/modules/contracts/src.sol/transferDefinitions/HashlockTransfer.sol) for a `HashlockTransfer`, i.e. a transfer which unlocks if the receiver provides a correct `preImage` that hashes to the same value as the `lockHash` provided on creation.
-
-## Creating a Transfer
-
-You can create a transfer by calling the `conditionalTransfer()` method.
-
-=== "TS"
-
- ``` typescript
- const result = await node.conditionalTransfer({
- type: "HashlockTransfer",
- channelAddress: "0xABC123...",
- amount: "1000000000000000", // 0.01 ETH
- assetId: "0x0000000000000000000000000000000000000000",
- details: {
- lockHash: "0xlockHash...",
- expiry: "0"
- },
- recipient: "vector123ABC...",
- meta: {
- hello: "world"
- }
- });
- ```
-
-=== "HTTP"
-
- ``` http
- ##############
- ### Create Transfer ETH
- POST {{nodeUrl}}/transfers/create
- Content-Type: application/json
-
- {
- "type": "HashlockTransfer",
- "channelAddress": "0xABC123...",
- "amount": "1000000000000000", # 0.01 ETH
- "assetId": "0x0000000000000000000000000000000000000000",
- "details": {
- "lockHash": "0xlockHash...",
- "expiry": "0"
- },
- "recipient": "vector123ABC...",
- "meta": {
- "hello": "world"
- }
- }
- ```
-
-The `type` field above can be EITHER a raw `transferDefinition` address, OR one of [several default transfer names](https://github.com/connext/vector/blob/main/modules/types/src/transferDefinitions/shared.ts#L22) that we support. The `details` field **must** match the `TransferState` struct in the `transferDefinition` solidity contract:
-
-```c++
-// Example from Hashlock Transfer
-struct TransferState {
- bytes32 lockHash;
- uint256 expiry; // If 0, then no timelock is enforced
-}
-```
-
-## Resolving a Transfer
-
-As a receiver, you can learn about an incoming transfer by listening for the `CONDITIONAL_TRANSFER_CREATED` event.
-
-=== "TS"
-
- ``` typescript
- await node.on(
- EngineEvents.CONDITIONAL_TRANSFER_CREATED,
- async data => {
- console.log(`Received conditional transfer: ${JSON.stringify(data)}`);
- },
- data => data.transfer.initiator === "vectorABCD", // can filter on the data here
- );
- ```
-
-=== "HTTP"
-
- ``` http
- ## TODO
- ```
-
-Then, you can resolve (i.e. unlock) the transfer by calling the `resolveCondition()` function, passing in the `data.transferId` that you caught from the above event.
-
-=== "TS"
-
- ``` typescript
- const result = await node.resolveTransfer({
- channelAddress: "0xABC123...",
- transferId: "0xtransferId...",
- transferResolver: {
- preImage: "0xpreimage..." // For hashlock transfer
- }
- });
- ```
-
-=== "HTTP"
-
- ``` http
- ##############
- ### Resolve Transfer
- POST {{nodeUrl}}/transfers/resolve
- Content-Type: application/json
-
- {
- "channelAddress": "0xABC123...",
- "transferId": "0xtransferId...",
- "transferResolver": {
- "preImage": "0xpreimage..." # For hashlock transfer
- }
- }
- ```
-
-Similar to the conditionalTransfer `details` field, the `transferResolver` **must** exactly match the `TransferResolver` struct from the `transferDefinition` contract:
-
-```c++
-struct TransferResolver {
- bytes32 preImage;
-}
-```
-
-## Transfers Across Chains and Assets
-
-Transfers in Connext are routed over one (eventually many) intermediary routers. [Routers](../router/basics.md) are Connext server-nodes that are running automated software to forward transfers across multiple channels.
-
-If the router that you're transferring over [supports it](../router/configure.md##setting-up-supported-chains), you can make transfers that swap across chains/assets while in-flight. In other words, a sender can send a transfer in $DAI on Ethereum, where the receiver receives $MATIC on Matic. To do this, specify the recipient asset and chainId as part of the transfer creation:
-
-=== "TS"
-
- ``` typescript
- const result = await node.conditionalTransfer({
- type: "HashlockTransfer",
- channelAddress: "0xABC123...",
- amount: "1000000000000000", // 0.01 ETH
- assetId: "0x0000000000000000000000000000000000000000",
- details: {
- lockHash: "0xlockHash...",
- expiry: "0"
- },
- recipient: "vector123ABC...",
- recipientChainId: 137, // Matic chainId
- // Recipient assetId is relative to recipient chain. 0x0 on Matic chain is $MATIC
- recipientAssetId: "0x0000000000000000000000000000000000000000"
- });
- ```
-
-=== "HTTP"
-
- ``` http
- ##############
- ### Create Transfer ETH
- POST {{nodeUrl}}/transfers/create
- Content-Type: application/json
-
- {
- "type": "HashlockTransfer",
- "channelAddress": "0xABC123...",
- "amount": "1000000000000000", # 0.01 ETH
- "assetId": "0x0000000000000000000000000000000000000000",
- "details": {
- "lockHash": "0xlockHash...",
- "expiry": "0"
- },
- "recipient": "vector123ABC...",
- recipientChainId: 137, // Matic chainId
- // Recipient assetId is relative to recipient chain. 0x0 on Matic chain is $MATIC
- recipientAssetId: "0x0000000000000000000000000000000000000000"
- }
- ```
-If `recipientChainId` or `recipientAssetId` are not provided, then the transfer will default to assuming it needs to be sent with the sender's `chainId` and the passed in `assetId` param respectively.
-
-## Custom Transfer Logic
-
-One of the best things about a generalized system like Connext is the ability to specify your own custom conditional transfer logic. This lets you build new protocols and ecosystems on top of Connext that leverage our networked state channels in different ways.
-
-Adding support for a custom conditional transfer is pretty simple! There are three core steps to doing this:
-
-1. Design the conditional transfer and write the `transferDefinition` solidity contract.
-2. Submit the new `transferDefinition` for review so that it can be added to our growing global registry of transfer types.
-3. Call the new transfer with the right params in your offchain code.
-
-### Writing the Transfer Definition Contract
-
-The only hard requirement for a Transfer Definition is that it adhere's to the [interface defined above](#transfer-definitions). The general pattern for doing this is to set up some initial condition when creating the transfer, and then checking to see if that condition is met before updating balances.
-
-!!! note
- In general, you don't need to be too concerned about the logistics of disputing onchain when writing a transfer. all onchain dispute logic (and the protocols that back this security) are pretty abstracted from the process of designing transfers.
-
-First, you should determine what goes into your `TransferState` and `TransferResolver` structs. We allow for metadata to be passed as part of a transfer separately, so the only fields in these structs should be those that are validated or manipulated directly as part of the transfer logic. Be sure to write ABIEncoderV2 encodings for both of these structs as defined in the interface.
-
-!!! warning
- To minimize time spent debugging Solidity, we strongly recommend you keep these structs and the core logic **as simple as possible**.
-
-Next, write the `create()` function. A good strategy is to work your way down the `TransferState` struct and validate each param. The `create()` function is called when calling `conditionalTransfer()` and is **only** place where the object passed in to `details` is actually validated. So it's useful to do all the param validation you can here. E.g. check to see if inputs are zeroes/empty bytes, etc.
-
-Lastly, write the `resolve()` function. The goal of the `resolve()` function, is to take in the initial `TransferState`, initial balance, and the passed in `resolver` to output a final balance. First, you should param validate all of the parts of the `TransferResolver` (you dont need to re-validate the `TransferState`). Then you should check to see if the passed in `resolver` meets some conditions set up against the initial `TransferState` - if it does, you should update the balances and return them. If not, then you should either throw an error (i.e. fail a `require()`) or just return the balance with no changes.
-
-!!! tip
- In some cases, we allow the transfer to be cooperatively cancelled by explicitly passing in an empty resolver. That way, there's a way to exit the transfer offchain if something goes wrong without needing to initiate an onchain dispute.
-
-### Submitting the Definition to our Registry
-
-We deploy and maintain a global onchain registry of approved `transferDefinition`s. This makes it possible for routers in the network to safely forward transfer operations without needing to inspect the packets themselves, instead only needing to validate the definition addresses.
-
-We're working on a structured RFC process for supporting new transfer standards. For now, we recommend that you reach out to us directly so that we can manually audit your code and add it to the registry.
-
-### Calling the New Transfer Logic
-
-After you have written the new transferDef, deployed it, and submitted it to us for review, the next step is to call it from your offchain code.
-
-Doing this works exactly the same way as described in the [creating a transfer](#creating-a-transfer) and [resolving a transfer](#resolving-a-transfer) sections above. Plug in your deployed `transferDefinition` address in the `type` field, and then pass in the `TransferState` in `details`. Then, when resolving, pass in the `TransferResolver` in the `transferResolver` field.
\ No newline at end of file
diff --git a/modules/documentation/docs/quickStart/browserNode.md b/modules/documentation/docs/quickStart/browserNode.md
deleted file mode 100644
index 867c0f5f6..000000000
--- a/modules/documentation/docs/quickStart/browserNode.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Browser Node Quick Start
-
-This quick start will guide you through getting to a simple e2e transfer flow running between two peers running [browser nodes](https://github.com/connext/vector/tree/master/modules/browser-node) that runs through an intermediary routing node.
-
-We assume you're starting with an existing JS application that runs in the browser.
-
-## Local Development With Local Blockchains
-
-### Spinning Up a Trio Stack Locally
-
-View server node docs to [spin up a trio stack](./serverNode/#spinning-up-a-trio-stack-locally).
-
-This gives you a router to interact with and non-router nodes to test transfers to and from, as well as local EVM chains and messaging services.
-
-### Spinning Up the iframe App Locally
-
-The iframe app will securely store the node's private keys in a separate browser window which's storage cannot be accessed by other windows, i.e. dapps which integrate the browser node.
-
-Run the app by running the command:
-
-```bash
-make start-iframe-app
-```
-
-The iframe app is configured by default to communicate with the local stack and EVM chains that are spun up with `make start-trio`. There is a config file generated at the root called `browser.config.json` which uses the same configuration API as [documented here]("../node/configure/#node-configuration-api).
-
-The iframe app runs by default at `http://localhost:3030`.
-
-#### Using Docker
-
-We have published the iframe app on [Docker](https://hub.docker.com/repository/docker/connextproject/vector_iframe_app). You can run it like so:
-
-```sh
-docker run -p "5000:5000" connextproject/vector_iframe_app:latest
-```
-
-### Application Installation and Instantiation
-
-You can install the `browser-node` into a React (or similar) application [via npm](https://www.npmjs.com/package/@connext/vector-browser-node):
-
-```bash
-npm i @connext/vector-browser-node @connext/vector-utils @connext/vector-types
-```
-
-Somewhere in your page load code, you can instantiate the browser node using the `connect` call, specifying the local iframe app:
-
-```ts
-const client = await BrowserNode.connect({
- iframeSrc: "http://localhost:3030",
- logger: pino(),
-});
-```
-
-Once this is connected, the `client` has the interface documented in the [node API docs]("../reference/nodeAPI/"). The steps to follow for basic operation are:
-
-- Setup a channel with your local router.
-- Deposit funds into your channel, transfer, and withdraw.
-
-## Local Development With Remote Testnets
-
-If you do not want/need to run a local blockchain/router/messaging service, you can skip the steps above and jump straight to "Application Installation and Instantiation". The connect call will instead be:
-
-```ts
-const client = await BrowserNode.connect({
- logger: pino(),
-});
-```
-
-This will connect to our hosted iframe app at `https://wallet.connext.network` which is configured to communicate to the testnets and mainnets that we currently support. You can setup channels with router nodes from our [list of hosted nodes]("../reference/hostedNodes/).
\ No newline at end of file
diff --git a/modules/documentation/docs/quickStart/serverNode.md b/modules/documentation/docs/quickStart/serverNode.md
deleted file mode 100644
index 8f27fa2a9..000000000
--- a/modules/documentation/docs/quickStart/serverNode.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# Server Node Quick Start
-
-This quick start will guide you through getting to a simple e2e transfer flow between two peers running [server-nodes](https://github.com/connext/vector/tree/master/modules/server-node) (Carol, Dave) that is routed through one intermediary routing node (Roger).
-
-## Spinning Up a Trio Stack Locally
-
-Prerequisites:
-
-- `make`: Probably already installed, otherwise install w `brew install make` or `apt install make` or similar.
-- `jq`: Probably not installed yet, install with `brew install jq` or `apt install jq` or similar.
-- `docker`: Sadly, Docker is kind of annoying to install. See [website](https://www.docker.com/) for instructions.
-
-First, clone the repo:
-
-```bash
-git clone git@github.com:connext/vector.git
-cd vector
-```
-
-Then, run:
-
-```bash
-make start-trio
-```
-
-The above command will spin up three server-nodes, one with an attached router in dev-mode. Note that in dev-mode, chain and db data will not be persisted between restarts. To run in prod mode, you can spin up a routing node with `make start-router` and non-routing server-nodes with `make start-node`. We have a guide on prod-mode deployments and configuration coming soon!
-
-## Creating a Channel
-
-Once you have the above trio set up, you can interact with your nodes via a REST interface. We've documented [example requests](https://github.com/connext/vector/tree/master/modules/server-node/examples) in the server-node module. If you're developing with VSCode, there are several REST client plugins available in the marketplace that you can use to make these queries _directly from the examples_.
-
-First, set up your nodes (in [0_config](https://github.com/connext/vector/blob/master/modules/server-node/examples/0-config.http)) on the servers to register signers and create the engines.
-
-```sh
-### Node -> Carol
-POST {{carolUrl}}/node
-Content-Type: application/json
-
-{
- "index": 0
-}
-
-### Node -> Dave
-POST {{daveUrl}}/node
-Content-Type: application/json
-
-{
- "index": 0
-}
-```
-
-Then, set up your channels from Carol -> Roger and Roger -> Carol (in [1_Setup](https://github.com/connext/vector/blob/master/modules/server-node/examples/1-setup.http)). Note `aliceUrl` is the internal URL that Carol has access to on the Docker network. In these examples, Carol and Dave are requesting Roger to set up the channel with them so that they can be the "Bob" within the channel, which lets them deposit by transferrring directly into the channel address.:
-
-```sh
-### Carol -> Node
-POST {{carolUrl}}/setup
-Content-Type: application/json
-
-{
- "counterpartyIdentifier": "{{rogerPublicIdentifier}}",
- "publicIdentifier": "{{carolPublicIdentifier}}",
- "chainId": "{{chainId}}",
- "timeout": "36000"
-}
-
-### Dave -> Node
-POST {{daveUrl}}/setup
-Content-Type: application/json
-
-{
- "counterpartyIdentifier": "{{rogerPublicIdentifier}}",
- "publicIdentifier": "{{davePublicIdentifier}}",
- "chainId": "{{chainId}}",
- "timeout": "36000"
-}
-```
-
-## Depositing Into a Channel
-
-Then, send an Eth deposit to Carol's channel onchain. This can be done by connecting Metamask to your local EVM at `http://localhost:8545` and sending a transfer directly to the `channelAddress`, at any time, regardless of either channel participant's liveness status. A convenient way to do this using HTTP JSON-RPC calls is with a POST request:
-
-```sh
-# Send a transaction to {{channelAddress}} for 100000000000000000 Wei
-POST http://localhost:8545
-Content-Type: application/json
-
-{
- "jsonrpc":"2.0",
- "method":"eth_sendTransaction",
- "params":[{
- "from": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
- "to": "{{channelAddress}}",
- "value": "0x16345785d8a0000",
- "data": "0x0"
- }],
- "id":1
-}
-```
-
-To add this to Carol's offchain balance, you need to wait for the tx to be mined and then call:
-
-```sh
-POST {{carolUrl}}/deposit
-Content-Type: application/json
-
-{
- "channelAddress": "{{carolDaveChannel}}",
- "assetId": "0x0000000000000000000000000000000000000000",
- "publicIdentifier": "{{carolPublicIdentifier}}",
-}
-```
-
-!!! Warning
- Only deposit ETH and ERC20-like assets into channel that implement a `transfer(address, address)` function
-
-## Making a Transfer
-
-Then, create a transfer between Carol and Dave through Roger (in [3_transfer](https://github.com/connext/vector/blob/master/modules/server-node/examples/3-transfer.http)):
-
-```sh
-POST {{carolUrl}}/transfers/create
-Content-Type: application/json
-
-{
- "type": "HashlockTransfer",
- "publicIdentifier": "{{carolPublicIdentifier}}",
- "channelAddress": "{{carolRogerChannel}}",
- "amount": "{{ethAmount}}",
- "assetId": "0x0000000000000000000000000000000000000000",
- "details": {
- "lockHash": "{{lockHash}}",
- "expiry": "0"
- },
- "recipient": "{{bobPublicIdentifier}}",
- "meta": {
- "routingId": "{{routingId}}",
- "hello": "world"
- }
-}
-```
-
-Lastly, unlock the transfer for Bob to get his funds:
-
-```sh
-POST {{daveUrl}}/transfers/resolve
-Content-Type: application/json
-
-{
- "publicIdentifier": "{{davePublicIdentifier}}",
- "channelAddress": "{{daveRogerChannel}}",
- "routingId": "{{routingId}}",
- "preImage": "{{preImage}}"
-}
-```
diff --git a/modules/documentation/docs/reference/hostedNodes.md b/modules/documentation/docs/reference/hostedNodes.md
deleted file mode 100644
index 144f82711..000000000
--- a/modules/documentation/docs/reference/hostedNodes.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# List of Hosted Routing Nodes
-
-## Testnet
-
-Public Identifier: `vector7tbbTxQp8ppEQUgPsbGiTrVdapLdU5dH7zTbVuXRf1M4CEBU9Q`
-Messaging: `https://messaging.connext.network`
-
-Chains Supported:
-
-* Rinkeby
-* Kovan
-* Arbitrum
-* Matic
diff --git a/modules/documentation/docs/reference/nodeAPI.md b/modules/documentation/docs/reference/nodeAPI.md
deleted file mode 100644
index f58c38816..000000000
--- a/modules/documentation/docs/reference/nodeAPI.md
+++ /dev/null
@@ -1,726 +0,0 @@
-# Node API Reference
-
-There is one consolidated API across both the `server-node` and `browser-node`. Server nodes expose that interface via HTTP and gRPC (coming soon), and we additionally have [an example TS "client"](./modules/utils/src/serverNode.ts) which wraps the HTTP methods. The browser node exposes a TS interface only.
-
-## Base Objects
-
-### Balance
-
-`Balance`: `object` - contains:
-
-- `to`: `string[]` - Signing keys of channel participants ordered by channel `[initiator, responder]`.
-- `amount`: `string[]` - Amount of balance for the given assetId, ordered by channel `[initiator, responder]`.
-
-### Full Channel State
-
-`FullChannelState`: `object` - contains:
-
-- `assetIds`: `string[]` - Array of assetIds for assets that are managed by this channel.
-- `balances`: `object[]` - Array of [Balance](#balance) objects indexed by the above `assetIds` array.
-- `channelAddress`: `string` - Unique onchain address of the channel.
-- `alice`: `string` - Signing key of channel initiator, i.e. the party that first called `setup`.
-- `bob`: `string` - Signing key of channel responder, i.e. the party who responded to `setup`.
-- `merkleRoot`: `string` - Root hash containing merkelized data from active transfers and balances. Used by the onchain contracts as part of disputing.
-- `nonce`: `number` - Monotonically increasing number which is incremented for every update to the channel. Used by the onchain contracts as part of disputing.
-- `processedDepositsA`: `string[]` - Offchain tracker of total amount of deposits reconciled into the channel balance for the channel initiator, indexed by `assetIds` array above. used by onchain contracts as part of disputing.
-- `processedDepositsB`: `string[]` - Offchain tracker of total amount of deposits reconciled into the channel balance for the channel responder, indexed by `assetIds` array above. used by onchain contracts as part of disputing.
-- `timeout`: `string` - Timeout within which onchain disputes are settled designated as number of blocks.
-- `aliceIdentifier`: `string` - Public identifier of the channel initiator.
-- `bobIdentifier`: `string` - Public identifier of the channel responder.
-- `latestUpdate`: `object` - Latest update that was mutually agreed on in the channel by both parties.
-- `networkContext`: `object` - Chain specific data used for disputing. Includes:
- - `channelFactoryAddress`: `string` - Address of `ChannelFactory.sol` contract for the chain that this channel is on.
- - `channelMastercopyAddress`: `string` - Address of `ChannelMastercopy.sol` contract for the chain that this channel is on.
- - `transferRegistryAddress`: `string` - Address of `TransferRegistry.sol` contract for the chain that this channel is on.
- - `chainId`: `number` - [Chainid](https://chainid.network) of the chain that this channel is on.
- - `providerUrl`: `string` - Chain provider that this node instance was initiated with (associated with this chainId).
-
-### Full Transfer State
-
-`FullTransferState`: `object` - contains:
-
-- `balance`: `object` - [Balance](#balance) object.
-- `assetId`: `string` - Id of the asset that is being sent as part of this transfer.
-- `channelAddress`: `string` - Unique onchain address of the channel.
-- `transferId`: `string` - Unique identifier associated with this transfer.
-- `transferDefinition`: `string` - Onchain address of the contract logic that will be used to govern this transfer.
-- `transferTimeout`: `string` - Transfer-specific dispute timeout within which the transfer state must be settled onchain.
-- `initialStateHash`: `string` - Hash of the initial state of the transfer as defined in the `transferDefinition` contract.
-- `initiator`: `string` - Signing key of the initiator of the transfer (the peer that calls `conditionalTransfer`).
-- `responder`: `string` - Signing key of the responder of the transfer (the peer that calls `resolveTransfer`).
-- `channelFactoryAddress`: `string` - Address of the `ChannelFactory.sol` contract.
-- `chainId`: `number` - Unique id of the chain that this channel is on.
-- `transferEncodings`: `string[]` - [ABIEncoderV2] encodings for `[transferState, transferResolver]`.
-- `transferState`: Initial state of the transfer as defined in the `transferDefinition` contract.
-- `transferResolver`: Data needed to resolve the transfer as defined in the `transferDefinition` contract.
-- `meta`: `object` - User-defined object for optional metadata sent along with the transfer (e.g. Invoice number, messages, etc.)
-
-### Registered Transfer
-
-`RegisteredTransfer`: `object` - contains:
-
-- `name`: `string` - The name of the transfer
-- `stateEncoding`: `string` - The state encoding of the transfer
-- `resolverEncoding`: `string` - The resolver encoding of the transfer
-- `definition`: `string` - The deployed address of the transfer definition
-
-## Core Methods
-
-### createNode
-
-!!! Warning
- `createNode` is a `server-node` **only** method. It is not relevant to the `browser-node`. See the [indexed engines](../node/basics.md#indexed-engines) documentation for details.
-
-Creates a new node engine (i.e. a new `signer` + `publicIdentifier`) at the given index.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.createNode({
- index: 0
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### CREATE NODE
- POST {{nodeUrl}}/node
- Content-Type: application/json
-
- {
- "index": 0
- }
- ```
-
-#### Params
-
-`ServerNodeParams.CreateNode` object. Contains:
-
-- `index`: `number` - used as part of the path along which a new key will be derived. This key is then used to create a new signer/public identifier/node engine.
-
-#### Returns
-
-EITHER `ServerNodeResponses.CreateNode` object. Contains:
-
-- `publicIdentifier`: Unique Connext-specific identifier for the node.
-- `signerAddress`: Address of the key that is used to to sign messages in the channel. This is linked 1:1 with the `publicIdentifier`.
-- `index`: Derivation index, same as what was passed in as a param.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-
-### setup
-
-Creates a channel with a given counterparty.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.setup({
- chainId: 1 // Ethereum
- counterpartyPublicIdentifier: "vector123ABC..."
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### Setup Channel
- POST {{nodeUrl}}/setup
- Content-Type: application/json
-
- {
- "counterpartyPublicIdentifier": "vector123ABC...",
- "chainId": 1,
- }
- ```
-
-#### Params
-
-`ServerNodeParams.Setup` object. Contains:
-
-- `chainId`: `number` - [chainId](https://chainid.network) of the chain on which the channel will be created.
-- `counterpartyIdentifier`: `string` - Identifier of the peer that you want to open a channel to.
-// TODO: make timeout optional
-- `timeout`: `string` - (Optional) Onchain dispute timeout of the channel in blocks.
-
-#### Returns
-
-EITHER `ServerNodeResponses.Setup` object. Contains:
-
-- `channelAddress`: Unique onchain address of the new channel.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### reconcileDeposit
-
-Reconciles an onchain deposit with your offchain balance. It is assumed when calling this function that a deposit tx to your `channelAddress` has already occurred and been mined.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.reconcileDeposit({
- channelAddress: "0xABC123...",
- assetId: "0x0000000000000000000000000000000000000000" // "0x0" == Base asset of whatever chain the channel is on, e.g $ETH
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### Reconcile Deposit
- POST {{nodeUrl}}/deposit
- Content-Type: application/json
-
- {
- "channelAddress": "0xABC123...",
- "assetId": "0x0000000000000000000000000000000000000000"
- }
- ```
-
-#### Params
-
-`ServerNodeParams.Deposit` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel. This should be the same address that the onchain funding tx was sent to.
-- `assetId`: `string` - Address of the asset on whatever chain your channel is on. For instance, the ERC20 contract address for a token on Ethereum. We use `0x0000000000000000000000000000000000000000` to represent the base asset of the chain, e.g. $ETH on `chainId == 1`
-
-#### Returns
-
-EITHER `ServerNodeResponses.Deposit` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### conditionalTransfer
-
-Creates a conditional transfer to a given counterparty, locking up the transfer balance and setting some logic by which the transfer will be unlocked. See [Transfers](../node/transfers.md) for more information.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.conditionalTransfer({
- type: "HashlockTransfer",
- channelAddress: "0xABC123...",
- amount: "1000000000000000", // 0.01 ETH
- assetId: "0x0000000000000000000000000000000000000000",
- details: {
- lockHash: "0xlockHash...",
- expiry: "0"
- },
- recipient: "vector123ABC...",
- meta: {
- hello: "world"
- }
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### Create Transfer ETH
- POST {{nodeUrl}}/transfers/create
- Content-Type: application/json
-
- {
- "type": "HashlockTransfer",
- "channelAddress": "0xABC123...",
- "amount": "1000000000000000", # 0.01 ETH
- "assetId": "0x0000000000000000000000000000000000000000",
- "details": {
- "lockHash": "0xlockHash...",
- "expiry": "0"
- },
- "recipient": "vector123ABC...",
- "meta": {
- "hello": "world"
- }
- }
- ```
-
-#### Params
-
-`ServerNodeParams.ConditionalTransfer` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of the channel in which the transfer will be executed.
-- `amount`: `string` - Amount to be transferred represented in decimal-free units. For instance, with $ETH we should use [wei units](https://eth-converter.com).
-- `assetId`: `string` - Address of the asset on whatever chain your channel is on. For instance, the ERC20 contract address for a token on Ethereum. We use `0x0000000000000000000000000000000000000000` to represent the base asset of the chain, e.g. $ETH on `chainId == 1`
-- `recipient`: `string` - Identifier of the peer that you want to transfer to.
-// TODO where do we have a list of transfernames?
-- `type`: `string` - Either of a hardcoded `TransferName` if the transfer type is officially supported by Connext, OR a `transferDefinition`, which is the onchain address of the logic which will be used to govern the transfer.
-- `details`: `object` - initial state of the transfer, used to set up the conditions which are used to unlock the transfer. This should be exactly the same as the `TransferState` defined in your `transferDefinition` contract.
-- `recipientChainId`: `number` - (Optional) [chainId](https://chainid.network) of chain on which the recipient is located. The recipient's channel does not need to be on the same chain as the sender's channel - for example, you could send a transfer from Alice on Ethereum to Bob on Matic. If `recipientChainId` is not provided, it will default to the `chainId` of the sender's channel.
-- `recipientAssetId`: `string` - (Optional) Similar to `recipientChainId`, the `assetId` that the recipient receives a transfer in does not need to be the same as the asset that the transfer is sent in. If intermediary routers are willing to provide liquidity, Alice can send a transfer in $ETH which can be receives by Bob in $DAI. If `recipientAssetId` is not provided, it will default to the `assetId` above.
-- `meta`: `object` - (Optional) User-defined object for any additional metadata to be sent with the transfer creation e.g. Invoice numbers, messages, etc.
-
-#### Returns
-
-EITHER `ServerNodeResponses.ConditionalTransfer` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transferId`: `string` - Unique identifier for a given transfer.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### resolveTransfer
-
-Unlocks a transfer from a counterparty by passing in whatever params are needed to resolve the condition defined in a corresponding `conditionalTransfer`. Note that if Alice creates a conditional transfer to Bob, only Bob can `resolveTransfer` on it.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.resolveTransfer({
- channelAddress: "0xABC123...",
- transferId: "0xtransferId...",
- transferResolver: {
- preImage: "0xpreimage..." // For hashlock transfer
- }
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### Resolve Transfer
- POST {{nodeUrl}}/transfers/resolve
- Content-Type: application/json
-
- {
- "channelAddress": "0xABC123...",
- "transferId": "0xtransferId...",
- "transferResolver": {
- "preImage": "0xpreimage..." # For hashlock transfer
- }
- }
- ```
-
-#### Params
-
-`ServerNodeParams.ResolveTransfer` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of the channel in which a conditional transfer has been received.
-- `transferId`: `string` - Unique identifier of the received conditional transfer.
-- `transferResolver`: `object` - params needed to resolve the conditional transfer. This should be exactly the same as the `TransferResolver` defined in your `transferDefinition` contract.
-- `meta`: `object` - (Optional) User-defined object for any additional metadata to be sent with the transfer resolution e.g. Invoice numbers, messages, etc.
-
-#### Returns
-
-EITHER `ServerNodeResponses.ResolveTransfer` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transferId`: `string` - Unique identifier for a given transfer.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### withdraw
-
-A special kind of conditional transfer that sends assets in your channel to a specified onchain address. Can optionally include a fee as part of the withdraw which is charged by the counterparty if they submit the transaction on behalf of the withdrawer (i.e. if the counterparty is performing a [metatransaction](https://medium.com/@austin_48503/ethereum-meta-transactions-90ccf0859e84) to remove the withdrawer's need to pay gas)
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.withdraw({
- channelAddress: "0xABC123...",
- amount: "1000000000000000", // 0.01 ETH,
- assetId: "0x0000000000000000000000000000000000000000",
- recipient: "0xmyAddress...",
- fee: "10000000000" // 10 gWei
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### Alice Withdraw
- POST {{nodeUrl}}/withdraw
- Content-Type: application/json
-
- {
- "channelAddress": "0xABC123...",
- "amount": "1000000000000000", # 0.01 ETH
- "assetId": "0x0000000000000000000000000000000000000000",
- "recipient": "0xmyAddress...",
- "fee": "10000000000" # 10 gWei
- }
- ```
-
-#### Params
-
-`ServerNodeParams.Withdraw` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of the channel in which a conditional transfer has been received.
-- `amount`: `string` - Amount to be withdrawn from channel in decimal-free units. For instance, for $ETH, we would use [wei](https://eth-converter.com/).
-- `assetId`: `string` - Address of the asset on whatever chain your channel is on. For instance, the ERC20 contract address for a token on Ethereum. We use `0x0000000000000000000000000000000000000000` to represent the base asset of the chain, e.g. $ETH on `chainId == 1`
-- `recipient`: `string` - Onchain address to which the withdraw will be made.
-- `fee`: `string` - (Optional) Fee that will be charged by the counterparty for the withdraw. It's up to the counterparty to implement validation logic to verify that the correct fee is being supplied by the caller. Fee is also in decimal-free units, just like `amount`.
-
-#### Returns
-
-EITHER `ServerNodeResponses.Withdraw` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transferId`: `string` - Unique identifier for the withdraw.
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-## Getters and Static Properties
-
-### publicIdentifier
-
-Unique identifier associated with your identity - 1:1 mapped with your signing key.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = node.publicIdentifier;
- ```
-
- === "HTTP"
- ``` http
- ## TODO
- ```
-
-#### Params
-
-None
-
-#### Returns
-
-- `publicIdentifier`: `string`
-
-### signerAddress
-
-Public address of your signing key - 1:1 mapped with your public identifier.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = node.signerAddress;
- ```
-
- === "HTTP"
- ``` http
- ## TODO
- ```
-
-#### Params
-
-None
-
-#### Returns
-
-- `signerAddress`: `string`
-
-### getStateChannelByParticipants
-
-Gets a channel given the participant public identifiers of that channel.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.getStateChannelByParticipants({
- publicIdentifier: "vector123MyId...",
- counterparty: "vector456TheirId...",
- chainId: 1 // Ethereum
- });
- ```
-
- === "HTTP"
-
- ``` http
- ##############
- ### getChannelByParticipants
- GET {{nodeUrl}}/vector123MyId.../channels/counterparty/vector456TheirId.../chain-id/1
- ```
-
-#### Params
-
-`ServerNodeParams.GetChannelStateByParticipants` object. Contains:
-
-- `publicIdentifier`: `string` - Your unique Connext-specific identifier.
-- `counterparty`: `string` - Counterparty's unique Connext-specific identifier.
-- `chainId`: `number` - - [chainId](https://chainid.network) of the chain on which the channel was created.
-
-#### Returns
-
-`ServerNodeResponses.GetChannelStateByParticipants` object. Contains:
-
-- `FullChannelState`: `object` - [Channel state](#full-channel-state).
-
-### getStateChannels
-
-Gets all state channels in your store associated with your signer/public identifier.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.getStateChannels();
- ```
-
- === "HTTP"
-
- ```http
- ##############
- ### GET CHANNELS
- GET {{nodeUrl}}/channel
- ```
-
-#### Params
-
-None
-
-#### Returns
-
-`ServerNodeResponses.GetChannelStates` object. Contains:
-
-- `string[]`: Array of all `channelAddresses` found in store
-
-### getStateChannel
-
-Gets a channel given its `channelAddress`.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.getStateChannel({
- channelAddress: "0xABC123..."
- });
- ```
-
- === "HTTP"
-
- ```http
- ##############
- ### GET CHANNEL
- GET {{nodeUrl}}/channel/0xABC123...
- ```
-
-#### Params
-
-`ServerNodeParams.GetChannelState` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel
-
-#### Returns
-
-EITHER `ServerNodeResponses.GetChannelState` object. Contains:
-
-- `string[]`: Array of all `channelAddresses` found in store
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### getTransfer
-
-Gets a transfer given its `transferId`.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.getTransfer({
- transferId: "0xtransferId..."
- });
- ```
-
- === "HTTP"
-
- ```http
- ##############
- ### GET TRANSFER
- GET {{nodeUrl}}/transfer/0xtransferId...
- ```
-
-#### Params
-
-`ServerNodeParams.GetTransferState` object. Contains:
-
-- `transferId`: `string` - Unique id of transfer
-
-#### Returns
-
-EITHER `ServerNodeResponses.GetTransferState` object. Contains:
-
-- `FullTransferState`: `object` - [Transfer state](#full-transfer-state).
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-
-### getActiveTransfers
-
-Gets all active transfers for a given channel address.
-
-!!! example
- === "TS"
-
- ``` typescript
- const result = await node.getActiveTransfers({
- channelAddress: "0xABC123..."
- });
- ```
-
- === "HTTP"
-
- ```http
- ## TODO
- ```
-#### Params
-
-`ServerNodeParams.GetActiveTransfersByChannelAddress` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-
-#### Returns
-
-EITHER `ServerNodeResponses.GetActiveTransfersByChannelAddress` object. Contains:
-
-- `FullTransferState[]`: `object[]` - Array of [transfer states](#full-transfer-state).
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-### getRegisteredTransfers
-
-Gets all registered transers from the `TransferRegistry`.
-
-#### Params
-
-`ServerNodeParams.GetRegisteredTransfers` object. Contains:
-
-- `chainId`: `number` - Chain id of the `TransferRegistry` you want to query
-
-#### Returns
-
-EITHER `ServerNodeResponses.GetRegisteredTransfers` object. Contains:
-
-- `RegisteredTransfer[]`: `object[]` - Array of [registered transferss](#registered-transfer).
-
-OR [NodeError](https://github.com/connext/vector/blob/master/modules/types/src/error.ts#L177)
-
-## Event Handler Methods
-
-## Event Types and Payloads
-
-### Setup
-
-`"SETUP"` - Emitted on channel setup.
-
-#### Payload
-
-`SetupPayload` object. Contains:
-
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `chainId`: `number` - [Chainid](https://chainid.network) that the channel has been set up on.
-
-### Conditional Transfer Created
-
-`"CONDITIONAL_TRANSFER_CREATED"` - Emitted on creation of a conditional transfer.
-
-#### Payload
-
-`ConditionalTransferCreatedPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transfer`: `FullTransferState` - [Full transfer state](#full-transfer-state).
-- `channelBalance`: `Balance` - [Balance](#balance).
-- `conditionType`: `string` - Either of a hardcoded `TransferName` for a transfer supported by default in connext OR a `transferDefinition` address for a custom transfer.
-
-### Conditional Transfer Resolved
-
-`"CONDITIONAL_TRANSFER_RESOLVED"` - Emitted on resolve of a conditional transfer.
-
-#### Payload
-
-`ConditionalTransferResolvedPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transfer`: `FullTransferState` - [Full transfer state](#full-transfer-state).
-- `channelBalance`: `Balance` - [Balance](#balance).
-- `conditionType`: `string` - Either of a hardcoded `TransferName` for a transfer supported by default in connext OR a `transferDefinition` address for a custom transfer.
-
-### Deposit Reconciled
-
-`"DEPOSIT_RECONCILED"` - Emitted after a channel party reconciles a deposit.
-
-#### Payload
-
-`DepositReconciledPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `channelBalance`: `Balance` - [Balance](#balance).
-- `assetId`: `string` - Address of the asset onchain. E.g. ERC20 token address. We use `0x0` for the base asset of the chain ($ETH on Ethereum).
-
-### Withdrawal Created
-
-`"WITHDRAWAL_CREATED"` - Emitted after a withdraw is initiated with a counterparty.
-
-#### Payload
-
-`WithdrawalCreatedPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transfer`: `FullTransferState` - [Full Transfer State](#full-transfer-state)
-- `fee`: `string` - Fee submitted by withdraw initiator.
-- `assetId`: `string` - Address of the asset onchain. E.g. ERC20 token address. We use `0x0` for the base asset of the chain ($ETH on Ethereum).
-- `amount`: `string` - Amount to be withdrawn in decimal-free units. E.g. wei for $ETH
-- `recipient`: `string` - Onchain address that the withdrawn amount will be sent to.
-- `channelBalance`: `Balance` - Updated [balance](#balance) for the above assetId.
-
-### Withdrawal Resolved
-
-`"WITHDRAWAL_RESOLVED"` - Emitted after a withdraw has been completed and a signed commitment to sent funds onchain has been successfully generated.
-
-#### Payload
-
-`WithdrawalResolvedPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transfer`: `FullTransferState` - [Full Transfer State](#full-transfer-state)
-- `fee`: `string` - Fee submitted by withdraw initiator.
-- `assetId`: `string` - Address of the asset onchain. E.g. ERC20 token address. We use `0x0` for the base asset of the chain ($ETH on Ethereum).
-- `amount`: `string` - Amount to be withdrawn in decimal-free units. E.g. wei for $ETH
-- `recipient`: `string` - Onchain address that the withdrawn amount will be sent to.
-- `channelBalance`: `Balance` - Updated [balance](#balance) for the above assetId.
-
-### Withdrawal Reconciled
-
-`"WITHDRAWAL_RECONCILED"` - Emitted after a withdraw commitment has been successfully sent to chain.
-
-#### Payload
-
-`WithdrawalReconciledPayload` object. Contains:
-
-- `aliceIdentifier`: `string` - Connext-specific identifier associated with the initiator of the channel (i.e. the peer that called `setup`).
-- `bobIdentifier`: `string` - Connext-specific identifier associated with the responded of the channel (i.e. the peer that responded to `setup`).
-- `channelAddress`: `string` - Unique onchain address of your channel.
-- `transactionHash`: `string` - Onchain transaction hash of submitted withdraw tx.
-- `transferId`: `string` - Unique id associated with this withdraw.
diff --git a/modules/documentation/docs/router/basics.md b/modules/documentation/docs/router/basics.md
deleted file mode 100644
index 52857ce9e..000000000
--- a/modules/documentation/docs/router/basics.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Basics
-
-Router is an automated module that allows a server-node to act as an intermediary in hopped transactions between different peers in a network. For now, nodes that have the router enabled, i.e. routing nodes can only forward transfers to non-routing peers. Eventually, this routing module can be expanded to allow routing nodes to route value to other routing nodes, thereby creating a fully-decentralized state channel network.
-
-## Responsibilities
-
-Router consumes the server-node gRPC interface to do the following:
-
-- Listen to incoming events from the node for inbound transfers.
-- Parse the transfer metadata to find routing information (recipient, chainId, assetId, requireOnline, etc.).
-- Look up the recipient's channel using the above info.
-- Check that the recipient's channel has enough collateral. If not, send a deposit to collateralize the channel and wait for it to be completed.
- - As part of resolving transfers, the router will also reclaim collateral from channels.
-- Dispatch the transfer. If the transfer fails and the transfer requires that the recipient is online, then hard error and cancel the sender side transfer too. Else, store the transfer and wait for the recipient to come back online.
-- When a recipient comes online, the node emits an isAlive event for that channel. Router should catch isAlive events and complete all pending transfers to the recipient.
-
-Note that validation around allowed transfer types all happens in the node itself.
-
-## Testing Deployed Router
-
-So you've deployed a router -- that's great! Now it's time to check if it's all done correctly. If you don't have your own setup ready to go, you can use the modules within vector to spin up a local UI pointed at your deployed router:
-
-1. Create a `browser.config.json` if it does not exist:
-
-```sh
-> make config
-```
-
-2. Update your `browser.config.json` to have the correct `chainProviders`, `chainAddresses`, and `messagingUrl` for your chain. For example, if your router is configured for rinkeby:
-
-```json
-{
- "adminToken": "cxt1234",
- "chainAddresses": {
- "4": {
- "channelFactoryAddress": "0x00F89bFDFD0dECa323793C3d3d2aED2d3ac9FAbD",
- "testTokenAddress": "0x07f2B2b021cF4F31bFBa79d77F39EA7Fb599213b",
- "transferRegistryAddress": "0x78B498f3Bc35EeCEb7fA2aC80206652c4138721f"
- }
- },
- "chainProviders": {
- "4": "https://rinkeby.infura.io/v3/your-infura-secret"
- },
- "logLevel": "info",
- "messagingUrl": "https://messaging.connext.network",
- "production": false
-}
-```
-
-3. Spin up the `iframe-app`:
-
-```sh
-> make start-iframe-app
-```
-
-4. Spin up the `test-ui`:
-
-```sh
-> make start-test-ui
-```
-
-Note: If you are using an ad blocker, it may block the connection to the router. You would see an error like this:
-
-```sh
-transport.ts:70 WebSocket connection to 'wss://messaging.connext.network/ws-nats' failed: Unknown reason
-```
-
-From there, you can plug in your routers public identifier, and test out all the functionality.
diff --git a/modules/documentation/docs/router/chains.md b/modules/documentation/docs/router/chains.md
deleted file mode 100644
index 12af5e1a1..000000000
--- a/modules/documentation/docs/router/chains.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# Adding a Chain
-
-## Requirements
-
-### Chain Requirements
-
-To integrate with connext your chain must have:
-
-- evm compatability
-- `ABIEncoderV2` support
-- `EC_RECOVER` support
-- `keccak256` support
-- same math quirks as solidity (i.e. must underflow and overflow in the same way if your contract is NOT using safe math)
-- blocktime/timestamp support
-- solidity v7 support
-
-If your chain meets some, but not all, of these requirements, reach out to the Connext team for more detailed integration tests.
-
-### Contract Testing
-
-If there is any concern about whether your chain supports the required behavior, it is possible to run the full contract test suite against your chain:
-
-1. Add the network information to the `hardhat.config.ts`. Specifically, include:
-
-- a funded mnemonic
-- a chainId
-- a provider url
-
-2. Run the test suite using:
-
-```sh
-$ bash ops/test-network.sh
-
-# i.e. for running against matic:
-# bash ops/test-network.sh "matic" '{ "80001" : "https://rpc-mumbai.matic.today" }' "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"
-```
-
-**NOTE** These tests are _expensive_ to run, and should be done against a testnet.
-
-### Integration Testing
-
-To test a local trio setup against a remote chain:
-
-1. Deploy the contracts to your chain
-
-```sh
-bash ops/deploy-contracts.sh -p -m -a
-
-# the cli inputs are all optional, and if not provided will use the following defaults:
-# m: "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"
-# p: "http://localhost:8545"
-# a: "./address-book.json"
-```
-
-2. Make sure there is a `node.config.json` and a `router.config.json` in the root of your `vector` directory. If one does not exist run:
-
-```sh
-make config
-```
-
-to create files with the preconfigured defaults for a local setup.
-
-3. Update the `chainProviders` and `chainAddresses` fields in the `node.config.json` to include the providers and deployed contract addresses for your network, respectively. Make sure to keep the formatting consistent. See the node [configuration](../node/configure.md) section for more information.
-
-4. Update the `rebalanceProfiles` field in `router.config.json` to include an entry for the chain with appropriate collateralization values for the native asset. See the router [configuration](./configure.md) section for more information. Once you update the `router.config.json` delete the `trio.docker.compose` (if it exists) to ensure your changes propagate properly.
-
-5. Run the trio happy case tests with:
-
-```sh
-make test-trio
-```
diff --git a/modules/documentation/docs/router/configure.md b/modules/documentation/docs/router/configure.md
deleted file mode 100644
index 9ac67c7c8..000000000
--- a/modules/documentation/docs/router/configure.md
+++ /dev/null
@@ -1,233 +0,0 @@
-# Configuring and Deploying a Routing Vector Node
-
-This guide will take you through the e2e process of configuring and deploying a router.
-
-## Machine Setup
-
-!!! Info
- If you're planning to launch an instance on your local machine or to a non-Ubuntu OS, you can skip this section and instead install the following dependencies yourself:
- - `make`: Probably already installed, otherwise install w `brew install make` or `apt install make` or similar.
- - `jq`: Probably not installed yet, install w `brew install jq` or `apt install jq` or similar.
- - `docker`: See the [docker website](https://www.docker.com/) for installation instructions.
-
-First step: get a server via AWS or DigitalOcean or setup some hardware at home. For best results, use the most recent LTS version of Ubuntu & make sure it has at least 32GB of disk space. Note this new server's IP address (we'll call this `$SERVER_IP`). Make sure it's able to connect to the internet via ports 80, 443, 4221, and 4222 (no action required on DigitalOcean, Security Group config needs to be setup properly on AWS).
-
-We won't need to ssh into this server right away, most of the setup will be done locally. Start by cloning the repo to your local machine if you haven't already and `cd` into it.
-
-```bash
-git clone git@github.com:connext/vector.git
-cd vector
-```
-
-Every Vector node needs access to a hot wallet, you should generate a fresh mnemonic for your node's wallet that isn't used anywhere else. You can generate a new mnemonic from a node console with ethers by doing something like this: `require('ethers').Wallet.createRandom()`. Alternatively, you can generate one [here](https://iancoleman.io/bip39/).
-
-!!! Warning
- We have a mnemonic hardcoded throughout our repo which is great to use in local testnets: `candy maple ... sweet treat`. If you try to use this mnemonic on a public testnet, it's possible that someone else is trying to use it at the same time. In the case where two nodes try to use the same mnemonic, vector will fail in unpredictable ways. To avoid encountering hard to debug errors, make sure you are using a private mnemonic that only you know, even on testnets.
-
-Save this mnemonic somewhere safe and copy it to your clipboard. From your local machine, run:
-
-```bash
-SSH_KEY=$HOME/.ssh/id_rsa bash ops/server-setup.sh $SERVER_IP
-```
-
-!!! Info
- `$HOME/.ssh/id_rsa` is the default `SSH_KEY`, if this is the key you'll use to access `$SERVER_IP` then you don't need to supply it explicitly
-
-The script should automatically do the following tasks to set up the environment:
-
-1. Install all required dependencies.
-2. Securely store your mnemonic as a [docker secret](https://docs.docker.com/engine/swarm/secrets/)
-3. Clone the Vector repo
-
-This script is idempotent which means you can run it over and over again w/out causing any problems. In fact, re-running it every month or so will help keep things up-to-date (you can skip inputting the mnemonic on subsequent runs).
-
-For convenience's sake, we recommend adding an entry to your ssh config to easily access this server. Add something that looks like the following to `$HOME/.ssh/config`:
-
-```bash
-Host new-vector
- Hostname $SERVER_IP
- User ubuntu
- IdentityFile ~/.ssh/id_rsa
- ServerAliveInterval 120
-```
-
-Now you can login to your new server with just `ssh new-vector`.
-
-## Contract Deployment
-
-Before moving any further, you should first ensure that the required Vector contracts are deployed to your chain.
-
-!!! Info
- Deploying contracts only needs to happen once per chain. If you want to use Vector on a new chain, the easiest thing to do is message the Connext team on Discord & ask us to add support for the new chain. This lets us save the deployment data in a place where everyone can access it & avoids duplicate deployments. If you want to deploy things yourself (or are a member of the Connext team looking for a refresher), read on.
-
-We use [`hardhat-deploy`](https://hardhat.org/plugins/hardhat-deploy.html) which manages all of our contract deployment data in `modules/contracts/deployments/`. You should check inside this folder as well as in `modules/contracts/hardhat.config.ts` to see whether your chain is supported yet.
-
-If not, you'll need to manually edit the hardhat config file to add support. You can mostly copy/paste one of the other network configurations but make sure that you've updated the network name & chain id.
-
-After editing hardhat config, run `make ethprovider` to ensure our hardhat cli script is using the most up-to-date info.
-
-We have a helper script for running hardhat tasks at `ops/hardhat.sh`, use this like you'd use the hardhat cli.
-
-!!! Info
- You can also bypass the fancy dockerized ops by running `cd modules/contracts && npm install && npm run build && hardhat `.
-
-To deploy contracts, run something like this:
-
-```bash
- export MNEMONIC="candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"
- export ETH_PROVIDER_URL="https://eth-rinkeby.alchemyapi.io/jsonrpc/123apikey
-bash ops/hardhat.sh deploy --network rinkeby
-```
-
-!!! Warning
- Make sure the mnemonic cli argument is wrapped in double quotes to ensure it's all interpreted as one argument. Additionally, make sure you put a space in front of any commands that include important secrets to prevent them from being saved to your bash history.
-
-In the above command, `$mnemonic` controls a funded account on whatever chain you plan to deploy to, and `$ethProvider` is a provider URL for the same chain (e.g. an Infura url including an API key). Any newly deployed contracts will have their addresses added to `modules/contracts/deployments//`. Make sure you either commit these changes or submit a PR so that the rest of the world can use these newly deployed contracts too.
-
-!!! Info
- The account that deploys the contracts does not need to be the same one as your vector node's hot wallet.
-
-## Configuring the Router
-
-After setting up dependencies, ssh into the server and enter the Vector repo:
-
-```sh
-ssh new-vector
-cd vector
-```
-
-As we mentioned on the [Router Basics](./basics.md) page, the router sits on top of a `server-node` and consumes its gRPC interface. This means that configuring a router is an extension of configuring a normal `server-node`!
-
-### Router Configuration Keys
-
-Default router configuration can be found in `ops/config/router.default.json`. To setup your custom config, start out by copying this file to `router.config.json`:
-
-```sh
-cp ops/config/router.default.json router.config.json
-```
-
-(or you can run `make config`, a helper that copies all default config files to the project root)
-
-The router's node can be configured by adding any of the following keys to `router.config.json`:
-
-| Key | Type | Description |
-|:-------------------:|:---------:|-------------------------------------------------------------------------------------------------------------------------:|
-| `chainAddresses` | `object` | Specifies the addresses of all relevant contracts, keyed by `chainId`. |
-| `chainProviders` | `object` | Specifies the URL to use to connect to each chain's provider, keyed by `chainId` |
-| `logLevel` | `string` | One of `"debug"`, `"info"`, `"warn"`, `"error"` to specify the maximum log level that will be printed. |
-| `messagingUrl` | `string` | The url used to connect to the messaging service. This will eventually be defaulted in prod-mode to a global service. |
-| `port` | `number` | The port number on which the stack should be exposed to the outside world. |
-| `allowedSwaps` | `object` | Specifies which swaps are allowed & how swap rates are determined. |
-| `rebalanceProfiles` | `object` | Specifies the thresholds & target while collateralizing some `assetId` on some `chainId` . |
-| `awsAccessId` | `string` | An API KEY id that specifies credentials for a remote AWS S3 bucket for storing db backups |
-| `awsAccessKey` | `string` | An API KEY secret that to authenticate on a remote AWS S3 bucket for storing db backups. |
-| `production` | `boolean` | If `false`, ops will automatically build anything that isn't available locally. If `true, nothing will be built locally. |
-| `logDnaKey` | `string` | An API KEY secret that is used to connect to logdna for parsing and viewing router logs. |
-
-### Setting Up Supported Chains
-
-To add support for one or many chains on this router, add a `chainAddresses` and `chainProviders` key to the `router.config.json` file in the root of the vector repo:
-
-```bash
-nano router.config.json
-```
-
-Recall that you deployed contracts to the chain(s) you want to support [earlier in this guide](#contract-deployment). If you open up your `address-book.json`, you should find deployed addresses for your chain indexed by [chainId](https://chainid.network). Copy them over into the config file like below. Also, plug in a providerURL into your `chainProvider`s object indexed at the same chainId.
-
-```json
-// Example Addresses
-"chainAddresses": {
- "4": {
- "channelFactoryAddress": "0xF12b5dd4EAD5F743C6BaA640B0216200e89B60Da",
- "channelMastercopyAddress": "0x8CdaF0CD259887258Bc13a92C0a6dA92698644C0",
- "transferRegistryAddress": "0x345cA3e014Aaf5dcA488057592ee47305D9B3e10",
- }
- },
- "chainProviders": {
- "4": "https://rinkeby.infura.io/abc123"
- },
-```
-
-!!! Tip
- You can support as many evm-compatible chains as you'd like in the above so long as they have a chainId and you have a provider for that chain!
-
-### Setting Up Supported Assets
-
-Routers need to explicitly configure their supported assets. We do this by setting up a `rebalanceProfile` for each asset we want to support.
-
-In order to forward transfers, routers first need to have liquidity (i.e. collateral) in the recipient-side channel to route a transfer over. A `rebalanceProfile` defines parameters around minimum, maximum, and targete liquidity amounts for a given asset. We cover this in more depth in our [Managing Collateral](./managingCollateral.md) section.
-
-An example profile just for Eth looks like the following. Note that we use a combination of `chainId` and `assetId` to represent a given asset (where `0x0` is the "base" asset of the chain):
-
-```json
-// E.g. Eth
-{
- "chainId": 1,
- "assetId": "0x0000000000000000000000000000000000000000",
- "reclaimThreshold": "200000000000000000",
- "target": "100000000000000000",
- "collateralizeThreshold": "50000000000000000"
-},
-```
-
-You can add profiles by setting them under the `rebalanceProfile` key in your `router.config.json`:
-
-```json
-"rebalanceProfiles": [
- {
- "chainId": 1,
- "assetId": "0x0000000000000000000000000000000000000000",
- "reclaimThreshold": "200000000000000000",
- "target": "100000000000000000",
- "collateralizeThreshold": "50000000000000000"
- },
- {
- "chainId": 1,
- "assetId": "0x8f0483125FCb9aaAEFA9209D8E9d7b9C8B9Fb90F",
- "reclaimThreshold": "2000000000000000000",
- "target": "1000000000000000000",
- "collateralizeThreshold": "500000000000000000"
- },
-]
-```
-
-Connext routers also support in-flight swaps when forwarding transfers! In other words, a router can receive a transfer in $ETH and forward it in $DAI so long as an `allowedSwap` exists for that pair.
-
-To allow swapping between the two assets above, you can set the following up under the `allowedSwaps` key in your `router.config.json`:
-
-```json
- "allowedSwaps": [
- {
- "fromChainId": 1,
- "toChainId": 1,
- "fromAssetId": "0x0000000000000000000000000000000000000000",
- "toAssetId": "0x8f0483125FCb9aaAEFA9209D8E9d7b9C8B9Fb90F",
- "priceType": "hardcoded",
- "hardcodedRate": "1"
- },
- {
- "fromChainId": 1,
- "toChainId": 1,
- "fromAssetId": "0x8f0483125FCb9aaAEFA9209D8E9d7b9C8B9Fb90F",
- "toAssetId": "0x0000000000000000000000000000000000000000",
- "priceType": "hardcoded",
- "hardcodedRate": "1"
- }
- ],
-```
-
-!!! Tip
- Above, we're setting default values for rebalance profiles and allowed swaps. In reality, these values (especially swap rates) likely need to be continuously updated at runtime every time period and/or on a per-channel basis. We go over how to plug in data sources for rates and profiles in our [Managing Collateral](./managingCollateral.md) section.
-
-## Spinning Up the Router
-
-Now that we have our configuration complete, we can spin up the router!
-
-This part is pretty easy - in the root of the vector repo, do:
-
-```sh
-make restart-router
-```
-
-!!! Tip
- `make start-$STACK` is optimized for development & will build everything that's out of date before starting the stack. `make restart-$STACK` on the other hand, won't try to build anything before starting the stack so is better to use in production.
diff --git a/modules/documentation/docs/stylesheets/extra.css b/modules/documentation/docs/stylesheets/extra.css
deleted file mode 100644
index c3c390caa..000000000
--- a/modules/documentation/docs/stylesheets/extra.css
+++ /dev/null
@@ -1,4 +0,0 @@
-/* prettier-ignore
-:root {
- --md-footer-fg-color: hsla(217, 100%, 20%, 0.87);
-} */
diff --git a/modules/documentation/mkdocs.yml b/modules/documentation/mkdocs.yml
deleted file mode 100644
index 722e030c7..000000000
--- a/modules/documentation/mkdocs.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-site_name: Connext Documentation
-
-repo_name: connext/vector
-repo_url: https://github.com/connext/vector
-
-theme:
- name: material
-
- logo: assets/logo.png
- favicon: assets/favicon.png
-
- font:
- text: Proxima Nova
- palette:
- primary: "#002868"
- accent: "#FCA311"
-
- features:
- - navigation.tabs
-
-markdown_extensions:
- - admonition
- - pymdownx.superfences
- - pymdownx.tabbed
- - pymdownx.highlight
- - toc:
- toc_depth: 3
- permalink: true
-
-extra:
- social:
- - icon: fontawesome/brands/github
- link: https://github.com/connext
- - icon: fontawesome/brands/twitter
- link: https://twitter.com/ConnextNetwork
- - icon: fontawesome/brands/medium
- link: https://medium.com/connext
- - icon: fontawesome/brands/discord
- link: https://discord.gg/FTxQc8C
-
-nav:
- - Intro:
- - index.md
- - Quick Start:
- - quickStart/serverNode.md
- - quickStart/browserNode.md
- - Node Guides:
- - node/basics.md
- - node/configure.md
- # - node/depositAndWithdraw.md
- - node/transfers.md
- - node/events.md
- - Router Guides:
- - router/basics.md
- - router/configure.md
- - router/chains.md
- # - router/managingCollateral.md
- - Reference:
- - reference/nodeAPI.md
- - reference/hostedNodes.md
- - Changelog:
- - changelog.md
diff --git a/ops/deploy-vector.sh b/ops/deploy-vector.sh
index 393d89b04..f3cf89939 100644
--- a/ops/deploy-vector.sh
+++ b/ops/deploy-vector.sh
@@ -61,7 +61,7 @@ then echo "Aborting: A new, unique $project version is required" && exit 1
fi
# Check the changelog is updated
-if [ ! "$(grep "$version$" "$root/modules/documentation/docs/changelog.md")" ]
+if [ ! "$(grep "$version$" "$root/changelog.md")" ]
then echo "Aborting: Make sure you've updated the changelog for $version" && exit 1
fi
diff --git a/package.json b/package.json
index c17852c39..47d4dc2bd 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,6 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "4.16.1",
"@typescript-eslint/parser": "4.16.1",
- "cypress": "^6.5.0",
"eslint": "7.21.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-import": "2.22.1",