Skip to content

[Phase E6] SDK: attestation signing and release-with-attestation #75

Open

Description

@afeezorobsco-cyber

Phase: E6 — SDK & integrator tooling (see ROADMAP.md)

Complexity: High (200 pts)

Description

Attestation-based release only works if attesters can produce exactly the message the contract verifies: domain-separated, network-bound, byte-exact. Getting that wrong means signatures that never verify (or, worse, are replayable). The SDK should own message construction and signing.

Requirements & context

What to do:

  • Add buildAttestationMessage({ contractId, networkPassphrase, escrowId, action }) matching the contract byte for byte.
  • Add signAttestation(message, signer) and releaseWithAttestation({ escrowId, signature }).
  • Shared test vectors (message bytes + signatures) used by both Rust and TS tests.
  • Testnet integration test with an offline attester key.

Files likely involved:

  • sdk/src/index.ts (EscrowClient methods; new types, constants and errors go in the matching topical module under sdk/src/)
  • sdk/src/generated/contract-client.ts
  • sdk/tests/

Edge cases / constraints:

  • The message must include the network so testnet attestations can't be used on mainnet.
  • Never accept a raw secret where a signer interface fits.
  • Follow the ARCHITECTURE_ESSENTIALS.md hard rules (no PHI or healthcare concepts anywhere, tests for every contract change, strict semver for the SDK, testnet only).

Suggested execution

  1. Fork the repo and branch off main: git checkout -b feat/sdk-attestation-signing-and-release-with
  2. Implement the changes above. If you hit a design question the issue doesn't answer, comment here before guessing.
  3. Run cargo test and cargo build --target wasm32v1-none --release in contracts/escrow/. For SDK changes, run npm run typecheck && npm run build in sdk/, plus npm run test:integration when the change touches network calls. Contract logic changes need tests in contracts/escrow/tests/ (hard rule 2).
  4. Commit with a clear message, for example: feat(sdk): SDK: attestation signing and release-with-attestation
  5. Open a PR against main with Closes #<this issue number> in the description.

Definition of done

  • Builders + signing + tests
  • Shared vectors
  • Version bump + changelog
  • Your ROADMAP.md item ticked in place, a changelog.d/<issue-number>-<short-slug>.md fragment (see changelog.d/README.md), a contract-changes.d/<issue-number>-<short-slug>.md fragment for any change under contracts/escrow/src/ (never edit CONTRACT_VERSION), and, if the contract or SDK surface changed, the new ARCHITECTURE_ESSENTIALS.md / README.md lines in a docs.d/<issue-number>-<short-slug>.md fragment (see docs.d/README.md)
  • CI green

How this will be reviewed

Reviewer verifies a vector signature with an independent ed25519 implementation.

Guidelines

  • Claiming: comment to claim before you start, and check nobody else is assigned.
  • PR description: say what changed and why, include Closes #<issue>, and paste test output (plus screenshots for UI work).
  • Timeframe: open a PR within 7 days of assignment. If you get stuck, say so in the issue early rather than going quiet.

Depends on: The matching Phase E5 contract issue opened alongside this one (the contract function must exist first).

Activity

  1. added
    enhancement
    Stellar Wave
    on Oct 12, 2026
  2. added
    Stellar Wave
    and removed
    Stellar Wave
    on Oct 13, 2026
  3. jaynomyaro commented on Oct 16, 2026

    @jaynomyaro

    @jaynomyaro has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi! I’m a full‑stack developer with strong blockchain expertise. I can resolve this issue quickly and deliver a clean, reliable solution with immediate attention to detail. Please assign it to me—I’m ready to start right away.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @jaynomyaro to this issue.

  4. Bosskandy1 commented on Oct 16, 2026

    @Bosskandy1

    @Bosskandy1 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hii pls I would love to work on this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Bosskandy1 to this issue.

  5. drips-wave commented on Oct 16, 2026

    @drips-wave

    Congratulations, @AllysiadevOps! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @AllysiadevOps: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. removed
    Stellar Wave
    on Nov 4, 2026
  7. added
    Stellar Wave
    on Nov 21, 2026
  8. rajiabdulrahmon2020-ui commented on Nov 21, 2026

    @rajiabdulrahmon2020-ui
    Contributor

    @rajiabdulrahmon2020-ui has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

    I’ve reviewed the issue from both the requirements and implementation perspective. I’d like to take ownership of it and deliver a solution that is robust, testable, and appropriately scoped to the problem.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @rajiabdulrahmon2020-ui to this issue.

  9. drips-wave commented on Nov 21, 2026

    @drips-wave

    Congratulations, @rajiabdulrahmon2020-ui! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

    🧑‍💻 @rajiabdulrahmon2020-ui: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar Waveenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions