-
Notifications
You must be signed in to change notification settings - Fork 13
Missing Dependency #11
Description
When I attempt to run some code that uses this, I get the following error. It seems polygon-did-registar needs @ethersproject/wallet but it is not included when installing it.
This is the code in the index file:
`import { createDID, registerDID } from "@ayanworks/polygon-did-registrar";
import * as dotenv from 'dotenv'
dotenv.config()
const network: string = "testnet";
async function main() {
// pad private key with 0x
let pk = process.env.PRIVATE_KEY;
if (!pk.startsWith("0x")) {
// pad 0x to private key
pk = 0x${pk};
}
// create a new did
const did = await createDID(network, pk);
console.log("DID created: ", did.data.did);
// register the did
const txHash = await registerDID(did.data.did, pk);
console.log("DID registered: ", txHash);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
`
