@@ -87,13 +87,20 @@ export async function createDelegationOffer({
8787 isDelegatableCredential ( parentCredential ) ,
8888 `Credential ${ credentialId } is not delegatable` ,
8989 ) ;
90- const parentDetails = await getDelegationDetails ( parentCredential , wallet ) ;
90+ const parentDetails = await getDelegationDetails (
91+ parentCredential ,
92+ wallet ,
93+ ) ;
9194 if ( parentDetails . delegationPolicy ) {
92- assertPolicyConformsToParent ( delegationPolicy , parentDetails . delegationPolicy , {
93- delegationRole,
94- remainingDepth : parentDetails . remainingDelegationDepth ,
95- parentRoleId : parentDetails . role ?. roleId ,
96- } ) ;
95+ assertPolicyConformsToParent (
96+ delegationPolicy ,
97+ parentDetails . delegationPolicy ,
98+ {
99+ delegationRole,
100+ remainingDepth : parentDetails . remainingDelegationDepth ,
101+ parentRoleId : parentDetails . role ?. roleId ,
102+ } ,
103+ ) ;
97104 }
98105 }
99106 }
@@ -149,8 +156,10 @@ export function createOOBInvitation(
149156 issuerDID : issuerDID ,
150157 issuerName : finalIssuerName ,
151158 role : delegationOffer . delegationRole ,
152- roleLabel : getRole ( delegationOffer . delegationRole , delegationOffer . delegationPolicy )
153- ?. label ,
159+ roleLabel : getRole (
160+ delegationOffer . delegationRole ,
161+ delegationOffer . delegationPolicy ,
162+ ) ?. label ,
154163 createdAt : delegationOffer . sentAt ,
155164 expiresAt : delegationOffer . expiresAt ,
156165 } ;
@@ -325,7 +334,10 @@ export const DELEGATION_REQUEST_HANDLER = {
325334 try {
326335 validateDelegationPolicy ( delegationOffer . delegationPolicy ) ;
327336 if ( parentCredential && isDelegatableCredential ( parentCredential ) ) {
328- const parentDetails = await getDelegationDetails ( parentCredential , wallet ) ;
337+ const parentDetails = await getDelegationDetails (
338+ parentCredential ,
339+ wallet ,
340+ ) ;
329341 if ( parentDetails . delegationPolicy ) {
330342 assertPolicyConformsToParent (
331343 delegationOffer . delegationPolicy ,
@@ -361,6 +373,11 @@ export const DELEGATION_REQUEST_HANDLER = {
361373 delegationPolicy : delegationOffer . delegationPolicy ,
362374 delegationRoleId : delegationOffer . delegationRole ,
363375 delegatorDID : delegationOffer . issuerDID || issuerDID ,
376+ revocationContext : {
377+ wallet,
378+ truveraApiConfigs : wallet . dataStore . configs . truveraApi ,
379+ issuerDID : delegationOffer . issuerDID || issuerDID ,
380+ } ,
364381 } ) ;
365382
366383 const delegationChain = await getDelegationChain ( parentCredential , wallet ) ;
@@ -498,8 +515,8 @@ export const messageHandlers = [
498515export async function handleMessage (
499516 message ,
500517 context : {
501- wallet ;
502- messageProvider ;
518+ wallet : any ;
519+ messageProvider : any ;
503520 } ,
504521) {
505522 const decoded = decodeMessage ( message ) ;
0 commit comments