@atproto-labs/identity-resolver 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atproto-labs/identity-resolver
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2633](https://github.com/bluesky-social/atproto/pull/2633) [`acc9093d2`](https://github.com/bluesky-social/atproto/commit/acc9093d2845eba02b68fb2f9db33e4f1b59bb10) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use distinct type names to prevent conflicts
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`acc9093d2`](https://github.com/bluesky-social/atproto/commit/acc9093d2845eba02b68fb2f9db33e4f1b59bb10)]:
|
|
10
|
+
- @atproto-labs/handle-resolver@0.1.1
|
|
11
|
+
- @atproto-labs/did-resolver@0.1.1
|
|
12
|
+
|
|
3
13
|
## 0.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ResolveDidOptions, DidResolver } from '@atproto-labs/did-resolver';
|
|
2
|
+
import { ResolveHandleOptions, HandleResolver, ResolvedHandle } from '@atproto-labs/handle-resolver';
|
|
3
3
|
export type ResolvedIdentity = {
|
|
4
4
|
did: NonNullable<ResolvedHandle>;
|
|
5
5
|
pds: URL;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type ResolveIdentityOptions = ResolveDidOptions & ResolveHandleOptions;
|
|
8
8
|
export declare class IdentityResolver {
|
|
9
9
|
readonly didResolver: DidResolver<'plc' | 'web'>;
|
|
10
10
|
readonly handleResolver: HandleResolver;
|
|
11
11
|
constructor(didResolver: DidResolver<'plc' | 'web'>, handleResolver: HandleResolver);
|
|
12
|
-
resolve(input: string, options?:
|
|
12
|
+
resolve(input: string, options?: ResolveIdentityOptions): Promise<ResolvedIdentity>;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=identity-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-resolver.d.ts","sourceRoot":"","sources":["../src/identity-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,
|
|
1
|
+
{"version":3,"file":"identity-resolver.d.ts","sourceRoot":"","sources":["../src/identity-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,cAAc,EAEf,MAAM,+BAA+B,CAAA;AAGtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAChC,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,oBAAoB,CAAA;AAE7E,qBAAa,gBAAgB;IAEzB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;IAChD,QAAQ,CAAC,cAAc,EAAE,cAAc;gBAD9B,WAAW,EAAE,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,EACvC,cAAc,EAAE,cAAc;IAG5B,OAAO,CAClB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,gBAAgB,CAAC;CA+B7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-resolver.js","sourceRoot":"","sources":["../src/identity-resolver.ts"],"names":[],"mappings":";;;AAOA,mEAKsC;AACtC,4CAA+D;AAS/D,MAAa,gBAAgB;IAC3B,YACW,WAAuC,EACvC,cAA8B;QADvC;;;;mBAAS,WAAW;WAA4B;QAChD;;;;mBAAS,cAAc;WAAgB;IACtC,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C,CAAC,eAAe,KAAK,QAAQ;QACrC,CAAC,CAAC,IAAI,KAAK,2BAA2B;QACtC,CAAC,CAAC,CAAC,EAAE,KAAK,cAAc,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,cAAc,CAAC,CAC/D,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto-labs/identity-resolver",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A library resolving ATPROTO identities",
|
|
6
6
|
"keywords": [
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@atproto-labs/did-resolver": "0.1.
|
|
29
|
-
"@atproto-labs/handle-resolver": "0.1.
|
|
28
|
+
"@atproto-labs/did-resolver": "0.1.1",
|
|
29
|
+
"@atproto-labs/handle-resolver": "0.1.1",
|
|
30
30
|
"@atproto/syntax": "0.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/src/identity-resolver.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Did,
|
|
3
3
|
DidDocument,
|
|
4
|
-
|
|
4
|
+
ResolveDidOptions,
|
|
5
5
|
DidResolver,
|
|
6
6
|
DidService,
|
|
7
7
|
} from '@atproto-labs/did-resolver'
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
ResolveHandleOptions,
|
|
10
10
|
HandleResolver,
|
|
11
11
|
ResolvedHandle,
|
|
12
12
|
isResolvedHandle,
|
|
@@ -18,7 +18,7 @@ export type ResolvedIdentity = {
|
|
|
18
18
|
pds: URL
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export type
|
|
21
|
+
export type ResolveIdentityOptions = ResolveDidOptions & ResolveHandleOptions
|
|
22
22
|
|
|
23
23
|
export class IdentityResolver {
|
|
24
24
|
constructor(
|
|
@@ -28,7 +28,7 @@ export class IdentityResolver {
|
|
|
28
28
|
|
|
29
29
|
public async resolve(
|
|
30
30
|
input: string,
|
|
31
|
-
options?:
|
|
31
|
+
options?: ResolveIdentityOptions,
|
|
32
32
|
): Promise<ResolvedIdentity> {
|
|
33
33
|
const did = isResolvedHandle(input)
|
|
34
34
|
? input // Already a did
|