feat: allow agent identity in rpc call context#956
Open
meeh0w wants to merge 1 commit into
Open
Conversation
csabbee
approved these changes
Jun 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Enables passing an agentIdentity alongside wallet/VM module RPC requests by updating shared request context types, forwarding the context field into VM module RPC calls, and pulling in VM module packages that expose the new types/methods.
Changes:
- Bumps
@avalabs/*-moduleand@avalabs/vm-module-typesto a pre-release build that includes agent identity support. - Extends
JsonRpcRequestContextwithagentIdentityand forwards it into the VM moduleonRpcRequestcontext. - Allows the new
RpcMethod.AVALANCHE_DECLARE_AGENT_IDENTITYmethod through the DApp permission allowlist.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for new pre-release VM module and type packages (plus transitive dependency graph changes). |
| package.json | Forces VM module/type packages to the pre-release versions via resolutions. |
| apps/next/package.json | Moves @avalabs/vm-module-types to the pre-release version. |
| packages/ui/package.json | Moves @avalabs/vm-module-types to the pre-release version. |
| packages/inpage/package.json | Moves EVM/SVM module deps to the pre-release versions. |
| packages/service-worker/package.json | Moves VM module deps and @avalabs/vm-module-types to the pre-release versions. |
| packages/types/src/dapp-connection.ts | Adds agentIdentity?: AgentIdentity to the RPC request context type. |
| packages/service-worker/src/connections/middlewares/PermissionMiddleware.ts | Adds the new RPC method to UNRESTRICTED_METHODS. |
| packages/service-worker/src/connections/middlewares/DAppRequestHandlerMiddleware.ts | Forwards agentIdentity into the VM module RPC call context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
85
to
+89
| // This field is for our internal use only (only used with extension's direct connection) | ||
| context: { | ||
| account: context.account, | ||
| agentIdentity: | ||
| context.request.params.request.context?.agentIdentity, |
Collaborator
Author
There was a problem hiding this comment.
I'll fix the comments. This particular field is getting whitelisted.
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.
Summary
Jira ticket: n/a
Figma: n/a
Notes
Allows for agent identity to be passed along with wallet RPC requests.
Related VM Modules PR: ava-labs/core-vm-modules#415
Testing
You can find some instructions in the VM Modules pull request (comments).