You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-13Lines changed: 2 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -17,34 +17,29 @@ import { FrequencyResolver } from "@dsnp/did-resolver-frequency";
17
17
18
18
const frequencyResolver = new FrequencyResolver({
19
19
providerUri: "ws://127.0.0.1:9944",
20
-
frequencyNetwork: "local",
21
20
});
22
21
```
23
22
24
23
If constructed this way, you must call `disconnect()` to explicitly release the connection; the process will not exit if this is not done.
25
24
26
25
or,
27
26
28
-
2. Construct with preconfigured `ApiPromise` object from `@polkadot/api`:
27
+
2. Construct with preconfigured `Promise<ApiPromise>` object from `@polkadot/api`:
29
28
30
29
```
31
30
import { FrequencyResolver } from "@dsnp/did-resolver-frequency";
32
31
33
32
const frequencyResolver = new FrequencyResolver({
34
33
apiPromise: myApiPromise, // from ApiPromise.create(...)
35
-
frequencyNetwork: "local",
36
34
});
37
35
```
38
36
39
-
The `frequencyNetwork` key is required in both cases (this is expected to be unnecessary with Frequency schema naming in the future).
40
-
41
37
Summary of options:
42
38
43
39
| Configuration option | Description |
44
40
| --- | --- |
45
41
|`providerUri`| Provider URI for Frequency RPC node (optional; alternative to `apiPromise`|
46
-
|`apiPromise`| An `ApiPromise` object (optional; alternative to `providerUri`|
47
-
|`frequencyNetwork`| One of `local`, `testnet`, `mainnet`|
42
+
|`apiPromise`| A `Promise<ApiPromise>` (optional; alternative to `providerUri`|
48
43
49
44
See `.env.example` for example configuration.
50
45
@@ -56,7 +51,6 @@ import dsnp from "@dsnp/did-resolver";
56
51
57
52
const frequencyResolver = new FrequencyResolver({
58
53
providerUri: "wss://rpc.rococo.frequency.xyz",
59
-
frequencyNetwork: "testnet"
60
54
});
61
55
62
56
const resolver = new Resolver(dsnp.getResolver([frequencyResolver]));
@@ -111,8 +105,3 @@ Currently this resolver implements the minimal functionality required to support
111
105
Public keys are encoded using the `Multikey` type.
112
106
The `id` consists of the DSNP DID and a URL fragment that is the same as the `publicKeyMultibase` value, which is a multicodec value in `base58btc` encoding.
113
107
The decoded value for `ed25519-pub` keys will be 34 bytes, including the two-byte multicodec identifier.
114
-
115
-
## Known issues
116
-
117
-
- The resolver currently responds with a DID document for any valid-looking DSNP DID.
118
-
It should return a `notFound` error if there is no corresponding Frequency MSA.
0 commit comments