Skip to content

Commit

Permalink
feat: add imageurl field in oob issuance and verification (#64)
Browse files Browse the repository at this point in the history
* feat: add imageurl field in oob issuance and verification

Signed-off-by: bhavanakarwade <[email protected]>

* feat: add imageurl in oob issuance and verification for dedicated agent

Signed-off-by: bhavanakarwade <[email protected]>

---------

Signed-off-by: bhavanakarwade <[email protected]>
Signed-off-by: KulkarniShashank <[email protected]>
  • Loading branch information
bhavanakarwade authored and KulkarniShashank committed Sep 13, 2024
1 parent 2a95909 commit f0da506
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/controllers/credentials/CredentialController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export class CredentialController extends Controller {
handshakeProtocols: [HandshakeProtocol.Connections],
messages: [credentialMessage],
autoAcceptConnection: true,
imageUrl: outOfBandOption?.imageUrl,
})
return {
invitationUrl: outOfBandRecord.outOfBandInvitation.toUrl({
Expand Down
7 changes: 5 additions & 2 deletions src/controllers/multi-tenancy/MultiTenancyController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ import { BCOVRIN_REGISTER_URL, INDICIO_NYM_URL } from '../../utils/util'
import { SchemaId, CredentialDefinitionId, RecordId, ProofRecordExample, ConnectionRecordExample } from '../examples'
import {
RequestProofOptions,
CreateOfferOobOptions,
CreateOfferOptions,
CreateProofRequestOobOptions,
CreateTenantOptions,
DidCreate,
DidNymTransaction,
EndorserTransaction,
ReceiveInvitationByUrlProps,
ReceiveInvitationProps,
WriteTransaction,
CreateProofRequestOobOptions,
CreateOfferOobOptions,
} from '../types'

import {
Expand Down Expand Up @@ -888,6 +888,7 @@ export class MultiTenancyController extends Controller {
},
options: {},
})

if (!credentialDefinitionState?.credentialDefinitionId) {
throw new Error('Credential Definition Id not found')
}
Expand Down Expand Up @@ -1017,6 +1018,7 @@ export class MultiTenancyController extends Controller {
handshakeProtocols: [HandshakeProtocol.Connections],
messages: [credentialMessage],
autoAcceptConnection: true,
imageUrl: createOfferOptions?.imageUrl,
})

createOfferOobRecord = {
Expand Down Expand Up @@ -1219,6 +1221,7 @@ export class MultiTenancyController extends Controller {
handshakeProtocols: [HandshakeProtocol.Connections],
messages: [proofMessage],
autoAcceptConnection: true,
imageUrl: createRequestOptions?.imageUrl,
})

oobProofRecord = {
Expand Down
1 change: 1 addition & 0 deletions src/controllers/proofs/ProofController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export class ProofController extends Controller {
handshakeProtocols: [HandshakeProtocol.Connections],
messages: [proofMessage],
autoAcceptConnection: true,
imageUrl: createRequestOptions?.imageUrl,
})

return {
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export interface CreateOfferOobOptions {
parentThreadId?: string
willConfirm?: boolean
label?: string
imageUrl?: string
}
export interface CredentialCreateOfferOptions {
credentialRecord: CredentialExchangeRecord
Expand All @@ -138,6 +139,7 @@ export interface CreateProofRequestOobOptions {
autoAcceptProof?: AutoAcceptProof
comment?: string
label?: string
imageUrl?: string
}

export interface OfferCredentialOptions {
Expand Down
2 changes: 2 additions & 0 deletions src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ const models: TsoaRoute.Models = {
"parentThreadId": {"dataType":"string"},
"willConfirm": {"dataType":"boolean"},
"label": {"dataType":"string"},
"imageUrl": {"dataType":"string"},
},
"additionalProperties": false,
},
Expand Down Expand Up @@ -601,6 +602,7 @@ const models: TsoaRoute.Models = {
"autoAcceptProof": {"ref":"AutoAcceptProof"},
"comment": {"dataType":"string"},
"label": {"dataType":"string"},
"imageUrl": {"dataType":"string"},
},
"additionalProperties": false,
},
Expand Down
6 changes: 6 additions & 0 deletions src/routes/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,9 @@
},
"label": {
"type": "string"
},
"imageUrl": {
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -1322,6 +1325,9 @@
},
"label": {
"type": "string"
},
"imageUrl": {
"type": "string"
}
},
"required": [
Expand Down

0 comments on commit f0da506

Please sign in to comment.