Skip to content

Commit

Permalink
Merge pull request #187 from Sphereon-Opensource/feature/CWALL-153_co…
Browse files Browse the repository at this point in the history
…ntact-metadata

CWALL-153 contact manager metadata
  • Loading branch information
BtencateSphereon authored Jun 11, 2024
2 parents 97163a3 + 4947c19 commit 5f1a892
Show file tree
Hide file tree
Showing 9 changed files with 1,624 additions and 138 deletions.
1,477 changes: 1,477 additions & 0 deletions out.log

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@
"@sphereon/ssi-sdk-ext.key-manager": "0.19.0",
"@sphereon/ssi-sdk-ext.key-utils": "0.19.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.19.0",
"@sphereon/ssi-sdk.contact-manager": "0.23.5-next.22",
"@sphereon/ssi-sdk.core": "0.23.5-next.22",
"@sphereon/ssi-sdk.data-store": "0.23.5-next.22",
"@sphereon/ssi-sdk.event-logger": "0.23.5-next.22",
"@sphereon/ssi-sdk.issuance-branding": "0.23.5-next.22",
"@sphereon/ssi-sdk.oid4vci-holder": "0.23.5-next.22",
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.23.5-next.22",
"@sphereon/ssi-sdk.vc-handler-ld-local": "0.23.5-next.22",
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.23.5-next.22",
"@sphereon/ssi-sdk.sd-jwt": "0.24.1-unstable.47",
"@sphereon/ssi-types": "0.23.5-next.22",
"@sphereon/ssi-sdk.contact-manager": "0.24.1-next.112",
"@sphereon/ssi-sdk.core": "0.24.1-next.112",
"@sphereon/ssi-sdk.data-store": "0.24.1-next.112",
"@sphereon/ssi-sdk.event-logger": "0.24.1-next.112",
"@sphereon/ssi-sdk.issuance-branding": "0.24.1-next.112",
"@sphereon/ssi-sdk.oid4vci-holder": "0.24.1-next.112",
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.24.1-next.112",
"@sphereon/ssi-sdk.vc-handler-ld-local": "0.24.1-next.112",
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.24.1-next.112",
"@sphereon/ssi-sdk.sd-jwt": "0.24.1-next.112",
"@sphereon/ssi-types": "0.24.1-next.112",
"@sphereon/ui-components.core": "0.2.0",
"@sphereon/ui-components.ssi-react-native": "0.2.0",
"@veramo/core": "4.2.0",
Expand Down Expand Up @@ -250,10 +250,10 @@
"@sphereon/ssi-sdk-ext.did-utils": "0.19.0",
"@sphereon/ssi-sdk-ext.kms-local": "0.19.0",
"@sphereon/ssi-sdk-ext.key-manager": "0.19.0",
"@sphereon/ssi-types": "0.23.5-next.22",
"@sphereon/ssi-sdk.core": "0.23.5-next.22",
"@sphereon/ssi-sdk.data-store": "0.23.5-next.22",
"@sphereon/ssi-sdk.contact-manager": "0.23.5-next.22",
"@sphereon/ssi-types": "0.24.1-next.112",
"@sphereon/ssi-sdk.core": "0.24.1-next.112",
"@sphereon/ssi-sdk.data-store": "0.24.1-next.112",
"@sphereon/ssi-sdk.contact-manager": "0.24.1-next.112",
"@sphereon/oid4vci-client": "0.10.3",
"@sphereon/oid4vci-common": "0.10.3",
"@sphereon/pex": "3.3.3",
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/SSIContactViewItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {IdentityRole} from '@sphereon/ssi-sdk.data-store';
import {CredentialRole} from '@sphereon/ssi-sdk.data-store';
import React, {FC} from 'react';
import {View} from 'react-native';

Expand All @@ -16,7 +16,7 @@ import {
export interface Props {
name: string;
uri?: string;
roles: Array<IdentityRole>;
roles: Array<CredentialRole>;
}

const SSIContactViewItem: FC<Props> = (props: Props): JSX.Element => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/SSIIdentityViewItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {IdentityRole} from '@sphereon/ssi-sdk.data-store';
import {CredentialRole} from '@sphereon/ssi-sdk.data-store';
import React, {FC, ForwardedRef} from 'react';
import {ViewStyle} from 'react-native';

Expand All @@ -11,7 +11,7 @@ import {

export interface IProps {
name: string;
roles: Array<IdentityRole>;
roles: Array<CredentialRole>;
style?: ViewStyle;
}

Expand Down
4 changes: 2 additions & 2 deletions src/navigation/machines/oid4vciStateNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ConnectionType,
CorrelationIdentifierType,
IBasicCredentialLocaleBranding,
IdentityRole,
CredentialRole,
NonPersistedParty,
Party,
PartyOrigin,
Expand Down Expand Up @@ -76,7 +76,7 @@ const navigateAddContact = async (args: OID4VCIMachineNavigationArgs): Promise<v
identities: [
{
alias: correlationId,
roles: [IdentityRole.ISSUER],
roles: [CredentialRole.ISSUER],
identifier: {
type: CorrelationIdentifierType.URL,
correlationId: issuerUrl.hostname,
Expand Down
4 changes: 2 additions & 2 deletions src/navigation/machines/siopV2StateNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {MainRoutesEnum, NavigationBarRoutesEnum, PopupImagesEnum, ScreenRoutesEn
import {
ConnectionType,
CorrelationIdentifierType,
IdentityRole,
CredentialRole,
NonPersistedParty,
Party,
PartyOrigin,
Expand Down Expand Up @@ -85,7 +85,7 @@ const navigateAddContact = async (args: SiopV2MachineNavigationArgs): Promise<vo
identities: [
{
alias: authorizationRequestData.correlationId,
roles: [IdentityRole.ISSUER],
roles: [CredentialRole.ISSUER],
identifier: {
type: CorrelationIdentifierType.URL,
correlationId: authorizationRequestData.correlationId,
Expand Down
4 changes: 2 additions & 2 deletions src/services/machines/siopV2MachineService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SupportedVersion, VerifiedAuthorizationRequest} from '@sphereon/did-auth-siop';
import {ConnectionType, CorrelationIdentifierType, DidAuthConfig, IdentityRole, NonPersistedIdentity, Party} from '@sphereon/ssi-sdk.data-store';
import {ConnectionType, CorrelationIdentifierType, DidAuthConfig, CredentialRole, NonPersistedIdentity, Party} from '@sphereon/ssi-sdk.data-store';
import {W3CVerifiableCredential} from '@sphereon/ssi-types';
import {Linking} from 'react-native';
import {URL} from 'react-native-url-polyfill';
Expand Down Expand Up @@ -112,7 +112,7 @@ export const addContactIdentity = async (context: Pick<SiopV2MachineContext, 'co
if (correlationId) {
const identity: NonPersistedIdentity = {
alias: correlationId,
roles: [IdentityRole.ISSUER],
roles: [CredentialRole.ISSUER],
identifier: {
type: CorrelationIdentifierType.DID,
correlationId,
Expand Down
6 changes: 3 additions & 3 deletions src/store/actions/contact.actions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {CorrelationIdentifierType, Party, IdentityRole, Identity, PartyTypeType, PartyOrigin} from '@sphereon/ssi-sdk.data-store';
import {CorrelationIdentifierType, Party, CredentialRole, Identity, PartyTypeType, PartyOrigin} from '@sphereon/ssi-sdk.data-store';
import {Action} from 'redux';
import {ThunkAction, ThunkDispatch} from 'redux-thunk';
import {v4 as uuidv4} from 'uuid';
Expand Down Expand Up @@ -159,12 +159,12 @@ export const getUserContact = async (): Promise<Party> => {
relationships: [],
uri: user.emailAddress,
//todo: (WAL-545) handle this based on the identities available in the wallet
roles: [IdentityRole.HOLDER],
roles: [CredentialRole.HOLDER],
identities: user.identifiers.map(
(identifier: IUserIdentifier): Identity => ({
id: uuidv4(),
alias: identifier.did,
roles: [IdentityRole.HOLDER],
roles: [CredentialRole.HOLDER],
identifier: {
id: uuidv4(),
type: CorrelationIdentifierType.DID,
Expand Down
Loading

0 comments on commit 5f1a892

Please sign in to comment.