diff --git a/src/controllers/api/account.ts b/src/controllers/api/account.ts index a61c21364..76f4439e0 100644 --- a/src/controllers/api/account.ts +++ b/src/controllers/api/account.ts @@ -25,6 +25,7 @@ import { EventTracker, eventTracker } from '../../services/track/tracker.js'; import type { ISubmitOperation, ISubmitStripeCustomerCreateData } from '../../services/track/submitter.js'; import * as dotenv from 'dotenv'; import { validate } from '../validator/decorator.js'; +import { SupportedKeyTypes } from '@veramo/utils'; dotenv.config(); export class AccountController { @@ -249,7 +250,7 @@ export class AccountController { const accounts = await PaymentAccountService.instance.find({ customer }); if (accounts.length === 0) { const key = await new IdentityServiceStrategySetup(customer.customerId).agent.createKey( - 'Secp256k1', + SupportedKeyTypes.Secp256k1, customer ); if (!key) { @@ -434,12 +435,12 @@ export class AccountController { } } - // 3. Check is paymentAccount exists for the customer + // 3. Check if paymentAccount exists for the customer const accounts = await PaymentAccountService.instance.find({ customer }); paymentAccount = accounts.find((account) => account.namespace === CheqdNetwork.Testnet) || null; if (paymentAccount === null) { const key = await new IdentityServiceStrategySetup(customer.customerId).agent.createKey( - 'Secp256k1', + SupportedKeyTypes.Secp256k1, customer ); if (!key) { diff --git a/src/controllers/api/did.ts b/src/controllers/api/did.ts index b58588be2..2f6003afb 100644 --- a/src/controllers/api/did.ts +++ b/src/controllers/api/did.ts @@ -35,7 +35,7 @@ import type { } from '../../types/did.js'; import { check, param } from '../validator/index.js'; import type { IKey, RequireOnly } from '@veramo/core'; -import { extractPublicKeyHex } from '@veramo/utils'; +import { SupportedKeyTypes, extractPublicKeyHex } from '@veramo/utils'; import type { KeyImport } from '../../types/key.js'; import { eventTracker } from '../../services/track/tracker.js'; import { OperationCategoryNameEnum, OperationNameEnum } from '../../types/constants.js'; @@ -183,8 +183,12 @@ export class DIDController { if (options) { const publicKeyHex = options.key || - (await identityServiceStrategySetup.agent.createKey('Ed25519', response.locals.customer)) - .publicKeyHex; + ( + await identityServiceStrategySetup.agent.createKey( + SupportedKeyTypes.Ed25519, + response.locals.customer + ) + ).publicKeyHex; const pkBase64 = publicKeyHex.length == 43 ? publicKeyHex : toString(fromString(publicKeyHex, 'hex'), 'base64'); @@ -207,8 +211,12 @@ export class DIDController { } else if (verificationMethodType) { const publicKeyHex = key || - (await identityServiceStrategySetup.agent.createKey('Ed25519', response.locals.customer)) - .publicKeyHex; + ( + await identityServiceStrategySetup.agent.createKey( + SupportedKeyTypes.Ed25519, + response.locals.customer + ) + ).publicKeyHex; didDocument = generateDidDoc({ verificationMethod: verificationMethodType, verificationMethodId: 'key-1', diff --git a/src/controllers/api/key.ts b/src/controllers/api/key.ts index 583271cc1..0c4e2b01f 100644 --- a/src/controllers/api/key.ts +++ b/src/controllers/api/key.ts @@ -18,10 +18,19 @@ import { eventTracker } from '../../services/track/tracker.js'; import type { IKeyTrack, ITrackOperation } from '../../types/track.js'; import { OperationCategoryNameEnum, OperationNameEnum } from '../../types/constants.js'; import { validate } from '../validator/decorator.js'; +import { SupportedKeyTypes } from '@veramo/utils'; // ToDo: Make the format of /key/create and /key/read the same // ToDo: Add valdiation for /key/import export class KeyController { + public static keyCreateValidator = [ + check('type') + .optional() + .isString() + .isIn([SupportedKeyTypes.Ed25519, SupportedKeyTypes.Secp256k1]) + .withMessage('Invalid key type') + .bail(), + ]; public static keyGetValidator = [ check('kid') .exists() @@ -56,6 +65,15 @@ export class KeyController { * tags: [ Key ] * summary: Create an identity key pair. * description: This endpoint creates an identity key pair associated with the user's account for custodian-mode clients. + * parameters: + * - name: type + * description: Key type of the identity key pair to create. + * in: query + * schema: + * type: string + * enum: + * - Ed25519 + * - Secp256k1 * responses: * 200: * description: The request was successful. @@ -86,7 +104,11 @@ export class KeyController { // Get strategy e.g. postgres or local const identityServiceStrategySetup = new IdentityServiceStrategySetup(response.locals.customer.customerId); try { - const key = await identityServiceStrategySetup.agent.createKey('Ed25519', response.locals.customer); + const keyType = request.query.type as SupportedKeyTypes | undefined; + const key = await identityServiceStrategySetup.agent.createKey( + keyType || SupportedKeyTypes.Ed25519, + response.locals.customer + ); eventTracker.emit('track', { name: OperationNameEnum.KEY_CREATE, diff --git a/src/services/api/customer.ts b/src/services/api/customer.ts index ae1f0e3b3..08a413395 100644 --- a/src/services/api/customer.ts +++ b/src/services/api/customer.ts @@ -9,6 +9,7 @@ import { PaymentAccountService } from './payment-account.js'; import { CheqdNetwork } from '@cheqd/sdk'; import { v4 as uuidv4 } from 'uuid'; import type { UpdateCustomerEntity } from '../../types/customer.js'; +import { SupportedKeyTypes } from '@veramo/utils'; dotenv.config(); export class CustomerService { @@ -35,7 +36,10 @@ export class CustomerService { await this.customerRepository.insert(customerEntity); // Create a new Cosmos account for the customer and make a link with customer entity; - const key = await new IdentityServiceStrategySetup(name).agent.createKey('Secp256k1', customerEntity); + const key = await new IdentityServiceStrategySetup(name).agent.createKey( + SupportedKeyTypes.Secp256k1, + customerEntity + ); await PaymentAccountService.instance.create(CheqdNetwork.Testnet, true, customerEntity, key); return { customerId: customerEntity.customerId, diff --git a/src/services/identity/abstract.ts b/src/services/identity/abstract.ts index 4b5fd4c66..14619e8c3 100644 --- a/src/services/identity/abstract.ts +++ b/src/services/identity/abstract.ts @@ -43,6 +43,7 @@ import type { CustomerEntity } from '../../database/entities/customer.entity.js' import type { KeyEntity } from '../../database/entities/key.entity.js'; import type { UserEntity } from '../../database/entities/user.entity'; import type { APIKeyEntity } from '../../database/entities/api.key.entity'; +import type { SupportedKeyTypes } from '@veramo/utils'; export abstract class AbstractIdentityService implements IIdentityService { agent?: VeramoAgent; @@ -51,12 +52,12 @@ export abstract class AbstractIdentityService implements IIdentityService { throw new Error(`Not supported`); } - createKey(type: 'Ed25519' | 'Secp256k1', customer?: CustomerEntity, keyAlias?: string): Promise { + createKey(type: SupportedKeyTypes, customer?: CustomerEntity, keyAlias?: string): Promise { throw new Error(`Not supported`); } importKey( - type: 'Ed25519' | 'Secp256k1', + type: SupportedKeyTypes, privateKeyHex: string, customer?: CustomerEntity, keyAlias?: string diff --git a/src/services/identity/agent.ts b/src/services/identity/agent.ts index 63756cdbb..c7d9367ef 100644 --- a/src/services/identity/agent.ts +++ b/src/services/identity/agent.ts @@ -72,6 +72,7 @@ import { toCoin, toDefaultDkg, toMinimalDenom } from '../../helpers/helpers.js'; import { jwtDecode } from 'jwt-decode'; import type { ICheqdCreateLinkedResourceArgs } from '@cheqd/did-provider-cheqd'; import type { TPublicKeyEd25519 } from '@cheqd/did-provider-cheqd'; +import { SupportedKeyTypes } from '@veramo/utils'; // dynamic import to avoid circular dependency const VeridaResolver = @@ -152,7 +153,7 @@ export class Veramo { return createAgent({ plugins }); } - async createKey(agent: TAgent, type: 'Ed25519' | 'Secp256k1' = 'Ed25519') { + async createKey(agent: TAgent, type: SupportedKeyTypes = SupportedKeyTypes.Ed25519) { const [kms] = await agent.keyManagerGetKeyManagementSystems(); return await agent.keyManagerCreate({ type: type || 'Ed25519', @@ -160,7 +161,11 @@ export class Veramo { }); } - async importKey(agent: TAgent, type: 'Ed25519' | 'Secp256k1' = 'Ed25519', privateKeyHex: string) { + async importKey( + agent: TAgent, + type: SupportedKeyTypes = SupportedKeyTypes.Ed25519, + privateKeyHex: string + ) { const [kms] = await agent.keyManagerGetKeyManagementSystems(); return await agent.keyManagerImport({ type: type || 'Ed25519', diff --git a/src/services/identity/index.ts b/src/services/identity/index.ts index 7cb54abee..4b121116c 100644 --- a/src/services/identity/index.ts +++ b/src/services/identity/index.ts @@ -48,6 +48,7 @@ import type { CustomerEntity } from '../../database/entities/customer.entity.js' import type { KeyEntity } from '../../database/entities/key.entity.js'; import type { UserEntity } from '../../database/entities/user.entity.js'; import type { APIKeyEntity } from '../../database/entities/api.key.entity.js'; +import type { SupportedKeyTypes } from '@veramo/utils'; dotenv.config(); @@ -59,9 +60,9 @@ export interface IIdentityService { initAgent(): TAgent; createAgent?(customer: CustomerEntity): Promise; - createKey(type: 'Ed25519' | 'Secp256k1', customer?: CustomerEntity, keyAlias?: string): Promise; + createKey(type: SupportedKeyTypes, customer?: CustomerEntity, keyAlias?: string): Promise; importKey( - type: 'Ed25519' | 'Secp256k1', + type: SupportedKeyTypes, privateKeyHex: string, customer?: CustomerEntity, keyAlias?: string diff --git a/src/services/identity/postgres.ts b/src/services/identity/postgres.ts index 022045530..21e224e72 100644 --- a/src/services/identity/postgres.ts +++ b/src/services/identity/postgres.ts @@ -56,6 +56,7 @@ import type { CheqdProviderError } from '@cheqd/did-provider-cheqd'; import type { TPublicKeyEd25519 } from '@cheqd/did-provider-cheqd'; import { toTPublicKeyEd25519 } from '../helpers.js'; import type { APIServiceOptions } from '../../types/admin.js'; +import { SupportedKeyTypes } from '@veramo/utils'; dotenv.config(); @@ -158,7 +159,7 @@ export class PostgresIdentityService extends DefaultIdentityService { }); } - async createKey(type: 'Ed25519' | 'Secp256k1' = 'Ed25519', customer?: CustomerEntity, keyAlias?: string) { + async createKey(type: SupportedKeyTypes = SupportedKeyTypes.Ed25519, customer?: CustomerEntity, keyAlias?: string) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const key = await Veramo.instance.createKey(this.agent!, type); // Update our specific key columns @@ -166,7 +167,7 @@ export class PostgresIdentityService extends DefaultIdentityService { } async importKey( - type: 'Ed25519' | 'Secp256k1' = 'Ed25519', + type: SupportedKeyTypes = SupportedKeyTypes.Ed25519, privateKeyHex: string, customer?: CustomerEntity, keyAlias?: string diff --git a/src/static/swagger-api.json b/src/static/swagger-api.json index a42f421f2..bd275c0ad 100644 --- a/src/static/swagger-api.json +++ b/src/static/swagger-api.json @@ -1155,6 +1155,20 @@ ], "summary": "Create an identity key pair.", "description": "This endpoint creates an identity key pair associated with the user's account for custodian-mode clients.", + "parameters": [ + { + "name": "type", + "description": "Key type of the identity key pair to create.", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "Ed25519", + "Secp256k1" + ] + } + } + ], "responses": { "200": { "description": "The request was successful.", diff --git a/src/types/key.ts b/src/types/key.ts index eecdd8e36..17287f765 100644 --- a/src/types/key.ts +++ b/src/types/key.ts @@ -1,6 +1,7 @@ import type { ManagedKeyInfo } from '@veramo/core'; import type { KeyEntity } from '../database/entities/key.entity.js'; import type { UnsuccessfulQueryResponseBody, UnsuccessfulResponseBody } from './shared.js'; +import type { SupportedKeyTypes } from '@veramo/utils'; // Interfaces @@ -10,7 +11,7 @@ export interface KeyImport { ivHex: string | undefined; salt: string | undefined; alias?: string; - type: 'Ed25519' | 'Secp256k1'; + type: SupportedKeyTypes.Ed25519 | SupportedKeyTypes.Secp256k1; } // Requests diff --git a/tests/e2e/constants.ts b/tests/e2e/constants.ts index 95df7f9b1..f4bdbd5f8 100644 --- a/tests/e2e/constants.ts +++ b/tests/e2e/constants.ts @@ -24,10 +24,12 @@ export enum CONTENT_TYPE { export const DID_METHOD = 'cheqd'; export const DID_NOT_FOUND_ERROR = 'notFound'; -export const DEFAULT_MAINNET_DID = 'did:cheqd:mainnet:7c950b5d-dbbb-4a12-9d79-6b553ca0c271'; -export const DEFAULT_TESTNET_DID = 'did:cheqd:testnet:0c3581f0-011f-4263-b1ca-15ad70d54ede'; -export const DEFAULT_TESTNET_DID_IDENTIFIER = '0c3581f0-011f-4263-b1ca-15ad70d54ede'; -export const DEFAULT_TESTNET_DID_RESOURCE_ID = '1a79a313-8fc3-421c-af3d-34730fa046d1'; +// todo: create a new mainnet did from test account +export const DEFAULT_MAINNET_DID = 'did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6'; +export const DEFAULT_TESTNET_DID = 'did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA'; +export const DEFAULT_TESTNET_DID_IDENTIFIER = '5RpEg66jhhbmASWPXJRWrA'; + +export const DEACTIVATED_TESTNET_DID = 'did:cheqd:testnet:UYBzUsTPHpTEXSnzYGTzUZ'; export const TESTNET_DID_WITH_JSON_RESOURCE = 'did:cheqd:testnet:c69d7867-be90-4dea-8bbf-f4419d3599d8'; export const TESTNET_DID_WITH_JSON_RESOURCE_ID = '3194b5a6-1b73-44a0-8ccf-27dc01509eb2'; @@ -45,10 +47,9 @@ export const NOT_EXISTENT_TESTNET_DID_IDENTIFIER = 'd4a13003-0bc5-4608-b23a-54ea // Credential status list names export const DEFAULT_STATUS_LIST_ENCRYPTED_NAME = 'cheqd-employee-credentials-encrypted'; -export const DEFAULT_STATUS_LIST_UNENCRYPTED_NAME = 'cheqd-employee-credentials-unencrypted'; +export const DEFAULT_STATUS_LIST_UNENCRYPTED_NAME = 'testingStatusList'; export const DEFAULT_STATUS_LIST_PAYMENT_ADDRESS = 'cheqd1qs0nhyk868c246defezhz5eymlt0dmajna2csg'; export const DEFAULT_STATUS_LIST_INDICES = [10, 3199, 12109, 130999]; -export const DEFAULT_STATUS_LIST_NAME = 'cheqd-employee-credentials'; // Credential names export const DEFAULT_SUBJECT_DID = 'did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'; diff --git a/tests/e2e/credential/issue-verify-flow.spec.ts b/tests/e2e/credential/issue-verify-flow.spec.ts index df6f2af5b..2f210e2ec 100644 --- a/tests/e2e/credential/issue-verify-flow.spec.ts +++ b/tests/e2e/credential/issue-verify-flow.spec.ts @@ -3,7 +3,7 @@ import type { VerifiableCredential } from '@veramo/core'; import { test, expect } from '@playwright/test'; import { StatusCodes } from 'http-status-codes'; import * as fs from 'fs'; -import { CONTENT_TYPE, PAYLOADS_PATH } from '../constants'; +import { CONTENT_TYPE, DEACTIVATED_TESTNET_DID, PAYLOADS_PATH } from '../constants'; test.use({ storageState: 'playwright/.auth/user.json' }); @@ -53,7 +53,7 @@ test(' Issue a jwt credential with a deactivated DID', async ({ request }) => { const credentialData = JSON.parse( fs.readFileSync(`${PAYLOADS_PATH.CREDENTIAL}/credential-issue-jwt.json`, 'utf-8') ); - credentialData.issuerDid = 'did:cheqd:testnet:edce6dfb-b59c-493b-a4b8-1d16a6184349'; + credentialData.issuerDid = DEACTIVATED_TESTNET_DID; const response = await request.post(`/credential/issue`, { data: JSON.stringify(credentialData), headers: { diff --git a/tests/e2e/helpers.ts b/tests/e2e/helpers.ts index defa4be66..589963950 100644 --- a/tests/e2e/helpers.ts +++ b/tests/e2e/helpers.ts @@ -3,6 +3,7 @@ import { DEFAULT_STATUS_LIST_ENCRYPTED_NAME, DEFAULT_STATUS_LIST_INDICES, DEFAULT_STATUS_LIST_PAYMENT_ADDRESS, + DEFAULT_STATUS_LIST_UNENCRYPTED_NAME, DEFAULT_SUBJECT_DID, DEFAULT_TESTNET_DID, } from './constants'; @@ -120,7 +121,7 @@ export const buildSimpleIssueCredentialRequest = ( issuerDid = DEFAULT_TESTNET_DID, subjectDid = DEFAULT_SUBJECT_DID, statusPurpose = 'revocation', - statusListName = 'employee-credentials' + statusListName = DEFAULT_STATUS_LIST_UNENCRYPTED_NAME ) => { return { issuerDid: issuerDid, diff --git a/tests/e2e/payloads/credential-status/create-encrypted-without-permissions.json b/tests/e2e/payloads/credential-status/create-encrypted-without-permissions.json index d26bd1ead..f7a10ca26 100644 --- a/tests/e2e/payloads/credential-status/create-encrypted-without-permissions.json +++ b/tests/e2e/payloads/credential-status/create-encrypted-without-permissions.json @@ -1,5 +1,5 @@ { - "did": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "did": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "statusListName": "cheqd-employee-credentials-encrypted", "paymentConditions": [ { diff --git a/tests/e2e/payloads/credential-status/create-unencrypted-without-permissions.json b/tests/e2e/payloads/credential-status/create-unencrypted-without-permissions.json index bd8866add..6aced889b 100644 --- a/tests/e2e/payloads/credential-status/create-unencrypted-without-permissions.json +++ b/tests/e2e/payloads/credential-status/create-unencrypted-without-permissions.json @@ -1,5 +1,5 @@ { - "did": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "did": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "statusListName": "cheqd-employee-credentials-encrypted", "length": 140000, "encoding": "base64url" diff --git a/tests/e2e/payloads/credential-status/update-encrypted-without-permissions.json b/tests/e2e/payloads/credential-status/update-encrypted-without-permissions.json index d26bd1ead..f7a10ca26 100644 --- a/tests/e2e/payloads/credential-status/update-encrypted-without-permissions.json +++ b/tests/e2e/payloads/credential-status/update-encrypted-without-permissions.json @@ -1,5 +1,5 @@ { - "did": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "did": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "statusListName": "cheqd-employee-credentials-encrypted", "paymentConditions": [ { diff --git a/tests/e2e/payloads/credential-status/update-unencrypted-without-permissions.json b/tests/e2e/payloads/credential-status/update-unencrypted-without-permissions.json index bd8866add..6aced889b 100644 --- a/tests/e2e/payloads/credential-status/update-unencrypted-without-permissions.json +++ b/tests/e2e/payloads/credential-status/update-unencrypted-without-permissions.json @@ -1,5 +1,5 @@ { - "did": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "did": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "statusListName": "cheqd-employee-credentials-encrypted", "length": 140000, "encoding": "base64url" diff --git a/tests/e2e/payloads/credential/credential-issue-jsonld.json b/tests/e2e/payloads/credential/credential-issue-jsonld.json index e84a355a7..74b406f19 100644 --- a/tests/e2e/payloads/credential/credential-issue-jsonld.json +++ b/tests/e2e/payloads/credential/credential-issue-jsonld.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male", diff --git a/tests/e2e/payloads/credential/credential-issue-jwt-revocation.json b/tests/e2e/payloads/credential/credential-issue-jwt-revocation.json index 050d1f9fc..df9a868aa 100644 --- a/tests/e2e/payloads/credential/credential-issue-jwt-revocation.json +++ b/tests/e2e/payloads/credential/credential-issue-jwt-revocation.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male", diff --git a/tests/e2e/payloads/credential/credential-issue-jwt.json b/tests/e2e/payloads/credential/credential-issue-jwt.json index a2c365981..a2ae7d665 100644 --- a/tests/e2e/payloads/credential/credential-issue-jwt.json +++ b/tests/e2e/payloads/credential/credential-issue-jwt.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male", diff --git a/tests/e2e/payloads/credential/credential-issue-vda.json b/tests/e2e/payloads/credential/credential-issue-vda.json index 452db0908..dd73fbed1 100644 --- a/tests/e2e/payloads/credential/credential-issue-vda.json +++ b/tests/e2e/payloads/credential/credential-issue-vda.json @@ -15,6 +15,6 @@ }, "credentialSchema": "https://common.schemas.verida.io/identity/kyc/FinClusive/individual-basic/v0.1.0/schema.json", "format": "jwt", - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:vda:mainnet:0x503DeeB3d41F835E22e2fa64940b18Eeb607759a" } diff --git a/tests/e2e/payloads/credential/issue-credential-without-permissions.json b/tests/e2e/payloads/credential/issue-credential-without-permissions.json index d065a4d22..5124accc3 100644 --- a/tests/e2e/payloads/credential/issue-credential-without-permissions.json +++ b/tests/e2e/payloads/credential/issue-credential-without-permissions.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "issuerDid": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "subjectDid": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", "attributes": { "gender": "male", diff --git a/tests/e2e/payloads/credential/reinstate-credential-without-permissions.json b/tests/e2e/payloads/credential/reinstate-credential-without-permissions.json index 40e6779e2..98389d1c4 100644 --- a/tests/e2e/payloads/credential/reinstate-credential-without-permissions.json +++ b/tests/e2e/payloads/credential/reinstate-credential-without-permissions.json @@ -1,27 +1,28 @@ { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schema.org", - "https://veramo.io/contexts/profile/v1" - ], "credentialSubject": { + "name": "Bob", "gender": "male", - "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK", - "name": "Bob" + "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" }, + "issuer": { + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6" + }, + "type": ["VerifiableCredential", "Person"], "credentialStatus": { - "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20", - "statusIndex": 20, + "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6?resourceName=test-suspension&resourceType=StatusList2021Suspension#10", + "type": "StatusList2021Entry", "statusPurpose": "suspension", - "type": "StatusList2021Entry" - }, - "issuanceDate": "2023-06-08T13:49:28.000Z", - "issuer": { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0" + "statusListIndex": "10" }, + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schema.org/schema.jsonld", + "https://veramo.io/contexts/profile/v1", + "https://w3id.org/vc-status-list-2021/v1" + ], + "issuanceDate": "2024-07-01T03:58:43.000Z", "proof": { - "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg", - "type": "JwtProof2020" - }, - "type": ["VerifiableCredential", "Person"] + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vc2NoZW1hLm9yZy9zY2hlbWEuanNvbmxkIiwiaHR0cHM6Ly92ZXJhbW8uaW8vY29udGV4dHMvcHJvZmlsZS92MSIsImh0dHBzOi8vdzNpZC5vcmcvdmMtc3RhdHVzLWxpc3QtMjAyMS92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUGVyc29uIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7Im5hbWUiOiJCb2IiLCJnZW5kZXIiOiJtYWxlIn0sImNyZWRlbnRpYWxTdGF0dXMiOnsiaWQiOiJodHRwczovL3Jlc29sdmVyLmNoZXFkLm5ldC8xLjAvaWRlbnRpZmllcnMvZGlkOmNoZXFkOm1haW5uZXQ6YTZlZjFkNTAtYTA0MC00ZGIzLWI4MzMtNmJiM2EwZmYxZWI2P3Jlc291cmNlTmFtZT10ZXN0LXN1c3BlbnNpb24mcmVzb3VyY2VUeXBlPVN0YXR1c0xpc3QyMDIxU3VzcGVuc2lvbiMxMCIsInR5cGUiOiJTdGF0dXNMaXN0MjAyMUVudHJ5Iiwic3RhdHVzUHVycG9zZSI6InN1c3BlbnNpb24iLCJzdGF0dXNMaXN0SW5kZXgiOiIxMCJ9fSwic3ViIjoiZGlkOmtleTp6Nk1raGFYZ0JaRHZvdERrTDUyNTdmYWl6dGlHaUMyUXRLTEdwYm5uRUd0YTJkb0siLCJuYmYiOjE3MTk4MDYzMjMsImlzcyI6ImRpZDpjaGVxZDptYWlubmV0OmE2ZWYxZDUwLWEwNDAtNGRiMy1iODMzLTZiYjNhMGZmMWViNiJ9.4BBZAPzTn4yCJuJeVLfhohMQqUMuxzxxTjV8UwDoaC9t8Ols-_awxFnkRR9OUJr_-ZFEAjjpn27RPIxdm8zGDg" + } } diff --git a/tests/e2e/payloads/credential/revoke-credential-without-permissions.json b/tests/e2e/payloads/credential/revoke-credential-without-permissions.json index 40e6779e2..da35df57c 100644 --- a/tests/e2e/payloads/credential/revoke-credential-without-permissions.json +++ b/tests/e2e/payloads/credential/revoke-credential-without-permissions.json @@ -1,27 +1,28 @@ { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schema.org", - "https://veramo.io/contexts/profile/v1" - ], "credentialSubject": { + "name": "Bob", "gender": "male", - "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK", - "name": "Bob" + "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" }, - "credentialStatus": { - "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20", - "statusIndex": 20, - "statusPurpose": "suspension", - "type": "StatusList2021Entry" - }, - "issuanceDate": "2023-06-08T13:49:28.000Z", "issuer": { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0" + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6" }, - "proof": { - "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg", - "type": "JwtProof2020" + "type": ["VerifiableCredential", "Person"], + "credentialStatus": { + "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6?resourceName=test-revocation&resourceType=StatusList2021Revocation#65417", + "type": "StatusList2021Entry", + "statusPurpose": "revocation", + "statusListIndex": "65417" }, - "type": ["VerifiableCredential", "Person"] + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schema.org/schema.jsonld", + "https://veramo.io/contexts/profile/v1", + "https://w3id.org/vc-status-list-2021/v1" + ], + "issuanceDate": "2024-07-01T03:56:52.000Z", + "proof": { + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vc2NoZW1hLm9yZy9zY2hlbWEuanNvbmxkIiwiaHR0cHM6Ly92ZXJhbW8uaW8vY29udGV4dHMvcHJvZmlsZS92MSIsImh0dHBzOi8vdzNpZC5vcmcvdmMtc3RhdHVzLWxpc3QtMjAyMS92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUGVyc29uIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7Im5hbWUiOiJCb2IiLCJnZW5kZXIiOiJtYWxlIn0sImNyZWRlbnRpYWxTdGF0dXMiOnsiaWQiOiJodHRwczovL3Jlc29sdmVyLmNoZXFkLm5ldC8xLjAvaWRlbnRpZmllcnMvZGlkOmNoZXFkOm1haW5uZXQ6YTZlZjFkNTAtYTA0MC00ZGIzLWI4MzMtNmJiM2EwZmYxZWI2P3Jlc291cmNlTmFtZT10ZXN0LXJldm9jYXRpb24mcmVzb3VyY2VUeXBlPVN0YXR1c0xpc3QyMDIxUmV2b2NhdGlvbiM2NTQxNyIsInR5cGUiOiJTdGF0dXNMaXN0MjAyMUVudHJ5Iiwic3RhdHVzUHVycG9zZSI6InJldm9jYXRpb24iLCJzdGF0dXNMaXN0SW5kZXgiOiI2NTQxNyJ9fSwic3ViIjoiZGlkOmtleTp6Nk1raGFYZ0JaRHZvdERrTDUyNTdmYWl6dGlHaUMyUXRLTEdwYm5uRUd0YTJkb0siLCJuYmYiOjE3MTk4MDYyMTIsImlzcyI6ImRpZDpjaGVxZDptYWlubmV0OmE2ZWYxZDUwLWEwNDAtNGRiMy1iODMzLTZiYjNhMGZmMWViNiJ9.MHkjF-q2H1xTRpMh0gDXH3tPFYOkLlSFReY2GO0m_UEbzvt6gfjLX0gwyGZdo5uQ-OmWpLIf9OiWv-C1RvYqAQ" + } } diff --git a/tests/e2e/payloads/credential/suspend-credential-without-permissions.json b/tests/e2e/payloads/credential/suspend-credential-without-permissions.json index 40e6779e2..5c108f045 100644 --- a/tests/e2e/payloads/credential/suspend-credential-without-permissions.json +++ b/tests/e2e/payloads/credential/suspend-credential-without-permissions.json @@ -1,27 +1,28 @@ { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://schema.org", - "https://veramo.io/contexts/profile/v1" - ], "credentialSubject": { + "name": "Bob", "gender": "male", - "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK", - "name": "Bob" + "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" }, + "issuer": { + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6" + }, + "type": ["VerifiableCredential", "Person"], "credentialStatus": { - "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20", - "statusIndex": 20, + "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6?resourceName=test-suspension&resourceType=StatusList2021Suspension#43229", + "type": "StatusList2021Entry", "statusPurpose": "suspension", - "type": "StatusList2021Entry" - }, - "issuanceDate": "2023-06-08T13:49:28.000Z", - "issuer": { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0" + "statusListIndex": "43229" }, + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://schema.org/schema.jsonld", + "https://veramo.io/contexts/profile/v1", + "https://w3id.org/vc-status-list-2021/v1" + ], + "issuanceDate": "2024-07-01T03:57:36.000Z", "proof": { - "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg", - "type": "JwtProof2020" - }, - "type": ["VerifiableCredential", "Person"] + "type": "JwtProof2020", + "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vc2NoZW1hLm9yZy9zY2hlbWEuanNvbmxkIiwiaHR0cHM6Ly92ZXJhbW8uaW8vY29udGV4dHMvcHJvZmlsZS92MSIsImh0dHBzOi8vdzNpZC5vcmcvdmMtc3RhdHVzLWxpc3QtMjAyMS92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiUGVyc29uIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7Im5hbWUiOiJCb2IiLCJnZW5kZXIiOiJtYWxlIn0sImNyZWRlbnRpYWxTdGF0dXMiOnsiaWQiOiJodHRwczovL3Jlc29sdmVyLmNoZXFkLm5ldC8xLjAvaWRlbnRpZmllcnMvZGlkOmNoZXFkOm1haW5uZXQ6YTZlZjFkNTAtYTA0MC00ZGIzLWI4MzMtNmJiM2EwZmYxZWI2P3Jlc291cmNlTmFtZT10ZXN0LXN1c3BlbnNpb24mcmVzb3VyY2VUeXBlPVN0YXR1c0xpc3QyMDIxU3VzcGVuc2lvbiM0MzIyOSIsInR5cGUiOiJTdGF0dXNMaXN0MjAyMUVudHJ5Iiwic3RhdHVzUHVycG9zZSI6InN1c3BlbnNpb24iLCJzdGF0dXNMaXN0SW5kZXgiOiI0MzIyOSJ9fSwic3ViIjoiZGlkOmtleTp6Nk1raGFYZ0JaRHZvdERrTDUyNTdmYWl6dGlHaUMyUXRLTEdwYm5uRUd0YTJkb0siLCJuYmYiOjE3MTk4MDYyNTYsImlzcyI6ImRpZDpjaGVxZDptYWlubmV0OmE2ZWYxZDUwLWEwNDAtNGRiMy1iODMzLTZiYjNhMGZmMWViNiJ9.b2fa3DjVyVUTcdj3qmlg2_82IPB3mcMKZlKf1cfijmXehVyFa13sEduglQSF97nedc4Qt11K0fWRTubVFtgxBQ" + } } diff --git a/tests/e2e/payloads/did/did-update-without-permissions.json b/tests/e2e/payloads/did/did-update-without-permissions.json index bc8c7464f..bee516592 100644 --- a/tests/e2e/payloads/did/did-update-without-permissions.json +++ b/tests/e2e/payloads/did/did-update-without-permissions.json @@ -1,16 +1,16 @@ { - "did": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "did": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "service": [ { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1", + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6#service-1", "type": "LinkedDomains", "serviceEndpoint": ["https://example.com"] } ], "verificationMethod": [ { - "controller": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1", + "controller": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6#key-1", "publicKeyBase58": "BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt", "type": "Ed25519VerificationKey2018" } @@ -18,20 +18,20 @@ "authentication": ["string"], "didDocument": { "@context": ["https://www.w3.org/ns/did/v1"], - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", - "controller": ["did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"], + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", + "controller": ["did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6"], "verificationMethod": [ { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1", + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6#key-1", "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0", + "controller": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6", "publicKeyBase58": "BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt" } ], - "authentication": ["did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1"], + "authentication": ["did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6#key-1"], "service": [ { - "id": "did:cheqd:mainnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#service-1", + "id": "did:cheqd:mainnet:a6ef1d50-a040-4db3-b833-6bb3a0ff1eb6#service-1", "type": "LinkedDomains", "serviceEndpoint": ["https://example.com"] } diff --git a/tests/payloads/credential/credential-issue-jsonld.json b/tests/payloads/credential/credential-issue-jsonld.json index e84a355a7..74b406f19 100644 --- a/tests/payloads/credential/credential-issue-jsonld.json +++ b/tests/payloads/credential/credential-issue-jsonld.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male", diff --git a/tests/payloads/credential/credential-issue-jwt-revocation.json b/tests/payloads/credential/credential-issue-jwt-revocation.json index 050d1f9fc..df9a868aa 100644 --- a/tests/payloads/credential/credential-issue-jwt-revocation.json +++ b/tests/payloads/credential/credential-issue-jwt-revocation.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male", diff --git a/tests/payloads/credential/credential-issue-jwt.json b/tests/payloads/credential/credential-issue-jwt.json index a2c365981..a2ae7d665 100644 --- a/tests/payloads/credential/credential-issue-jwt.json +++ b/tests/payloads/credential/credential-issue-jwt.json @@ -1,5 +1,5 @@ { - "issuerDid": "did:cheqd:testnet:4JdgsZ4A8LegKXdsKE3v6X", + "issuerDid": "did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA", "subjectDid": "did:key:z6MkqJNR1DHxX2qxqDYx9tNDsXoNRVpaVvJkLPeCYqaARz1n", "attributes": { "gender": "male",