@3id/common
Advanced tools
Comparing version 0.1.1 to 0.1.3
/// <reference types="node" /> | ||
import type { JWE } from 'did-jwt'; | ||
import type { RPCConnection, RPCRequest, RPCResponse } from 'rpc-utils'; | ||
export interface ProviderConnectInfo { | ||
@@ -34,49 +32,3 @@ readonly chainId: string; | ||
} | ||
declare type CreateJWSParams = { | ||
payload: Record<string, any>; | ||
protected?: Record<string, any>; | ||
revocable?: boolean; | ||
did: string; | ||
}; | ||
declare type DecryptJWEParams = { | ||
jwe: JWE; | ||
did?: string; | ||
}; | ||
declare type AuthParams = { | ||
paths: Array<string>; | ||
nonce: string; | ||
aud?: string; | ||
}; | ||
declare type JWSSignature = { | ||
protected: string; | ||
signature: string; | ||
}; | ||
declare type GeneralJWS = { | ||
payload: string; | ||
signatures: Array<JWSSignature>; | ||
}; | ||
export declare type DIDProviderMethods = { | ||
did_authenticate: { | ||
params: AuthParams; | ||
result: GeneralJWS; | ||
}; | ||
did_createJWS: { | ||
params: CreateJWSParams; | ||
result: { | ||
jws: GeneralJWS; | ||
}; | ||
}; | ||
did_decryptJWE: { | ||
params: DecryptJWEParams; | ||
result: { | ||
cleartext: string; | ||
}; | ||
}; | ||
}; | ||
export declare type DIDMethodName = keyof DIDProviderMethods; | ||
export declare type DIDRequest<K extends DIDMethodName = DIDMethodName> = RPCRequest<DIDProviderMethods, K>; | ||
export declare type DIDResponse<K extends DIDMethodName = DIDMethodName> = RPCResponse<DIDProviderMethods, K>; | ||
export declare type DIDProvider = RPCConnection<DIDProviderMethods, [string | null | undefined]>; | ||
export declare type AccountsList = Array<string>; | ||
export declare type DIDLinksList = Record<string, AccountsList>; | ||
export {}; |
{ | ||
"name": "@3id/common", | ||
"version": "0.1.1", | ||
"version": "0.1.3", | ||
"author": "Ceramic Studio", | ||
@@ -40,3 +40,3 @@ "license": "(Apache-2.0 OR MIT)", | ||
"errors-utils": "^0.1.0", | ||
"uint8arrays": "^2.1.2" | ||
"uint8arrays": "^2.1.5" | ||
}, | ||
@@ -51,3 +51,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "011f7d0d09e94984a6b996a09a1db751676371d1" | ||
"gitHead": "f6b956da31146bdb289f42c43577dd862f753ef8" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13215
162
Updateduint8arrays@^2.1.5