Skip to content

feat: allow agent identity in rpc call context#956

Open
meeh0w wants to merge 1 commit into
mainfrom
feat/agent-identity
Open

feat: allow agent identity in rpc call context#956
meeh0w wants to merge 1 commit into
mainfrom
feat/agent-identity

Conversation

@meeh0w

@meeh0w meeh0w commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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).

Copilot AI left a comment

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.

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/*-module and @avalabs/vm-module-types to a pre-release build that includes agent identity support.
  • Extends JsonRpcRequestContext with agentIdentity and forwards it into the VM module onRpcRequest context.
  • Allows the new RpcMethod.AVALANCHE_DECLARE_AGENT_IDENTITY method 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,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'll fix the comments. This particular field is getting whitelisted.

@meeh0w meeh0w added the DO NOT MERGE This PR is not meant to be merged in its current state label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE This PR is not meant to be merged in its current state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants