did-sdk-dev
Version:
SAN did sdk
26 lines (25 loc) • 819 B
TypeScript
import { TDocument } from "./model";
import { TJsonRpcResponse } from "../rpc/jsonrpc";
import { SANClient } from "../SANClient";
declare type keyPair = {
type: string;
priKey: string;
pubKey: string;
};
export declare class did {
private chain;
private SANClient;
constructor(SANClient: SANClient);
create: () => Promise<TJsonRpcResponse<{
document: TDocument;
did: string;
authenticationKey: keyPair;
recoveryKey: keyPair;
}>>;
resolve: (did: string) => Promise<TJsonRpcResponse<{
document: TDocument;
}>>;
update: (did: string, oldRecoveryPriKey: string, document: any, newRecoveryPriKey?: string) => Promise<TJsonRpcResponse<string>>;
revoke: (did: string, hexPriKey: string) => Promise<TJsonRpcResponse<string>>;
}
export {};