dcka 3147 wallet delegation policy#507
Merged
Merged
Conversation
maycon-mello
commented
Apr 30, 2026
Collaborator
- wallet delegation policy
Contributor
There was a problem hiding this comment.
Pull request overview
Adds wallet delegation-policy support by introducing a new wasm delegation service plus core helpers for issuing delegatable credentials and working with delegation policies/chains.
Changes:
- Add
DelegationService(wasm) with RPC client wrappers for mobile platforms. - Add core delegation modules (types, policy fetch/digest attributes, credential issuance helpers, chain storage helpers) and unit tests.
- Add integration test/fixtures for issuing a delegatable credential and resolving its embedded delegation policy.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/wasm/src/services/delegation/service.ts | Implements delegation operations (issue credential, compute policy digest, fetch policy). |
| packages/wasm/src/services/delegation/service-rpc.ts | Adds RPC client wrapper for delegation service methods. |
| packages/wasm/src/services/delegation/index.ts | Exposes the delegation service entrypoint. |
| packages/wasm/src/services/delegation/index.ios.js | Uses RPC client implementation on iOS. |
| packages/wasm/src/services/delegation/index.android.js | Uses RPC client implementation on Android. |
| packages/core/src/delegation/delegation-utils.ts | Adds helper to detect delegatable credentials via @context. |
| packages/core/src/delegation/delegation-types.ts | Introduces TS types for delegation policy structures. |
| packages/core/src/delegation/delegation-policy.ts | Fetches delegation policy and builds policy attributes/digest; builds role tree. |
| packages/core/src/delegation/delegation-policy.test.ts | Unit test for role-tree builder. |
| packages/core/src/delegation/delegation-issuance.ts | Issues delegatable credentials with embedded policy ID + digest. |
| packages/core/src/delegation/delegation-fixtures.ts | Adds sample delegation policies used by tests. |
| packages/core/src/delegation/delegation-chain.ts | Adds wallet persistence/read helpers for delegation chain documents. |
| packages/core/src/delegation/delegation-chain.test.ts | Unit tests for delegation chain read/write behavior. |
| integration-tests/delegation/delegation-policy.test.ts | Integration test issuing a delegatable credential and resolving its delegation policy. |
| integration-tests/delegation/delegation-fixtures.ts | Integration fixtures for a travel-agency delegation policy and contexts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
maycon-mello
marked this pull request as ready for review
May 7, 2026 02:06
mike-parkhill
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.