import { OpenId4VciCredentialConfigurationsSupportedWithFormats, OpenId4VciCredentialOfferPayload } from "../shared/models/index.mjs"; import { OpenId4VcIssuanceSessionRecord } from "./repository/OpenId4VcIssuanceSessionRecord.mjs"; import { OpenId4VcIssuerRecord } from "./repository/OpenId4VcIssuerRecord.mjs"; import "./repository/index.mjs"; import { OpenId4VcUpdateIssuerRecordOptions, OpenId4VciCreateCredentialOfferOptions, OpenId4VciCreateCredentialResponseOptions, OpenId4VciCreateDeferredCredentialResponseOptions, OpenId4VciCreateIssuerOptions, OpenId4VciCreateStatelessCredentialOfferOptions } from "./OpenId4VcIssuerServiceOptions.mjs"; import { OpenId4VcIssuerModuleConfig } from "./OpenId4VcIssuerModuleConfig.mjs"; import { OpenId4VcIssuerService } from "./OpenId4VcIssuerService.mjs"; import "../index.mjs"; import { AgentContext } from "@credo-ts/core"; import * as _openid4vc_oauth20 from "@openid4vc/oauth2"; import * as _openid4vc_openid4vci0 from "@openid4vc/openid4vci"; //#region src/openid4vc-issuer/OpenId4VcIssuerApi.d.ts /** * @public * This class represents the API for interacting with the OpenID4VC Issuer service. * It provides methods for creating a credential offer, creating a response to a credential issuance request, * and retrieving a credential offer from a URI. */ declare class OpenId4VcIssuerApi { readonly config: OpenId4VcIssuerModuleConfig; private agentContext; private openId4VcIssuerService; constructor(config: OpenId4VcIssuerModuleConfig, agentContext: AgentContext, openId4VcIssuerService: OpenId4VcIssuerService); getAllIssuers(): Promise; getIssuerByIssuerId(issuerId: string): Promise; /** * Creates an issuer and stores the corresponding issuer metadata. Multiple issuers can be created, to allow different sets of * credentials to be issued with each issuer. */ createIssuer(options: OpenId4VciCreateIssuerOptions): Promise; /** * Rotate the key used for signing access tokens for the issuer with the given issuerId. */ rotateAccessTokenSigningKey(issuerId: string): Promise; updateIssuerMetadata(options: OpenId4VcUpdateIssuerRecordOptions): Promise; /** * Creates a stateless credential offer. This can only be used with an external authorization server, as credo only supports stateful * credential offers. */ createStatelessCredentialOffer(options: OpenId4VciCreateStatelessCredentialOfferOptions & { issuerId: string; }): Promise<{ credentialOffer: string; credentialOfferObject: OpenId4VciCredentialOfferPayload; }>; /** * Creates a credential offer. Either the preAuthorizedCodeFlowConfig or the authorizationCodeFlowConfig must be provided. * * @returns Object containing the payload of the credential offer and the credential offer request, which can be sent to the wallet. */ createCredentialOffer(options: OpenId4VciCreateCredentialOfferOptions & { issuerId: string; }): Promise<{ issuanceSession: OpenId4VcIssuanceSessionRecord; credentialOffer: string; }>; /** * This function creates a response which can be sent to the holder after receiving a credential issuance request. */ createCredentialResponse(options: OpenId4VciCreateCredentialResponseOptions & { issuanceSessionId: string; }): Promise<{ issuanceSession: OpenId4VcIssuanceSessionRecord; credentialResponse: _openid4vc_openid4vci0.CredentialResponse; }>; /** * This function creates a response which can be sent to the holder after receiving a deferred credential issuance request. */ createDeferredCredentialResponse(options: OpenId4VciCreateDeferredCredentialResponseOptions & { issuanceSessionId: string; }): Promise<{ issuanceSession: OpenId4VcIssuanceSessionRecord; deferredCredentialResponse: _openid4vc_openid4vci0.DeferredCredentialResponse; }>; getIssuerMetadata(issuerId: string): Promise<{ originalDraftVersion: _openid4vc_openid4vci0.Openid4vciVersion; credentialIssuer: { credential_issuer: string; credential_endpoint: string; deferred_credential_endpoint: string; credential_configurations_supported: OpenId4VciCredentialConfigurationsSupportedWithFormats; authorization_servers: string[] | undefined; display: { [x: string]: unknown; name?: string | undefined; locale?: string | undefined; logo?: { [x: string]: unknown; uri?: string | undefined; alt_text?: string | undefined; } | undefined; }[] | undefined; nonce_endpoint: string; batch_credential_issuance: { batch_size: number; } | undefined; }; authorizationServers: ({ [x: string]: unknown; issuer: string; token_endpoint: string; token_endpoint_auth_methods_supported?: string[] | undefined; authorization_endpoint?: string | undefined; jwks_uri?: string | undefined; grant_types_supported?: string[] | undefined; code_challenge_methods_supported?: string[] | undefined; dpop_signing_alg_values_supported?: string[] | undefined; require_pushed_authorization_requests?: boolean | undefined; pushed_authorization_request_endpoint?: string | undefined; introspection_endpoint?: string | undefined; introspection_endpoint_auth_methods_supported?: string[] | undefined; introspection_endpoint_auth_signing_alg_values_supported?: string[] | undefined; authorization_challenge_endpoint?: string | undefined; 'pre-authorized_grant_anonymous_access_supported'?: boolean | undefined; client_attestation_pop_nonce_required?: boolean | undefined; authorization_response_iss_parameter_supported?: boolean | undefined; } | { issuer: string; token_endpoint: string; 'pre-authorized_grant_anonymous_access_supported': true; jwks_uri: string; grant_types_supported: ("authorization_code" | "urn:ietf:params:oauth:grant-type:pre-authorized_code")[]; authorization_challenge_endpoint: string; authorization_endpoint: string; pushed_authorization_request_endpoint: string; require_pushed_authorization_requests: true; code_challenge_methods_supported: _openid4vc_oauth20.PkceCodeChallengeMethod[]; dpop_signing_alg_values_supported: ["HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | "Ed25519" | "ES256K", ...("HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | "Ed25519" | "ES256K")[]] | undefined; authorization_response_iss_parameter_supported: true; })[]; knownCredentialConfigurations: OpenId4VciCredentialConfigurationsSupportedWithFormats; signedMetadataJwt: string | undefined; }>; getIssuanceSessionById(issuanceSessionId: string): Promise; } //#endregion export { OpenId4VcIssuerApi }; //# sourceMappingURL=OpenId4VcIssuerApi.d.mts.map