Skip to content

refactor(signer): rename capability Signer to ExternalSigner internally - #225

Merged
Sednaoui merged 3 commits into
devfrom
refactor/rename-external-signer
Jul 27, 2026
Merged

refactor(signer): rename capability Signer to ExternalSigner internally#225
Sednaoui merged 3 commits into
devfrom
refactor/rename-external-signer

Conversation

@sherifahmed990

@sherifahmed990 sherifahmed990 commented Jul 27, 2026

Copy link
Copy Markdown
Member

The capability signer type had three names: declared as Signer in signer/types.ts, imported as AkSigner inside the account classes (to dodge the collision with the legacy Safe owner-identifier union also named Signer), and exported to consumers as ExternalSigner.

Align on ExternalSigner everywhere: the declaration is renamed (SignerBase → ExternalSignerBase alongside), the AkSigner import aliases are deleted, and the package root re-exports the name directly instead of aliasing. The legacy Safe union keeps the unqualified Signer name; if it is ever renamed (e.g. SafeOwner), the plain name frees up.

Pure rename — no runtime or public-API change (consumers already knew this type only as ExternalSigner).

Summary by CodeRabbit

  • API Updates
    • Renamed the exported signer type to ExternalSigner (replacing the previous Signer naming).
    • Updated account signing APIs (including single and multi-op flows) to accept ExternalSigner parameters.
    • Updated signer adapter factories and integrations (WebAuthn, private key, Viem, Ethers) to return ExternalSigner.
    • Kept the existing signing behavior and supported signing schemes unchanged.
    • Refreshed related documentation and validation/error messaging to use the new terminology.

sherifahmed990 and others added 2 commits July 27, 2026 13:19
The capability signer type had three names: declared as Signer in
signer/types.ts, imported as AkSigner inside the account classes (to
dodge the collision with the legacy Safe owner-identifier union also
named Signer), and exported to consumers as ExternalSigner.

Align on ExternalSigner everywhere: the declaration is renamed
(SignerBase → ExternalSignerBase alongside), the AkSigner import
aliases are deleted, and the package root re-exports the name directly
instead of aliasing. The legacy Safe union keeps the unqualified Signer
name; if it is ever renamed (e.g. SafeOwner), the plain name frees up.

Pure rename — no runtime or public-API change (consumers already knew
this type only as ExternalSigner).

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

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cff65119-abc9-426c-b55e-b7da8c4f7853

📥 Commits

Reviewing files that changed from the base of the PR and between 73b8792 and 2100269.

📒 Files selected for processing (2)
  • src/account/Safe/SafeAccount.ts
  • src/account/Safe/SafeMultiChainSigAccount.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/account/Safe/SafeAccount.ts
  • src/account/Safe/SafeMultiChainSigAccount.ts

📝 Walkthrough

Walkthrough

The SDK renames its account-agnostic signer type to ExternalSigner and updates exports, signer adapters, negotiation helpers, documentation, and account signing method contracts. Runtime signing and scheme-selection behavior remain unchanged.

Changes

ExternalSigner migration

Layer / File(s) Summary
Signer contract and negotiation
src/signer/types.ts, src/signer/negotiate.ts, src/abstractionkit.ts
The exported signer type and related negotiation APIs now use ExternalSigner, with updated documentation and package re-exports.
Signer adapter return contracts
src/signer/adapters.ts, src/account/Safe/adapters.ts
Signer factory functions and the Safe WebAuthn adapter now return ExternalSigner types.
Account signing API types
src/account/Calibur/..., src/account/Safe/..., src/account/simple/...
Account signing methods and shared helpers now accept ExternalSigner, including generic multi-operation signing contexts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: andrewwahid, sednaoui

Poem

A rabbit renames the signer with care,
From old aliases to names clear and fair.
Adapters hop, account APIs align,
While signing paths keep their old design.
“ExternalSigner!” the bunny cries—
Clean types now sparkle under moonlit skies.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the rename but does not follow the required Summary/Test/Risk / Compatibility template. Add the required Summary, Test, and Risk / Compatibility sections, and note any compatibility impact or explicitly state none.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: renaming the signer capability from Signer to ExternalSigner.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/account/Calibur/Calibur7702Account.ts (1)

709-721: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep capability-signer documentation aligned with the renamed type.

The code now uses ExternalSigner, but several signing docs still use the ambiguous legacy Signer name. Update only capability references; preserve Signer for the Safe owner-identifier union.

  • src/account/Calibur/Calibur7702Account.ts#L709-L721: update the accepted-schemes documentation at Line 693 to ExternalSigner.
  • src/account/Safe/SafeAccount.ts#L1981-L1981: update capability references at Lines 1949, 1957, 1964, and 1967.
  • src/account/Safe/SafeMultiChainSigAccount.ts#L770-L770: update Signer<SignContext> at Line 752 and “one Signer per owner” at Line 765.
  • src/account/simple/Simple7702Account.ts#L863-L863: update the accepted-schemes documentation at Line 778.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/account/Calibur/Calibur7702Account.ts` around lines 709 - 721, Align
signing capability documentation with the renamed ExternalSigner type while
preserving Signer for Safe owner-identifier unions. Update the accepted-schemes
documentation around signUserOperationWithSigner in
src/account/Calibur/Calibur7702Account.ts (lines 709-721), capability references
in src/account/Safe/SafeAccount.ts (lines 1949, 1957, 1964, and 1967; anchor
1981), Signer<SignContext> and “one Signer per owner” in
src/account/Safe/SafeMultiChainSigAccount.ts (lines 752 and 765; anchor 770),
and accepted-schemes documentation in src/account/simple/Simple7702Account.ts
(line 778; anchor 863).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/account/Calibur/Calibur7702Account.ts`:
- Around line 709-721: Align signing capability documentation with the renamed
ExternalSigner type while preserving Signer for Safe owner-identifier unions.
Update the accepted-schemes documentation around signUserOperationWithSigner in
src/account/Calibur/Calibur7702Account.ts (lines 709-721), capability references
in src/account/Safe/SafeAccount.ts (lines 1949, 1957, 1964, and 1967; anchor
1981), Signer<SignContext> and “one Signer per owner” in
src/account/Safe/SafeMultiChainSigAccount.ts (lines 752 and 765; anchor 770),
and accepted-schemes documentation in src/account/simple/Simple7702Account.ts
(line 778; anchor 863).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 21ce3186-e4c8-444c-a69d-8af374aea728

📥 Commits

Reviewing files that changed from the base of the PR and between eda085f and 73b8792.

📒 Files selected for processing (12)
  • src/abstractionkit.ts
  • src/account/Calibur/Calibur7702Account.ts
  • src/account/Safe/SafeAccount.ts
  • src/account/Safe/SafeAccountV0_2_0.ts
  • src/account/Safe/SafeAccountV0_3_0.ts
  • src/account/Safe/SafeMultiChainSigAccount.ts
  • src/account/Safe/adapters.ts
  • src/account/simple/Simple7702Account.ts
  • src/account/simple/Simple7702AccountV09.ts
  • src/signer/adapters.ts
  • src/signer/negotiate.ts
  • src/signer/types.ts

…lSigner

Follow-up to the ExternalSigner rename: six doc references in
SafeAccount and SafeMultiChainSigAccount still said Signer while
meaning the capability type — including {@link Signer} links that now
resolved to the legacy Safe owner-identifier union, and a
Signer<SignContext> mention naming a generic that no longer exists.
The unqualified Signer name remains in use only where it genuinely
means the owner union (e.g. owners: Signer[]).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Sednaoui
Sednaoui merged commit 61bb0c1 into dev Jul 27, 2026
3 checks passed
@Sednaoui
Sednaoui deleted the refactor/rename-external-signer branch July 27, 2026 11:02
@Sednaoui Sednaoui mentioned this pull request Jul 27, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 27, 2026
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.

2 participants