Skip to content

Conversation

@allanbrondum
Copy link
Contributor

Purpose

Try to integrate identity attributes directly from identity credentials directly into the web3id module

Changes

_Describe the changes that were needed.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@allanbrondum allanbrondum marked this pull request as draft October 9, 2025 09:45
@allanbrondum allanbrondum changed the title web3id direct identity credentials, integration with web3id Oct 9, 2025
Comment on lines +730 to +738
struct GivenContextInfo {
// Randomly generated nonce. It is important that the nonce is freshly generated by the backend
// for each request so that the presentation request anchor on-chain truely looks random.
nonce: Sha256Challenge,
// Human readable string giving more context to the request.
context_string: String,
// The topic of the wallet connection as defined by `walletConnect`.
// The wallet or ID app use this value to check that the topic matches the current active connection.
// TODO: Should we decide on a fix-sized length type `e.g. a type that will represent the walletConntect topic`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the properties should be dynamically represented and not as hardcoded fields? The web3id module may not even need to know the different properties.

requested: RequestedContextInfo,
}

// This data is suppose to be provided by the dapp backend (e.g. merchant backend).
Copy link
Contributor Author

@allanbrondum allanbrondum Oct 15, 2025

Choose a reason for hiding this comment

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

Docs on an item needs three slashes: ///

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Else it is just a comment


/// A trait that represents a challenge in a proof response request protocol.
/// Types implementing this trait define how they can be incorporated into a cryptographic transcript (random oracle).
pub trait IsChallenge:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we need a polymorphic behaviour for different types of challenges, I think we should settle on one approach. Either an enum, or a trait that you implement. Having both seems redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(enum is for variation of a fixed set of behaviours, while the trait is open for extension, not sure which one is best here)

Base automatically changed from ar/cor-1971-identity-credential-attributes-prover-and-verifier-simplify to ar/cor-1939-verifiable-presentations-from-id-credentials-feature October 15, 2025 10:43
@allanbrondum allanbrondum changed the base branch from ar/cor-1939-verifiable-presentations-from-id-credentials-feature to ar/cor-1972-identity-credential-attributes-prover-and-verifier-optimize-id-cred October 22, 2025 14:23
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