Skip to content

feat: load account signers through injectable SEP-10 account lookup - #792

Open
Ghost1063 wants to merge 1 commit into
Anchor-kit:mainfrom
Ghost1063:fix/issue-704-load-account-signers-through-an-injectable-sep-r2
Open

Ghost1063 wants to merge 1 commit into
Anchor-kit:mainfrom
Ghost1063:fix/issue-704-load-account-signers-through-an-injectable-sep-r2

Conversation

@Ghost1063

Copy link
Copy Markdown

Overview

This PR adds a typed account lookup boundary so SEP-10 authentication can read configured account signers, weights, and thresholds instead of requiring the account master key. The lookup returns distinct not-found and upstream-error outcomes, and the HTTP handling in the Express router now distinguishes them.

Related Issue

Closes #AK-028

Changes

  • [MODIFY] src/runtime/interfaces.ts

    • Adds the typed account lookup interface returning signer keys, weights, and thresholds, with separate not-found and upstream-error result variants.
  • [MODIFY] src/runtime/http/express-router-impl.ts

    • Injects the account lookup and maps not-found and upstream-error outcomes to distinct HTTP responses.
  • [MODIFY] src/runtime/http/express-router.ts

    • Passes the injectable lookup through the router factory.
  • [MODIFY] src/services/stellar-signer.ts

    • Reads account signers and thresholds through the lookup boundary for signature verification.

Verification Results

Focused check (fixtures for existing, nonexistent, and unavailable accounts; no real credentials):

npm test -- src/runtime/http

Expected result: the existing-account, nonexistent-account, and unavailable-account cases pass, with not-found and upstream-error responses asserted as distinct.

Type and build checks:

npx tsc --noEmit
npm run lint
npm run build
Acceptance Criteria Status
Tests provide existing, nonexistent and unavailable accounts without real credentials ✅ Fixture-based lookup doubles
HTTP handling distinguishes those outcomes ✅ Distinct not-found and upstream-error responses
Reproducible focused check with command and expected result documented ✅ npm test -- src/runtime/http

Closes #704

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.

Load account signers through an injectable SEP-10 account lookup

1 participant