const dpack = require('dpack');
const my_pack = require('./packs/my_pack.dpack.json')
const dapp = dpack.Dapp.loadFromJson(my_pack); // also have loadFromFile, loadFromCID
dapp.objects // all instantiated contract *objects* from this pack
dapp.types // all artifacts plus ethers.js 'factories'; JS-level objects that deploy new instances of contracts
await dapp.objects.WETH.wrap(...)
could be:
const dpack = require('dpack')
const dapp = await dpack.load('./pack/weth_ethereum.dpack.json')
await dapp.weth.wrap(...) // objects on top-level dapp object. types in `_types`.
In current readme:
could be: