-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(mothership): reconcile canonical /mint contract, archive sprawl #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,19 +47,18 @@ class ChittyIDClient { | |
| } | ||
|
|
||
| try { | ||
| const response = await fetch(`${this.serverUrl}/api/v2/chittyid/mint`, { | ||
| const response = await fetch(`${this.serverUrl}/mint`, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| Authorization: `Bearer ${this.apiKey}`, | ||
| "X-ChittyOS-Pipeline": "Router→Intake→Trust→Authorization→Generation", | ||
| }, | ||
| body: JSON.stringify({ | ||
| entityType, | ||
| region, | ||
| jurisdiction, | ||
| entity: entityType, | ||
| trustLevel, | ||
|
Comment on lines
59
to
61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| format: "official", | ||
| }), | ||
| }); | ||
|
|
||
|
|
@@ -94,13 +93,13 @@ class ChittyIDClient { | |
| } | ||
|
|
||
| try { | ||
| const response = await fetch(`${this.serverUrl}/api/v2/chittyid/verify`, { | ||
| const response = await fetch(`${this.serverUrl}/api/validate`, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| Authorization: `Bearer ${this.apiKey}`, | ||
| }, | ||
| body: JSON.stringify({ chittyId }), | ||
| body: JSON.stringify({ id: chittyId }), | ||
| }); | ||
|
|
||
| if (!response.ok) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current worker returns a 308 for
/generateand/api/get-chittyid, and 308 preserves the original HTTP method, while the canonical/mintroute only handlesPOST(worker.jslines 467-497). Any client following the documentedGET /generatealias will therefore arrive atGET /mintand get a 404 instead of minting, so these aliases are not backward-compatible as described.Useful? React with 👍 / 👎.