Skip to content

feat(sep12): SEP-12 PUT/GET /customer client with CustomerStatus types#596

Open
Johnalex-hub wants to merge 1 commit into
ezedike-evan:mainfrom
Johnalex-hub:feat/b013-sep12-client-446
Open

feat(sep12): SEP-12 PUT/GET /customer client with CustomerStatus types#596
Johnalex-hub wants to merge 1 commit into
ezedike-evan:mainfrom
Johnalex-hub:feat/b013-sep12-client-446

Conversation

@Johnalex-hub

Copy link
Copy Markdown

Summary

Implements B013 — adds a minimal SEP-12 /customer HTTP client to lib/stellar/sep12.ts and required types to types/index.ts.

  • putCustomer(kycServer, jwt, fields) — PUT /customer with JSON body and Bearer auth
  • getCustomer(kycServer, jwt, id?) — GET /customer with optional id query param
  • CustomerStatus type: ACCEPTED | NEEDS_INFO | PROCESSING | REJECTED
  • Sep12CustomerResponse and Sep12CustomerField interfaces in types/index.ts
  • Unknown anchor status strings normalize to NEEDS_INFO, matching SEP-24 status-map convention

Test plan

  • putCustomer sends correct method/headers/body, returns normalized response
  • getCustomer sends correct URL, appends id param when provided
  • Unknown status normalizes to NEEDS_INFO
  • Non-ok responses throw via parseSepErrorBody
  • 12 tests pass (npx vitest run tests/sep12.spec.ts)

Closes #446

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Johnalex-hub is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Johnalex-hub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ezedike-evan ezedike-evan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Two CI failures to fix before this can merge:

  1. Prettier formattingcheck (node 20) fails at the "Prettier formatting" step. Run:

    npx prettier --write lib/stellar/sep12.ts tests/sep12.spec.ts types/index.ts
    
  2. Commitlint — the commit subject line exceeds the 72-character limit. Please shorten it, e.g.:

    feat(sep12): add putCustomer/getCustomer client with CustomerStatus types
    

    (Trim it so the header is ≤72 chars, then amend: git commit --amend --no-edit after fixing the message, and force-push.)

@Johnalex-hub Johnalex-hub force-pushed the feat/b013-sep12-client-446 branch from 7e75c6b to 0661c77 Compare June 28, 2026 22:58
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.

B013: [FEAT] [SEP6] SEP-12 client: PUT/GET /customer + types

2 participants