Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Missing Dependency #11

@crgold

Description

@crgold

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.

polyDIDError

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;
});
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions