Skip to content

feat(v4): track key exports for migration visibility - #2466

Merged
jakehobbs merged 3 commits into
mainfrom
jake/track-key-export
Apr 23, 2026
Merged

jakehobbs merged 3 commits into
mainfrom
jake/track-key-export

Conversation

@jakehobbs

@jakehobbs jakehobbs commented Apr 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a fire-and-forget call to /v1/track-key-export after a successful wallet key export in the signer client
  • Sends org ID, account address, and chain type (ETH/SOL) for export tracking
  • Adds the new endpoint type definition to SignerEndpoints

Test plan

  • Verify key export flow still works end-to-end
  • Confirm tracking request is sent after successful export
  • Confirm failed tracking request does not break the export flow (fire-and-forget with .catch(() => {}))

🤖 Generated with Claude Code


PR-Codex overview

This PR introduces a new API endpoint for tracking key exports and updates several type definitions in the codebase. It enhances the functionality related to account management and multi-owner operations.

Detailed summary

  • Added new endpoint "/v1/track-key-export" with request Body containing orgId, accountAddress, and type.
  • Updated type definitions for various events and parameters in account-kit/signer/src/client/types.ts.
  • Adjusted existing documentation references to reflect updated line numbers for type definitions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This PR adds an observability hook to the signer client so that successful wallet key exports trigger a best-effort tracking request to a new signer API route.

Changes:

  • Adds a fire-and-forget POST /v1/track-key-export request after exportWalletAccount returns an exportBundle.
  • Introduces the /v1/track-key-export route definition in the SignerEndpoints type, including payload shape and response type.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
account-kit/signer/src/client/types.ts Adds the new /v1/track-key-export endpoint type definition for the typed request helper.
account-kit/signer/src/client/base.ts Sends a non-blocking tracking request after a successful export bundle is produced, without impacting the export flow on failure.

@jakehobbs jakehobbs changed the title Track key exports for observability feat(v4): track key exports for observability Apr 22, 2026
Success is implied by 200 status, matching existing patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines +1556 to +1561
this.request("/v1/track-key-export", {
orgId: organizationId,
accountAddress: account.address,
type: opts.type === "ETHEREUM" ? "ETH" : "SOL",
}).catch(() => {});

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.

The cleaner way of doing this would be to proxy the exportWalletAccount call above through our signer service and logging it as it's exported. We do this for a few other endpoints (take in the stamped request and forward the result back)

Given that we're winding this down I feel less strongly, but if we weren't I'd want to do that instead. Your call

@jakehobbs jakehobbs Apr 22, 2026 •

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 feel like not doing that since we are winding down.

also feels like slightly better optics to not proxy anything w/ key material through us, even if it is encrypted.

but lmk if you feel strongly & i'll change.

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.

pretty sure we alr proxy multi owner key exports FYI. another reason to prefer proxying is that people can't just spam us to pollute our db. happy with this though per our conversation on slack

florrdv
florrdv previously approved these changes Apr 22, 2026
Co-Authored-By: Claude <noreply@anthropic.com>
@jakehobbs jakehobbs changed the title feat(v4): track key exports for observability feat(v4): track key exports for migration visibility Apr 23, 2026
@jakehobbs
jakehobbs enabled auto-merge (squash) April 23, 2026 01:01
@jakehobbs
jakehobbs merged commit 934cd82 into main Apr 23, 2026
15 checks passed
@jakehobbs
jakehobbs deleted the jake/track-key-export branch April 23, 2026 01:02
Dargon789 added a commit to Dargon789/aa-sdk that referenced this pull request May 8, 2026
* chore: remove arb nova (alchemyplatform#2464)

Co-authored-by: Claude <noreply@anthropic.com>

* chore(release): publish v4.87.2 [skip-ci]

* feat(v4): track key exports for migration visibility (alchemyplatform#2466)

* Track key exports via /v1/track-key-export endpoint for observability

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use empty response type for track-key-export endpoint

Success is implied by 200 status, matching existing patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update docs gen

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore(release): publish v4.88.0 [skip-ci]

* chore: bump next.js, minimatch, and lerna (alchemyplatform#2467)

* fix: upgrade Next.js 14 → 15.5.15 to resolve high-severity DoS vulnerability (Dependabot alchemyplatform#361, alchemyplatform#362, alchemyplatform#363)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: bump minimatch to patched versions and upgrade lerna to v9

Upgrades lerna from v8 to v9 which brings in nx 22.x, eliminating
pinned vulnerable minimatch versions. All transitive minimatch
dependencies now resolve to patched releases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: fmt

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore(release): publish v4.88.1 [skip-ci]

* docs: update v5 SDK reference docs for 5.0.0-beta.25 (alchemyplatform#2475)

Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>

* docs: update v5 SDK reference docs for 5.0.0-beta.26 (alchemyplatform#2482)

Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>

* fix: disallow more permission builder selectors (alchemyplatform#2485)

Port v5 selector restrictions to v4 — block installValidation,
uninstallValidation, installExecution, uninstallExecution, and
upgradeToAndCall from being added to session key allowlists. Refactors
individual checks into shared assertion helpers with case-insensitive
matching.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore(release): publish v4.88.2 [skip-ci]

* docs: update v5 SDK reference docs for 5.0.0-beta.27 (alchemyplatform#2489)

Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>

---------

Co-authored-by: jakehobbs <jacob.hobbs@alchemy.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>
Dargon789 added a commit to Dargon789/aa-sdk that referenced this pull request May 8, 2026
* chore: remove arb nova (alchemyplatform#2464)



* chore(release): publish v4.87.2 [skip-ci]

* feat(v4): track key exports for migration visibility (alchemyplatform#2466)

* Track key exports via /v1/track-key-export endpoint for observability



* Use empty response type for track-key-export endpoint

Success is implied by 200 status, matching existing patterns.



* chore: update docs gen



---------



* chore(release): publish v4.88.0 [skip-ci]

* chore: bump next.js, minimatch, and lerna (alchemyplatform#2467)

* fix: upgrade Next.js 14 → 15.5.15 to resolve high-severity DoS vulnerability (Dependabot alchemyplatform#361, alchemyplatform#362, alchemyplatform#363)



* fix: bump minimatch to patched versions and upgrade lerna to v9

Upgrades lerna from v8 to v9 which brings in nx 22.x, eliminating
pinned vulnerable minimatch versions. All transitive minimatch
dependencies now resolve to patched releases.



* chore: fmt

---------



* chore(release): publish v4.88.1 [skip-ci]

* docs: update v5 SDK reference docs for 5.0.0-beta.25 (alchemyplatform#2475)



* docs: update v5 SDK reference docs for 5.0.0-beta.26 (alchemyplatform#2482)



* fix: disallow more permission builder selectors (alchemyplatform#2485)

Port v5 selector restrictions to v4 — block installValidation,
uninstallValidation, installExecution, uninstallExecution, and
upgradeToAndCall from being added to session key allowlists. Refactors
individual checks into shared assertion helpers with case-insensitive
matching.



* chore(release): publish v4.88.2 [skip-ci]

* docs: update v5 SDK reference docs for 5.0.0-beta.27 (alchemyplatform#2489)



---------

Co-authored-by: jakehobbs <jacob.hobbs@alchemy.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alchemy Bot <alchemy-bot@alchemy.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: gha-aa-sdk[bot] <269827238+gha-aa-sdk[bot]@users.noreply.github.com>
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.

4 participants