@stable_sea/sdk 0.1.3 → 0.1.4
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/README.md +29 -0
- package/dist/gen/schema.d.ts +358 -18
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -34,6 +34,27 @@ carries fixed scopes, so do not send a `Stable-Sea-Account` header.
|
|
|
34
34
|
| SDK | API contract | Credentials |
|
|
35
35
|
|---|---|---|
|
|
36
36
|
| `0.1.x` | `2026-07-23` | `sk_live_…` on production |
|
|
37
|
+
| `0.1.x` | `2026-07-23` | `sk_test_…` on sandbox |
|
|
38
|
+
|
|
39
|
+
API access enables both Live and Sandbox. In Terminal, open **API keys** and
|
|
40
|
+
create a key under **Test keys**. Set `baseUrl` to
|
|
41
|
+
`https://sandbox-api.stablesea.com` and use that `sk_test_…` key. The same client,
|
|
42
|
+
contract and idempotency rules apply.
|
|
43
|
+
See the [sandbox quickstart](https://docs.stablesea.com/api/#sandbox) for simple
|
|
44
|
+
instructions and the downloadable SDK test project.
|
|
45
|
+
|
|
46
|
+
Sandbox uses synthetic balances and simulated financial partners; it cannot move
|
|
47
|
+
real money. Production refuses Test credentials, and the stable sandbox refuses
|
|
48
|
+
Live credentials. Create, rotate and revoke both kinds of keys in the same
|
|
49
|
+
Terminal pane with the same business permissions. Live keys require a fresh
|
|
50
|
+
two-factor code; Test keys do not. The first
|
|
51
|
+
Test key prepares isolated balances of 100,000 USDC and 50,000 WTGXX; additional
|
|
52
|
+
keys and rotations reuse that data.
|
|
53
|
+
|
|
54
|
+
Available funds and settlement modes follow the production contract: WTGXX
|
|
55
|
+
supports standard and instant settlement; FLTTX uses standard settlement. An
|
|
56
|
+
unsupported instant order must produce the normal refusal rather than simulated
|
|
57
|
+
liquidity that would not exist in production.
|
|
37
58
|
|
|
38
59
|
## Idempotent writes
|
|
39
60
|
|
|
@@ -69,3 +90,11 @@ const valid = await verifyWebhookSignature(
|
|
|
69
90
|
API request, response, pagination, and error types are generated from
|
|
70
91
|
`services/backend/api/openapi.public.json` and exported as `paths`, `operations`,
|
|
71
92
|
and `components`.
|
|
93
|
+
|
|
94
|
+
## Contract changes
|
|
95
|
+
|
|
96
|
+
- `GET /v1/balances`: `chain` gains the value `solana`. A USDC balance held on
|
|
97
|
+
Solana (`segregated_rail: onchain_solana`) now reports `chain: "solana"`;
|
|
98
|
+
before this it reported `chain: "unknown"`. Code that switches on `chain`
|
|
99
|
+
should accept the new value, and code that keyed a Solana balance by its
|
|
100
|
+
`unknown` row should expect the `solana` row instead.
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -153,7 +153,9 @@ export interface paths {
|
|
|
153
153
|
* List events
|
|
154
154
|
* @description Lists the events recorded for the platform, newest first.
|
|
155
155
|
*
|
|
156
|
-
* SCOPING. The response covers every event this credential recorded, so one cursor sweep reconciles everything. There is no narrower scope to ask for: one credential addresses one business.
|
|
156
|
+
* SCOPING. The response covers every event this credential recorded except those about pay-ins and payouts, so one cursor sweep reconciles everything this API serves. There is no narrower scope to ask for: one credential addresses one business.
|
|
157
|
+
*
|
|
158
|
+
* PAY-INS AND PAYOUTS ARE NOT SERVED. An event about a pay-in or a payout is never listed, and neither is one about a held deposit, which has no /v1 transaction. That holds for events recorded before this API stopped serving payments as well. A withheld event is answered like an id that names no event, and a cursor that names one is refused like a cursor that names no event, so restart from the newest page by sending no cursor.
|
|
157
159
|
*
|
|
158
160
|
* FRESHNESS. An event becomes listable 60 seconds after its created_ts. Inside that window it can be retrieved by id but is not returned here. Once a page has been served, the range it covers is complete and final: no older event can appear behind a cursor that has already passed it. Retrieval by id is not lagged.
|
|
159
161
|
*
|
|
@@ -183,7 +185,7 @@ export interface paths {
|
|
|
183
185
|
*
|
|
184
186
|
* FRESHNESS. Retrieval is not lagged: an event is readable as soon as it is recorded, including during the 60 seconds before it becomes listable.
|
|
185
187
|
*
|
|
186
|
-
* SCOPING. Any event this credential recorded may be retrieved, and nothing else. An id that names no event, one belonging to another business,
|
|
188
|
+
* SCOPING. Any event this credential recorded may be retrieved, and nothing else, with one exclusion: an event about a pay-in, a payout or a held deposit is not served, because this API never serves those. An id that names no event, one belonging to another business, one recorded in the other environment, and one withheld for that reason are answered identically.
|
|
187
189
|
*
|
|
188
190
|
* RETENTION. An event remains retrievable for at least 90 days after it is recorded.
|
|
189
191
|
*/
|
|
@@ -196,6 +198,56 @@ export interface paths {
|
|
|
196
198
|
patch?: never;
|
|
197
199
|
trace?: never;
|
|
198
200
|
};
|
|
201
|
+
"/v1/external_wallets": {
|
|
202
|
+
parameters: {
|
|
203
|
+
query?: never;
|
|
204
|
+
header?: never;
|
|
205
|
+
path?: never;
|
|
206
|
+
cookie?: never;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* List external wallets
|
|
210
|
+
* @description Lists the external wallets the business has connected: the addresses it whitelisted for withdrawals, each with the latest on-chain holdings of the tokens Stable Sea tracks.
|
|
211
|
+
*
|
|
212
|
+
* THESE ARE NOT STABLE SEA BALANCES. holdings is read from the chain and describes the address; it is not money Stable Sea holds, and it is never part of /v1/balances.
|
|
213
|
+
*
|
|
214
|
+
* HOLDINGS ARE READ ONLY FOR MONITORED WALLETS: enabled, cleared for withdrawals, and on a network we read (Ethereum, Stellar). Every other wallet is still listed, with holdings_status not_monitored and no holdings. Holdings are read in the background every few minutes, not on request. A reading is served for at most 15 minutes: holdings_status is ok when the latest read succeeded and stale when it failed and the last good reading is shown, and holdings_read_ts says when it was read. unavailable means there is no reading, not that the wallet is empty. A Stellar address with a memo is a shared deposit address and is answered shared_address.
|
|
215
|
+
*
|
|
216
|
+
* PAGING. limit defaults to 10 and may not exceed 100; a larger value is rejected rather than reduced. starting_after and ending_before each take an external wallet id and cannot be combined. Wallets are ordered newest first by created_ts, ties by id. A cursor that names no current wallet is rejected rather than ignored.
|
|
217
|
+
*/
|
|
218
|
+
get: operations["external_wallets.list"];
|
|
219
|
+
put?: never;
|
|
220
|
+
post?: never;
|
|
221
|
+
delete?: never;
|
|
222
|
+
options?: never;
|
|
223
|
+
head?: never;
|
|
224
|
+
patch?: never;
|
|
225
|
+
trace?: never;
|
|
226
|
+
};
|
|
227
|
+
"/v1/external_wallets/{id}": {
|
|
228
|
+
parameters: {
|
|
229
|
+
query?: never;
|
|
230
|
+
header?: never;
|
|
231
|
+
path?: never;
|
|
232
|
+
cookie?: never;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Retrieve an external wallet
|
|
236
|
+
* @description Retrieves one external wallet by id, with its latest on-chain holdings when the wallet is monitored.
|
|
237
|
+
*
|
|
238
|
+
* holdings is read from the chain and is not money Stable Sea holds. See the listing for what each holdings_status means.
|
|
239
|
+
*
|
|
240
|
+
* SCOPING. Any wallet this credential's business has connected may be retrieved, and nothing else. An id that names no wallet, one belonging to another business, and one whose wallet has been removed are answered identically.
|
|
241
|
+
*/
|
|
242
|
+
get: operations["external_wallets.get"];
|
|
243
|
+
put?: never;
|
|
244
|
+
post?: never;
|
|
245
|
+
delete?: never;
|
|
246
|
+
options?: never;
|
|
247
|
+
head?: never;
|
|
248
|
+
patch?: never;
|
|
249
|
+
trace?: never;
|
|
250
|
+
};
|
|
199
251
|
"/v1/notifications": {
|
|
200
252
|
parameters: {
|
|
201
253
|
query?: never;
|
|
@@ -225,7 +277,7 @@ export interface paths {
|
|
|
225
277
|
};
|
|
226
278
|
/**
|
|
227
279
|
* Retrieve a notification
|
|
228
|
-
* @description Returns one eligible business-wide notice by id. Other businesses' and excluded notices are indistinguishable from unknown ids. A test credential cannot read live notices.
|
|
280
|
+
* @description Returns one eligible business-wide notice by id. Other businesses' and excluded notices are indistinguishable from unknown ids. A test credential cannot read live notices. Notifications already announced in the credential environment remain retrievable after a ledger-mode cutover.
|
|
229
281
|
*/
|
|
230
282
|
get: operations["notifications.retrieve"];
|
|
231
283
|
put?: never;
|
|
@@ -284,6 +336,26 @@ export interface paths {
|
|
|
284
336
|
patch?: never;
|
|
285
337
|
trace?: never;
|
|
286
338
|
};
|
|
339
|
+
"/v1/policies": {
|
|
340
|
+
parameters: {
|
|
341
|
+
query?: never;
|
|
342
|
+
header?: never;
|
|
343
|
+
path?: never;
|
|
344
|
+
cookie?: never;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Read effective money controls
|
|
348
|
+
* @description Read the authenticated business's movement switches, effective calendar/rolling limits and outgoing approval tiers. No policy or financial writes. These are current observations, not a transfer authorization. No withdrawal endpoint is enabled by this read. Delay/cooloff report supported=false; null limits mean no flow-wide cap, not unavailable data. Highest matching approval minimum applies when USD valuation is known. If USD valuation is unavailable for an on-chain withdrawal or fund trade, the highest configured approval rule for that flow applies regardless of amount. Changed pending policies require resubmission.
|
|
349
|
+
*/
|
|
350
|
+
get: operations["policies.snapshot"];
|
|
351
|
+
put?: never;
|
|
352
|
+
post?: never;
|
|
353
|
+
delete?: never;
|
|
354
|
+
options?: never;
|
|
355
|
+
head?: never;
|
|
356
|
+
patch?: never;
|
|
357
|
+
trace?: never;
|
|
358
|
+
};
|
|
287
359
|
"/v1/quotes": {
|
|
288
360
|
parameters: {
|
|
289
361
|
query?: never;
|
|
@@ -377,7 +449,7 @@ export interface paths {
|
|
|
377
449
|
};
|
|
378
450
|
/**
|
|
379
451
|
* Retrieve statement content
|
|
380
|
-
* @description Returns the immutable issued statement values as display-ready JSON. Corrected statements remain retrievable and name their replacement.
|
|
452
|
+
* @description Returns the immutable issued statement values as display-ready JSON. Corrected statements remain retrievable and name their replacement. Pay-ins and payouts are not served on this API, so they are not listed in transactions; the balances and totals are the printed ones and still include their effect, which means a statement for a period in which the business made a payment does not reconcile from its transactions alone.
|
|
381
453
|
*/
|
|
382
454
|
get: operations["statements.content.retrieve"];
|
|
383
455
|
put?: never;
|
|
@@ -399,11 +471,13 @@ export interface paths {
|
|
|
399
471
|
* List transactions
|
|
400
472
|
* @description Lists the business's money movements, newest first.
|
|
401
473
|
*
|
|
402
|
-
* SCOPING. The response covers every movement booked for this credential's business, so one cursor sweep reconciles everything. There is no narrower scope to ask for: one credential addresses one business.
|
|
474
|
+
* SCOPING. The response covers every movement booked for this credential's business except the pay-ins and payouts described below, so one cursor sweep reconciles everything this API serves. There is no narrower scope to ask for: one credential addresses one business.
|
|
475
|
+
*
|
|
476
|
+
* WHAT A ROW IS. One row is one MOVEMENT — the whole operation, not its ledger legs. asset_changes carries its signed net effect on the business's own holdings, one entry per asset: negative left, positive arrived. Amounts are net of the ledger's fees and taxes, on the same basis /v1/balances reports. Legs that touch accounts /v1/balances does not report are left out — a bank account, a whitelisted withdrawal address — and so are legs that failed, which never reached a balance.
|
|
403
477
|
*
|
|
404
|
-
*
|
|
478
|
+
* PAY-INS AND PAYOUTS ARE NOT SERVED. This API never lists a pay-in or a payout — not as a row here, not as a statement entry, not as an event — for any business, whatever its Payments settings say. Payments are managed in the dashboard, not on this API.
|
|
405
479
|
*
|
|
406
|
-
* RECONCILING AGAINST /v1/balances.
|
|
480
|
+
* RECONCILING AGAINST /v1/balances. For a business with no pay-ins or payouts, sum an asset's amounts across EVERY transaction, with no filter on status, and the total is the movement in that asset's settled balance. Do not restrict the sum to completed transactions: asset_changes reports what has SETTLED, which is not the same fact as the movement's status. A movement whose legs are still in flight reports no change at all, even one already marked processing; a movement that FAILED after part of it settled reports the part that settled, because that money really moved. THE EXCEPTION IS PAYMENTS: /v1/balances and a statement's totals still include the effect of a pay-in or payout, but this listing does not serve the movement. A business with payment movements therefore cannot reconcile its balance from /v1/transactions alone — the transactions sum short by exactly its payments.
|
|
407
481
|
*
|
|
408
482
|
* STATUS. pending means no leg has been picked up yet. processing means at least one leg is in flight. completed means every leg settled, and completed_ts is the instant the last one did. failed means the movement terminated without settling, and failed_ts is when. The two non-terminal states are reported separately because they call for opposite responses: a movement nothing has touched may be worth chasing, one already in flight must be left alone.
|
|
409
483
|
*
|
|
@@ -437,7 +511,7 @@ export interface paths {
|
|
|
437
511
|
*
|
|
438
512
|
* FIGURES. asset_changes is the signed net effect on the business's OWN SETTLED holdings, one entry per asset: negative left, positive arrived. Amounts are net of the ledger's fees and taxes, on the same basis /v1/balances reports. Legs touching accounts /v1/balances does not report are left out, and so are legs that failed — a failed leg never reached a balance.
|
|
439
513
|
*
|
|
440
|
-
* IT REPORTS WHAT SETTLED, NOT WHAT THE STATUS SAYS. A movement still in flight reports no change at all, because none of its legs has reached a balance yet. A movement that failed after part of it settled reports the part that settled. One whose every leg failed reports no change.
|
|
514
|
+
* IT REPORTS WHAT SETTLED, NOT WHAT THE STATUS SAYS. A movement still in flight reports no change at all, because none of its legs has reached a balance yet. A movement that failed after part of it settled reports the part that settled. One whose every leg failed reports no change. For a business with no pay-ins or payouts, sum an asset's amounts across every transaction — with no filter on status — to reconcile against /v1/balances. Pay-ins and payouts are never served on this API, though /v1/balances still includes their effect, so a business with payment movements cannot reconcile its balance from /v1/transactions alone.
|
|
441
515
|
*
|
|
442
516
|
* STATUS. The four states are pending, processing, completed and failed. completed_ts and failed_ts are mutually exclusive, and neither is present while the movement is in flight.
|
|
443
517
|
*
|
|
@@ -509,7 +583,7 @@ export interface paths {
|
|
|
509
583
|
};
|
|
510
584
|
/**
|
|
511
585
|
* List webhook deliveries
|
|
512
|
-
* @description Lists secret-free delivery health for an endpoint, newest first. limit defaults to 10 and may not exceed 100. starting_after and ending_before are mutually exclusive.
|
|
586
|
+
* @description Lists secret-free delivery health for an endpoint, newest first. limit defaults to 10 and may not exceed 100. starting_after and ending_before are mutually exclusive. Deliveries of events about pay-ins and payouts (and held deposits, which have no /v1 transaction) are not served, and none is sent. A cursor that names a withheld delivery is refused like a cursor that names no delivery, so restart from the newest page by sending no cursor.
|
|
513
587
|
*/
|
|
514
588
|
get: operations["webhook_deliveries.list"];
|
|
515
589
|
put?: never;
|
|
@@ -529,7 +603,7 @@ export interface paths {
|
|
|
529
603
|
};
|
|
530
604
|
/**
|
|
531
605
|
* Retrieve a webhook delivery
|
|
532
|
-
* @description Retrieves delivery health for one endpoint and event.
|
|
606
|
+
* @description Retrieves delivery health for one endpoint and event. Deliveries of events about pay-ins and payouts (and held deposits, which have no /v1 transaction) are not served, and none is sent. Asking for one is answered like an id that names no delivery.
|
|
533
607
|
*/
|
|
534
608
|
get: operations["webhook_deliveries.get"];
|
|
535
609
|
put?: never;
|
|
@@ -551,7 +625,7 @@ export interface paths {
|
|
|
551
625
|
put?: never;
|
|
552
626
|
/**
|
|
553
627
|
* Replay a webhook delivery
|
|
554
|
-
* @description Requeues one dead webhook delivery using its original event and endpoint revision, with a new three-day retry window.
|
|
628
|
+
* @description Requeues one dead webhook delivery using its original event and endpoint revision, with a new three-day retry window. Deliveries of events about pay-ins and payouts (and held deposits, which have no /v1 transaction) are not served, and none is sent. Asking to replay one is answered like an id that names no delivery, and nothing is requeued.
|
|
555
629
|
*/
|
|
556
630
|
post: operations["webhook_deliveries.replay"];
|
|
557
631
|
delete?: never;
|
|
@@ -648,7 +722,7 @@ export interface components {
|
|
|
648
722
|
* @description The network this holding sits on. off_chain is the chain-agnostic omnibus balance; unknown means the chain could not be attributed, and the holding is reported anyway rather than dropped.
|
|
649
723
|
* @enum {string}
|
|
650
724
|
*/
|
|
651
|
-
chain: "off_chain" | "ethereum" | "arbitrum" | "base" | "stellar" | "unknown";
|
|
725
|
+
chain: "off_chain" | "ethereum" | "arbitrum" | "base" | "stellar" | "solana" | "unknown";
|
|
652
726
|
/**
|
|
653
727
|
* Format: date-time
|
|
654
728
|
* @description The instant the ledger was cut and the assets were priced. Every figure below is as of this instant.
|
|
@@ -656,7 +730,7 @@ export interface components {
|
|
|
656
730
|
created_ts: string;
|
|
657
731
|
/** @description The balance id. Derived from (business, chain, source, asset, segregated rail), so it is stable across reads and safe to diff against. */
|
|
658
732
|
id: string;
|
|
659
|
-
/** @description
|
|
733
|
+
/** @description False only for an isolated mock-money-only ledger; independent of the reading credential. */
|
|
660
734
|
livemode: boolean;
|
|
661
735
|
/** @enum {string} */
|
|
662
736
|
object: "balance";
|
|
@@ -747,6 +821,68 @@ export interface components {
|
|
|
747
821
|
};
|
|
748
822
|
/** @enum {string} */
|
|
749
823
|
EventTypeName: "notification.created" | "order.updated" | "transaction.created" | "transaction.updated";
|
|
824
|
+
ExternalWallet: {
|
|
825
|
+
/** @description The wallet's on-chain address, exactly as the business connected it. */
|
|
826
|
+
address: string;
|
|
827
|
+
/**
|
|
828
|
+
* Format: date-time
|
|
829
|
+
* @description When the wallet was connected. The list is ordered and paged on this instant.
|
|
830
|
+
*/
|
|
831
|
+
created_ts: string;
|
|
832
|
+
/**
|
|
833
|
+
* Format: uri
|
|
834
|
+
* @description The address's page on a public block explorer. Absent when the network has none.
|
|
835
|
+
*/
|
|
836
|
+
explorer_url?: string;
|
|
837
|
+
/** @description The wallet's non-zero holdings of the tokens Stable Sea tracks, read from the chain. Only populated when holdings_status is ok or stale; an ok reading with no entries means the wallet holds none of those tokens. These are not funds Stable Sea holds, and they are never part of /v1/balances. */
|
|
838
|
+
holdings: components["schemas"]["ExternalWalletHolding"][];
|
|
839
|
+
/**
|
|
840
|
+
* Format: date-time
|
|
841
|
+
* @description When holdings was read from the chain. Present only when holdings_status is ok or stale.
|
|
842
|
+
*/
|
|
843
|
+
holdings_read_ts?: string;
|
|
844
|
+
/**
|
|
845
|
+
* @description Whether holdings carries a reading. ok: the latest read succeeded. stale: the latest read failed, and holdings is the last good read. Either way holdings_read_ts says when it was read, and it is at most 15 minutes old. unavailable: no good read within 15 minutes; holdings is empty, which says nothing about what the wallet holds. shared_address: a Stellar address with a memo, which holds other people's funds and is never read. not_monitored: the wallet's holdings are not read, because it is disabled, on a network we do not monitor, or not yet cleared for withdrawals.
|
|
846
|
+
* @enum {string}
|
|
847
|
+
*/
|
|
848
|
+
holdings_status: "ok" | "stale" | "unavailable" | "shared_address" | "not_monitored";
|
|
849
|
+
/** @description The external wallet id. Stable for the life of the wallet and safe to store. */
|
|
850
|
+
id: string;
|
|
851
|
+
/** @description False only under the validated mock-money-only profile; independent of the reading credential. */
|
|
852
|
+
livemode: boolean;
|
|
853
|
+
/** @description The Stellar memo the business attached to the address. Absent when there is none. A wallet with a memo is a shared deposit address, such as an exchange's, and its holdings are never read. */
|
|
854
|
+
memo?: string;
|
|
855
|
+
/** @enum {string} */
|
|
856
|
+
object: "external_wallet";
|
|
857
|
+
/** @description The network the wallet is on, as a withdrawal rail (onchain_ethereum, onchain_stellar). */
|
|
858
|
+
payment_rail: string;
|
|
859
|
+
/**
|
|
860
|
+
* @description enabled: the business has the wallet switched on as a withdrawal destination (a withdrawal to it can still be held for review). disabled: the business switched it off, and withdrawals to it are refused until it is enabled again.
|
|
861
|
+
* @enum {string}
|
|
862
|
+
*/
|
|
863
|
+
status: "enabled" | "disabled";
|
|
864
|
+
};
|
|
865
|
+
ExternalWalletHolding: {
|
|
866
|
+
/** @description The quantity held, in the token's own units. Exact, never rounded, and always above zero. */
|
|
867
|
+
amount: string;
|
|
868
|
+
/** @description The token's on-chain identity: the ERC-20 contract address on Ethereum, CODE:ISSUER on Stellar. Two tokens can share a symbol; this cannot. */
|
|
869
|
+
asset_ref: string;
|
|
870
|
+
/** @description The token's symbol (USDC, WTGXX). */
|
|
871
|
+
symbol: string;
|
|
872
|
+
/** @description The holding valued in USD, to the cent. null when valuation_basis is none: a token we do not value carries no dollar figure rather than a zero. */
|
|
873
|
+
usd_value: string | null;
|
|
874
|
+
/**
|
|
875
|
+
* @description How usd_value was reached. pegged: valued at 1.00 USD per unit, the fixed value Stable Sea's own ledger gives this asset. assumed_par: a USD stablecoin Stable Sea does not price, valued at 1.00 USD per unit by assumption. none: no price source, so not valued. usd_value is for display and is never part of a Stable Sea balance.
|
|
876
|
+
* @enum {string}
|
|
877
|
+
*/
|
|
878
|
+
valuation_basis: "pegged" | "assumed_par" | "none";
|
|
879
|
+
};
|
|
880
|
+
ExternalWalletList: {
|
|
881
|
+
data: components["schemas"]["ExternalWallet"][];
|
|
882
|
+
has_more: boolean;
|
|
883
|
+
/** @enum {string} */
|
|
884
|
+
object: "list";
|
|
885
|
+
};
|
|
750
886
|
List: {
|
|
751
887
|
data: components["schemas"]["Resource"][];
|
|
752
888
|
has_more: boolean;
|
|
@@ -826,6 +962,112 @@ export interface components {
|
|
|
826
962
|
/** @enum {string} */
|
|
827
963
|
object: "list";
|
|
828
964
|
};
|
|
965
|
+
Policy: {
|
|
966
|
+
/** @description If USD valuation is unavailable for an on-chain withdrawal or fund trade, the highest configured approval rule for that flow applies regardless of amount. */
|
|
967
|
+
approval_tiers: components["schemas"]["PolicyApprovalTier"][];
|
|
968
|
+
/** @description The business's movement switch; not a guarantee that identity, compliance, asset or partner checks will permit execution. */
|
|
969
|
+
enabled: boolean;
|
|
970
|
+
limits: components["schemas"]["PolicyLimits"];
|
|
971
|
+
new_destination_cooloff: {
|
|
972
|
+
/** @description False: this control has not been implemented. */
|
|
973
|
+
supported: boolean;
|
|
974
|
+
};
|
|
975
|
+
/** @enum {string} */
|
|
976
|
+
object: "policy";
|
|
977
|
+
rail: string;
|
|
978
|
+
release_delay: {
|
|
979
|
+
/** @description False: this control has not been implemented. */
|
|
980
|
+
supported: boolean;
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
/** @enum {string} */
|
|
984
|
+
PolicyApprovalFlow: "ach_withdrawal" | "wire_withdrawal" | "onchain_withdrawal" | "fund_buy" | "fund_sell";
|
|
985
|
+
PolicyApprovalTier: {
|
|
986
|
+
/** Format: int32 */
|
|
987
|
+
approvals_required: number;
|
|
988
|
+
/** @enum {string} */
|
|
989
|
+
flow: "ach_withdrawal" | "wire_withdrawal" | "onchain_withdrawal" | "fund_buy" | "fund_sell";
|
|
990
|
+
/** @description Legacy thresholds may require strictly greater than min_usd; current rules are inclusive. */
|
|
991
|
+
min_inclusive: boolean;
|
|
992
|
+
min_usd: string;
|
|
993
|
+
/** @description An additional named approval is required. Ordinary counts exclude both requester and named approver. */
|
|
994
|
+
named_approval_required: boolean;
|
|
995
|
+
};
|
|
996
|
+
PolicyDelay: {
|
|
997
|
+
/** @description False: this control has not been implemented. */
|
|
998
|
+
supported: boolean;
|
|
999
|
+
};
|
|
1000
|
+
/** @enum {string} */
|
|
1001
|
+
PolicyLimitScope: "all_assets" | "par_usd_assets";
|
|
1002
|
+
PolicyLimits: {
|
|
1003
|
+
daily: {
|
|
1004
|
+
/** @enum {string} */
|
|
1005
|
+
applies_to: "all_assets" | "par_usd_assets";
|
|
1006
|
+
limit_usd: string;
|
|
1007
|
+
remaining_usd: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Format: int64
|
|
1010
|
+
* @description Movements omitted from the USD-valued used figure because no rate was available.
|
|
1011
|
+
*/
|
|
1012
|
+
unpriced_movements: number;
|
|
1013
|
+
used_usd: string;
|
|
1014
|
+
/** @enum {string} */
|
|
1015
|
+
window: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1016
|
+
} | null;
|
|
1017
|
+
/** @description Null means there is no flow-wide per-transaction USD cap. Asset and settlement-pathway gates still apply. */
|
|
1018
|
+
per_transaction: {
|
|
1019
|
+
/** @enum {string} */
|
|
1020
|
+
applies_to: "all_assets" | "par_usd_assets";
|
|
1021
|
+
limit_usd: string;
|
|
1022
|
+
remaining_usd: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Format: int64
|
|
1025
|
+
* @description Movements omitted from the USD-valued used figure because no rate was available.
|
|
1026
|
+
*/
|
|
1027
|
+
unpriced_movements: number;
|
|
1028
|
+
used_usd: string;
|
|
1029
|
+
/** @enum {string} */
|
|
1030
|
+
window: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1031
|
+
} | null;
|
|
1032
|
+
rolling: {
|
|
1033
|
+
/** @enum {string} */
|
|
1034
|
+
applies_to: "all_assets" | "par_usd_assets";
|
|
1035
|
+
limit_usd: string;
|
|
1036
|
+
remaining_usd: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* Format: int64
|
|
1039
|
+
* @description Movements omitted from the USD-valued used figure because no rate was available.
|
|
1040
|
+
*/
|
|
1041
|
+
unpriced_movements: number;
|
|
1042
|
+
used_usd: string;
|
|
1043
|
+
/** @enum {string} */
|
|
1044
|
+
window: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1045
|
+
} | null;
|
|
1046
|
+
weekly: {
|
|
1047
|
+
/** @enum {string} */
|
|
1048
|
+
applies_to: "all_assets" | "par_usd_assets";
|
|
1049
|
+
limit_usd: string;
|
|
1050
|
+
remaining_usd: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* Format: int64
|
|
1053
|
+
* @description Movements omitted from the USD-valued used figure because no rate was available.
|
|
1054
|
+
*/
|
|
1055
|
+
unpriced_movements: number;
|
|
1056
|
+
used_usd: string;
|
|
1057
|
+
/** @enum {string} */
|
|
1058
|
+
window: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1059
|
+
} | null;
|
|
1060
|
+
};
|
|
1061
|
+
PolicySnapshot: {
|
|
1062
|
+
data: components["schemas"]["Policy"][];
|
|
1063
|
+
livemode: boolean;
|
|
1064
|
+
/** @enum {string} */
|
|
1065
|
+
object: "policy_snapshot";
|
|
1066
|
+
/** Format: date-time */
|
|
1067
|
+
observed_ts: string;
|
|
1068
|
+
};
|
|
1069
|
+
/** @enum {string} */
|
|
1070
|
+
PolicyWindowKind: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
829
1071
|
Quote: {
|
|
830
1072
|
amount_usd: string;
|
|
831
1073
|
/** @enum {string} */
|
|
@@ -918,6 +1160,7 @@ export interface components {
|
|
|
918
1160
|
ramp_fees?: components["schemas"]["StatementRampFee"][];
|
|
919
1161
|
superseded_by?: string;
|
|
920
1162
|
totals: components["schemas"]["StatementTotals"];
|
|
1163
|
+
/** @description The period's movements. Pay-ins and payouts are never served on this API, so they are not listed here although balances and totals include their effect: for a period in which the business made a payment the entries do not sum to the totals. */
|
|
921
1164
|
transactions: components["schemas"]["StatementEntry"][];
|
|
922
1165
|
};
|
|
923
1166
|
StatementEffect: {
|
|
@@ -937,7 +1180,7 @@ export interface components {
|
|
|
937
1180
|
/** @enum {string} */
|
|
938
1181
|
status: "completed" | "pending" | "failed";
|
|
939
1182
|
/** @enum {string} */
|
|
940
|
-
type: "ach_offramp" | "ach_onramp" | "adjustment" | "
|
|
1183
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
|
|
941
1184
|
withdrawal?: components["schemas"]["StatementWithdrawal"];
|
|
942
1185
|
};
|
|
943
1186
|
StatementLine: {
|
|
@@ -1019,7 +1262,7 @@ export interface components {
|
|
|
1019
1262
|
failed_ts?: string;
|
|
1020
1263
|
/** @description The transaction id. Stable for the life of the movement and safe to store. */
|
|
1021
1264
|
id: string;
|
|
1022
|
-
/** @description
|
|
1265
|
+
/** @description False only for an isolated mock-money-only ledger; independent of the reading credential. */
|
|
1023
1266
|
livemode: boolean;
|
|
1024
1267
|
/** @enum {string} */
|
|
1025
1268
|
object: "transaction";
|
|
@@ -1029,13 +1272,13 @@ export interface components {
|
|
|
1029
1272
|
*/
|
|
1030
1273
|
status: "pending" | "processing" | "completed" | "failed";
|
|
1031
1274
|
/**
|
|
1032
|
-
* @description What the movement is. The
|
|
1275
|
+
* @description What the movement is. The whole vocabulary a transaction can carry is published; a business only ever sees the members its own activity produces. Pay-ins and payouts are never served on this API.
|
|
1033
1276
|
* @enum {string}
|
|
1034
1277
|
*/
|
|
1035
|
-
type: "ach_offramp" | "ach_onramp" | "adjustment" | "
|
|
1278
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
|
|
1036
1279
|
};
|
|
1037
1280
|
TransactionAssetChange: {
|
|
1038
|
-
/** @description The signed net change to the business's settled holdings of this asset, in the asset's own units. NEGATIVE LEFT the business, positive arrived. Net of the ledger's fees and taxes, on the same basis /v1/balances reports.
|
|
1281
|
+
/** @description The signed net change to the business's settled holdings of this asset, in the asset's own units. NEGATIVE LEFT the business, positive arrived. Net of the ledger's fees and taxes, on the same basis /v1/balances reports. For a business with no pay-ins or payouts, summing an asset's amounts across every transaction — not only the completed ones — gives the movement in its settled balance. Pay-ins and payouts are not served on this API but still move /v1/balances, so a business with payments cannot reconcile its balance from transactions alone. */
|
|
1039
1282
|
amount: string;
|
|
1040
1283
|
/** @description The asset symbol, in the ledger's own casing (USDC, WTGXX, SOL:USDC). */
|
|
1041
1284
|
asset: string;
|
|
@@ -1414,6 +1657,74 @@ export interface operations {
|
|
|
1414
1657
|
};
|
|
1415
1658
|
};
|
|
1416
1659
|
};
|
|
1660
|
+
"external_wallets.list": {
|
|
1661
|
+
parameters: {
|
|
1662
|
+
query?: {
|
|
1663
|
+
/** @description How many external wallets to return. Defaults to 10. A value above 100 is rejected, not reduced. */
|
|
1664
|
+
limit?: number;
|
|
1665
|
+
/** @description Return the external wallets immediately after this external wallet id in the list order. Cannot be combined with ending_before. */
|
|
1666
|
+
starting_after?: string;
|
|
1667
|
+
/** @description Return the external wallets immediately before this external wallet id in the list order. Cannot be combined with starting_after. */
|
|
1668
|
+
ending_before?: string;
|
|
1669
|
+
};
|
|
1670
|
+
header?: never;
|
|
1671
|
+
path?: never;
|
|
1672
|
+
cookie?: never;
|
|
1673
|
+
};
|
|
1674
|
+
requestBody?: never;
|
|
1675
|
+
responses: {
|
|
1676
|
+
/** @description OK */
|
|
1677
|
+
200: {
|
|
1678
|
+
headers: {
|
|
1679
|
+
[name: string]: unknown;
|
|
1680
|
+
};
|
|
1681
|
+
content: {
|
|
1682
|
+
"application/json": components["schemas"]["ExternalWalletList"];
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
/** @description Error response. */
|
|
1686
|
+
default: {
|
|
1687
|
+
headers: {
|
|
1688
|
+
[name: string]: unknown;
|
|
1689
|
+
};
|
|
1690
|
+
content: {
|
|
1691
|
+
"application/json": components["schemas"]["Error"];
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
"external_wallets.get": {
|
|
1697
|
+
parameters: {
|
|
1698
|
+
query?: never;
|
|
1699
|
+
header?: never;
|
|
1700
|
+
path: {
|
|
1701
|
+
/** @description The external wallet id. */
|
|
1702
|
+
id: string;
|
|
1703
|
+
};
|
|
1704
|
+
cookie?: never;
|
|
1705
|
+
};
|
|
1706
|
+
requestBody?: never;
|
|
1707
|
+
responses: {
|
|
1708
|
+
/** @description OK */
|
|
1709
|
+
200: {
|
|
1710
|
+
headers: {
|
|
1711
|
+
[name: string]: unknown;
|
|
1712
|
+
};
|
|
1713
|
+
content: {
|
|
1714
|
+
"application/json": components["schemas"]["ExternalWallet"];
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
/** @description Error response. */
|
|
1718
|
+
default: {
|
|
1719
|
+
headers: {
|
|
1720
|
+
[name: string]: unknown;
|
|
1721
|
+
};
|
|
1722
|
+
content: {
|
|
1723
|
+
"application/json": components["schemas"]["Error"];
|
|
1724
|
+
};
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1417
1728
|
"notifications.list": {
|
|
1418
1729
|
parameters: {
|
|
1419
1730
|
query?: {
|
|
@@ -1585,6 +1896,35 @@ export interface operations {
|
|
|
1585
1896
|
};
|
|
1586
1897
|
};
|
|
1587
1898
|
};
|
|
1899
|
+
"policies.snapshot": {
|
|
1900
|
+
parameters: {
|
|
1901
|
+
query?: never;
|
|
1902
|
+
header?: never;
|
|
1903
|
+
path?: never;
|
|
1904
|
+
cookie?: never;
|
|
1905
|
+
};
|
|
1906
|
+
requestBody?: never;
|
|
1907
|
+
responses: {
|
|
1908
|
+
/** @description OK */
|
|
1909
|
+
200: {
|
|
1910
|
+
headers: {
|
|
1911
|
+
[name: string]: unknown;
|
|
1912
|
+
};
|
|
1913
|
+
content: {
|
|
1914
|
+
"application/json": components["schemas"]["PolicySnapshot"];
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
/** @description Error response. */
|
|
1918
|
+
default: {
|
|
1919
|
+
headers: {
|
|
1920
|
+
[name: string]: unknown;
|
|
1921
|
+
};
|
|
1922
|
+
content: {
|
|
1923
|
+
"application/json": components["schemas"]["Error"];
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1588
1928
|
"quotes.quote": {
|
|
1589
1929
|
parameters: {
|
|
1590
1930
|
query: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stable_sea/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -35,13 +35,14 @@
|
|
|
35
35
|
"openapi-fetch": "0.17.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "26.6.
|
|
38
|
+
"@types/node": "26.6.3",
|
|
39
39
|
"openapi-typescript": "7.13.0",
|
|
40
40
|
"typescript": "5.9.3",
|
|
41
|
-
"vitest": "5.0.
|
|
41
|
+
"vitest": "5.0.2"
|
|
42
42
|
},
|
|
43
43
|
"overrides": {
|
|
44
44
|
"js-yaml": "^5.4.2",
|
|
45
|
-
"nanoid": "^3.3.17"
|
|
45
|
+
"nanoid": "^3.3.17",
|
|
46
|
+
"source-map-js": "^1.2.2"
|
|
46
47
|
}
|
|
47
48
|
}
|