@stable_sea/sdk 0.2.8 → 0.2.9

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 CHANGED
@@ -207,7 +207,24 @@ registry metadata remains available. These figures are informational. Use a
207
207
  quote to obtain the price for a trade. See the
208
208
  [securities reference](https://docs.stablesea.com/api/reference/#GET/v1/securities).
209
209
 
210
- ## Transaction settlement references
210
+ ## Transaction receipts and settlement references
211
+
212
+ Retrieve `GET /v1/transactions/{id}` with `money:read` for `financial_details`:
213
+ the same input/output, fee, net trade value, fund price and commission figures
214
+ as Terminal. Values use decimal strings. `estimated: true` means a figure can
215
+ change; false does not prove settlement. Optional `quoted` values are the native
216
+ receipt's comparison figures, with the currently disclosed fee held constant
217
+ for net trade comparisons. They are not necessarily the original order quote.
218
+ Deposit and withdrawal sections separate principal, fees, collection and
219
+ delivery. Fee refunds preserve their original collection history.
220
+
221
+ Input and output identify their `chain` and your `bank_account_id` or
222
+ `external_wallet_id` when applicable. Use `accounts:read` to retrieve linked
223
+ account details. Removed, internal and other businesses' accounts have no resource link.
224
+
225
+ Missing figures are omitted. A movement initiated by another business may affect
226
+ your balances without exposing its financial details. List responses omit receipt
227
+ enrichment; use `asset_changes` to reconcile settled balance effects.
211
228
 
212
229
  Retrieve `GET /v1/transactions/{id}` with `money:read` to see
213
230
  `onchain_transactions`. Each observed reference includes its `hash` and, when
@@ -894,6 +894,8 @@ export interface paths {
894
894
  *
895
895
  * The status is `pending`, `processing`, `completed` or `failed`. `completed_ts` and `failed_ts` are mutually exclusive and absent while execution is pending or processing.
896
896
  *
897
+ * `financial_details` contains Terminal's receipt amounts, fees and trade figures for a movement initiated by your business. Input and output identify their blockchain and link to your bank account or external wallet when applicable; retrieve linked account details with `accounts:read`. Internal and other businesses' accounts have no resource link. Missing figures are omitted. Amounts are decimal strings; `estimated: true` means a figure can change, while false does not prove settlement. Optional `quoted` figures follow Terminal's comparison precision; a net trade comparison holds the currently disclosed fee constant and is not necessarily the original order quote. Status, settled changes and financial details share one read snapshot. Refund totals describe the assessed movement; a fee-refund transaction links to it in `original_transaction_id`.
898
+ *
897
899
  * `onchain_transactions` includes observed hashes, their blockchain when known, and available explorer links for movements initiated by your business. An empty array means no hashes have been observed; null means references are unavailable for this read. Lists omit these details.
898
900
  *
899
901
  * Unknown and cross-business IDs return the same not-found response.
@@ -2249,6 +2251,22 @@ export interface components {
2249
2251
  /** @description The asset symbol, in the ledger's own casing (USDC, WTGXX, SOL:USDC). */
2250
2252
  asset: string;
2251
2253
  };
2254
+ TransactionDepositAmounts: {
2255
+ available: boolean;
2256
+ collected_platform_fee_usdc: string;
2257
+ /** @enum {string} */
2258
+ collection_status: "not_needed" | "pending" | "collected" | "failed" | "insufficient_proceeds";
2259
+ estimated: boolean;
2260
+ /** Format: date-time */
2261
+ first_observed_ts: string | null;
2262
+ gross_deposit_usd: string;
2263
+ gross_proceeds_usdc: string;
2264
+ net_usdc: string;
2265
+ platform_fee_usdc: string;
2266
+ pricing_basis: string | null;
2267
+ /** Format: date-time */
2268
+ pricing_ts: string | null;
2269
+ };
2252
2270
  TransactionDetail: {
2253
2271
  /** @description Signed net changes to settled holdings, one entry per asset, ordered by asset. Empty when no part has settled. A failed movement includes any changes that settled before failure; pending or processing status alone does not determine whether this array is empty. */
2254
2272
  asset_changes: components["schemas"]["TransactionAssetChange"][];
@@ -2267,6 +2285,7 @@ export interface components {
2267
2285
  * @description When the movement terminated as failed. Present only when status is failed, and never alongside completed_ts.
2268
2286
  */
2269
2287
  failed_ts?: string;
2288
+ financial_details?: components["schemas"]["TransactionFinancialDetail"];
2270
2289
  /** @description The transaction id. Stable for the life of the movement and safe to store. */
2271
2290
  id: string;
2272
2291
  /** @description Whether the resource represents live financial data. False for an isolated simulated ledger; independent of the reading credential. */
@@ -2286,6 +2305,43 @@ export interface components {
2286
2305
  */
2287
2306
  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";
2288
2307
  };
2308
+ TransactionFeeReturns: {
2309
+ original_transaction_id: string | null;
2310
+ refund_transaction_ids: (string | null)[] | null;
2311
+ refunded: boolean;
2312
+ /** @description Total fee refunds recorded against this movement's assessment. A fee-refund transaction links to the original assessed transaction instead. */
2313
+ refunded_usdc: string;
2314
+ waived: boolean;
2315
+ };
2316
+ TransactionFigure: {
2317
+ amount: string;
2318
+ asset: string;
2319
+ /** @description Whether this figure can still change. False also covers terminal failure and a fund-trade amount fixed at placement; it does not prove settlement. */
2320
+ estimated: boolean;
2321
+ quoted?: components["schemas"]["TransactionValue"];
2322
+ };
2323
+ TransactionFinancialDetail: {
2324
+ automation_id: string | null;
2325
+ deposit?: components["schemas"]["TransactionDepositAmounts"];
2326
+ /**
2327
+ * Format: date-time
2328
+ * @description Pending fund settlement estimate. Null after the native receipt no longer reports an estimate.
2329
+ */
2330
+ estimated_settlement_ts: string | null;
2331
+ fee?: components["schemas"]["TransactionValue"];
2332
+ fee_returns?: components["schemas"]["TransactionFeeReturns"];
2333
+ input?: components["schemas"]["TransactionSide"];
2334
+ net_amount?: components["schemas"]["TransactionFigure"];
2335
+ output?: components["schemas"]["TransactionSide"];
2336
+ price_per_unit?: components["schemas"]["TransactionFigure"];
2337
+ settlement_commission?: components["schemas"]["TransactionValue"];
2338
+ /**
2339
+ * @description Recorded fund settlement choice; null when none was recorded.
2340
+ * @enum {string|null}
2341
+ */
2342
+ settlement_pathway: "standard" | "express" | null;
2343
+ withdrawal?: components["schemas"]["TransactionWithdrawalAmounts"];
2344
+ };
2289
2345
  TransactionList: {
2290
2346
  data: components["schemas"]["Transaction"][];
2291
2347
  has_more: boolean;
@@ -2303,6 +2359,34 @@ export interface components {
2303
2359
  /** @description Observed transaction hash. */
2304
2360
  hash: string;
2305
2361
  };
2362
+ TransactionSide: {
2363
+ amount: string;
2364
+ asset: string;
2365
+ /** @description Your bank-account resource, omitted after removal. Retrieve it with accounts:read for account details. */
2366
+ bank_account_id?: string;
2367
+ /** @description Blockchain used by this ledger leg, when it names one. Internal conversions and bank legs have no chain. */
2368
+ chain?: string;
2369
+ /** @description Whether this figure can still change. False also covers terminal failure and a fund-trade amount fixed at placement; it does not prove settlement. */
2370
+ estimated: boolean;
2371
+ /** @description Your external-wallet resource, omitted after removal. Retrieve it with accounts:read for wallet details. */
2372
+ external_wallet_id?: string;
2373
+ quoted?: components["schemas"]["TransactionValue"];
2374
+ };
2375
+ TransactionValue: {
2376
+ amount: string;
2377
+ asset: string;
2378
+ };
2379
+ TransactionWithdrawalAmounts: {
2380
+ bank_fee_usd: string;
2381
+ collected_platform_fee_usdc: string;
2382
+ /** @enum {string} */
2383
+ collection_status: "not_needed" | "pending" | "collected" | "failed";
2384
+ delivered: boolean;
2385
+ estimated: boolean;
2386
+ paid_to_bank_usd: string;
2387
+ platform_fee_usdc: string;
2388
+ total_debit_usdc: string;
2389
+ };
2306
2390
  USBankAccountCreateDetails: {
2307
2391
  account_number: string;
2308
2392
  /** @enum {string} */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [