diff --git a/examples/integration-scripts/singlesig-vlei-issuance.test.ts b/examples/integration-scripts/singlesig-vlei-issuance.test.ts index 6aacbc51..6734d68a 100644 --- a/examples/integration-scripts/singlesig-vlei-issuance.test.ts +++ b/examples/integration-scripts/singlesig-vlei-issuance.test.ts @@ -106,6 +106,13 @@ const ECR_AUTH_RULES = Saider.saidify({ const OOR_RULES = LE_RULES; const OOR_AUTH_RULES = LE_RULES; +const CRED_RETRY_DEFAULTS = { + maxSleep: 1000, + minSleep: 10, + maxRetries: 5, + timeout: 10000, +}; + interface Aid { name: string; prefix: string; @@ -193,8 +200,9 @@ test('singlesig-vlei-issuance', async function run() { const cred = await getGrantedCredential(qviClient, qviCred.sad.d); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(qviCredHolder.sad.d, qviCred.sad.d); assert.equal(qviCredHolder.sad.s, QVI_SCHEMA_SAID); assert.equal(qviCredHolder.sad.i, gleifAid.prefix); @@ -232,8 +240,9 @@ test('singlesig-vlei-issuance', async function run() { const cred = await getGrantedCredential(leClient, leCred.sad.d); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(leCredHolder.sad.d, leCred.sad.d); assert.equal(leCredHolder.sad.s, LE_SCHEMA_SAID); assert.equal(leCredHolder.sad.i, qviAid.prefix); @@ -273,8 +282,9 @@ test('singlesig-vlei-issuance', async function run() { const cred = await getGrantedCredential(roleClient, ecrCred.sad.d); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(ecrCredHolder.sad.d, ecrCred.sad.d); assert.equal(ecrCredHolder.sad.s, ECR_SCHEMA_SAID); assert.equal(ecrCredHolder.sad.i, leAid.prefix); @@ -320,8 +330,9 @@ test('singlesig-vlei-issuance', async function run() { ); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(ecrAuthCredHolder.sad.d, ecrAuthCred.sad.d); assert.equal(ecrAuthCredHolder.sad.s, ECR_AUTH_SCHEMA_SAID); assert.equal(ecrAuthCredHolder.sad.i, leAid.prefix); @@ -363,8 +374,9 @@ test('singlesig-vlei-issuance', async function run() { const cred = await getGrantedCredential(roleClient, ecrCred2.sad.d); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(ecrCredHolder2.sad.d, ecrCred2.sad.d); assert.equal(ecrCredHolder2.sad.s, ECR_SCHEMA_SAID); assert.equal(ecrCredHolder2.sad.i, qviAid.prefix); @@ -409,8 +421,9 @@ test('singlesig-vlei-issuance', async function run() { ); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(oorAuthCredHolder.sad.d, oorAuthCred.sad.d); assert.equal(oorAuthCredHolder.sad.s, OOR_AUTH_SCHEMA_SAID); assert.equal(oorAuthCredHolder.sad.i, leAid.prefix); @@ -451,8 +464,9 @@ test('singlesig-vlei-issuance', async function run() { const cred = await getGrantedCredential(roleClient, oorCred.sad.d); assert(cred !== undefined); return cred; - }); + }, CRED_RETRY_DEFAULTS); } + assert.equal(oorCredHolder.sad.d, oorCred.sad.d); assert.equal(oorCredHolder.sad.s, OOR_SCHEMA_SAID); assert.equal(oorCredHolder.sad.i, qviAid.prefix); diff --git a/src/keri/app/credentialing.ts b/src/keri/app/credentialing.ts index ca08a9ab..44cd637f 100644 --- a/src/keri/app/credentialing.ts +++ b/src/keri/app/credentialing.ts @@ -211,9 +211,13 @@ export class Credentials { const [, acdc] = Saider.saidify({ v: versify(Ident.ACDC, undefined, Serials.JSON, 0), d: '', + u: args.u, i: args.i ?? hab.prefix, - ...args, + ri: args.ri, + s: args.s, a: subject, + e: args.e, + r: args.r, }); const [, iss] = Saider.saidify({