import { VIP030026AlgorithmIDEnum } from '../enums'; import { IVIP030026CredentialVerifyBytesOptions } from '../types'; export default abstract class VIP030026BaseCredential { protected readonly _credential: Uint8Array; protected constructor(credential: Uint8Array); /** * protected abstract methods */ protected abstract _publicKeyBytes(): Uint8Array; /** * public abstract methods */ abstract toJSON(): Type; /** * protected methods */ /** * Gets the raw algorithm, this will be the first 4 bytes of the VIP-03-0026 algorithm ID hashed using SHA-256. * @returns {Uint8Array} The first 4 bytes of the VIP-03-0026 algorithm ID hashed using SHA-256. * @protected */ protected _algorithmHashBytes(): Uint8Array; /** * Gets the ID as bytes. * @returns {Uint8Array} The ID as bytes. * @protected */ protected _idBytes(): Uint8Array; /** * public methods */ /** * Gets the VIP-03-0026 algorithm ID. * @returns {VIP030026AlgorithmIDEnum} The VIP-03-0026 algorithm ID for the credential. * @throws {VIP030026UnsupportedAlgorithmIDError} If the algorithm is unsupported. */ algorithm(): VIP030026AlgorithmIDEnum; /** * Gets the ID of the credential. * @returns {string} The UUID v4 ID of the credential. * @public */ id(): string; /** * Gets the base64 encoded public key of the credential. * @returns {string} The public key as a base64 encoded string. * @public */ publicKey(): string; /** * Gets the credential as raw bytes. * @returns {Uint8Array} The credential as bytes. * @public */ toBytes(): Uint8Array; /** * Gets the credential as a base64 encoded string. * @returns {string} The credential as a base64 encoded string. * @public */ toString(): string; /** * Verifies the supplied bytes' hash against the credentials and signature. * @param {IVIP030026CredentialVerifyBytesOptions} options - The bytes used to sign and the signature. * @returns {boolean} True if the signature can be verified, false otherwise. * @throws {VIP030026UnsupportedAlgorithmIDError} If the algorithm is unsupported. * @public */ verify({ bytes, signature }: IVIP030026CredentialVerifyBytesOptions): boolean; } //# sourceMappingURL=VIP030026BaseCredential.d.ts.map