@stable_sea/sdk 0.2.13 → 0.2.18
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 +57 -4
- package/dist/gen/schema.d.ts +19 -31
- package/dist/gen/session-schema.d.ts +4930 -659
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ import { createStableSeaClient } from "@stable_sea/sdk";
|
|
|
21
21
|
const client = createStableSeaClient({
|
|
22
22
|
apiKey: process.env.STABLE_SEA_API_KEY!,
|
|
23
23
|
baseUrl: process.env.STABLE_SEA_BASE_URL!,
|
|
24
|
-
version: "2026-10-
|
|
24
|
+
version: "2026-10-15",
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -55,8 +55,9 @@ settlement; instant orders are refused in both production and sandbox.
|
|
|
55
55
|
|
|
56
56
|
## Member administration and personal actions
|
|
57
57
|
|
|
58
|
-
Use `createStableSeaSessionClient` for
|
|
59
|
-
|
|
58
|
+
Use `createStableSeaSessionClient` for onboarding, legal documents, your profile
|
|
59
|
+
and security, team and API-key administration, notifications, preferences and
|
|
60
|
+
business support messages. It uses
|
|
60
61
|
the native sign-in, MFA and business-selection flow,
|
|
61
62
|
not a Live or Test API key. Use `https://api.stablesea.com`; the isolated
|
|
62
63
|
Test-key Sandbox does not serve member sessions.
|
|
@@ -98,6 +99,12 @@ invitee's email-link token; administrators cannot accept on their behalf.
|
|
|
98
99
|
Member grants and activation use existing business permissions. Policy settings
|
|
99
100
|
retain their separate launch gate.
|
|
100
101
|
|
|
102
|
+
Read a member's active keys at
|
|
103
|
+
`GET /identity/members/{individual_id}/api_keys`, selecting `environment: "live"`
|
|
104
|
+
or `"test"`. Suspending or removing the member leaves those business keys working;
|
|
105
|
+
revoke unwanted keys explicitly through the existing key-revocation operation.
|
|
106
|
+
The same API-key management permission applies.
|
|
107
|
+
|
|
101
108
|
Manage Live and Test credentials at `/identity/api_keys`. Use an explicit scope
|
|
102
109
|
list and a unique issuance idempotency key. Test lifecycle operations have no
|
|
103
110
|
extra fresh two-factor prompt; Live operations retain their existing protection.
|
|
@@ -113,6 +120,37 @@ advisory, not proof of authentication.
|
|
|
113
120
|
Generated types are exported as `SessionPaths`, `SessionOperations` and
|
|
114
121
|
`SessionComponents`; internal operator and excluded product operations are omitted.
|
|
115
122
|
|
|
123
|
+
## Business onboarding and documents
|
|
124
|
+
|
|
125
|
+
Use the member client before issuing an API key. Signup uses the existing
|
|
126
|
+
business-email/OTP flow. After account and authenticator setup, sign in and select
|
|
127
|
+
your business using the same session flow as Terminal.
|
|
128
|
+
|
|
129
|
+
Read `/onboarding/status` and `/compliance/kyb/fields` to discover the current
|
|
130
|
+
requirements and saved answers. Review registry proposals before confirming
|
|
131
|
+
prefilled answers. Draft writes retain their native revision checks: send the
|
|
132
|
+
field's current `answer_revision` as `expected_answer_revision`, keep the returned
|
|
133
|
+
revision, and reload/review a conflict before another save. Checklist uploads and
|
|
134
|
+
account documents use the existing base64 document operations and limits.
|
|
135
|
+
|
|
136
|
+
Read pending MSAs at `/compliance/msa/terms`, retrieve each document, and retain
|
|
137
|
+
its version for click-through acceptance. Read agreements before the actual
|
|
138
|
+
authorized signer consents. MSA enrollment
|
|
139
|
+
chooses the existing click-through or embedded-signature workflow. An envelope's
|
|
140
|
+
`executed` status and archived artifacts establish completion; issuing a signing
|
|
141
|
+
URL does not. W-9 signing binds the reviewed prepared-form checksum. Custody
|
|
142
|
+
contract signing requires an explicit `Idempotency-Key`. Provider enrollment,
|
|
143
|
+
business terms, signer authority and compliance review remain enforced; this
|
|
144
|
+
client does not activate a feature or sign as a machine credential. Present the
|
|
145
|
+
[WisdomTree supplemental terms](https://www.wisdomtreeconnect.com/stable-sea-supplemental-terms-of-use)
|
|
146
|
+
before recording the member's explicit consent at `/money/treasury/terms`;
|
|
147
|
+
that route's GET returns acceptance metadata, not the document.
|
|
148
|
+
|
|
149
|
+
See the [onboarding guide](https://docs.stablesea.com/api/#onboarding) for the
|
|
150
|
+
workflow, field-value encoding and document handling, and the
|
|
151
|
+
[member reference](https://docs.stablesea.com/api/member-reference/) for request
|
|
152
|
+
shapes and native retry rules.
|
|
153
|
+
|
|
116
154
|
## Idempotent writes
|
|
117
155
|
|
|
118
156
|
Create one mutation handle for one logical write. Its `POST` method always sends
|
|
@@ -332,6 +370,21 @@ with `client.DELETE("/v1/bank_accounts/{id}")`, without a body or idempotency ke
|
|
|
332
370
|
Read bank and wallet operation `status` instead of `state`. Retrieve issued
|
|
333
371
|
statement content with `GET /v1/statements/{id}`; the `/content` route is retired.
|
|
334
372
|
|
|
335
|
-
The HTTP request pin is `2026-10-
|
|
373
|
+
The HTTP request pin is `2026-10-15`. The retired pin returns
|
|
336
374
|
`400 unsupported_api_version`. Existing API keys remain valid; stored key and
|
|
337
375
|
thin-event/webhook versions are preserved.
|
|
376
|
+
|
|
377
|
+
Fund documents are part of `GET /v1/securities`: use
|
|
378
|
+
`details.content.disclosures` for issuer fund-page and approved Terminal trading
|
|
379
|
+
disclosure HTML, including yield definitions, transaction roles and fee
|
|
380
|
+
applicability. Titles identify the context, and each fund's risk language is
|
|
381
|
+
preserved. Use
|
|
382
|
+
`details.content.prospectus_url` for the shared Terminal prospectus link. The
|
|
383
|
+
link may open the issuer’s official regulatory-reports page. Details and links
|
|
384
|
+
can be null and disclosures can be empty when unavailable.
|
|
385
|
+
These blocks supplement current quotes, fees and financial controls.
|
|
386
|
+
|
|
387
|
+
Bank registration and reads support US accounts only. Non-US banks and
|
|
388
|
+
cross-border Payments/Treasury operations are intentionally excluded. Update to
|
|
389
|
+
the latest SDK for the current HTTP contract; credential and webhook record
|
|
390
|
+
versions are unchanged.
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -179,7 +179,7 @@ export interface paths {
|
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
181
181
|
* List bank accounts
|
|
182
|
-
* @description Lists saved US
|
|
182
|
+
* @description Lists saved US bank accounts, newest first by created_ts, then ID. Requires money:read. Account numbers and holder identity are masked unless the key also has money:bank_accounts_sensitive_read. Institution, routing and postal address fields follow the same visibility as Terminal.
|
|
183
183
|
*
|
|
184
184
|
* Use either starting_after or ending_before with a bank account ID. limit defaults to 10 and cannot exceed 100. An unknown or removed cursor returns an error. Newly added or changed accounts can briefly return 503 before updated details are available; retry the read.
|
|
185
185
|
*/
|
|
@@ -187,7 +187,7 @@ export interface paths {
|
|
|
187
187
|
put?: never;
|
|
188
188
|
/**
|
|
189
189
|
* Register a bank account
|
|
190
|
-
* @description Registers a US
|
|
190
|
+
* @description Registers a US bank account using Terminal's existing validation and screening. Set country to US and provide us_bank_account details. Non-US bank accounts and cross-border payments are not supported. Requires money:bank_accounts_write and an Idempotency-Key. Poll the returned operation, then retrieve its bank_account with money:read. Registration alone does not enable the account or make it eligible for funding or payouts.
|
|
191
191
|
*/
|
|
192
192
|
post: operations["bank_accounts.create"];
|
|
193
193
|
delete?: never;
|
|
@@ -1212,17 +1212,16 @@ export interface components {
|
|
|
1212
1212
|
/** @enum {string} */
|
|
1213
1213
|
beneficiary_type: "self" | "third_party";
|
|
1214
1214
|
/** @enum {string} */
|
|
1215
|
-
country: "US"
|
|
1215
|
+
country: "US";
|
|
1216
1216
|
/** Format: date-time */
|
|
1217
1217
|
created_ts: string;
|
|
1218
1218
|
/** @enum {string} */
|
|
1219
|
-
currency: "USD"
|
|
1219
|
+
currency: "USD";
|
|
1220
1220
|
/** @description True when account numbers and holder identity are masked. Full details require money:bank_accounts_sensitive_read in addition to money:read. */
|
|
1221
1221
|
details_masked: boolean;
|
|
1222
1222
|
id: string;
|
|
1223
1223
|
/** @description False for an isolated simulated bank account. */
|
|
1224
1224
|
livemode: boolean;
|
|
1225
|
-
mx_bank_account?: components["schemas"]["MXBankAccountDetails"];
|
|
1226
1225
|
/** @enum {string} */
|
|
1227
1226
|
object: "bank_account";
|
|
1228
1227
|
/**
|
|
@@ -1230,7 +1229,7 @@ export interface components {
|
|
|
1230
1229
|
* @enum {string}
|
|
1231
1230
|
*/
|
|
1232
1231
|
status: "enabled" | "disabled";
|
|
1233
|
-
us_bank_account
|
|
1232
|
+
us_bank_account: components["schemas"]["USBankAccountDetails"];
|
|
1234
1233
|
};
|
|
1235
1234
|
BankAccountAddress: {
|
|
1236
1235
|
city: string;
|
|
@@ -1253,9 +1252,8 @@ export interface components {
|
|
|
1253
1252
|
*/
|
|
1254
1253
|
beneficiary_type?: "self" | "third_party" | null;
|
|
1255
1254
|
/** @enum {string} */
|
|
1256
|
-
country: "US"
|
|
1257
|
-
|
|
1258
|
-
us_bank_account?: components["schemas"]["USBankAccountCreateDetails"];
|
|
1255
|
+
country: "US";
|
|
1256
|
+
us_bank_account: components["schemas"]["USBankAccountCreateDetails"];
|
|
1259
1257
|
};
|
|
1260
1258
|
BankAccountDeleted: {
|
|
1261
1259
|
/** @enum {boolean} */
|
|
@@ -1608,29 +1606,13 @@ export interface components {
|
|
|
1608
1606
|
observed_ts: string;
|
|
1609
1607
|
};
|
|
1610
1608
|
/** @enum {string} */
|
|
1611
|
-
HTTPAPIVersion: "2026-10-
|
|
1609
|
+
HTTPAPIVersion: "2026-10-15";
|
|
1612
1610
|
List: {
|
|
1613
1611
|
data: components["schemas"]["Resource"][];
|
|
1614
1612
|
has_more: boolean;
|
|
1615
1613
|
/** @enum {string} */
|
|
1616
1614
|
object: "list";
|
|
1617
1615
|
};
|
|
1618
|
-
MXBankAccountCreateDetails: {
|
|
1619
|
-
account_holder_first_name: string;
|
|
1620
|
-
account_holder_last_name: string;
|
|
1621
|
-
clabe: string;
|
|
1622
|
-
/** @description Optional RFC or CURP, validated by the existing recipient rules. */
|
|
1623
|
-
holder_identifier?: string;
|
|
1624
|
-
legal_entity_name: string;
|
|
1625
|
-
};
|
|
1626
|
-
MXBankAccountDetails: {
|
|
1627
|
-
account_holder_first_name: string;
|
|
1628
|
-
account_holder_last_name: string;
|
|
1629
|
-
clabe: string;
|
|
1630
|
-
/** @description Account holder RFC or CURP. Omitted when unavailable; masked unless full details are permitted. */
|
|
1631
|
-
holder_identifier?: string;
|
|
1632
|
-
legal_entity_name: string;
|
|
1633
|
-
};
|
|
1634
1616
|
MarketPricePoint: {
|
|
1635
1617
|
close_usd: string;
|
|
1636
1618
|
/** Format: date-time */
|
|
@@ -2085,7 +2067,13 @@ export interface components {
|
|
|
2085
2067
|
};
|
|
2086
2068
|
SecurityContent: {
|
|
2087
2069
|
description_html: string;
|
|
2070
|
+
/** @description Issuer fund-page and approved trading disclosures. Titles identify order, review and Express buy contexts; fund-specific applicability is preserved. */
|
|
2088
2071
|
disclosures: components["schemas"]["SecurityDisclosure"][];
|
|
2072
|
+
/**
|
|
2073
|
+
* Format: uri
|
|
2074
|
+
* @description Issuer prospectus or official prospectus and regulatory-reports page, shared with Terminal. The link may open a document portal rather than a PDF. Null when unavailable.
|
|
2075
|
+
*/
|
|
2076
|
+
prospectus_url: string | null;
|
|
2089
2077
|
why_fund_html: string;
|
|
2090
2078
|
};
|
|
2091
2079
|
SecurityDetails: {
|
|
@@ -2284,7 +2272,7 @@ export interface components {
|
|
|
2284
2272
|
/** @enum {string} */
|
|
2285
2273
|
status: "completed" | "pending" | "failed";
|
|
2286
2274
|
/** @enum {string} */
|
|
2287
|
-
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";
|
|
2275
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "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";
|
|
2288
2276
|
withdrawal?: components["schemas"]["StatementWithdrawal"];
|
|
2289
2277
|
};
|
|
2290
2278
|
StatementGeneration: {
|
|
@@ -2294,7 +2282,7 @@ export interface components {
|
|
|
2294
2282
|
* @description Reason processing failed. Correct the cause before submitting a new request with a new idempotency key.
|
|
2295
2283
|
* @enum {string}
|
|
2296
2284
|
*/
|
|
2297
|
-
failure_code?: "permission_denied" | "api_key_revoked" | "business_locked" | "terms_acceptance_required" | "api_access_disabled" | "statement_ineligible" | "invalid_statement_month" | "statement_generation_refused" | "statement_processing_unavailable";
|
|
2285
|
+
failure_code?: "permission_denied" | "api_key_revoked" | "business_locked" | "business_archived" | "terms_acceptance_required" | "api_access_disabled" | "statement_ineligible" | "invalid_statement_month" | "statement_generation_refused" | "statement_processing_unavailable";
|
|
2298
2286
|
id: string;
|
|
2299
2287
|
livemode: boolean;
|
|
2300
2288
|
/** @enum {string} */
|
|
@@ -2433,7 +2421,7 @@ export interface components {
|
|
|
2433
2421
|
* @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.
|
|
2434
2422
|
* @enum {string}
|
|
2435
2423
|
*/
|
|
2436
|
-
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";
|
|
2424
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "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";
|
|
2437
2425
|
};
|
|
2438
2426
|
TransactionAssetChange: {
|
|
2439
2427
|
/** @description The signed net change to the business's settled holdings of this asset, in the asset's own units. Negative amounts decrease holdings; positive amounts increase them. 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. */
|
|
@@ -2493,7 +2481,7 @@ export interface components {
|
|
|
2493
2481
|
* @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.
|
|
2494
2482
|
* @enum {string}
|
|
2495
2483
|
*/
|
|
2496
|
-
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";
|
|
2484
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "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";
|
|
2497
2485
|
};
|
|
2498
2486
|
TransactionFeeReturns: {
|
|
2499
2487
|
original_transaction_id: string | null;
|
|
@@ -2712,7 +2700,7 @@ export interface components {
|
|
|
2712
2700
|
"application/json": components["schemas"]["Error"];
|
|
2713
2701
|
};
|
|
2714
2702
|
};
|
|
2715
|
-
/** @description The credential lacks the required permission or the operation is unavailable to this business. */
|
|
2703
|
+
/** @description The credential lacks the required permission or the operation is unavailable to this business. Two codes refuse every request a genuine key makes: platform_inactive (API access is not active in this environment) and business_archived (the business is archived; its keys work again once it is unarchived). */
|
|
2716
2704
|
Error403: {
|
|
2717
2705
|
headers: {
|
|
2718
2706
|
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|