iso-did
Version:
Isomorphic did core and did key tooling
50 lines • 1.43 kB
TypeScript
/**
* Validate raw public key length
*
* @param {number} code
* @param {Uint8Array} key
*/
export function validateRawPublicKeyLength(code: number, key: Uint8Array): Uint8Array<ArrayBufferLike>;
export * from "./common.js";
/**
* did:key Method
*
* @implements {T.VerifiableDID}
*/
export class DIDKey extends DIDCore implements T.VerifiableDID {
/**
* Create a DIDKey from a DID string
*
* @param {string} didString
*/
static fromString(didString: string): DIDKey;
/**
* Create a DIDKey from a public key bytes
*
* @param {T.KeyType} type
* @param {Uint8Array} key
*/
static fromPublicKey(type: T.KeyType, key: Uint8Array): DIDKey;
/**
*
* @param {T.DIDURLObject} did
* @param {T.KeyType} type
* @param {Uint8Array} key
*/
constructor(did: T.DIDURLObject, type: T.KeyType, key: Uint8Array);
type: "RSA" | "Ed25519" | "P-256" | "P-384" | "P-521" | "secp256k1";
publicKey: Uint8Array<ArrayBufferLike>;
code: 237 | 4613 | 4608 | 4609 | 4610 | 231;
didObject: T.DIDURLObject;
verifiableDid: this;
/**
*
* @returns {T.DIDDocument}
*/
get document(): T.DIDDocument;
}
/** @type {import('did-resolver').ResolverRegistry} */
export const resolver: import("did-resolver").ResolverRegistry;
import * as T from './types.js';
import { DIDCore } from './core.js';
//# sourceMappingURL=key.d.ts.map