File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ This package contains a plugin for the [@dsnp/did-resolver](https://github.com/L
7
7
The plugin must be initialized with Frequency connection information.
8
8
9
9
```
10
- import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
10
+ import { FrequencyResolver } from "@dsnp/did-resolver-plugin-frequency";
11
11
12
- await pluginInit ({
12
+ const frequencyResolver = new FrequencyResolver ({
13
13
providerUri: "ws://127.0.0.1:9944",
14
14
frequencyNetwork: "local",
15
15
});
@@ -31,19 +31,18 @@ Here's a full usage example with the DID resolver framework:
31
31
```
32
32
import { Resolver } from "did-resolver";
33
33
import dsnp from "@dsnp/did-resolver";
34
- import { pluginInit, pluginDestroy } from "@dsnp/did-resolver-plugin-frequency";
35
34
36
- await pluginInit ({
35
+ const frequencyResolver = new FrequencyResolver ({
37
36
providerUri: "wss://rpc.rococo.frequency.xyz",
38
37
frequencyNetwork: "testnet"
39
38
});
40
39
41
- const resolver = new Resolver(dsnp.getResolver());
40
+ const resolver = new Resolver(dsnp.getResolver([frequencyResolver] ));
42
41
const myDid = "did:dsnp:13972";
43
42
const result = await resolver.resolve(myDid);
44
43
console.log(JSON.stringify(result, null, 2));
45
44
46
- await pluginDestroy ();
45
+ frequencyResolver.disconnect ();
47
46
48
47
/* Example output:
49
48
{
You can’t perform that action at this time.
0 commit comments