mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
To identify matching issuer metadata details exposed by wellknown of the VC, previously credentialDefinition's type was used now it is getting replaced by credentialConfigurationId (this holds the keyValues of credential_configrations_supported object) Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import {createModel} from 'xstate/lib/model';
|
|
import {AuthorizeResult} from 'react-native-app-auth';
|
|
import {
|
|
CredentialTypes,
|
|
CredentialWrapper,
|
|
IssuerWellknownResponse,
|
|
VerifiableCredential,
|
|
} from '../VerifiableCredential/VCMetaMachine/vc';
|
|
import {AppServices} from '../../shared/GlobalContext';
|
|
import {VCMetadata} from '../../shared/VCMetadata';
|
|
import {IssuersEvents} from './IssuersEvents';
|
|
import {issuerType} from './IssuersMachine';
|
|
|
|
export const IssuersModel = createModel(
|
|
{
|
|
issuers: [] as issuerType[],
|
|
selectedIssuerId: '' as string,
|
|
selectedIssuer: {} as issuerType,
|
|
selectedIssuerWellknownResponse: {} as IssuerWellknownResponse,
|
|
tokenResponse: {} as AuthorizeResult,
|
|
errorMessage: '' as string,
|
|
loadingReason: 'displayIssuers' as string,
|
|
verifiableCredential: null as VerifiableCredential | null,
|
|
selectedCredentialType: {} as CredentialTypes,
|
|
supportedCredentialTypes: [] as CredentialTypes[],
|
|
credentialWrapper: {} as CredentialWrapper,
|
|
serviceRefs: {} as AppServices,
|
|
verificationErrorMessage: '',
|
|
publicKey: '',
|
|
privateKey: '',
|
|
vcMetadata: {} as VCMetadata,
|
|
keyType: 'RS256' as string,
|
|
wellknownKeyTypes: [] as string[],
|
|
},
|
|
{
|
|
events: IssuersEvents,
|
|
},
|
|
);
|