Delegate server setting

The delegate server setup can be done in two ways: by configuring it when creating a Mitum instance or by using the setDelegate() function.

  1. By configuring delegate server when creating a Mitum instance ! Pay attention to the order, address for delegate server is second.

const mitum = new Mitum("http://{mainnet address}", "http://{delegate server address}");

// check delegate server address
console.log(mitum.getDelegate());
  1. By configuring delegate server when creating a Mitum instance

const mitum = new Mitum("http://{mainnet address}");
mitum.setDelegate("http://{delegate server address}");

// check delegate server address
console.log(mitum.getDelegate());

Last updated