Skip to content

Commit b6cf954

Browse files
author
Wes Biggs
committed
Fix README
1 parent 61b31b1 commit b6cf954

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ This package contains a plugin for the [@dsnp/did-resolver](https://github.com/L
77
The plugin must be initialized with Frequency connection information.
88

99
```
10-
import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
10+
import { FrequencyResolver } from "@dsnp/did-resolver-plugin-frequency";
1111
12-
await pluginInit({
12+
const frequencyResolver = new FrequencyResolver({
1313
providerUri: "ws://127.0.0.1:9944",
1414
frequencyNetwork: "local",
1515
});
@@ -31,19 +31,18 @@ Here's a full usage example with the DID resolver framework:
3131
```
3232
import { Resolver } from "did-resolver";
3333
import dsnp from "@dsnp/did-resolver";
34-
import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
3534
36-
await pluginInit({
35+
const frequencyResolver = new FrequencyResolver({
3736
providerUri: "wss://rpc.rococo.frequency.xyz",
3837
frequencyNetwork: "testnet"
3938
});
4039
41-
const resolver = new Resolver(dsnp.getResolver());
40+
const resolver = new Resolver(dsnp.getResolver([frequencyResolver]));
4241
const myDid = "did:dsnp:13972";
4342
const result = await resolver.resolve(myDid);
4443
console.log(JSON.stringify(result, null, 2));
4544
46-
await pluginDestroy();
45+
frequencyResolver.disconnect();
4746
4847
/* Example output:
4948
{

0 commit comments

Comments
 (0)