@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
86 lines (85 loc) • 3.67 kB
text/typescript
import { KmsCreateKeyOptions, KmsCreateKeyTypeAsymmetric } from "../../../kms/options/KmsCreateKeyOptions.mjs";
import { XOR } from "../../../../types.mjs";
import "../../../kms/index.mjs";
import { DidDocument } from "../../domain/DidDocument.mjs";
import { DidRegistrar } from "../../domain/DidRegistrar.mjs";
import { DidDocumentKey } from "../../DidsApiOptions.mjs";
import "../../domain/index.mjs";
import { DidCreateOptions, DidCreateResult, DidDeactivateResult, DidUpdateResult } from "../../types.mjs";
import { PeerDidNumAlgo } from "./didPeer.mjs";
import { AgentContext } from "../../../../agent/context/AgentContext.mjs";
import "../../../../agent/index.mjs";
//#region src/modules/dids/methods/peer/PeerDidRegistrar.d.ts
declare class PeerDidRegistrar implements DidRegistrar {
readonly supportedMethods: string[];
create(agentContext: AgentContext, options: PeerDidNumAlgo0CreateOptions | PeerDidNumAlgo1CreateOptions | PeerDidNumAlgo2CreateOptions | PeerDidNumAlgo4CreateOptions): Promise<DidCreateResult>;
update(): Promise<DidUpdateResult>;
deactivate(): Promise<DidDeactivateResult>;
}
type PeerDidCreateOptions = PeerDidNumAlgo0CreateOptions | PeerDidNumAlgo1CreateOptions | PeerDidNumAlgo2CreateOptions | PeerDidNumAlgo4CreateOptions;
interface PeerDidNumAlgo0CreateOptions extends DidCreateOptions {
method: 'peer';
did?: never;
didDocument?: never;
options: {
numAlgo: PeerDidNumAlgo.InceptionKeyWithoutDoc;
} & XOR<{
createKey: KmsCreateKeyOptions<KmsCreateKeyTypeAsymmetric>;
}, {
keyId: string;
}>;
secret?: never;
}
interface PeerDidNumAlgo1CreateOptions extends DidCreateOptions {
method: 'peer';
did?: never;
didDocument: DidDocument;
options: {
numAlgo: PeerDidNumAlgo.GenesisDoc;
/**
* The linking between the did document keys and the kms keys. If you want to use
* the DID within Credo you MUST add the key here. All keys must be present in the did
* document, but not all did document keys must be present in this array, to allow for keys
* that are not controleld by this agent.
*/
keys: DidDocumentKey[];
};
secret?: never;
}
interface PeerDidNumAlgo2CreateOptions extends DidCreateOptions {
method: 'peer';
did?: never;
didDocument: DidDocument;
options: {
numAlgo: PeerDidNumAlgo.MultipleInceptionKeyWithoutDoc;
/**
* The linking between the did document keys and the kms keys. If you want to use
* the DID within Credo you MUST add the key here. All keys must be present in the did
* document, but not all did document keys must be present in this array, to allow for keys
* that are not controleld by this agent.
*/
keys: DidDocumentKey[];
};
secret?: never;
}
interface PeerDidNumAlgo4CreateOptions extends DidCreateOptions {
method: 'peer';
did?: never;
didDocument: DidDocument;
options: {
numAlgo: PeerDidNumAlgo.ShortFormAndLongForm;
/**
* The linking between the did document keys and the kms keys. If you want to use
* the DID within Credo you MUST add the key here. All keys must be present in the did
* document, but not all did document keys must be present in this array, to allow for keys
* that are not controleld by this agent.
*/
keys: DidDocumentKey[];
};
secret?: never;
}
type PeerDidUpdateOptions = never;
type PeerDidDeactivateOptions = never;
//#endregion
export { PeerDidCreateOptions, PeerDidDeactivateOptions, PeerDidNumAlgo0CreateOptions, PeerDidNumAlgo1CreateOptions, PeerDidNumAlgo2CreateOptions, PeerDidNumAlgo4CreateOptions, PeerDidRegistrar, PeerDidUpdateOptions };
//# sourceMappingURL=PeerDidRegistrar.d.mts.map