Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atproto-labs/did-resolver

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atproto-labs/did-resolver - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

10

CHANGELOG.md
# @atproto-labs/did-resolver
## 0.1.1
### Patch Changes
- [#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
- Updated dependencies [[`acc9093d2`](https://github.com/bluesky-social/atproto/commit/acc9093d2845eba02b68fb2f9db33e4f1b59bb10), [`acc9093d2`](https://github.com/bluesky-social/atproto/commit/acc9093d2845eba02b68fb2f9db33e4f1b59bb10)]:
- @atproto-labs/simple-store@0.1.1
- @atproto-labs/simple-store-memory@0.1.1
## 0.1.0

@@ -4,0 +14,0 @@

6

dist/did-cache.d.ts
import { CachedGetter, SimpleStore } from '@atproto-labs/simple-store';
import { Did, DidDocument } from '@atproto/did';
import { DidMethod, ResolveOptions } from './did-method.js';
import { DidMethod, ResolveDidOptions } from './did-method.js';
import { DidResolver, ResolvedDocument } from './did-resolver.js';
export type { DidMethod, ResolveOptions, ResolvedDocument };
export type { DidMethod, ResolvedDocument, ResolveDidOptions };
export type DidCache = SimpleStore<Did, DidDocument>;

@@ -13,4 +13,4 @@ export type DidResolverCachedOptions = {

constructor(resolver: DidResolver<M>, cache?: DidCache);
resolve<D extends Did>(did: D, options?: ResolveOptions): Promise<ResolvedDocument<D, M>>;
resolve<D extends Did>(did: D, options?: ResolveDidOptions): Promise<ResolvedDocument<D, M>>;
}
//# sourceMappingURL=did-cache.d.ts.map
import { Did, DidDocument } from '@atproto/did';
export type ResolveOptions = {
export type ResolveDidOptions = {
signal?: AbortSignal;

@@ -7,3 +7,3 @@ noCache?: boolean;

export interface DidMethod<Method extends string> {
resolve: (did: Did<Method>, options?: ResolveOptions) => DidDocument | PromiseLike<DidDocument>;
resolve: (did: Did<Method>, options?: ResolveDidOptions) => DidDocument | PromiseLike<DidDocument>;
}

@@ -10,0 +10,0 @@ export type DidMethods<M extends string> = {

import { Did } from '@atproto/did';
import { DidMethod, DidMethods, ResolveOptions } from './did-method.js';
import { DidMethod, DidMethods, ResolveDidOptions } from './did-method.js';
import { DidResolver, ResolvedDocument } from './did-resolver.js';
export type { DidMethod, ResolveOptions, ResolvedDocument };
export type { DidMethod, ResolvedDocument, ResolveDidOptions };
export declare class DidResolverBase<M extends string = string> implements DidResolver<M> {
protected readonly methods: Map<string, DidMethod<M>>;
constructor(methods: DidMethods<M>);
resolve<D extends Did>(did: D, options?: ResolveOptions): Promise<ResolvedDocument<D, M>>;
resolve<D extends Did>(did: D, options?: ResolveDidOptions): Promise<ResolvedDocument<D, M>>;
}
//# sourceMappingURL=did-resolver-base.d.ts.map
import { Did, DidDocument } from '@atproto/did';
import { ResolveOptions } from './did-method.js';
import { ResolveDidOptions } from './did-method.js';
export type ResolvedDocument<D extends Did, M extends string = string> = D extends Did<infer N> ? DidDocument<N extends string ? M : N extends M ? N : never> : never;
export interface DidResolver<M extends string = string> {
resolve<D extends Did>(did: D, options?: ResolveOptions): Promise<ResolvedDocument<D, M>>;
resolve<D extends Did>(did: D, options?: ResolveDidOptions): Promise<ResolvedDocument<D, M>>;
}
//# sourceMappingURL=did-resolver.d.ts.map
import { Fetch } from '@atproto-labs/fetch';
import { Did } from '@atproto/did';
import { DidMethod, ResolveOptions } from '../did-method.js';
import { DidMethod, ResolveDidOptions } from '../did-method.js';
export type DidPlcMethodOptions = {

@@ -18,3 +18,3 @@ /**

constructor(options?: DidPlcMethodOptions);
resolve(did: Did<'plc'>, options?: ResolveOptions): Promise<{
resolve(did: Did<'plc'>, options?: ResolveDidOptions): Promise<{
id: `did:${string}:${string}`;

@@ -21,0 +21,0 @@ '@context': "https://www.w3.org/ns/did/v1" | [string, ...string[]];

import { Fetch } from '@atproto-labs/fetch';
import { Did } from '@atproto/did';
import { DidMethod, ResolveOptions } from '../did-method.js';
import { DidMethod, ResolveDidOptions } from '../did-method.js';
export type DidWebMethodOptions = {

@@ -10,3 +10,3 @@ fetch?: Fetch;

constructor({ fetch }?: DidWebMethodOptions);
resolve(did: Did<'web'>, options?: ResolveOptions): Promise<{
resolve(did: Did<'web'>, options?: ResolveDidOptions): Promise<{
id: `did:${string}:${string}`;

@@ -13,0 +13,0 @@ '@context': "https://www.w3.org/ns/did/v1" | [string, ...string[]];

{
"name": "@atproto-labs/did-resolver",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -30,4 +30,4 @@ "description": "DID resolution and verification library",

"@atproto-labs/pipe": "0.1.0",
"@atproto-labs/simple-store": "0.1.0",
"@atproto-labs/simple-store-memory": "0.1.0",
"@atproto-labs/simple-store": "0.1.1",
"@atproto-labs/simple-store-memory": "0.1.1",
"@atproto/did": "0.1.0"

@@ -34,0 +34,0 @@ },

@@ -5,6 +5,6 @@ import { CachedGetter, SimpleStore } from '@atproto-labs/simple-store'

import { DidCacheMemory } from './did-cache-memory.js'
import { DidMethod, ResolveOptions } from './did-method.js'
import { DidMethod, ResolveDidOptions } from './did-method.js'
import { DidResolver, ResolvedDocument } from './did-resolver.js'
export type { DidMethod, ResolveOptions, ResolvedDocument }
export type { DidMethod, ResolvedDocument, ResolveDidOptions }

@@ -29,5 +29,5 @@ export type DidCache = SimpleStore<Did, DidDocument>

public async resolve<D extends Did>(did: D, options?: ResolveOptions) {
public async resolve<D extends Did>(did: D, options?: ResolveDidOptions) {
return this.getter.get(did, options) as Promise<ResolvedDocument<D, M>>
}
}
import { Did, DidDocument } from '@atproto/did'
export type ResolveOptions = {
export type ResolveDidOptions = {
signal?: AbortSignal

@@ -11,3 +11,3 @@ noCache?: boolean

did: Did<Method>,
options?: ResolveOptions,
options?: ResolveDidOptions,
) => DidDocument | PromiseLike<DidDocument>

@@ -14,0 +14,0 @@ }

@@ -5,6 +5,6 @@ import { FetchRequestError } from '@atproto-labs/fetch'

import { DidMethod, DidMethods, ResolveOptions } from './did-method.js'
import { DidMethod, DidMethods, ResolveDidOptions } from './did-method.js'
import { DidResolver, ResolvedDocument } from './did-resolver.js'
export type { DidMethod, ResolveOptions, ResolvedDocument }
export type { DidMethod, ResolvedDocument, ResolveDidOptions }

@@ -22,3 +22,3 @@ export class DidResolverBase<M extends string = string>

did: D,
options?: ResolveOptions,
options?: ResolveDidOptions,
): Promise<ResolvedDocument<D, M>> {

@@ -25,0 +25,0 @@ options?.signal?.throwIfAborted()

import { Did, DidDocument } from '@atproto/did'
import { ResolveOptions } from './did-method.js'
import { ResolveDidOptions } from './did-method.js'

@@ -13,4 +13,4 @@ export type ResolvedDocument<D extends Did, M extends string = string> =

did: D,
options?: ResolveOptions,
options?: ResolveDidOptions,
): Promise<ResolvedDocument<D, M>>
}

@@ -11,3 +11,3 @@ import {

import { DidMethod, ResolveOptions } from '../did-method.js'
import { DidMethod, ResolveDidOptions } from '../did-method.js'

@@ -44,3 +44,3 @@ const fetchSuccessHandler = pipe(

async resolve(did: Did<'plc'>, options?: ResolveOptions) {
async resolve(did: Did<'plc'>, options?: ResolveDidOptions) {
// Although the did should start with `did:plc:` (thanks to typings), we

@@ -47,0 +47,0 @@ // should still check if the msid is valid.

@@ -11,3 +11,3 @@ import {

import { DidMethod, ResolveOptions } from '../did-method.js'
import { DidMethod, ResolveDidOptions } from '../did-method.js'

@@ -31,3 +31,3 @@ const fetchSuccessHandler = pipe(

async resolve(did: Did<'web'>, options?: ResolveOptions) {
async resolve(did: Did<'web'>, options?: ResolveDidOptions) {
const didDocumentUrl = buildDidWebDocumentUrl(did)

@@ -34,0 +34,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc