Using Cargo With Fortmatic

You can easily use Fortmatic with Cargo by providing Cargo with the Fortmatic Provider.

You can set the provider when initializing Cargo or you can update the provider after initialization.

Setting the provider during initialization

const fortmatic = new Fortmatic(FORTMATIC_KEY);
​
const cargo = new Cargo({ provider: fm.getProvider() });

Setting the provider after initialization

const fortmatic = new Fortmatic(FORTMATIC_KEY);
​
const cargo = new Cargo();
​
// Things happen and then ....
​
cargo.setProvider(fm.getProvider());

​