Skip to content

Wallet sdk credential and proof plus display #350

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

Merged

Conversation

berendsliedrecht
Copy link
Member

@berendsliedrecht berendsliedrecht commented Jun 23, 2025

Credential and proof display

I have migrated quite some functionality from @packages/agent to @paradym/wallet-sdk. This mainly includes the display functionality for credentials and proofs. It also includes a lot of hooks, invitation functionality and utils. The easypid app now uses some of this new functionality from the wallet sdk, but it has to be refactored to use the ParadymWalletSdk instance, so the usage is not too relevant. I mainly changed it so that migrating to usage of the ParadymWalletSdk is easier, as all the types already line up.

I also used Error internally, as all cases that were reached were fatal. At a higher level, ParadymWalletSdk, we can wrap this and convert into an object with a success or something equivalent.

Git also did not correctly remap some files, even when using git mv sadly.

There are still some tasks related to this, like improving the DX of the proof display attributes, but I would like to do this in a new PR as +3.3k and -2.6k is a bit much.

@berendsliedrecht berendsliedrecht changed the base branch from main to wallet-sdk June 23, 2025 09:38
@berendsliedrecht berendsliedrecht force-pushed the wallet-sdk-credential-and-proof-plus-display branch from 926e723 to afa7abd Compare July 7, 2025 10:11
@berendsliedrecht berendsliedrecht force-pushed the wallet-sdk-credential-and-proof-plus-display branch from 72e9c00 to 7846041 Compare July 8, 2025 12:33
@berendsliedrecht berendsliedrecht force-pushed the wallet-sdk-credential-and-proof-plus-display branch 2 times, most recently from 54e7d87 to c586b15 Compare July 16, 2025 09:27
@berendsliedrecht berendsliedrecht force-pushed the wallet-sdk-credential-and-proof-plus-display branch from c586b15 to 838a29d Compare July 16, 2025 09:35
@berendsliedrecht berendsliedrecht marked this pull request as ready for review July 16, 2025 09:40
Signed-off-by: Berend Sliedrecht <[email protected]>
Signed-off-by: Berend Sliedrecht <[email protected]>
Signed-off-by: Berend Sliedrecht <[email protected]>
Signed-off-by: Berend Sliedrecht <[email protected]>
Comment on lines +13 to +14
// TODO: remove this?
credentialCategory?: CredentialCategoryMetadata['credentialCategory']
Copy link
Member

Choose a reason for hiding this comment

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

Why remove it? I think we're using this to retrieve the PID record

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah mainly because we only really use it for the PID. Just wondering about how relevant that is in a general SDK.

@@ -0,0 +1,10 @@
import { useCredentialRecords } from './useCredentialRecords'

export const useCredentialRecordById = (id: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

I think for all these hooks we need to update it to use the for display variant by default (which also includes the record i think?)

Copy link
Member Author

Choose a reason for hiding this comment

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

the useCredentials now returns display information, and the useCredentialRecords only the record. useCredentials will be a public hook and useCredentialRecords will be an internal hook

Signed-off-by: Berend Sliedrecht <[email protected]>
@berendsliedrecht berendsliedrecht merged commit 49d7aaf into wallet-sdk Jul 17, 2025
@berendsliedrecht berendsliedrecht deleted the wallet-sdk-credential-and-proof-plus-display branch July 17, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants