Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anoncreds): wrong key name for predicates in proof object #1517

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
# pulls all commits (needed for lerna to correctly version)
fetch-depth: 0
persist-credentials: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change should be reverted from this PR

Copy link
Contributor Author

@auer-martin auer-martin Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed it sorry


# setup dependencies
- name: Setup Libindy
Expand Down
2 changes: 1 addition & 1 deletion packages/anoncreds/src/models/exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
>
self_attested_attrs: Record<string, string>

requested_predicates: Record<string, { sub_proof_index: number }>
predicates: Record<string, { sub_proof_index: number }>
}
// TODO: extend types for proof property
proof: any

Check warning on line 93 in packages/anoncreds/src/models/exchange.ts

View workflow job for this annotation

GitHub Actions / Validate

Unexpected any. Specify a different type
identifiers: Array<{
schema_id: string
cred_def_id: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export class IndySdkHolderService implements AnonCredsHolderService {
indyProof,
})

return indyProof
// FIXME IndyProof if badly typed in indy-sdk. It contains a `requested_predicates` property, which should be `predicates`.
return indyProof as unknown as AnonCredsProof
} catch (error) {
agentContext.config.logger.error(`Error creating Indy Proof`, {
error,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AnonCredsVerifierService, VerifyProofOptions } from '@aries-framework/anoncreds'
import type { AnonCredsProof, AnonCredsVerifierService, VerifyProofOptions } from '@aries-framework/anoncreds'
import type { AgentContext } from '@aries-framework/core'
import type { CredentialDefs, Schemas, RevocRegDefs, RevRegs, IndyProofRequest, IndyProof } from 'indy-sdk'

Expand Down Expand Up @@ -82,7 +82,8 @@ export class IndySdkVerifierService implements AnonCredsVerifierService {

return await this.indySdk.verifierVerifyProof(
options.proofRequest as IndyProofRequest,
options.proof as IndyProof,
// FIXME IndyProof if badly typed in indy-sdk. It contains a `requested_predicates` property, which should be `predicates`.
options.proof as unknown as IndyProof,
indySchemas,
indyCredentialDefinitions,
indyRevocationDefinitions,
Expand Down
Loading