@microsoft/useragent-sdk
Version:
SDK for building decentralized identity wallets and enterprise agents.
37 lines (31 loc) • 1.36 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import Identifier from '../Identifier';
import IdentifierDocument from '../IdentifierDocument';
import RegistrarCryptoOptions from './RegistrarCryptoOptions';
/**
* Interface defining methods and properties to
* be implemented by specific registration methods.
*/
export default interface IRegistrar {
/**
* Registrar crypto options
*/
registrarCryptoOptions: RegistrarCryptoOptions;
/**
* Registers the identifier document on the ledger
* returning the identifier generated by the registrar.
* @param identifierDocument to register.
* @param keyReference Reference to the identifier for the signing key.
*/
register (identifierDocument: IdentifierDocument, keyReference: string): Promise<Identifier>;
/**
* Uses the specified input for generating
* an identifier reference, but does not register
* with a ledger.
* @param input generating the identifier.
*/
generateIdentifier (input: any): Promise<Identifier>;
}