@compass-labs/api-sdk 2.2.46-rc.0 → 2.2.46-rc.1

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.
Files changed (149) hide show
  1. package/README.md +8 -8
  2. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts +12 -8
  3. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js +12 -8
  5. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js.map +1 -1
  6. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts +9 -4
  7. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.js +9 -4
  9. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.js.map +1 -1
  10. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts +13 -5
  11. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js +13 -5
  13. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js.map +1 -1
  14. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +16 -15
  15. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.js +16 -15
  17. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.js.map +1 -1
  18. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts +8 -4
  19. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js +8 -4
  21. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js.map +1 -1
  22. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts +9 -11
  23. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts.map +1 -1
  24. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js +9 -11
  25. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js.map +1 -1
  26. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +10 -11
  27. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts.map +1 -1
  28. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +10 -11
  29. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js.map +1 -1
  30. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts +10 -5
  31. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts.map +1 -1
  32. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.js +10 -5
  33. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.js.map +1 -1
  34. package/dist/commonjs/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.d.ts +4 -4
  35. package/dist/commonjs/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.js +1 -1
  36. package/dist/commonjs/models/components/marketdetail.d.ts +5 -5
  37. package/dist/commonjs/models/components/marketdetail.js +1 -1
  38. package/dist/commonjs/models/components/ohlccandle.d.ts +1 -1
  39. package/dist/commonjs/models/components/orderstatus.d.ts +8 -8
  40. package/dist/commonjs/models/components/orderstatus.js +1 -1
  41. package/dist/commonjs/models/components/ordertosign.d.ts +9 -10
  42. package/dist/commonjs/models/components/ordertosign.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/ordertosign.js.map +1 -1
  44. package/dist/commonjs/models/components/quote.d.ts +2 -2
  45. package/dist/commonjs/models/components/quotefee.d.ts +2 -2
  46. package/dist/commonjs/models/components/tokenizedassetsbuildorderrequest.d.ts +3 -3
  47. package/dist/commonjs/models/components/tokenizedassetsbuildorderresponse.d.ts +7 -8
  48. package/dist/commonjs/models/components/tokenizedassetsbuildorderresponse.d.ts.map +1 -1
  49. package/dist/commonjs/models/components/tokenizedassetsbuildorderresponse.js.map +1 -1
  50. package/dist/commonjs/models/components/tokenizedassetscancelorderrequest.d.ts +1 -1
  51. package/dist/commonjs/models/components/tokenizedassetssubmitorderrequest.d.ts +8 -10
  52. package/dist/commonjs/models/components/tokenizedassetssubmitorderrequest.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/tokenizedassetssubmitorderrequest.js.map +1 -1
  54. package/dist/commonjs/sdk/tokenizedassets.d.ts +94 -70
  55. package/dist/commonjs/sdk/tokenizedassets.d.ts.map +1 -1
  56. package/dist/commonjs/sdk/tokenizedassets.js +94 -70
  57. package/dist/commonjs/sdk/tokenizedassets.js.map +1 -1
  58. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts +12 -8
  59. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts.map +1 -1
  60. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js +12 -8
  61. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js.map +1 -1
  62. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts +9 -4
  63. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts.map +1 -1
  64. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.js +9 -4
  65. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.js.map +1 -1
  66. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts +13 -5
  67. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts.map +1 -1
  68. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js +13 -5
  69. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js.map +1 -1
  70. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +16 -15
  71. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts.map +1 -1
  72. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.js +16 -15
  73. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.js.map +1 -1
  74. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts +8 -4
  75. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts.map +1 -1
  76. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js +8 -4
  77. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js.map +1 -1
  78. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts +9 -11
  79. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts.map +1 -1
  80. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js +9 -11
  81. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js.map +1 -1
  82. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +10 -11
  83. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts.map +1 -1
  84. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +10 -11
  85. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js.map +1 -1
  86. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts +10 -5
  87. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts.map +1 -1
  88. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.js +10 -5
  89. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.js.map +1 -1
  90. package/dist/esm/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.d.ts +4 -4
  91. package/dist/esm/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.js +1 -1
  92. package/dist/esm/models/components/marketdetail.d.ts +5 -5
  93. package/dist/esm/models/components/marketdetail.js +1 -1
  94. package/dist/esm/models/components/ohlccandle.d.ts +1 -1
  95. package/dist/esm/models/components/orderstatus.d.ts +8 -8
  96. package/dist/esm/models/components/orderstatus.js +1 -1
  97. package/dist/esm/models/components/ordertosign.d.ts +9 -10
  98. package/dist/esm/models/components/ordertosign.d.ts.map +1 -1
  99. package/dist/esm/models/components/ordertosign.js.map +1 -1
  100. package/dist/esm/models/components/quote.d.ts +2 -2
  101. package/dist/esm/models/components/quotefee.d.ts +2 -2
  102. package/dist/esm/models/components/tokenizedassetsbuildorderrequest.d.ts +3 -3
  103. package/dist/esm/models/components/tokenizedassetsbuildorderresponse.d.ts +7 -8
  104. package/dist/esm/models/components/tokenizedassetsbuildorderresponse.d.ts.map +1 -1
  105. package/dist/esm/models/components/tokenizedassetsbuildorderresponse.js.map +1 -1
  106. package/dist/esm/models/components/tokenizedassetscancelorderrequest.d.ts +1 -1
  107. package/dist/esm/models/components/tokenizedassetssubmitorderrequest.d.ts +8 -10
  108. package/dist/esm/models/components/tokenizedassetssubmitorderrequest.d.ts.map +1 -1
  109. package/dist/esm/models/components/tokenizedassetssubmitorderrequest.js.map +1 -1
  110. package/dist/esm/sdk/tokenizedassets.d.ts +94 -70
  111. package/dist/esm/sdk/tokenizedassets.d.ts.map +1 -1
  112. package/dist/esm/sdk/tokenizedassets.js +94 -70
  113. package/dist/esm/sdk/tokenizedassets.js.map +1 -1
  114. package/docs/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.md +2 -2
  115. package/docs/models/components/compassapibackendv2modelstokenizedassetsmarketmarketchain.md +1 -1
  116. package/docs/models/components/marketdetail.md +3 -3
  117. package/docs/models/components/marketdetailchain.md +1 -1
  118. package/docs/models/components/ohlccandle.md +1 -1
  119. package/docs/models/components/orderstatus.md +9 -9
  120. package/docs/models/components/ordertosign.md +12 -13
  121. package/docs/models/components/quote.md +6 -6
  122. package/docs/models/components/quotefee.md +2 -2
  123. package/docs/models/components/status.md +1 -1
  124. package/docs/models/components/tokenizedassetsbuildorderrequest.md +8 -8
  125. package/docs/models/components/tokenizedassetsbuildorderresponse.md +6 -6
  126. package/docs/models/components/tokenizedassetscancelorderrequest.md +3 -3
  127. package/docs/models/components/tokenizedassetssubmitorderrequest.md +11 -13
  128. package/docs/sdks/tokenizedassets/README.md +87 -63
  129. package/package.json +1 -1
  130. package/src/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.ts +12 -8
  131. package/src/funcs/tokenizedAssetsTokenizedAssetsMarkets.ts +9 -4
  132. package/src/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.ts +13 -5
  133. package/src/funcs/tokenizedAssetsTokenizedAssetsOrder.ts +16 -15
  134. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.ts +8 -4
  135. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.ts +9 -11
  136. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.ts +10 -11
  137. package/src/funcs/tokenizedAssetsTokenizedAssetsPositions.ts +10 -5
  138. package/src/models/components/compassapibackendv2modelstokenizedassetsmarketmarket.ts +4 -4
  139. package/src/models/components/marketdetail.ts +5 -5
  140. package/src/models/components/ohlccandle.ts +1 -1
  141. package/src/models/components/orderstatus.ts +8 -8
  142. package/src/models/components/ordertosign.ts +9 -10
  143. package/src/models/components/quote.ts +2 -2
  144. package/src/models/components/quotefee.ts +2 -2
  145. package/src/models/components/tokenizedassetsbuildorderrequest.ts +3 -3
  146. package/src/models/components/tokenizedassetsbuildorderresponse.ts +7 -8
  147. package/src/models/components/tokenizedassetscancelorderrequest.ts +1 -1
  148. package/src/models/components/tokenizedassetssubmitorderrequest.ts +8 -10
  149. package/src/sdk/tokenizedassets.ts +94 -70
@@ -4,21 +4,26 @@
4
4
 
5
5
  ### Available Operations
6
6
 
7
- * [tokenizedAssetsMarkets](#tokenizedassetsmarkets) - List equity markets
7
+ * [tokenizedAssetsMarkets](#tokenizedassetsmarkets) - List tokenized equity markets
8
8
  * [tokenizedAssetsMarketsSymbol](#tokenizedassetsmarketssymbol) - Get a single market
9
- * [tokenizedAssetsPositions](#tokenizedassetspositions) - Get on-chain positions for a wallet
9
+ * [tokenizedAssetsPositions](#tokenizedassetspositions) - Get tokenized-asset positions for a wallet
10
10
  * [tokenizedAssetsOrderOrderHash](#tokenizedassetsorderorderhash) - Get order status
11
- * [tokenizedAssetsCreateAccount](#tokenizedassetscreateaccount) - Create account
11
+ * [tokenizedAssetsCreateAccount](#tokenizedassetscreateaccount) - Create a Tokenized Assets Account
12
12
  * [tokenizedAssetsOrder](#tokenizedassetsorder) - Build a buy/sell order
13
- * [tokenizedAssetsOrderSubmit](#tokenizedassetsordersubmit) - Submit a signed order to 1inch Fusion
13
+ * [tokenizedAssetsOrderSubmit](#tokenizedassetsordersubmit) - Submit a signed order
14
14
  * [tokenizedAssetsOrderOrderHashCancel](#tokenizedassetsorderorderhashcancel) - Cancel an unfilled order
15
15
 
16
16
  ## tokenizedAssetsMarkets
17
17
 
18
- List tokenized equities surfaced on Ethereum.
18
+ List the tokenized US equities available on Ethereum.
19
19
 
20
- Composed from Ondo's metadata + enhanced-prices feeds. Non-Ethereum-only
21
- assets (BSC/Solana deployments without an Ethereum twin) are skipped.
20
+ Each entry includes the symbol, the underlying ticker, the on-chain
21
+ contract address, the latest USD price, and 24h price change. Filter
22
+ by `category` (sector tag) or `search` (substring match against symbol,
23
+ ticker, or name).
24
+
25
+ Only Ethereum-deployed tokens are returned; assets that exist only on
26
+ other chains are omitted.
22
27
 
23
28
  ### Example Usage
24
29
 
@@ -89,13 +94,21 @@ run();
89
94
 
90
95
  ## tokenizedAssetsMarketsSymbol
91
96
 
92
- Single-market detail for the on-chain Ondo symbol (e.g. `TSLAon`).
97
+ Get extended detail for a single tokenized equity (e.g. `TSLAon`).
98
+
99
+ Includes 52-week range, volume, market cap, holder count, and tradable
100
+ sessions in addition to the fields returned by `/markets`.
101
+
102
+ **OHLC candles** are opt-in: pass both `interval` and `range` query
103
+ params to include a `candles` array in the response. They must be
104
+ provided together and must form one of the supported pairs:
93
105
 
94
- OHLC candles are opt-in via `interval` + `range`:
106
+ - `1min` / `5min` / `15min` with `range=1day`
107
+ - `1hour` / `4hour` with `range=1month`
108
+ - `12hour` with `range=3month`
109
+ - `1day` with `range=3month` / `6month` / `1year` / `all`
95
110
 
96
- - Both omitted: 200 with `candles` absent.
97
- - Both supplied and forming a valid Ondo pair: 200 with `candles` populated.
98
- - Exactly one supplied, or both supplied with an invalid pair: 400.
111
+ Omitting both returns the market detail without `candles`.
99
112
 
100
113
  ### Example Usage
101
114
 
@@ -171,11 +184,16 @@ run();
171
184
 
172
185
  ## tokenizedAssetsPositions
173
186
 
174
- On-chain ERC-20 balance reads for a wallet across all listed Ondo GM tokens.
187
+ Get the tokenized-asset holdings for a wallet.
175
188
 
176
- Reads each Ethereum-deployed Ondo GM token's `balanceOf(wallet)` via a
177
- single Multicall3 batch and enriches non-zero balances with the latest USD
178
- price. Returns human-readable amounts (decimals applied).
189
+ Returns the balance of every listed tokenized equity at the queried
190
+ address, plus the latest USD price and a USD-valued balance when
191
+ pricing is available. Zero balances are omitted, and a `total_usd`
192
+ aggregate is returned across all priced positions.
193
+
194
+ Pass the **Tokenized Assets Account address** (returned by
195
+ `/create_account`), not the owner's wallet — proceeds from filled
196
+ orders settle into the Tokenized Assets Account.
179
197
 
180
198
  ### Example Usage
181
199
 
@@ -250,11 +268,15 @@ run();
250
268
 
251
269
  ## tokenizedAssetsOrderOrderHash
252
270
 
253
- Status of a relayed Fusion order — `pending` / `filled` / `expired` / `cancelled`.
271
+ Get the lifecycle state of a submitted order.
272
+
273
+ The `status` field is one of `pending`, `filled`, `expired`, or
274
+ `cancelled`. Partial fills stay in `pending` while `filled_amount` is
275
+ populated as fills come in; once an order fully fills, `fill_tx_hash`
276
+ is also returned.
254
277
 
255
- Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) are
256
- collapsed into the 4-value enum the SDK promises. Unknown upstream states
257
- surface as 502 to alert on schema drift.
278
+ Upstream protocol states beyond these four (e.g. `partially-filled`,
279
+ `refunded`) are mapped onto this set.
258
280
 
259
281
  ### Example Usage
260
282
 
@@ -332,17 +354,21 @@ run();
332
354
 
333
355
  Create a Tokenized Assets Account for a wallet address.
334
356
 
335
- Each wallet address has one Tokenized Assets Account per chain. It is owned by
336
- `owner` and isolated from the owner's Earn, Credit, and Traditional Investing
337
- accounts.
357
+ Before placing orders, the owner must create a Tokenized Assets Account.
358
+ Each wallet address has one Tokenized Assets Account, isolated from the
359
+ owner's Earn, Credit, and other product accounts.
360
+
361
+ The account address is deterministic. If it already exists, the
362
+ response returns `transaction: null` and you can skip straight to
363
+ building orders.
338
364
 
339
- Returns an unsigned transaction to create the account. The `sender` signs and
340
- broadcasts this transaction.
365
+ Returns an unsigned transaction to create the account. The `sender`
366
+ signs and broadcasts this transaction.
341
367
 
342
368
  **If owner pays gas:** Set `sender` to the owner's address.
343
369
 
344
- **If someone else pays gas:** Set `sender` to the wallet that will sign and
345
- broadcast the transaction on behalf of the owner.
370
+ **If someone else pays gas:** Set `sender` to the wallet that will
371
+ sign and broadcast the transaction on behalf of the owner.
346
372
 
347
373
  ### Example Usage
348
374
 
@@ -420,24 +446,25 @@ run();
420
446
 
421
447
  ## tokenizedAssetsOrder
422
448
 
423
- Build a quote, optional approve SafeTx, and SafeMessage EIP-712 to sign.
449
+ Build a buy or sell order whose maker is the Tokenized Assets Account.
424
450
 
425
- Returns everything the SDK needs to take an `owner` from "I want to buy"
426
- to a relayed Fusion order whose maker is the Tokenized Assets Account.
427
- The flow is **signing-based, not transaction-based**:
451
+ Returns up to three pieces in a single round-trip:
428
452
 
429
- 1. If `approval_safe_tx_eip712` is populated (Safe→LOP allowance is
430
- insufficient), sign it with `wallet.signTypedData(...)` and relay via
431
- `POST /v2/gas_sponsorship/prepare` so the sponsor broadcasts the resulting
432
- `Safe.execTransaction(USDC.approve(LOP_v4, ...))`. Wait for that tx
433
- to confirm before signing the order.
434
- 2. Sign `order.safe_message_eip712` with the same owner wallet this is
435
- a Safe ERC-1271 wrapper around the Fusion order hash. POST the
436
- resulting 65-byte ECDSA together with the rest of the `order` fields
437
- to `/order/submit`.
453
+ - **`quote`** preview of the input/output amounts and fees.
454
+ - **`approval_safe_tx_eip712`** only present when the account's
455
+ allowance to the settlement contract is below `amount`. The owner
456
+ signs this EIP-712 payload, then it is broadcast via
457
+ `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast
458
+ directly) to set the on-chain allowance. Wait for that transaction
459
+ to confirm before signing the order.
460
+ - **`order`** the order metadata (`order_hash`, `extension`,
461
+ `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712
462
+ payload the owner signs off-chain to authorize the order. The
463
+ signature is submitted to `/order/submit` and is **never** broadcast
464
+ on-chain.
438
465
 
439
- The owner never broadcasts an on-chain transaction in this flow; all
440
- on-chain action goes through the product account via the sponsor relay.
466
+ The owner never broadcasts the order itself only the (one-time)
467
+ approval transaction ever hits the chain.
441
468
 
442
469
  ### Example Usage
443
470
 
@@ -521,18 +548,17 @@ run();
521
548
 
522
549
  ## tokenizedAssetsOrderSubmit
523
550
 
524
- Relay an owner-signed Fusion order to the 1inch relayer.
551
+ Submit a signed order to the resolver network.
525
552
 
526
- The body carries the signature produced by
527
- `wallet.signTypedData(order.safe_message_eip712)` from the `/order`
528
- response, plus the order struct (`signed_order`), opaque `extension`,
529
- and `quote_id`. The signature is validated via ERC-1271
530
- (`Safe.isValidSignature`) at fill time — the maker on the order struct
531
- is the Tokenized Assets Account, not the EOA owner.
553
+ The body echoes the `order` fields from `/order` (`signed_order`,
554
+ `extension`, `quote_id`, optionally `order_hash`) plus the owner's
555
+ signature over `order.safe_message_eip712`. The maker on the order
556
+ struct is the Tokenized Assets Account, not the owner's wallet —
557
+ pass `signed_order` back unchanged.
532
558
 
533
- Returns the order hash and a server-side timestamp. Subsequent calls to
534
- `GET /order/{order_hash}` track lifecycle (`pending` → `filled` /
535
- `expired` / `cancelled`).
559
+ Returns the order hash and a server-side ISO 8601 timestamp.
560
+ Subsequent calls to `GET /order/{order_hash}` track the lifecycle
561
+ (`pending` → `filled` / `expired` / `cancelled`).
536
562
 
537
563
  ### Example Usage
538
564
 
@@ -618,19 +644,17 @@ run();
618
644
 
619
645
  ## tokenizedAssetsOrderOrderHashCancel
620
646
 
621
- Build a SafeTx EIP-712 wrapping the on-chain cancel for a Fusion order.
647
+ Build the EIP-712 payload to cancel an unfilled order on-chain.
622
648
 
623
- Returns ``cancel_safe_tx_eip712``: an EIP-712 ``Safe.execTransaction``
624
- payload whose inner call is ``LOP.cancelOrder(makerTraits, orderHash)``.
625
- Sign with the Tokenized Assets Account's owner via
626
- ``wallet.signTypedData(...)`` and relay via ``POST /v2/gas_sponsorship/prepare``
627
- so the sponsor broadcasts ``execTransaction`` on the product account
628
- (the order's maker). The owner can also broadcast ``execTransaction``
629
- directly if not using gas sponsorship.
649
+ Returns ``cancel_safe_tx_eip712``, an EIP-712 payload that authorizes
650
+ the on-chain cancellation. Sign with the Tokenized Assets Account's
651
+ owner via ``wallet.signTypedData(...)`` and relay via
652
+ ``POST /v2/gas_sponsorship/prepare`` so the sponsor broadcasts the
653
+ cancellation on the product account. The owner can also broadcast
654
+ the resulting transaction directly without using gas sponsorship.
630
655
 
631
- Authorization is on the *predicted* Safe address: the Tokenized Assets
632
- Account computed from ``owner`` must match the order's on-chain maker.
633
- Mismatches return 403 ``OWNER_NOT_MAKER`` before any on-chain reads.
656
+ Cancellation works on `pending` and `expired` orders only. Only the
657
+ Tokenized Assets Account that placed the order can cancel it.
634
658
 
635
659
  ### Example Usage
636
660
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.46-rc.0",
3
+ "version": "2.2.46-rc.1",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -27,22 +27,26 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Create account
30
+ * Create a Tokenized Assets Account
31
31
  *
32
32
  * @remarks
33
33
  * Create a Tokenized Assets Account for a wallet address.
34
34
  *
35
- * Each wallet address has one Tokenized Assets Account per chain. It is owned by
36
- * `owner` and isolated from the owner's Earn, Credit, and Traditional Investing
37
- * accounts.
35
+ * Before placing orders, the owner must create a Tokenized Assets Account.
36
+ * Each wallet address has one Tokenized Assets Account, isolated from the
37
+ * owner's Earn, Credit, and other product accounts.
38
38
  *
39
- * Returns an unsigned transaction to create the account. The `sender` signs and
40
- * broadcasts this transaction.
39
+ * The account address is deterministic. If it already exists, the
40
+ * response returns `transaction: null` and you can skip straight to
41
+ * building orders.
42
+ *
43
+ * Returns an unsigned transaction to create the account. The `sender`
44
+ * signs and broadcasts this transaction.
41
45
  *
42
46
  * **If owner pays gas:** Set `sender` to the owner's address.
43
47
  *
44
- * **If someone else pays gas:** Set `sender` to the wallet that will sign and
45
- * broadcast the transaction on behalf of the owner.
48
+ * **If someone else pays gas:** Set `sender` to the wallet that will
49
+ * sign and broadcast the transaction on behalf of the owner.
46
50
  */
47
51
  export function tokenizedAssetsTokenizedAssetsCreateAccount(
48
52
  client: CompassApiSDKCore,
@@ -28,13 +28,18 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * List equity markets
31
+ * List tokenized equity markets
32
32
  *
33
33
  * @remarks
34
- * List tokenized equities surfaced on Ethereum.
34
+ * List the tokenized US equities available on Ethereum.
35
35
  *
36
- * Composed from Ondo's metadata + enhanced-prices feeds. Non-Ethereum-only
37
- * assets (BSC/Solana deployments without an Ethereum twin) are skipped.
36
+ * Each entry includes the symbol, the underlying ticker, the on-chain
37
+ * contract address, the latest USD price, and 24h price change. Filter
38
+ * by `category` (sector tag) or `search` (substring match against symbol,
39
+ * ticker, or name).
40
+ *
41
+ * Only Ethereum-deployed tokens are returned; assets that exist only on
42
+ * other chains are omitted.
38
43
  */
39
44
  export function tokenizedAssetsTokenizedAssetsMarkets(
40
45
  client: CompassApiSDKCore,
@@ -31,13 +31,21 @@ import { Result } from "../types/fp.js";
31
31
  * Get a single market
32
32
  *
33
33
  * @remarks
34
- * Single-market detail for the on-chain Ondo symbol (e.g. `TSLAon`).
34
+ * Get extended detail for a single tokenized equity (e.g. `TSLAon`).
35
35
  *
36
- * OHLC candles are opt-in via `interval` + `range`:
36
+ * Includes 52-week range, volume, market cap, holder count, and tradable
37
+ * sessions in addition to the fields returned by `/markets`.
37
38
  *
38
- * - Both omitted: 200 with `candles` absent.
39
- * - Both supplied and forming a valid Ondo pair: 200 with `candles` populated.
40
- * - Exactly one supplied, or both supplied with an invalid pair: 400.
39
+ * **OHLC candles** are opt-in: pass both `interval` and `range` query
40
+ * params to include a `candles` array in the response. They must be
41
+ * provided together and must form one of the supported pairs:
42
+ *
43
+ * - `1min` / `5min` / `15min` with `range=1day`
44
+ * - `1hour` / `4hour` with `range=1month`
45
+ * - `12hour` with `range=3month`
46
+ * - `1day` with `range=3month` / `6month` / `1year` / `all`
47
+ *
48
+ * Omitting both returns the market detail without `candles`.
41
49
  */
42
50
  export function tokenizedAssetsTokenizedAssetsMarketsSymbol(
43
51
  client: CompassApiSDKCore,
@@ -30,24 +30,25 @@ import { Result } from "../types/fp.js";
30
30
  * Build a buy/sell order
31
31
  *
32
32
  * @remarks
33
- * Build a quote, optional approve SafeTx, and SafeMessage EIP-712 to sign.
33
+ * Build a buy or sell order whose maker is the Tokenized Assets Account.
34
34
  *
35
- * Returns everything the SDK needs to take an `owner` from "I want to buy"
36
- * to a relayed Fusion order whose maker is the Tokenized Assets Account.
37
- * The flow is **signing-based, not transaction-based**:
35
+ * Returns up to three pieces in a single round-trip:
38
36
  *
39
- * 1. If `approval_safe_tx_eip712` is populated (Safe→LOP allowance is
40
- * insufficient), sign it with `wallet.signTypedData(...)` and relay via
41
- * `POST /v2/gas_sponsorship/prepare` so the sponsor broadcasts the resulting
42
- * `Safe.execTransaction(USDC.approve(LOP_v4, ...))`. Wait for that tx
43
- * to confirm before signing the order.
44
- * 2. Sign `order.safe_message_eip712` with the same owner wallet this is
45
- * a Safe ERC-1271 wrapper around the Fusion order hash. POST the
46
- * resulting 65-byte ECDSA together with the rest of the `order` fields
47
- * to `/order/submit`.
37
+ * - **`quote`** preview of the input/output amounts and fees.
38
+ * - **`approval_safe_tx_eip712`** only present when the account's
39
+ * allowance to the settlement contract is below `amount`. The owner
40
+ * signs this EIP-712 payload, then it is broadcast via
41
+ * `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast
42
+ * directly) to set the on-chain allowance. Wait for that transaction
43
+ * to confirm before signing the order.
44
+ * - **`order`** the order metadata (`order_hash`, `extension`,
45
+ * `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712
46
+ * payload the owner signs off-chain to authorize the order. The
47
+ * signature is submitted to `/order/submit` and is **never** broadcast
48
+ * on-chain.
48
49
  *
49
- * The owner never broadcasts an on-chain transaction in this flow; all
50
- * on-chain action goes through the product account via the sponsor relay.
50
+ * The owner never broadcasts the order itself only the (one-time)
51
+ * approval transaction ever hits the chain.
51
52
  */
52
53
  export function tokenizedAssetsTokenizedAssetsOrder(
53
54
  client: CompassApiSDKCore,
@@ -31,11 +31,15 @@ import { Result } from "../types/fp.js";
31
31
  * Get order status
32
32
  *
33
33
  * @remarks
34
- * Status of a relayed Fusion order — `pending` / `filled` / `expired` / `cancelled`.
34
+ * Get the lifecycle state of a submitted order.
35
35
  *
36
- * Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) are
37
- * collapsed into the 4-value enum the SDK promises. Unknown upstream states
38
- * surface as 502 to alert on schema drift.
36
+ * The `status` field is one of `pending`, `filled`, `expired`, or
37
+ * `cancelled`. Partial fills stay in `pending` while `filled_amount` is
38
+ * populated as fills come in; once an order fully fills, `fill_tx_hash`
39
+ * is also returned.
40
+ *
41
+ * Upstream protocol states beyond these four (e.g. `partially-filled`,
42
+ * `refunded`) are mapped onto this set.
39
43
  */
40
44
  export function tokenizedAssetsTokenizedAssetsOrderOrderHash(
41
45
  client: CompassApiSDKCore,
@@ -31,19 +31,17 @@ import { Result } from "../types/fp.js";
31
31
  * Cancel an unfilled order
32
32
  *
33
33
  * @remarks
34
- * Build a SafeTx EIP-712 wrapping the on-chain cancel for a Fusion order.
34
+ * Build the EIP-712 payload to cancel an unfilled order on-chain.
35
35
  *
36
- * Returns ``cancel_safe_tx_eip712``: an EIP-712 ``Safe.execTransaction``
37
- * payload whose inner call is ``LOP.cancelOrder(makerTraits, orderHash)``.
38
- * Sign with the Tokenized Assets Account's owner via
39
- * ``wallet.signTypedData(...)`` and relay via ``POST /v2/gas_sponsorship/prepare``
40
- * so the sponsor broadcasts ``execTransaction`` on the product account
41
- * (the order's maker). The owner can also broadcast ``execTransaction``
42
- * directly if not using gas sponsorship.
36
+ * Returns ``cancel_safe_tx_eip712``, an EIP-712 payload that authorizes
37
+ * the on-chain cancellation. Sign with the Tokenized Assets Account's
38
+ * owner via ``wallet.signTypedData(...)`` and relay via
39
+ * ``POST /v2/gas_sponsorship/prepare`` so the sponsor broadcasts the
40
+ * cancellation on the product account. The owner can also broadcast
41
+ * the resulting transaction directly without using gas sponsorship.
43
42
  *
44
- * Authorization is on the *predicted* Safe address: the Tokenized Assets
45
- * Account computed from ``owner`` must match the order's on-chain maker.
46
- * Mismatches return 403 ``OWNER_NOT_MAKER`` before any on-chain reads.
43
+ * Cancellation works on `pending` and `expired` orders only. Only the
44
+ * Tokenized Assets Account that placed the order can cancel it.
47
45
  */
48
46
  export function tokenizedAssetsTokenizedAssetsOrderOrderHashCancel(
49
47
  client: CompassApiSDKCore,
@@ -27,21 +27,20 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Submit a signed order to 1inch Fusion
30
+ * Submit a signed order
31
31
  *
32
32
  * @remarks
33
- * Relay an owner-signed Fusion order to the 1inch relayer.
33
+ * Submit a signed order to the resolver network.
34
34
  *
35
- * The body carries the signature produced by
36
- * `wallet.signTypedData(order.safe_message_eip712)` from the `/order`
37
- * response, plus the order struct (`signed_order`), opaque `extension`,
38
- * and `quote_id`. The signature is validated via ERC-1271
39
- * (`Safe.isValidSignature`) at fill time — the maker on the order struct
40
- * is the Tokenized Assets Account, not the EOA owner.
35
+ * The body echoes the `order` fields from `/order` (`signed_order`,
36
+ * `extension`, `quote_id`, optionally `order_hash`) plus the owner's
37
+ * signature over `order.safe_message_eip712`. The maker on the order
38
+ * struct is the Tokenized Assets Account, not the owner's wallet —
39
+ * pass `signed_order` back unchanged.
41
40
  *
42
- * Returns the order hash and a server-side timestamp. Subsequent calls to
43
- * `GET /order/{order_hash}` track lifecycle (`pending` → `filled` /
44
- * `expired` / `cancelled`).
41
+ * Returns the order hash and a server-side ISO 8601 timestamp.
42
+ * Subsequent calls to `GET /order/{order_hash}` track the lifecycle
43
+ * (`pending` → `filled` / `expired` / `cancelled`).
45
44
  */
46
45
  export function tokenizedAssetsTokenizedAssetsOrderSubmit(
47
46
  client: CompassApiSDKCore,
@@ -28,14 +28,19 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * Get on-chain positions for a wallet
31
+ * Get tokenized-asset positions for a wallet
32
32
  *
33
33
  * @remarks
34
- * On-chain ERC-20 balance reads for a wallet across all listed Ondo GM tokens.
34
+ * Get the tokenized-asset holdings for a wallet.
35
35
  *
36
- * Reads each Ethereum-deployed Ondo GM token's `balanceOf(wallet)` via a
37
- * single Multicall3 batch and enriches non-zero balances with the latest USD
38
- * price. Returns human-readable amounts (decimals applied).
36
+ * Returns the balance of every listed tokenized equity at the queried
37
+ * address, plus the latest USD price and a USD-valued balance when
38
+ * pricing is available. Zero balances are omitted, and a `total_usd`
39
+ * aggregate is returned across all priced positions.
40
+ *
41
+ * Pass the **Tokenized Assets Account address** (returned by
42
+ * `/create_account`), not the owner's wallet — proceeds from filled
43
+ * orders settle into the Tokenized Assets Account.
39
44
  */
40
45
  export function tokenizedAssetsTokenizedAssetsPositions(
41
46
  client: CompassApiSDKCore,
@@ -10,13 +10,13 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * Chain on which the surfaced contract is deployed.
13
+ * Chain on which the contract is deployed.
14
14
  */
15
15
  export const CompassApiBackendV2ModelsTokenizedAssetsMarketMarketChain = {
16
16
  Ethereum: "ethereum",
17
17
  } as const;
18
18
  /**
19
- * Chain on which the surfaced contract is deployed.
19
+ * Chain on which the contract is deployed.
20
20
  */
21
21
  export type CompassApiBackendV2ModelsTokenizedAssetsMarketMarketChain =
22
22
  ClosedEnum<typeof CompassApiBackendV2ModelsTokenizedAssetsMarketMarketChain>;
@@ -38,7 +38,7 @@ export type CompassApiBackendV2ModelsTokenizedAssetsMarketMarket = {
38
38
  */
39
39
  name: string;
40
40
  /**
41
- * Chain on which the surfaced contract is deployed.
41
+ * Chain on which the contract is deployed.
42
42
  */
43
43
  chain?: CompassApiBackendV2ModelsTokenizedAssetsMarketMarketChain | undefined;
44
44
  /**
@@ -46,7 +46,7 @@ export type CompassApiBackendV2ModelsTokenizedAssetsMarketMarket = {
46
46
  */
47
47
  contractAddress: string;
48
48
  /**
49
- * ERC-20 decimals on the surfaced chain.
49
+ * ERC-20 decimals for this token.
50
50
  */
51
51
  decimals: number;
52
52
  /**
@@ -12,13 +12,13 @@ import { OhlcCandle, OhlcCandle$inboundSchema } from "./ohlccandle.js";
12
12
  import { PricePoint, PricePoint$inboundSchema } from "./pricepoint.js";
13
13
 
14
14
  /**
15
- * Chain on which the surfaced contract is deployed.
15
+ * Chain on which the contract is deployed.
16
16
  */
17
17
  export const MarketDetailChain = {
18
18
  Ethereum: "ethereum",
19
19
  } as const;
20
20
  /**
21
- * Chain on which the surfaced contract is deployed.
21
+ * Chain on which the contract is deployed.
22
22
  */
23
23
  export type MarketDetailChain = ClosedEnum<typeof MarketDetailChain>;
24
24
 
@@ -39,7 +39,7 @@ export type MarketDetail = {
39
39
  */
40
40
  name: string;
41
41
  /**
42
- * Chain on which the surfaced contract is deployed.
42
+ * Chain on which the contract is deployed.
43
43
  */
44
44
  chain?: MarketDetailChain | undefined;
45
45
  /**
@@ -47,7 +47,7 @@ export type MarketDetail = {
47
47
  */
48
48
  contractAddress: string;
49
49
  /**
50
- * ERC-20 decimals on the surfaced chain.
50
+ * ERC-20 decimals for this token.
51
51
  */
52
52
  decimals: number;
53
53
  /**
@@ -71,7 +71,7 @@ export type MarketDetail = {
71
71
  */
72
72
  regionExposure?: Array<string> | undefined;
73
73
  /**
74
- * 24h price sparkline (sampled timestamps, descending or ascending).
74
+ * 24h price sparkline as `(timestamp, price)` samples in chronological order.
75
75
  */
76
76
  priceHistory24h?: Array<PricePoint> | undefined;
77
77
  /**
@@ -8,7 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  /**
11
- * A single OHLC candle. Note: Ondo does not return per-candle volume.
11
+ * A single OHLC candle. Per-candle volume is not provided.
12
12
  */
13
13
  export type OhlcCandle = {
14
14
  /**
@@ -10,7 +10,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * Coarse-grained order state. Compass collapses Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) into this 4-value enum.
13
+ * Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
14
14
  */
15
15
  export const Status = {
16
16
  Pending: "pending",
@@ -19,7 +19,7 @@ export const Status = {
19
19
  Cancelled: "cancelled",
20
20
  } as const;
21
21
  /**
22
- * Coarse-grained order state. Compass collapses Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) into this 4-value enum.
22
+ * Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
23
23
  */
24
24
  export type Status = ClosedEnum<typeof Status>;
25
25
 
@@ -32,27 +32,27 @@ export type OrderStatus = {
32
32
  */
33
33
  orderHash: string;
34
34
  /**
35
- * Coarse-grained order state. Compass collapses Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) into this 4-value enum.
35
+ * Order lifecycle state. One of `pending`, `filled`, `expired`, or `cancelled`. Upstream protocol states beyond these four (e.g. `partially-filled`, `refunded`) are mapped onto this set.
36
36
  */
37
37
  status: Status;
38
38
  /**
39
- * Tx hash of the most recent resolver fill (populated when filled or partially filled).
39
+ * Transaction hash of the most recent fill. Populated for fully filled orders and for partial fills while `status` is still `pending`.
40
40
  */
41
41
  fillTxHash?: string | null | undefined;
42
42
  /**
43
- * Implied USD execution rate per unit of the taker token, derived from filled amounts and the maker-side USD price. For USDC→equity buys this is the USD paid per equity unit. Omitted if maker/taker decimals are unknown.
43
+ * Implied USD execution rate per unit of the received token, derived from filled amounts and the input token's USD price. For USDC equity buys, this is the USD paid per equity unit. Omitted when token decimals or pricing are not available.
44
44
  */
45
45
  fillPriceUsd?: string | null | undefined;
46
46
  /**
47
- * Sum of base-unit amounts filled so far. Populated for partial fills while `status` is still `pending`, and for fully filled orders.
47
+ * Total amount filled so far, expressed as a raw integer in the input token's decimals. Populated for partial fills while `status` is still `pending`, and for fully filled orders.
48
48
  */
49
49
  filledAmount?: string | null | undefined;
50
50
  /**
51
- * ISO 8601 UTC timestamp of order submission.
51
+ * ISO 8601 UTC timestamp at which the order was submitted.
52
52
  */
53
53
  submittedAt?: string | null | undefined;
54
54
  /**
55
- * ISO 8601 UTC timestamp of this status read.
55
+ * ISO 8601 UTC timestamp at which this status was read.
56
56
  */
57
57
  updatedAt: string;
58
58
  };