did-sdk-js
Version:
js sdk for did and vc according to mcps did spec
24 lines (23 loc) • 963 B
TypeScript
import { Secp256k1 } from "./secp256k1";
import { Sm2 } from "./sm2";
export declare enum AlgoType {
AlgoTypeSecp256k1 = "secp256k1",
AlgoTypeSm2 = "sm2",
AlgoTypeNotSupport = "not-support"
}
export declare enum KeyType {
KeyTypeSecp256k1 = "Secp256k1",
KeyTypeSm2 = "Sm2",
KeyTypeNotSupport = "not-support"
}
export declare enum VerifyType {
VerifyTypeSecp256k1 = "Secp256k1",
VerifyTypeSm2 = "Sm2",
VerifyTypeNotSupport = "not-support"
}
export declare function getKeyTypeByAlgo(algo: AlgoType): KeyType;
export declare function getVerifyTypeByAlgo(algo: AlgoType): VerifyType;
export declare function getVerifyTypeByKeyType(keyType: KeyType): VerifyType;
export declare function getAlgoTypeByVerifyType(verifyType: VerifyType): AlgoType;
export declare function getAlgoTypeByKeyType(keyType: KeyType): AlgoType;
export declare function keyGenerator(algoType: AlgoType): typeof Secp256k1 | typeof Sm2;