import type { Anoncreds, AnoncredsErrorObject, NativeCredentialEntry, NativeCredentialProve, NativeCredentialRevocationConfig, NativeNonRevokedIntervalOverride } from '@hyperledger/anoncreds-shared'; import { ObjectHandle } from '@hyperledger/anoncreds-shared'; export declare class NodeJSAnoncreds implements Anoncreds { get nativeAnoncreds(): import("./library").NativeMethods; /** * Fetch the error from the native library and throw it as a JS error * * NOTE: * Checks whether the error code of the returned error matches the error code that was passed to the function. * If it doesn't, we throw an error with the original errorCode, and a custom message explaining we weren't able * to retrieve the error message from the native library. This should however not break functionality as long as * error codes are used rather than error messages for error handling. * */ private getAnoncredsError; getCurrentError(): AnoncredsErrorObject; private handleError; generateNonce(): string; createSchema(options: { name: string; version: string; issuerId: string; attributeNames: string[]; }): ObjectHandle; revocationRegistryDefinitionGetAttribute(options: { objectHandle: ObjectHandle; name: string; }): string; credentialGetAttribute(options: { objectHandle: ObjectHandle; name: string; }): string | null; createCredentialDefinition(options: { schemaId: string; schema: ObjectHandle; issuerId: string; tag: string; signatureType: string; supportRevocation: boolean; }): { credentialDefinition: ObjectHandle; credentialDefinitionPrivate: ObjectHandle; keyCorrectnessProof: ObjectHandle; }; createCredential(options: { credentialDefinition: ObjectHandle; credentialDefinitionPrivate: ObjectHandle; credentialOffer: ObjectHandle; credentialRequest: ObjectHandle; attributeRawValues: Record; attributeEncodedValues?: Record; revocationConfiguration?: NativeCredentialRevocationConfig; }): ObjectHandle; encodeCredentialAttributes(options: { attributeRawValues: string[]; }): string[]; processCredential(options: { credential: ObjectHandle; credentialRequestMetadata: ObjectHandle; linkSecret: string; credentialDefinition: ObjectHandle; revocationRegistryDefinition?: ObjectHandle | undefined; }): ObjectHandle; createCredentialOffer(options: { schemaId: string; credentialDefinitionId: string; keyCorrectnessProof: ObjectHandle; }): ObjectHandle; createCredentialRequest(options: { entropy?: string; proverDid?: string; credentialDefinition: ObjectHandle; linkSecret: string; linkSecretId: string; credentialOffer: ObjectHandle; }): { credentialRequest: ObjectHandle; credentialRequestMetadata: ObjectHandle; }; createLinkSecret(): string; createPresentation(options: { presentationRequest: ObjectHandle; credentials: NativeCredentialEntry[]; credentialsProve: NativeCredentialProve[]; selfAttest: Record; linkSecret: string; schemas: Record; credentialDefinitions: Record; }): ObjectHandle; verifyPresentation(options: { presentation: ObjectHandle; presentationRequest: ObjectHandle; schemas: ObjectHandle[]; schemaIds: string[]; credentialDefinitions: ObjectHandle[]; credentialDefinitionIds: string[]; revocationRegistryDefinitions?: ObjectHandle[]; revocationRegistryDefinitionIds?: string[]; revocationStatusLists?: ObjectHandle[]; nonRevokedIntervalOverrides?: NativeNonRevokedIntervalOverride[]; }): boolean; createRevocationStatusList(options: { credentialDefinition: ObjectHandle; revocationRegistryDefinitionId: string; revocationRegistryDefinition: ObjectHandle; revocationRegistryDefinitionPrivate: ObjectHandle; issuerId: string; issuanceByDefault: boolean; timestamp?: number; }): ObjectHandle; updateRevocationStatusListTimestampOnly(options: { timestamp: number; currentRevocationStatusList: ObjectHandle; }): ObjectHandle; updateRevocationStatusList(options: { credentialDefinition: ObjectHandle; revocationRegistryDefinition: ObjectHandle; revocationRegistryDefinitionPrivate: ObjectHandle; currentRevocationStatusList: ObjectHandle; issued?: number[]; revoked?: number[]; timestamp?: number; }): ObjectHandle; createRevocationRegistryDefinition(options: { credentialDefinition: ObjectHandle; credentialDefinitionId: string; issuerId: string; tag: string; revocationRegistryType: string; maximumCredentialNumber: number; tailsDirectoryPath?: string; }): { revocationRegistryDefinition: ObjectHandle; revocationRegistryDefinitionPrivate: ObjectHandle; }; createOrUpdateRevocationState(options: { revocationRegistryDefinition: ObjectHandle; revocationStatusList: ObjectHandle; revocationRegistryIndex: number; tailsPath: string; oldRevocationState?: ObjectHandle; oldRevocationStatusList?: ObjectHandle; }): ObjectHandle; createW3cCredential(options: { credentialDefinition: ObjectHandle; credentialDefinitionPrivate: ObjectHandle; credentialOffer: ObjectHandle; credentialRequest: ObjectHandle; attributeRawValues: Record; revocationConfiguration?: NativeCredentialRevocationConfig; w3cVersion?: string; }): ObjectHandle; processW3cCredential(options: { credential: ObjectHandle; credentialRequestMetadata: ObjectHandle; linkSecret: string; credentialDefinition: ObjectHandle; revocationRegistryDefinition?: ObjectHandle | undefined; }): ObjectHandle; createW3cPresentation(options: { presentationRequest: ObjectHandle; credentials: NativeCredentialEntry[]; credentialsProve: NativeCredentialProve[]; linkSecret: string; schemas: Record; credentialDefinitions: Record; w3cVersion?: string; }): ObjectHandle; verifyW3cPresentation(options: { presentation: ObjectHandle; presentationRequest: ObjectHandle; schemas: ObjectHandle[]; schemaIds: string[]; credentialDefinitions: ObjectHandle[]; credentialDefinitionIds: string[]; revocationRegistryDefinitions?: ObjectHandle[]; revocationRegistryDefinitionIds?: string[]; revocationStatusLists?: ObjectHandle[]; nonRevokedIntervalOverrides?: NativeNonRevokedIntervalOverride[]; }): boolean; credentialToW3c(options: { objectHandle: ObjectHandle; issuerId: string; w3cVersion?: string; }): ObjectHandle; credentialFromW3c(options: { objectHandle: ObjectHandle; }): ObjectHandle; w3cCredentialGetIntegrityProofDetails(options: { objectHandle: ObjectHandle; }): ObjectHandle; w3cCredentialProofGetAttribute(options: { objectHandle: ObjectHandle; name: string; }): string | null; w3cCredentialFromJson(options: { json: string; }): ObjectHandle; w3cPresentationFromJson(options: { json: string; }): ObjectHandle; version(): string; setDefaultLogger(): void; private objectFromJson; presentationRequestFromJson(options: { json: string; }): ObjectHandle; credentialRequestFromJson(options: { json: string; }): ObjectHandle; credentialRequestMetadataFromJson(options: { json: string; }): ObjectHandle; revocationRegistryDefinitionFromJson(options: { json: string; }): ObjectHandle; revocationRegistryFromJson(options: { json: string; }): ObjectHandle; revocationStatusListFromJson(options: { json: string; }): ObjectHandle; revocationStateFromJson(options: { json: string; }): ObjectHandle; presentationFromJson(options: { json: string; }): ObjectHandle; credentialOfferFromJson(options: { json: string; }): ObjectHandle; schemaFromJson(options: { json: string; }): ObjectHandle; credentialFromJson(options: { json: string; }): ObjectHandle; revocationRegistryDefinitionPrivateFromJson(options: { json: string; }): ObjectHandle; credentialDefinitionFromJson(options: { json: string; }): ObjectHandle; credentialDefinitionPrivateFromJson(options: { json: string; }): ObjectHandle; keyCorrectnessProofFromJson(options: { json: string; }): ObjectHandle; getJson(options: { objectHandle: ObjectHandle; }): string; getTypeName(options: { objectHandle: ObjectHandle; }): string; objectFree(options: { objectHandle: ObjectHandle; }): void; private convertCredentialList; private convertCredentialProves; private convertSchemas; private convertCredDefs; private convertNonRevokedIntervalOverrides; private convertAttributeNames; private convertAttributeRawValues; private convertAttributeEncodedValues; private convertRevocationConfiguration; }