@certen.io/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +298 -185
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +12 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +78 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +112 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/billing.d.ts +63 -0
- package/dist/resources/billing.d.ts.map +1 -0
- package/dist/resources/billing.js +86 -0
- package/dist/resources/billing.js.map +1 -0
- package/dist/resources/execute.d.ts +29 -1
- package/dist/resources/execute.d.ts.map +1 -1
- package/dist/resources/execute.js +23 -1
- package/dist/resources/execute.js.map +1 -1
- package/dist/types.d.ts +112 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,185 +1,298 @@
|
|
|
1
|
-
# Changelog — @certen.io/sdk
|
|
2
|
-
|
|
3
|
-
## 0.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
###
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`
|
|
82
|
-
|
|
83
|
-
`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
1
|
+
# Changelog — @certen.io/sdk
|
|
2
|
+
|
|
3
|
+
## 0.5.0 — balance, funding, and a 402 that carries its own fix
|
|
4
|
+
|
|
5
|
+
### Added — `client.billing`
|
|
6
|
+
|
|
7
|
+
Balance, commitments, and adding funds. Two methods worth reading the docstrings for:
|
|
8
|
+
|
|
9
|
+
`obligations()` returns `remaining_usd` — spendable minus what pending intents will consume — and
|
|
10
|
+
that, not `balance()`, is the number to gate work on. A multi-signature intent can wait weeks for
|
|
11
|
+
quorum, so an account can hold a balance that is entirely committed and still be refused on its
|
|
12
|
+
next call.
|
|
13
|
+
|
|
14
|
+
`waitForPayment()` polls until a deposit is credited or its window closes, and RETURNS the terminal
|
|
15
|
+
status rather than throwing on expiry. An expired payment is an ordinary outcome the caller should
|
|
16
|
+
report, not an exception.
|
|
17
|
+
|
|
18
|
+
Registering a payer address is deliberately absent: it asserts that deposits from a wallet belong to
|
|
19
|
+
your organization, so it stays a signed-in owner/admin action in the portal rather than something a
|
|
20
|
+
machine key can do.
|
|
21
|
+
|
|
22
|
+
### Added — `CertenPaymentRequiredError`, and the response body on every error
|
|
23
|
+
|
|
24
|
+
**Behavioural change: HTTP 402 no longer arrives as `CertenBadRequestError`.** Code that caught
|
|
25
|
+
`CertenBadRequestError` to handle payment failures must catch `CertenPaymentRequiredError` instead.
|
|
26
|
+
The two were worth separating: nothing is wrong with a refused request — it is priced, valid, and
|
|
27
|
+
would succeed once funded — and a host product needs that distinction to choose between a top-up
|
|
28
|
+
prompt and a validation message.
|
|
29
|
+
|
|
30
|
+
The gateway mints a payment target with the refusal, and the SDK was discarding it: `details`
|
|
31
|
+
carried only `retryAfter`, so a body containing an address, an exact amount, a reference and a
|
|
32
|
+
deep link was reduced to a message string. `CertenError.body` now carries the parsed response for
|
|
33
|
+
every error, and the 402 subclass reads it through typed accessors — `shortfallUsd`, `quoteId`,
|
|
34
|
+
`resolution`, `portalUrl`, `cliCommand`, `pendingIntents`, `isCommitmentExceeded`, and a `summary`
|
|
35
|
+
fit to show a person.
|
|
36
|
+
|
|
37
|
+
`summary` exists so callers do not each re-derive the sentence and get the commitment case wrong:
|
|
38
|
+
under `COMMITMENT_EXCEEDED`, waiting for pending intents to settle frees the same capacity, so
|
|
39
|
+
advising only "add funds" is incomplete.
|
|
40
|
+
|
|
41
|
+
Never retryable, and it must not be retried: only money changes the outcome.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Fixed — `execute.contractCall()` now works at all
|
|
45
|
+
|
|
46
|
+
**Breaking, type-level: `contractAddresses` is an object, not `string[]`.**
|
|
47
|
+
|
|
48
|
+
`execute.contractCall()` sent `contract_addresses: [contractCall.target]`. That field is an OBJECT
|
|
49
|
+
naming the CERTEN deployment (`anchor`, `anchorV2`, `abstractAccount`, `entryPoint`, `factory`) — not
|
|
50
|
+
your call target, and not a list. The endpoint rejected every such call with
|
|
51
|
+
`400 /contract_addresses must be object`, so the method had never worked on any chain.
|
|
52
|
+
|
|
53
|
+
It is no longer sent at all: the gateway applies the correct defaults. Pass `contractAddresses` only
|
|
54
|
+
to target a non-standard deployment.
|
|
55
|
+
|
|
56
|
+
Verified against production on base-sepolia: opened, signed and submitted, where the same call
|
|
57
|
+
returned 400 before.
|
|
58
|
+
|
|
59
|
+
### Fixed — `CreateIdentityParams.signingProvider` is an object
|
|
60
|
+
|
|
61
|
+
Declared `string` while the endpoint's schema is `{ type: 'object' }`, so a provider name was
|
|
62
|
+
rejected with a 400 naming a field the caller believed they had set correctly.
|
|
63
|
+
|
|
64
|
+
### Changed — the contract fixture now pins property TYPES
|
|
65
|
+
|
|
66
|
+
Both bugs above are the same class, and the contract test could not see either: it recorded property
|
|
67
|
+
*names* only, so it confirmed `contract_addresses` was an allowed key while the SDK sent it in a
|
|
68
|
+
shape the API rejects. The fixture now records each request property's JSON type and
|
|
69
|
+
`contract.test.ts` asserts it, with `number`/`integer` handled the way JSON Schema does.
|
|
70
|
+
|
|
71
|
+
### Fixed — `execute.transfer()` now works at all
|
|
72
|
+
|
|
73
|
+
**Breaking: `TransferParams.adiUrl` is required.** Not breaking in practice — every call that
|
|
74
|
+
omitted it failed, so there is no working code to break.
|
|
75
|
+
|
|
76
|
+
`execute.transfer()` returned a bodyless `502` on every invocation. The cause was not the gateway
|
|
77
|
+
being down: the upstream native-transfer path requires four fields that **do not appear in the
|
|
78
|
+
transfer shape the API documents** — `adiUrl`, `id`, `initiatedBy` and `timestamp` — and omitting any
|
|
79
|
+
one of them crashes it rather than returning a validation error. `adiUrl` is dereferenced with no
|
|
80
|
+
null check (`TypeError`), and `new Date(intent.timestamp).toISOString()` throws `RangeError` on
|
|
81
|
+
`undefined`. The equivalent multi-leg path defaults the last three for the caller; this one does not.
|
|
82
|
+
|
|
83
|
+
The SDK now supplies all four: you pass `adiUrl`, and `id`, `initiatedBy` and `timestamp` are
|
|
84
|
+
generated. Verified end-to-end against production — intent opened, signed externally, submitted,
|
|
85
|
+
`anchoring` → `completed` in 94s, and the resulting Accumulate transaction confirmed `delivered`
|
|
86
|
+
on kermit.
|
|
87
|
+
|
|
88
|
+
This is a workaround for certenIO/accumulate-api-bridge#1. Once that path defaults the three
|
|
89
|
+
generated fields, they become harmless no-ops rather than load-bearing.
|
|
90
|
+
|
|
91
|
+
`execute.contractCall()` was never affected — it sends the multi-leg shape, which is handled
|
|
92
|
+
correctly upstream.
|
|
93
|
+
|
|
94
|
+
### Changed — `Identity.can_sign` is now `boolean | null`
|
|
95
|
+
|
|
96
|
+
The gateway changed what this field means, and the type follows.
|
|
97
|
+
|
|
98
|
+
It used to be derived from a database column — effectively "was a public key supplied" — so it read
|
|
99
|
+
`true` from the moment the identity row existed. On 2026-08-01 an Accumulate outage killed
|
|
100
|
+
provisioning between "create the ADI under the sponsor key" and "swap the customer's key in",
|
|
101
|
+
leaving an ADI on chain held by the **CERTEN sponsor key** rather than the customer. The gateway
|
|
102
|
+
reported `status: "error"` and `can_sign: true` for it. On the one failure where the distinction
|
|
103
|
+
matters most, the field asserted the reassuring answer.
|
|
104
|
+
|
|
105
|
+
It is now derived from the on-chain key page: is this identity's key hash actually on it?
|
|
106
|
+
|
|
107
|
+
- `true` — the key is on the page. The identity can sign.
|
|
108
|
+
- `false` — the page was read and the key is not on it.
|
|
109
|
+
- **`null` — the page could not be read. Unknown, NOT usable.**
|
|
110
|
+
|
|
111
|
+
**Treat `null` as "do not proceed".** It is deliberately not `true`: an Accumulate outage is exactly
|
|
112
|
+
when a caller most needs to be told the truth is unavailable rather than handed an optimistic
|
|
113
|
+
default. If you were doing `if (identity.can_sign)`, that still behaves correctly — `null` is falsy.
|
|
114
|
+
If you were doing `if (identity.can_sign === false)`, add the null case.
|
|
115
|
+
|
|
116
|
+
## 0.4.0 — a reachable timeout, and error codes that match the documentation
|
|
117
|
+
|
|
118
|
+
Both of these were found by running the SDK against the live gateway. Neither is visible against a
|
|
119
|
+
mock that always answers JSON promptly, which is why neither was caught before.
|
|
120
|
+
|
|
121
|
+
### Added — `timeoutMs` client option
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
const certen = new CertenClient({ apiKey, timeoutMs: 90_000 });
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The per-request timeout was hardcoded at 30s with no way to change it, and the ceiling was reachable
|
|
128
|
+
in ordinary use: `execute.proof()` falls back to fetching the Accumulate merkle receipt, which can
|
|
129
|
+
take longer than 30s. The call failed as `NETWORK_ERROR` and the caller could do nothing about it —
|
|
130
|
+
the SDK reported that a proof could not be retrieved when it existed and was simply slow.
|
|
131
|
+
|
|
132
|
+
This bounds a single HTTP request. It is not `execute.wait()`, which polls to its own budget
|
|
133
|
+
(default 360s).
|
|
134
|
+
|
|
135
|
+
### Changed — `execute.proof()` gets its own budget, and accepts an override
|
|
136
|
+
|
|
137
|
+
Proof fetches now allow 120s rather than the client default, and take an override:
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
await certen.execute.proof(intentId, { timeoutMs: 30_000 });
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Retrieving evidence for an already-completed transaction is the call that should wait rather than
|
|
144
|
+
fail: nothing is pending on it, and the alternative is telling a caller their proof does not exist
|
|
145
|
+
when it does.
|
|
146
|
+
|
|
147
|
+
### Fixed — errors no longer report codes outside the documented catalog
|
|
148
|
+
|
|
149
|
+
An error response with no machine-readable `code` now maps to a documented code by HTTP status
|
|
150
|
+
(`502/503/504 → BAD_GATEWAY`, `500 → INTERNAL_ERROR`, `404 → NOT_FOUND`, and so on). A `code` the
|
|
151
|
+
gateway actually sends always wins; a status with no mapping still reports `UNKNOWN_ERROR`.
|
|
152
|
+
|
|
153
|
+
Previously any non-JSON error body left `data.code` undefined and produced `UNKNOWN_ERROR`. That is
|
|
154
|
+
not hypothetical — an edge-level 502 has a `text/plain` body, so **every edge 502 surfaced as
|
|
155
|
+
`UNKNOWN_ERROR`**, and code branching on `BAD_GATEWAY`, exactly as `docs/errors.md` instructs,
|
|
156
|
+
silently never matched.
|
|
157
|
+
|
|
158
|
+
`isRetryable` is derived from the HTTP status and was always correct, so retry behaviour does not
|
|
159
|
+
change. Only the reported `code` does. If you were special-casing `UNKNOWN_ERROR` to catch 5xx, you
|
|
160
|
+
can now branch on the documented codes instead.
|
|
161
|
+
|
|
162
|
+
## 0.3.1 — documentation links that work off GitHub
|
|
163
|
+
|
|
164
|
+
No code changes.
|
|
165
|
+
|
|
166
|
+
The README linked its guides with repository-relative paths (`../../docs/guides/...`). Those resolve
|
|
167
|
+
on GitHub and are **dead on the npm package page**, which renders the README standalone and where
|
|
168
|
+
`docs/` is not part of the tarball. Every guide link a reader followed from npm 404'd. They now point
|
|
169
|
+
at <https://docs.kompendium.co>, which publishes the same guides.
|
|
170
|
+
|
|
171
|
+
Also adds the documentation and API-key links to the top of the README, and corrects a link to the
|
|
172
|
+
policy signer that pointed at a GitHub org that does not exist.
|
|
173
|
+
|
|
174
|
+
## 0.3.0 — response types now describe what the API actually returns
|
|
175
|
+
|
|
176
|
+
**Breaking, at the type level only. No runtime behavior changed.**
|
|
177
|
+
|
|
178
|
+
Every response interface was camelCase (`intentId`, `signingData.dataToSign`, `adiUrl`,
|
|
179
|
+
`creditBalance`). The API is snake_case, and the resources do `return data` with no transformation —
|
|
180
|
+
so every one of those declared fields was `undefined` at runtime while TypeScript insisted it was a
|
|
181
|
+
`string`. The failure was silent in the worst way: code compiled, ran, and produced `undefined`
|
|
182
|
+
somewhere far from the cause.
|
|
183
|
+
|
|
184
|
+
`execute.*` was never affected. It was written against real responses and reads snake_case directly,
|
|
185
|
+
which is why the one flow that had been exercised end-to-end worked while the typed resources did not.
|
|
186
|
+
|
|
187
|
+
If you were already compensating with `as any` or reading snake_case at runtime, your code was
|
|
188
|
+
correct and keeps working — you can now delete the casts. If you were trusting the types, your code
|
|
189
|
+
was silently broken and will now fail to compile, which is the point.
|
|
190
|
+
|
|
191
|
+
### Changed — all response types are snake_case
|
|
192
|
+
|
|
193
|
+
`IdentityResponse` · `TransactionResponse` · `GovernanceResponse` · `SignResponse` ·
|
|
194
|
+
`PortfolioResponse` · `PendingActionsResponse` · `OrgResponse` · `ApiKeyResponse` ·
|
|
195
|
+
`ApiKeyListItem` · `AuditLogEntry` · `UsageSummaryResponse` · `ChainAccount` · `ChainBalance` ·
|
|
196
|
+
`PortfolioIdentity` · `PendingAction`.
|
|
197
|
+
|
|
198
|
+
### Changed — `create` and `get` no longer share a type
|
|
199
|
+
|
|
200
|
+
`POST /v1/transaction` and `GET /v1/transaction/{id}` return different shapes, and one
|
|
201
|
+
`TransactionResponse` covering both hid it. Same for governance.
|
|
202
|
+
|
|
203
|
+
- `transaction.create` → **`CreateTransactionResponse`** (`intent_id`, `signing_data`, `submit_url`, `idempotent`)
|
|
204
|
+
- `transaction.get` → `TransactionResponse` (`accum_tx_hash`, `proof`, timestamps)
|
|
205
|
+
- `transaction.submitSignature` → **`SubmitSignatureResponse`**
|
|
206
|
+
- `transaction.list` → **`ListTransactionsResponse`**. It declared `{ transactions, pagination }`; the endpoint returns `{ transactions, limit, offset }` and has no pagination object.
|
|
207
|
+
- `governance.create` → **`CreateGovernanceResponse`**, `governance.submitSignature` → **`SubmitGovernanceSignatureResponse`**
|
|
208
|
+
- `sign.submitSignature` → **`SubmitSignSignatureResponse`**
|
|
209
|
+
- `identity.retire` → **`DeleteIdentityResponse`**
|
|
210
|
+
|
|
211
|
+
### Changed — `SigningData` split in two
|
|
212
|
+
|
|
213
|
+
The two endpoints that return signing data carry the bytes under **different names**, and a single
|
|
214
|
+
shared type is what let that go unnoticed:
|
|
215
|
+
|
|
216
|
+
- **`IntentSigningData`** (`POST /v1/transaction`) — the bytes are in **`hash_to_sign`**
|
|
217
|
+
- **`SignRequestSigningData`** (`POST /v1/sign`) — the bytes are in **`data_for_signature`**
|
|
218
|
+
|
|
219
|
+
Both mean the same thing: sign the RAW BYTES of that hex. Do not hash it again; do not sign its
|
|
220
|
+
ASCII. `execute.*` handles the distinction for you.
|
|
221
|
+
|
|
222
|
+
### Added
|
|
223
|
+
|
|
224
|
+
- `Identity` and `DeleteIdentityResponse` types; `can_sign` and `error_message` on `Identity`.
|
|
225
|
+
`can_sign` derives from the on-chain key page, not the provisioning state machine, so it can read
|
|
226
|
+
`true` while `status` is still `creating` — check both.
|
|
227
|
+
- `user_has_signed`, `required_signatures`, `is_ready`, `identity_url` on `PendingAction`, and
|
|
228
|
+
`stats` on `PendingActionsResponse`.
|
|
229
|
+
- **`test/response-shape.test.ts`** — pins every declared response type against the gateway's own
|
|
230
|
+
OpenAPI response schemas. The existing contract test only ever checked the REQUEST direction,
|
|
231
|
+
which is precisely why this drifted. Verified to fail when a camelCase key is reintroduced.
|
|
232
|
+
- **`scripts/build-contract-fixture.mjs`** — regenerates the contract fixture from the live spec.
|
|
233
|
+
The old fixture was hand-shaped and captured no responses at all; the test file said "then
|
|
234
|
+
regenerate the fixture" without saying how.
|
|
235
|
+
|
|
236
|
+
## 0.2.0 — first published version
|
|
237
|
+
|
|
238
|
+
**0.1.0 was never published.** Three of its methods could not work against the live API. They were found
|
|
239
|
+
while preparing the package for release, by comparing what the SDK sends against the gateway's own OpenAPI
|
|
240
|
+
spec. Nothing in the existing test suite could have caught them: those tests exercise retry, idempotency,
|
|
241
|
+
and error mapping against a local mock that accepts any body, and a mock answering 200 to anything will
|
|
242
|
+
never tell you the request was wrong.
|
|
243
|
+
|
|
244
|
+
### Fixed — methods that could not work
|
|
245
|
+
|
|
246
|
+
- **`transaction.create` sent no `intent`.** It sent a flat `{ type, to, amount, token, chain, memo }` body.
|
|
247
|
+
`POST /v1/transaction` requires `identity_id` and `intent`, and accepts none of those six fields — so every
|
|
248
|
+
call returned 400. Now takes `{ identityId, intent, contractAddresses?, proofClass?, signerKeyPage?,
|
|
249
|
+
signerPublicKey?, idempotencyKey? }`, matching the API, including multi-leg and `contractCall` intents.
|
|
250
|
+
- **`governance.create` omitted both required fields.** It sent `{ identity_id, operation_type, payload }`;
|
|
251
|
+
the API requires `identity` (the ADI, not a uuid) and `operations` (an **array**, so several changes are
|
|
252
|
+
authorized under one quorum). Every call returned 400.
|
|
253
|
+
- **`identity.list` called a route that does not exist.** `GET /v1/identities` returns 404 — the gateway has
|
|
254
|
+
no plural collection route. **Removed** rather than shipped as a dead method. Track the ids you create.
|
|
255
|
+
|
|
256
|
+
### Fixed — silent no-ops
|
|
257
|
+
|
|
258
|
+
- **`identity.create` no longer sends `webhook_url`.** `POST /v1/identity` does not accept it, and Fastify
|
|
259
|
+
strips unknown properties, so the option did nothing while appearing to work. Set it via `identity.update()`,
|
|
260
|
+
which does accept it. `create` now also supports `signingMode`, `signingProvider`, and `idempotencyKey`.
|
|
261
|
+
- **`identity.get` no longer sends an `include` query parameter.** The route takes none; it was ignored.
|
|
262
|
+
|
|
263
|
+
### Added
|
|
264
|
+
|
|
265
|
+
- **`identity.retire(id)`** — `DELETE /v1/identity/{id}`, which frees the org's identity quota. Soft delete
|
|
266
|
+
inside Certen only: the on-chain ADI, key book, and key page are untouched.
|
|
267
|
+
- **`DEFAULT_BASE_URL` is exported**, and the base URL now resolves `options.baseUrl` → `$CERTEN_API_URL` →
|
|
268
|
+
`https://gateway.kompendium.co`. The previous default was `https://api.certen.io`, which resolves — to the
|
|
269
|
+
Certen marketing site. A client built without an explicit `baseUrl` returned HTML for every call.
|
|
270
|
+
- **`test/contract.test.ts`** — validates the request every method produces against a vendored snapshot of
|
|
271
|
+
the gateway's OpenAPI spec: path exists, method exists, required fields present, no field the endpoint
|
|
272
|
+
would strip. This is the guard that would have caught all of the above. Refresh it with the command at the
|
|
273
|
+
bottom of this file when the API changes.
|
|
274
|
+
- Publish metadata: `files`, `exports`, `engines`, repository, keywords, `prepack` build, README, LICENSE.
|
|
275
|
+
|
|
276
|
+
### Changed
|
|
277
|
+
|
|
278
|
+
- `license` corrected to **MIT**. `package.json` claimed Apache-2.0 while `LICENSE` is MIT.
|
|
279
|
+
|
|
280
|
+
## Also fixed, in the gateway
|
|
281
|
+
|
|
282
|
+
Six routes — `/v1/transactions`, `/v1/pending`, `/v1/portfolio`, `/v1/admin/usage`, `/v1/admin/audit-log`,
|
|
283
|
+
and `/v1/admin/webhooks/deliveries` — read query parameters but declared no `querystring` schema, so
|
|
284
|
+
`@fastify/swagger` emitted no `parameters` and the spec reported that they took none.
|
|
285
|
+
|
|
286
|
+
The routes worked. The damage was to everyone reading the spec instead of the source: a client generated
|
|
287
|
+
from it had no paging at all, and `/v1/pending` silently lost the `identity` and `category` filters a signer
|
|
288
|
+
needs to find its own work. All six now declare their parameters, guarded on both sides —
|
|
289
|
+
`test/integration/openapi-snapshot.test.ts` in the gateway, and `test/contract.test.ts` here.
|
|
290
|
+
|
|
291
|
+
Refresh this package's contract fixture after an API change, from the gateway root:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
REGEN_SDK_CONTRACT=1 npx vitest run test/integration/openapi-snapshot.test.ts
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
The fixture is generated from `buildServer()` rather than from the deployed gateway on purpose: the SDK
|
|
298
|
+
must be tested against the code it ships beside, not against whatever happens to be live.
|
package/dist/client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { GovernanceResource } from './resources/governance.js';
|
|
|
4
4
|
import { PendingResource } from './resources/pending.js';
|
|
5
5
|
import { SignResource } from './resources/sign.js';
|
|
6
6
|
import { PortfolioResource } from './resources/portfolio.js';
|
|
7
|
+
import { BillingResource } from './resources/billing.js';
|
|
7
8
|
import { AdminResource } from './resources/admin.js';
|
|
8
9
|
import { ExecuteResource } from './resources/execute.js';
|
|
9
10
|
import type { CertenClientOptions } from './types.js';
|
|
@@ -33,6 +34,8 @@ export declare class CertenClient {
|
|
|
33
34
|
sign: SignResource;
|
|
34
35
|
portfolio: PortfolioResource;
|
|
35
36
|
admin: AdminResource;
|
|
37
|
+
/** Balance, commitments, and adding funds. See resources/billing.ts. */
|
|
38
|
+
billing: BillingResource;
|
|
36
39
|
/** The proof-gated execution flow as one call: open, sign, submit, poll, prove. See resources/execute.ts. */
|
|
37
40
|
execute: ExecuteResource;
|
|
38
41
|
constructor(options: CertenClientOptions & {
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],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AAO,EAAE,mBAAmB,GAAG;QACzC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB;;qEAE6D;QAC7D,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B;;;;;;;;;WASG;QACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;KAC7C;CAkHF;AAWD;;;;;;;GAOG;AACH,wBAAuB,QAAQ,CAAC,CAAC,EAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACrF,QAAQ,SAAM,GACb,qBAAqB,CAAC,CAAC,CAAC,CAQ1B;AAED,wBAAuB,iBAAiB,CAAC,CAAC,EACxC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACrF,QAAQ,SAAM,GACb,qBAAqB,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,CAU9E"}
|
package/dist/client.js
CHANGED
|
@@ -7,6 +7,7 @@ import { GovernanceResource } from './resources/governance.js';
|
|
|
7
7
|
import { PendingResource } from './resources/pending.js';
|
|
8
8
|
import { SignResource } from './resources/sign.js';
|
|
9
9
|
import { PortfolioResource } from './resources/portfolio.js';
|
|
10
|
+
import { BillingResource } from './resources/billing.js';
|
|
10
11
|
import { AdminResource } from './resources/admin.js';
|
|
11
12
|
import { ExecuteResource } from './resources/execute.js';
|
|
12
13
|
/**
|
|
@@ -73,6 +74,8 @@ export class CertenClient {
|
|
|
73
74
|
sign;
|
|
74
75
|
portfolio;
|
|
75
76
|
admin;
|
|
77
|
+
/** Balance, commitments, and adding funds. See resources/billing.ts. */
|
|
78
|
+
billing;
|
|
76
79
|
/** The proof-gated execution flow as one call: open, sign, submit, poll, prove. See resources/execute.ts. */
|
|
77
80
|
execute;
|
|
78
81
|
constructor(options) {
|
|
@@ -146,7 +149,14 @@ export class CertenClient {
|
|
|
146
149
|
if (status === 429 && typeof retryAfter === 'string') {
|
|
147
150
|
this.rateLimit.resetAt = Date.now() + Number(retryAfter) * 1000;
|
|
148
151
|
}
|
|
149
|
-
|
|
152
|
+
// The parsed body travels with the error. A 402 carries a payment target,
|
|
153
|
+
// and dropping the body reduced it to a message string the caller could
|
|
154
|
+
// only regex. Only objects are passed on: a string body (HTML error page)
|
|
155
|
+
// would give typed accessors something meaningless to read.
|
|
156
|
+
const parsedBody = typeof body === 'object' && body !== null ? body : undefined;
|
|
157
|
+
const wrapped = CertenError.fromAxios(message, status, code, {
|
|
158
|
+
requestId, details, body: parsedBody,
|
|
159
|
+
});
|
|
150
160
|
// Retry transient failures with exponential backoff + jitter.
|
|
151
161
|
if (cfg && wrapped.isRetryable) {
|
|
152
162
|
cfg.__retryCount = (cfg.__retryCount ?? 0) + 1;
|
|
@@ -166,6 +176,7 @@ export class CertenClient {
|
|
|
166
176
|
this.sign = new SignResource(this.http);
|
|
167
177
|
this.portfolio = new PortfolioResource(this.http);
|
|
168
178
|
this.admin = new AdminResource(this.http);
|
|
179
|
+
this.billing = new BillingResource(this.http);
|
|
169
180
|
this.execute = new ExecuteResource(this.http, generateIdempotencyKey);
|
|
170
181
|
}
|
|
171
182
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO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