Skip to content

docs: document deterministic PRISM DID generation#257

Open
Rahul-2k4 wants to merge 1 commit into
hyperledger-identus:mainfrom
Rahul-2k4:docs-deterministic-prism-did-249
Open

docs: document deterministic PRISM DID generation#257
Rahul-2k4 wants to merge 1 commit into
hyperledger-identus:mainfrom
Rahul-2k4:docs-deterministic-prism-did-249

Conversation

@Rahul-2k4
Copy link
Copy Markdown

Summary

This draft PR adds the deterministic PRISM DID docs requested in #249.

Changes

  • Added documentation/develop/deterministic-did-creation.md
  • Documented mnemonic -> seed -> deterministic DID flow
  • Documented derivation path format: m/29'/29'/did-index'/key-usage'/key-index'
  • Added deterministic test vectors and expected DID outputs
  • Added code snippets for:
    • Cloud Agent API
    • SDK-TS
    • SDK-KMP
    • SDK-Swift
  • Added sidebar entry in documentation/develop/sidebar.ts
  • Linked from documentation/develop/cloud-agent/did-management.md

Validation

  • New page compiles with @mdx-js/mdx (mdx-ok)
  • npm run build in this environment currently fails on an existing upstream submodule MDX file:
    • sdk-ts/docs/decisions/20231110-sdk-package-release.md
    • this is outside the scope of this PR

Closes #249

@Rahul-2k4 Rahul-2k4 marked this pull request as ready for review April 25, 2026 08:11
@Rahul-2k4 Rahul-2k4 requested a review from a team as a code owner April 25, 2026 08:11
## Mnemonic to DID flow

1. Convert BIP-39 mnemonic (+ optional passphrase) to seed bytes.
2. Derive the master key with path `m/29'/29'/did-index'/key-usage'/key-index'`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In this case the master key have key-usage = 1

<TabItem value="swift" label="SDK-Swift">

```swift
let did = try await didCommAgent.createDeterministicPrismDID(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@goncalo-frade-iohk Does this method already exists?

Copy link
Copy Markdown
Contributor

@FabioPinheiro FabioPinheiro left a comment

Choose a reason for hiding this comment

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

LGTM

You need to have the Signed-off-by: <Name> is not commits for DCO

Signed-off-by: Rahul Tripathi <rahul@Rahuls-Mac-mini.local>
@Rahul-2k4 Rahul-2k4 force-pushed the docs-deterministic-prism-did-249 branch from 7086b82 to 4462511 Compare April 25, 2026 15:40
@Rahul-2k4
Copy link
Copy Markdown
Author

@FabioPinheiro thanks for the review. I pushed an update with the requested changes.

  • Added an explicit note in the Mnemonic -> DID flow that the master key uses key-usage = 1.
  • Added DCO sign-off to the commit and force-pushed the branch.
  • Removed the Swift snippet for now so we do not document an unverified method name.

@goncalo-frade-iohk could you confirm the intended SDK-Swift API method for deterministic PRISM DID creation? I can add the correct snippet back right away once confirmed.

@sonarqubecloud
Copy link
Copy Markdown

@Rahul-2k4
Copy link
Copy Markdown
Author

@FabioPinheiro please do review on this and let me know if this looks good

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.

docs: Document deterministic PRISM DID generation

2 participants