@atproto-labs/did-resolver 0.3.1 → 0.3.3

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,31 @@
1
1
  # @atproto-labs/did-resolver
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#5151](https://github.com/bluesky-social/atproto/pull/5151) [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update dependencies
8
+
9
+ - Updated dependencies [[`60e9b83`](https://github.com/bluesky-social/atproto/commit/60e9b8391f212c274b1f21991ee2a3a2d14f2f88), [`60e9b83`](https://github.com/bluesky-social/atproto/commit/60e9b8391f212c274b1f21991ee2a3a2d14f2f88), [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7)]:
10
+ - @atproto-labs/fetch@0.3.2
11
+ - @atproto/did@0.5.2
12
+ - @atproto-labs/pipe@0.2.2
13
+ - @atproto-labs/simple-store@0.4.2
14
+ - @atproto-labs/simple-store-memory@0.2.2
15
+
16
+ ## 0.3.2
17
+
18
+ ### Patch Changes
19
+
20
+ - [#4967](https://github.com/bluesky-social/atproto/pull/4967) [`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use TypeScript 7 to build package
21
+
22
+ - Updated dependencies [[`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5)]:
23
+ - @atproto-labs/simple-store-memory@0.2.1
24
+ - @atproto-labs/simple-store@0.4.1
25
+ - @atproto-labs/fetch@0.3.1
26
+ - @atproto-labs/pipe@0.2.1
27
+ - @atproto/did@0.5.1
28
+
3
29
  ## 0.3.1
4
30
 
5
31
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"did-cache-memory.d.ts","sourceRoot":"","sources":["../src/did-cache-memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAKzC,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;AAE9E,qBAAa,cACX,SAAQ,iBAAiB,CAAC,GAAG,EAAE,WAAW,CAC1C,YAAW,QAAQ;gBAEP,OAAO,CAAC,EAAE,qBAAqB;CAO5C"}
1
+ {"version":3,"file":"did-cache-memory.d.ts","sourceRoot":"","sources":["../src/did-cache-memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAKzC,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;AAE9E,qBAAa,cACX,SAAQ,iBAAiB,CAAC,GAAG,EAAE,WAAW,CAC1C,YAAW,QAAQ;IAEnB,YAAY,OAAO,CAAC,EAAE,qBAAqB,EAM1C;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"did-cache.d.ts","sourceRoot":"","sources":["../src/did-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OA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AAM,GAAG,MAAM,CACtD,YAAW,WAAW,CAAC,CAAC,CAAC;IAEzB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IACzD,YACE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,EACxB,KAAK,GAAE,QAA+B,EAMvC;IAEY,OAAO,CAAC,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,mCAEtE;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"did-cache.js","sourceRoot":"","sources":["../src/did-cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAe,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAUtD,MAAM,OAAO,iBAAiB;IAI5B,YACE,QAAwB,EACxB,QAAkB,IAAI,cAAc,EAAE;QAEtC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAC5B,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,EAChD,KAAK,CACN,CAAA;IACH,CAAC;IAEM,KAAK,CAAC,OAAO,CAAgB,GAAM,EAAE,OAA2B;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAoC,CAAA;IACzE,CAAC;CACF","sourcesContent":["import { Did, DidDocument } from '@atproto/did'\nimport { CachedGetter, SimpleStore } from '@atproto-labs/simple-store'\nimport { DidCacheMemory } from './did-cache-memory.js'\nimport { DidMethod, ResolveDidOptions } from './did-method.js'\nimport { DidResolver, ResolvedDocument } from './did-resolver.js'\n\nexport type { DidMethod, ResolveDidOptions, ResolvedDocument }\n\nexport type DidCache = SimpleStore<Did, DidDocument>\n\nexport type DidResolverCachedOptions = { cache?: DidCache }\n\nexport class DidResolverCached<M extends string = string>\n implements DidResolver<M>\n{\n protected readonly getter: CachedGetter<Did, DidDocument>\n constructor(\n resolver: DidResolver<M>,\n cache: DidCache = new DidCacheMemory(),\n ) {\n this.getter = new CachedGetter<Did, DidDocument>(\n (did, options) => resolver.resolve(did, options),\n cache,\n )\n }\n\n public async resolve<D extends Did>(did: D, options?: ResolveDidOptions) {\n return this.getter.get(did, options) as Promise<ResolvedDocument<D, M>>\n }\n}\n"]}
1
+ {"version":3,"file":"did-cache.js","sourceRoot":"","sources":["../src/did-cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAe,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAUtD,MAAM,OAAO,iBAAiB;IAI5B,YACE,QAAwB,EACxB,KAAK,GAAa,IAAI,cAAc,EAAE;QAEtC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAC5B,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,EAChD,KAAK,CACN,CAAA;IACH,CAAC;IAEM,KAAK,CAAC,OAAO,CAAgB,GAAM,EAAE,OAA2B;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAoC,CAAA;IACzE,CAAC;CACF","sourcesContent":["import { Did, DidDocument } from '@atproto/did'\nimport { CachedGetter, SimpleStore } from '@atproto-labs/simple-store'\nimport { DidCacheMemory } from './did-cache-memory.js'\nimport { DidMethod, ResolveDidOptions } from './did-method.js'\nimport { DidResolver, ResolvedDocument } from './did-resolver.js'\n\nexport type { DidMethod, ResolveDidOptions, ResolvedDocument }\n\nexport type DidCache = SimpleStore<Did, DidDocument>\n\nexport type DidResolverCachedOptions = { cache?: DidCache }\n\nexport class DidResolverCached<M extends string = string>\n implements DidResolver<M>\n{\n protected readonly getter: CachedGetter<Did, DidDocument>\n constructor(\n resolver: DidResolver<M>,\n cache: DidCache = new DidCacheMemory(),\n ) {\n this.getter = new CachedGetter<Did, DidDocument>(\n (did, options) => resolver.resolve(did, options),\n cache,\n )\n }\n\n public async resolve<D extends Did>(did: D, options?: ResolveDidOptions) {\n return this.getter.get(did, options) as Promise<ResolvedDocument<D, M>>\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"did-resolver-base.d.ts","sourceRoot":"","sources":["../src/did-resolver-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAA8B,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEjE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;AAE9D,qBAAa,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CACpD,YAAW,WAAW,CAAC,CAAC,CAAC;IAEzB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;gBAEzC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAI5B,OAAO,CAAC,CAAC,SAAS,GAAG,EACzB,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAiDnC"}
1
+ {"version":3,"file":"did-resolver-base.d.ts","sourceRoot":"","sources":["../src/did-resolver-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAA8B,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEjE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;AAE9D,qBAAa,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CACpD,YAAW,WAAW,CAAC,CAAC,CAAC;IAEzB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IAErD,YAAY,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAEjC;IAEK,OAAO,CAAC,CAAC,SAAS,GAAG,EACzB,GAAG,EAAE,CAAC,EACN,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAgDjC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"did-resolver-common.d.ts","sourceRoot":"","sources":["../src/did-resolver-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,mBAAmB,GAAG,mBAAmB,CAC1C,CAAA;AAED,qBAAa,iBACX,SAAQ,eAAe,CAAC,KAAK,GAAG,KAAK,CACrC,YAAW,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;gBAE7B,OAAO,CAAC,EAAE,wBAAwB;CAM/C"}
1
+ {"version":3,"file":"did-resolver-common.d.ts","sourceRoot":"","sources":["../src/did-resolver-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,mBAAmB,GAAG,mBAAmB,CAC1C,CAAA;AAED,qBAAa,iBACX,SAAQ,eAAe,CAAC,KAAK,GAAG,KAAK,CACrC,YAAW,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC;IAEzC,YAAY,OAAO,CAAC,EAAE,wBAAwB,EAK7C;CACF"}
@@ -16,26 +16,26 @@ export declare class DidPlcMethod implements DidMethod<'plc'> {
16
16
  readonly plcDirectoryUrl: URL;
17
17
  constructor(options?: DidPlcMethodOptions);
18
18
  resolve(did: Did<'plc'>, options?: ResolveDidOptions): Promise<{
19
- id: `did:${string}:${string}`;
20
- controller?: `did:${string}:${string}` | `did:${string}:${string}`[] | undefined;
21
19
  '@context'?: "https://www.w3.org/ns/did/v1" | [string, ...string[]] | undefined;
20
+ id: `did:${string}:${string}`;
21
+ controller?: `did:${string}:${string}`[] | `did:${string}:${string}` | undefined;
22
22
  alsoKnownAs?: string[] | undefined;
23
23
  service?: {
24
- type: string | string[];
25
24
  id: string;
25
+ type: string | string[];
26
26
  serviceEndpoint: string | Record<string, string> | [string | Record<string, string>, ...(string | Record<string, string>)[]];
27
27
  }[] | undefined;
28
28
  authentication?: (string | {
29
- type: string;
30
29
  id: string;
31
- controller: `did:${string}:${string}` | `did:${string}:${string}`[];
30
+ type: string;
31
+ controller: `did:${string}:${string}`[] | `did:${string}:${string}`;
32
32
  publicKeyJwk?: Record<string, unknown> | undefined;
33
33
  publicKeyMultibase?: string | undefined;
34
34
  })[] | undefined;
35
35
  verificationMethod?: {
36
- type: string;
37
36
  id: string;
38
- controller: `did:${string}:${string}` | `did:${string}:${string}`[];
37
+ type: string;
38
+ controller: `did:${string}:${string}`[] | `did:${string}:${string}`;
39
39
  publicKeyJwk?: Record<string, unknown> | undefined;
40
40
  publicKeyMultibase?: string | undefined;
41
41
  }[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"plc.d.ts","sourceRoot":"","sources":["../../src/methods/plc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAsC,MAAM,cAAc,CAAA;AACtE,OAAO,EACL,KAAK,EAKN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAQ/D,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;IAEb;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAC/B,CAAA;AAED,qBAAa,YAAa,YAAW,SAAS,CAAC,KAAK,CAAC;IACnD,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAExC,SAAgB,eAAe,EAAE,GAAG,CAAA;gBAExB,OAAO,CAAC,EAAE,mBAAmB;IAOnC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;wBAeq0W,CAAC;8BAAiE,CAAC;;;;;;wBAAkN,CAAC;8BAAiE,CAAC;;;CADxtX"}
1
+ {"version":3,"file":"plc.d.ts","sourceRoot":"","sources":["../../src/methods/plc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAsC,MAAM,cAAc,CAAA;AACtE,OAAO,EACL,KAAK,EAKN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAQ/D,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;IAEb;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAC/B,CAAA;AAED,qBAAa,YAAa,YAAW,SAAS,CAAC,KAAK,CAAC;IACnD,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAExC,SAAgB,eAAe,EAAE,GAAG,CAAA;IAEpC,YAAY,OAAO,CAAC,EAAE,mBAAmB,EAKxC;IAEK,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;OAazD;CACF"}
@@ -11,26 +11,26 @@ export declare class DidWebMethod implements DidMethod<'web'> {
11
11
  protected readonly allowHttp: boolean;
12
12
  constructor({ fetch, allowHttp, }?: DidWebMethodOptions);
13
13
  resolve(did: Did<'web'>, options?: ResolveDidOptions): Promise<{
14
- id: `did:${string}:${string}`;
15
- controller?: `did:${string}:${string}` | `did:${string}:${string}`[] | undefined;
16
14
  '@context'?: "https://www.w3.org/ns/did/v1" | [string, ...string[]] | undefined;
15
+ id: `did:${string}:${string}`;
16
+ controller?: `did:${string}:${string}`[] | `did:${string}:${string}` | undefined;
17
17
  alsoKnownAs?: string[] | undefined;
18
18
  service?: {
19
- type: string | string[];
20
19
  id: string;
20
+ type: string | string[];
21
21
  serviceEndpoint: string | Record<string, string> | [string | Record<string, string>, ...(string | Record<string, string>)[]];
22
22
  }[] | undefined;
23
23
  authentication?: (string | {
24
- type: string;
25
24
  id: string;
26
- controller: `did:${string}:${string}` | `did:${string}:${string}`[];
25
+ type: string;
26
+ controller: `did:${string}:${string}`[] | `did:${string}:${string}`;
27
27
  publicKeyJwk?: Record<string, unknown> | undefined;
28
28
  publicKeyMultibase?: string | undefined;
29
29
  })[] | undefined;
30
30
  verificationMethod?: {
31
- type: string;
32
31
  id: string;
33
- controller: `did:${string}:${string}` | `did:${string}:${string}`[];
32
+ type: string;
33
+ controller: `did:${string}:${string}`[] | `did:${string}:${string}`;
34
34
  publicKeyJwk?: Record<string, unknown> | undefined;
35
35
  publicKeyMultibase?: string | undefined;
36
36
  }[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/methods/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAA+C,MAAM,cAAc,CAAA;AAC/E,OAAO,EACL,KAAK,EAKN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAQ/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,oBAAoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,qBAAa,YAAa,YAAW,SAAS,CAAC,KAAK,CAAC;IACnD,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;gBAEzB,EACV,KAAwB,EACxB,SAAgB,GACjB,GAAE,mBAAwB;IAKrB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;wBA0Ck+U,CAAC;8BAAiE,CAAC;;;;;;wBAAkN,CAAC;8BAAiE,CAAC;;;CApBr3V;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,OAarD"}
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/methods/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAA+C,MAAM,cAAc,CAAA;AAC/E,OAAO,EACL,KAAK,EAKN,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAQ/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,oBAAoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,qB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,IAAI,CAAC,SAAS,IAAI,cAAc,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YAC3D,MAAM,IAAI,QAAQ,CAChB,GAAG,EACH,6CAA6C,EAC7C,0BAA0B,CAC3B,CAAA;QACH,CAAC;QAED,4EAA4E;QAC5E,iEAAiE;QACjE,0EAA0E;QAC1E,+BAA+B;QAE/B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE;YAChC,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,EAAE,MAAM,EAAE,0CAA0C,EAAE;YAC/D,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IAC9B,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAe;IACpD,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA,CAAC,mCAAmC;IAEhE,2EAA2E;IAC3E,8EAA8E;IAC9E,gCAAgC;IAEhC,yDAAyD;IACzD,IAAI,GAAG,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;QACzB,OAAO,IAAI,GAAG,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAA;IAC9C,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,WAAW,EAAE,GAAG,CAAC,CAAA;IACjD,CAAC;AACH,CAAC","sourcesContent":["import { Did, DidError, didDocumentValidator, didWebToUrl } from '@atproto/did'\nimport {\n Fetch,\n bindFetch,\n fetchJsonProcessor,\n fetchJsonZodProcessor,\n fetchOkProcessor,\n} from '@atproto-labs/fetch'\nimport { pipe } from '@atproto-labs/pipe'\nimport { DidMethod, ResolveDidOptions } from '../did-method.js'\n\nconst fetchSuccessHandler = pipe(\n fetchOkProcessor(),\n fetchJsonProcessor(/^application\\/(did\\+ld\\+)?json$/),\n fetchJsonZodProcessor(didDocumentValidator),\n)\n\nexport type DidWebMethodOptions = {\n fetch?: Fetch\n /** @default true */\n allowHttp?: boolean\n}\n\nexport class DidWebMethod implements DidMethod<'web'> {\n protected readonly fetch: Fetch<unknown>\n protected readonly allowHttp: boolean\n\n constructor({\n fetch = globalThis.fetch,\n allowHttp = true,\n }: DidWebMethodOptions = {}) {\n this.fetch = bindFetch(fetch)\n this.allowHttp = allowHttp\n }\n\n async resolve(did: Did<'web'>, options?: ResolveDidOptions) {\n const didDocumentUrl = buildDidWebDocumentUrl(did)\n\n if (!this.allowHttp && didDocumentUrl.protocol === 'http:') {\n throw new DidError(\n did,\n 'Resolution of \"http\" did:web is not allowed',\n 'did-web-http-not-allowed',\n )\n }\n\n // Note we do not explicitly check for \"localhost\" here. Instead, we rely on\n // the injected 'fetch' function to handle the URL. If the URL is\n // \"localhost\", or resolves to a private IP address, the fetch function is\n // responsible for handling it.\n\n return this.fetch(didDocumentUrl, {\n redirect: 'error',\n headers: { accept: 'application/did+ld+json,application/json' },\n signal: options?.signal,\n }).then(fetchSuccessHandler)\n }\n}\n\n/**\n * @see {@link https://datatracker.ietf.org/doc/html/rfc8615}\n * @see {@link https://w3c-ccg.github.io/did-method-web/#create-register}\n */\nexport function buildDidWebDocumentUrl(did: Did<'web'>) {\n const url = didWebToUrl(did) // Will throw if the DID is invalid\n\n // Note: DID cannot end with an `:`, so they cannot end with a `/`. This is\n // true unless when there is no path at all, in which case the URL constructor\n // will set the pathname to `/`.\n\n // https://w3c-ccg.github.io/did-method-web/#read-resolve\n if (url.pathname === '/') {\n return new URL(`/.well-known/did.json`, url)\n } else {\n return new URL(`${url.pathname}/did.json`, url)\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/methods/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/E,OAAO,EAEL,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAA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;QACzB,OAAO,IAAI,GAAG,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAA;IAC9C,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,WAAW,EAAE,GAAG,CAAC,CAAA;IACjD,CAAC;AACH,CAAC","sourcesContent":["import { Did, DidError, didDocumentValidator, didWebToUrl } from '@atproto/did'\nimport {\n Fetch,\n bindFetch,\n fetchJsonProcessor,\n fetchJsonZodProcessor,\n fetchOkProcessor,\n} from '@atproto-labs/fetch'\nimport { pipe } from '@atproto-labs/pipe'\nimport { DidMethod, ResolveDidOptions } from '../did-method.js'\n\nconst fetchSuccessHandler = pipe(\n fetchOkProcessor(),\n fetchJsonProcessor(/^application\\/(did\\+ld\\+)?json$/),\n fetchJsonZodProcessor(didDocumentValidator),\n)\n\nexport type DidWebMethodOptions = {\n fetch?: Fetch\n /** @default true */\n allowHttp?: boolean\n}\n\nexport class DidWebMethod implements DidMethod<'web'> {\n protected readonly fetch: Fetch<unknown>\n protected readonly allowHttp: boolean\n\n constructor({\n fetch = globalThis.fetch,\n allowHttp = true,\n }: DidWebMethodOptions = {}) {\n this.fetch = bindFetch(fetch)\n this.allowHttp = allowHttp\n }\n\n async resolve(did: Did<'web'>, options?: ResolveDidOptions) {\n const didDocumentUrl = buildDidWebDocumentUrl(did)\n\n if (!this.allowHttp && didDocumentUrl.protocol === 'http:') {\n throw new DidError(\n did,\n 'Resolution of \"http\" did:web is not allowed',\n 'did-web-http-not-allowed',\n )\n }\n\n // Note we do not explicitly check for \"localhost\" here. Instead, we rely on\n // the injected 'fetch' function to handle the URL. If the URL is\n // \"localhost\", or resolves to a private IP address, the fetch function is\n // responsible for handling it.\n\n return this.fetch(didDocumentUrl, {\n redirect: 'error',\n headers: { accept: 'application/did+ld+json,application/json' },\n signal: options?.signal,\n }).then(fetchSuccessHandler)\n }\n}\n\n/**\n * @see {@link https://datatracker.ietf.org/doc/html/rfc8615}\n * @see {@link https://w3c-ccg.github.io/did-method-web/#create-register}\n */\nexport function buildDidWebDocumentUrl(did: Did<'web'>) {\n const url = didWebToUrl(did) // Will throw if the DID is invalid\n\n // Note: DID cannot end with an `:`, so they cannot end with a `/`. This is\n // true unless when there is no path at all, in which case the URL constructor\n // will set the pathname to `/`.\n\n // https://w3c-ccg.github.io/did-method-web/#read-resolve\n if (url.pathname === '/') {\n return new URL(`/.well-known/did.json`, url)\n } else {\n return new URL(`${url.pathname}/did.json`, url)\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto-labs/did-resolver",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },
@@ -26,16 +26,14 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "zod": "^3.23.8",
29
- "@atproto-labs/fetch": "^0.3.0",
30
- "@atproto-labs/pipe": "^0.2.0",
31
- "@atproto-labs/simple-store": "^0.4.0",
32
- "@atproto-labs/simple-store-memory": "^0.2.0",
33
- "@atproto/did": "^0.5.0"
34
- },
35
- "devDependencies": {
36
- "typescript": "^6.0.3"
29
+ "@atproto-labs/fetch": "^0.3.2",
30
+ "@atproto-labs/pipe": "^0.2.2",
31
+ "@atproto-labs/simple-store": "^0.4.2",
32
+ "@atproto/did": "^0.5.2",
33
+ "@atproto-labs/simple-store-memory": "^0.2.2"
37
34
  },
35
+ "devDependencies": {},
38
36
  "scripts": {
39
- "build": "tsc --build tsconfig.build.json"
37
+ "build": "tsgo --build tsconfig.build.json"
40
38
  }
41
39
  }
@@ -2,7 +2,7 @@
2
2
  "extends": ["../../../tsconfig/isomorphic.json"],
3
3
  "compilerOptions": {
4
4
  "rootDir": "./src",
5
- "outDir": "./dist"
5
+ "outDir": "./dist",
6
6
  },
7
- "include": ["./src/**/*.ts"]
7
+ "include": ["./src/**/*.ts"],
8
8
  }
@@ -1 +1 @@
1
- {"root":["./src/create-did-resolver.ts","./src/did-cache-memory.ts","./src/did-cache.ts","./src/did-method.ts","./src/did-resolver-base.ts","./src/did-resolver-common.ts","./src/did-resolver.ts","./src/index.ts","./src/methods.ts","./src/util.ts","./src/methods/plc.ts","./src/methods/web.ts"],"version":"6.0.3"}
1
+ {"version":"7.0.0-dev.20260614.1","root":["./src/create-did-resolver.ts","./src/did-cache-memory.ts","./src/did-cache.ts","./src/did-method.ts","./src/did-resolver-base.ts","./src/did-resolver-common.ts","./src/did-resolver.ts","./src/index.ts","./src/methods.ts","./src/util.ts","./src/methods/plc.ts","./src/methods/web.ts"]}
package/tsconfig.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "include": [],
3
- "references": [{ "path": "./tsconfig.build.json" }]
3
+ "references": [{ "path": "./tsconfig.build.json" }],
4
4
  }