@stable_sea/sdk 0.2.7 → 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,6 +207,35 @@ 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 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.
228
+
229
+ Retrieve `GET /v1/transactions/{id}` with `money:read` to see
230
+ `onchain_transactions`. Each observed reference includes its `hash` and, when
231
+ known, `chain` and `explorer_url`. An empty array means no references have been
232
+ observed; null means the metadata is unavailable, including a receipt initiated
233
+ by another business. List responses omit this detail.
234
+
235
+ A hash is a settlement reference, not proof that the whole movement completed.
236
+ Check the transaction's `status` and `asset_changes` for its lifecycle and effect
237
+ on settled balances. Sandbox references use simulated partner data.
238
+
210
239
  ## Statement previews
211
240
 
212
241
  Read the current month's interim document with
@@ -894,6 +894,10 @@ 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
+ *
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.
900
+ *
897
901
  * Unknown and cross-business IDs return the same not-found response.
898
902
  */
899
903
  get: operations["transactions.get"];
@@ -2247,12 +2251,142 @@ export interface components {
2247
2251
  /** @description The asset symbol, in the ledger's own casing (USDC, WTGXX, SOL:USDC). */
2248
2252
  asset: string;
2249
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
+ };
2270
+ TransactionDetail: {
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. */
2272
+ asset_changes: components["schemas"]["TransactionAssetChange"][];
2273
+ /**
2274
+ * Format: date-time
2275
+ * @description When the last leg settled. Present only when status is completed, and never alongside failed_ts.
2276
+ */
2277
+ completed_ts?: string;
2278
+ /**
2279
+ * Format: date-time
2280
+ * @description When the movement was opened. Immutable, and the instant this list is ordered and paged on.
2281
+ */
2282
+ created_ts: string;
2283
+ /**
2284
+ * Format: date-time
2285
+ * @description When the movement terminated as failed. Present only when status is failed, and never alongside completed_ts.
2286
+ */
2287
+ failed_ts?: string;
2288
+ financial_details?: components["schemas"]["TransactionFinancialDetail"];
2289
+ /** @description The transaction id. Stable for the life of the movement and safe to store. */
2290
+ id: string;
2291
+ /** @description Whether the resource represents live financial data. False for an isolated simulated ledger; independent of the reading credential. */
2292
+ livemode: boolean;
2293
+ /** @enum {string} */
2294
+ object: "transaction";
2295
+ /** @description Observed on-chain settlement references for a movement initiated by your business. Empty when none have been observed; null when unavailable. */
2296
+ onchain_transactions: components["schemas"]["TransactionOnchainReference"][] | null;
2297
+ /**
2298
+ * @description The movement lifecycle: pending before execution starts; processing while at least one part is in flight; completed when all parts settle; failed when execution ends unsuccessfully. A failed movement can have settled changes, reported in asset_changes.
2299
+ * @enum {string}
2300
+ */
2301
+ status: "pending" | "processing" | "completed" | "failed";
2302
+ /**
2303
+ * @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.
2304
+ * @enum {string}
2305
+ */
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";
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
+ };
2250
2345
  TransactionList: {
2251
2346
  data: components["schemas"]["Transaction"][];
2252
2347
  has_more: boolean;
2253
2348
  /** @enum {string} */
2254
2349
  object: "list";
2255
2350
  };
2351
+ TransactionOnchainReference: {
2352
+ /** @description Blockchain identifier, such as ethereum or stellar. Omitted when the hash cannot be attributed to a blockchain. */
2353
+ chain?: string;
2354
+ /**
2355
+ * Format: uri
2356
+ * @description Block-explorer URL, when available. Otherwise use the hash as plain text.
2357
+ */
2358
+ explorer_url?: string;
2359
+ /** @description Observed transaction hash. */
2360
+ hash: string;
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
+ };
2256
2390
  USBankAccountCreateDetails: {
2257
2391
  account_number: string;
2258
2392
  /** @enum {string} */
@@ -4156,7 +4290,7 @@ export interface operations {
4156
4290
  [name: string]: unknown;
4157
4291
  };
4158
4292
  content: {
4159
- "application/json": components["schemas"]["Transaction"];
4293
+ "application/json": components["schemas"]["TransactionDetail"];
4160
4294
  };
4161
4295
  };
4162
4296
  400: components["responses"]["Error400"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [