@compass-labs/api-sdk 2.2.63-rc.0 → 2.2.64-rc.0

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 (135) hide show
  1. package/README.md +14 -14
  2. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts +4 -1
  3. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts.map +1 -1
  4. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js +4 -1
  5. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js.map +1 -1
  6. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts +9 -6
  7. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.js +9 -6
  9. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarkets.js.map +1 -1
  10. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts +9 -6
  11. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js +10 -6
  13. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js.map +1 -1
  14. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +7 -2
  15. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.js +7 -2
  17. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.js.map +1 -1
  18. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts +6 -2
  19. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js +6 -2
  21. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js.map +1 -1
  22. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts +1 -1
  23. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js +1 -1
  24. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +1 -1
  25. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +1 -1
  26. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts +9 -7
  27. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts.map +1 -1
  28. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.js +9 -7
  29. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsPositions.js.map +1 -1
  30. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts +9 -3
  31. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts.map +1 -1
  32. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.js +9 -3
  33. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.js.map +1 -1
  34. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.d.ts +10 -8
  35. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.d.ts.map +1 -1
  36. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.js +10 -8
  37. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.js.map +1 -1
  38. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactSell.d.ts +8 -6
  39. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactSell.d.ts.map +1 -1
  40. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactSell.js +8 -6
  41. package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsTransactSell.js.map +1 -1
  42. package/dist/commonjs/lib/config.d.ts +2 -2
  43. package/dist/commonjs/lib/config.js +2 -2
  44. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  45. package/dist/commonjs/lib/sdks.js +37 -12
  46. package/dist/commonjs/lib/sdks.js.map +1 -1
  47. package/dist/commonjs/models/components/tokenizedassetstraderequest.d.ts +2 -2
  48. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts +22 -0
  49. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js +14 -1
  51. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  52. package/dist/commonjs/sdk/tokenizedassets.d.ts +73 -43
  53. package/dist/commonjs/sdk/tokenizedassets.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/tokenizedassets.js +73 -43
  55. package/dist/commonjs/sdk/tokenizedassets.js.map +1 -1
  56. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts +4 -1
  57. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.d.ts.map +1 -1
  58. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js +4 -1
  59. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.js.map +1 -1
  60. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts +9 -6
  61. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.d.ts.map +1 -1
  62. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.js +9 -6
  63. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarkets.js.map +1 -1
  64. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts +9 -6
  65. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.d.ts.map +1 -1
  66. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js +10 -6
  67. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.js.map +1 -1
  68. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +7 -2
  69. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts.map +1 -1
  70. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.js +7 -2
  71. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.js.map +1 -1
  72. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts +6 -2
  73. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.d.ts.map +1 -1
  74. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js +6 -2
  75. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.js.map +1 -1
  76. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.d.ts +1 -1
  77. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.js +1 -1
  78. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +1 -1
  79. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +1 -1
  80. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts +9 -7
  81. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.d.ts.map +1 -1
  82. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.js +9 -7
  83. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsPositions.js.map +1 -1
  84. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts +9 -3
  85. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts.map +1 -1
  86. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.js +9 -3
  87. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.js.map +1 -1
  88. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.d.ts +10 -8
  89. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.d.ts.map +1 -1
  90. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.js +10 -8
  91. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.js.map +1 -1
  92. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactSell.d.ts +8 -6
  93. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactSell.d.ts.map +1 -1
  94. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactSell.js +8 -6
  95. package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsTransactSell.js.map +1 -1
  96. package/dist/esm/lib/config.d.ts +2 -2
  97. package/dist/esm/lib/config.js +2 -2
  98. package/dist/esm/lib/sdks.d.ts.map +1 -1
  99. package/dist/esm/lib/sdks.js +37 -12
  100. package/dist/esm/lib/sdks.js.map +1 -1
  101. package/dist/esm/models/components/tokenizedassetstraderequest.d.ts +2 -2
  102. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts +22 -0
  103. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  104. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js +13 -0
  105. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  106. package/dist/esm/sdk/tokenizedassets.d.ts +73 -43
  107. package/dist/esm/sdk/tokenizedassets.d.ts.map +1 -1
  108. package/dist/esm/sdk/tokenizedassets.js +73 -43
  109. package/dist/esm/sdk/tokenizedassets.js.map +1 -1
  110. package/docs/models/components/tokenizedassetstraderequest.md +9 -9
  111. package/docs/models/operations/v2tokenizedassetsmarketssymbolchain.md +17 -0
  112. package/docs/models/operations/v2tokenizedassetsmarketssymbolrequest.md +6 -5
  113. package/docs/sdks/tokenizedassets/README.md +73 -44
  114. package/examples/node_modules/@types/node/README.md +1 -1
  115. package/examples/node_modules/@types/node/http2.d.ts +1 -0
  116. package/examples/node_modules/@types/node/package.json +2 -2
  117. package/examples/package-lock.json +3 -3
  118. package/openapi_prepped_for_speakeasy.json +46 -28
  119. package/package.json +1 -1
  120. package/src/funcs/tokenizedAssetsTokenizedAssetsCreateAccount.ts +4 -1
  121. package/src/funcs/tokenizedAssetsTokenizedAssetsMarkets.ts +9 -6
  122. package/src/funcs/tokenizedAssetsTokenizedAssetsMarketsSymbol.ts +10 -6
  123. package/src/funcs/tokenizedAssetsTokenizedAssetsOrder.ts +7 -2
  124. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHash.ts +6 -2
  125. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashCancel.ts +1 -1
  126. package/src/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.ts +1 -1
  127. package/src/funcs/tokenizedAssetsTokenizedAssetsPositions.ts +9 -7
  128. package/src/funcs/tokenizedAssetsTokenizedAssetsQuote.ts +9 -7
  129. package/src/funcs/tokenizedAssetsTokenizedAssetsTransactBuy.ts +10 -8
  130. package/src/funcs/tokenizedAssetsTokenizedAssetsTransactSell.ts +8 -6
  131. package/src/lib/config.ts +2 -2
  132. package/src/lib/sdks.ts +41 -13
  133. package/src/models/components/tokenizedassetstraderequest.ts +2 -2
  134. package/src/models/operations/v2tokenizedassetsmarketssymbol.ts +30 -0
  135. package/src/sdk/tokenizedassets.ts +73 -43
@@ -7022,7 +7022,7 @@
7022
7022
  "Tokenized Assets"
7023
7023
  ],
7024
7024
  "summary": "List tokenized asset markets",
7025
- "description": "List tokenized asset markets: Ondo equities and Midas RWA yield tokens.\n\nEach entry includes the symbol, the underlying ticker, the on-chain\ncontract address, the latest USD price, and 24h price change. Filter\nby `category` (sector tag) or `search` (substring match against symbol,\nticker, or name).\n\nOnly Ethereum-deployed tokens are returned; assets that exist only on\nother chains are omitted.",
7025
+ "description": "List tokenized asset markets: Ondo equities and Midas RWA yield tokens.\n\nEach entry carries `provider` (`ondo` | `midas`), `asset_class` (`EQUITY` |\n`T_BILLS` | `BASIS_TRADE` | `BTC_YIELD`), `chain`, the symbol, underlying\nticker, contract address, latest USD price, and 24h change; RWA-yield entries\nadd `apy_7d`/`apy_30d` and `tvl_usd`. Filter with `provider`, `asset_class`,\nand `chain`, plus `category` (sector tag \u2014 equities only) or `search`\n(substring match against symbol, ticker, or name).\n\nEquities are Ethereum-only; RWA yield tokens also list on Base \u2014 pass\n`chain=base` to see them. How to trade each: `asset_class=EQUITY` \u2192\n`/quote` + `/order`; the RWA classes \u2192 `/transact/buy` + `/transact/sell`.",
7026
7026
  "operationId": "v2_tokenized_assets_markets",
7027
7027
  "parameters": [
7028
7028
  {
@@ -7157,7 +7157,7 @@
7157
7157
  "Tokenized Assets"
7158
7158
  ],
7159
7159
  "summary": "Get a single market",
7160
- "description": "Get extended detail for a single tokenized equity (e.g. `TSLAon`).\n\nIncludes 52-week range, volume, market cap, holder count, and tradable\nsessions in addition to the fields returned by `/markets`.\n\n**OHLC candles** are opt-in: pass both `interval` and `range` query\nparams to include a `candles` array in the response. They must be\nprovided together and must form one of the supported pairs:\n\n- `1min` / `5min` / `15min` with `range=1day`\n- `1hour` / `4hour` with `range=1month`\n- `12hour` with `range=3month`\n- `1day` with `range=3month` / `6month` / `1year` / `all`\n\nOmitting both returns the market detail without `candles`.",
7160
+ "description": "Get extended detail for a single tokenized market.\n\nWorks for both asset families: an Ondo **equity** (e.g. `TSLAon`) or a\nMidas **RWA yield token** (e.g. `mTBILL`). Equities add 52-week range,\nvolume, market cap, holder count, and tradable sessions on top of the\n`/markets` fields; RWA-yield entries instead carry `apy_7d`/`apy_30d` and\n`tvl_usd`.\n\n**OHLC candles are an equities-only feature** \u2014 opt in by passing both\n`interval` and `range` query params to include a `candles` array. They\nmust be provided together and must form one of the supported pairs:\n\n- `1min` / `5min` / `15min` with `range=1day`\n- `1hour` / `4hour` with `range=1month`\n- `12hour` with `range=3month`\n- `1day` with `range=3month` / `6month` / `1year` / `all`\n\nOmitting both returns the market detail without `candles`.",
7161
7161
  "operationId": "v2_tokenized_assets_markets_{symbol}",
7162
7162
  "parameters": [
7163
7163
  {
@@ -7169,6 +7169,24 @@
7169
7169
  "title": "Symbol"
7170
7170
  }
7171
7171
  },
7172
+ {
7173
+ "name": "chain",
7174
+ "in": "query",
7175
+ "required": false,
7176
+ "schema": {
7177
+ "type": "string",
7178
+ "enum": [
7179
+ "base",
7180
+ "ethereum",
7181
+ "arbitrum",
7182
+ "hyperevm",
7183
+ "tempo"
7184
+ ],
7185
+ "title": "Chain",
7186
+ "description": "The chain to use."
7187
+ },
7188
+ "description": "Network the market is deployed on (defaults to Ethereum). A token deployed on multiple chains (e.g. Midas RWA on Ethereum and Base) is resolved per chain; 404 if the symbol isn't deployed there. Ondo equities are Ethereum-only."
7189
+ },
7172
7190
  {
7173
7191
  "name": "interval",
7174
7192
  "in": "query",
@@ -7226,7 +7244,7 @@
7226
7244
  }
7227
7245
  },
7228
7246
  "404": {
7229
- "description": "`MARKET_NOT_FOUND` \u2014 symbol is not a supported tokenized market on Ethereum.",
7247
+ "description": "`MARKET_NOT_FOUND` \u2014 symbol is not a supported tokenized market (Ondo equity or Midas RWA yield token).",
7230
7248
  "content": {
7231
7249
  "application/json": {
7232
7250
  "schema": {
@@ -7265,7 +7283,7 @@
7265
7283
  "Tokenized Assets"
7266
7284
  ],
7267
7285
  "summary": "Get tokenized-asset positions for an owner",
7268
- "description": "Get the tokenized-equity holdings for an owner.\n\nThe owner's Tokenized Assets Account address is derived deterministically\nfrom the `owner` query param; balances are read from that account (proceeds\nfrom filled orders settle there). The response returns the balance of every\nlisted tokenized equity, plus the latest USD price and a USD-valued balance\nwhen pricing is available. Zero balances are omitted, and a `total_usd`\naggregate is returned across all priced positions.\n\nReturns 400 `ACCOUNT_NOT_DEPLOYED` if the owner has no Tokenized Assets\nAccount deployed yet \u2014 create one via `/create_account` first.",
7286
+ "description": "Get the tokenized-asset holdings for an owner.\n\nCovers **both** asset families held in the account \u2014 Ondo equities and\nMidas RWA yield tokens (`mTBILL`, `mBASIS`, `mBTC`). The Tokenized Assets\nAccount address is derived deterministically from the `owner` query param;\nbalances are read from that account (proceeds from equity orders and RWA\nswaps both settle there). Equity positions are priced from the Ondo feed;\nRWA positions are valued at the latest indexed NAV. Pass `chain=base` for\nBase holdings (equities are Ethereum-only). Zero balances are omitted, and\na `total_usd` aggregate is returned across all priced positions.\n\nReturns 400 `ACCOUNT_NOT_DEPLOYED` if the owner has no Tokenized Assets\nAccount deployed yet \u2014 create one via `/create_account` first.",
7269
7287
  "operationId": "v2_tokenized_assets_positions",
7270
7288
  "parameters": [
7271
7289
  {
@@ -7310,7 +7328,7 @@
7310
7328
  }
7311
7329
  },
7312
7330
  "400": {
7313
- "description": "`ACCOUNT_NOT_DEPLOYED` \u2014 the requesting `owner` does not have a Tokenized Assets Account on Ethereum mainnet. Call `POST /v2/tokenized_assets/create_account` first.",
7331
+ "description": "`ACCOUNT_NOT_DEPLOYED` \u2014 the requesting `owner` does not have a Tokenized Assets Account on the requested network. Call `POST /v2/tokenized_assets/create_account` first.",
7314
7332
  "content": {
7315
7333
  "application/json": {
7316
7334
  "schema": {
@@ -7348,8 +7366,8 @@
7348
7366
  "tags": [
7349
7367
  "Tokenized Assets"
7350
7368
  ],
7351
- "summary": "Get order status",
7352
- "description": "Get the lifecycle state of a submitted order.\n\nThe `status` field is one of `pending`, `filled`, `expired`, or\n`cancelled`. Partial fills stay in `pending` while `filled_amount` is\npopulated as fills come in; once an order fully fills, `fill_tx_hash`\nis also returned.\n\nUpstream protocol states beyond these four (e.g. `partially-filled`,\n`refunded`) are mapped onto this set.",
7369
+ "summary": "Get tokenized-equity order status (Ondo)",
7370
+ "description": "Get the lifecycle state of a submitted tokenized-**equity** order (Ondo).\n\nEquity-order flow only: RWA-yield trades (`/transact/buy`, `/transact/sell`)\nare plain swaps that settle in a single transaction and have no order\nlifecycle to poll.\n\nThe `status` field is one of `pending`, `filled`, `expired`, or\n`cancelled`. Partial fills stay in `pending` while `filled_amount` is\npopulated as fills come in; once an order fully fills, `fill_tx_hash`\nis also returned.\n\nUpstream protocol states beyond these four (e.g. `partially-filled`,\n`refunded`) are mapped onto this set.",
7353
7371
  "operationId": "v2_tokenized_assets_order_{order_hash}",
7354
7372
  "parameters": [
7355
7373
  {
@@ -7423,7 +7441,7 @@
7423
7441
  "Tokenized Assets"
7424
7442
  ],
7425
7443
  "summary": "Create a Tokenized Assets Account",
7426
- "description": "Create a Tokenized Assets Account for a wallet address.\n\nBefore placing orders, the owner must create a Tokenized Assets Account.\nEach wallet address has one Tokenized Assets Account, isolated from the\nowner's Earn, Credit, and other product accounts.\n\nThe account address is deterministic. If it already exists, the\nresponse returns `transaction: null` and you can skip straight to\nbuilding orders.\n\nReturns an unsigned transaction to create the account. The `sender`\nsigns and broadcasts this transaction.\n\n**If owner pays gas:** Set `sender` to the owner's address.\n\n**If someone else pays gas:** Set `sender` to the wallet that will\nsign and broadcast the transaction on behalf of the owner.",
7444
+ "description": "Create a Tokenized Assets Account for a wallet address.\n\nRequired once before **either** trade flow \u2014 tokenized-equity orders\n(Ondo, via `/quote` + `/order`) and RWA-yield-token swaps (Midas, via\n`/transact/buy` + `/transact/sell`) both settle into this one account.\n\nEach wallet address has one Tokenized Assets Account, isolated from the\nowner's Earn, Credit, and other product accounts.\n\nThe account address is deterministic. If it already exists, the\nresponse returns `transaction: null` and you can skip straight to\nbuilding orders.\n\nReturns an unsigned transaction to create the account. The `sender`\nsigns and broadcasts this transaction.\n\n**If owner pays gas:** Set `sender` to the owner's address.\n\n**If someone else pays gas:** Set `sender` to the wallet that will\nsign and broadcast the transaction on behalf of the owner.",
7427
7445
  "operationId": "v2_tokenized_assets_create_account",
7428
7446
  "requestBody": {
7429
7447
  "content": {
@@ -7518,8 +7536,8 @@
7518
7536
  "tags": [
7519
7537
  "Tokenized Assets"
7520
7538
  ],
7521
- "summary": "Preview a buy/sell quote",
7522
- "description": "Preview the input/output amounts, fees, and slippage tolerance for an order.\n\nRead-only relative to Fusion: hits ``/quote/receive`` only and does not\nconsume a ``quote_id`` or commit an order. Pair with `POST /order`:\nsurface this preview to the user, and on confirm pass the body plus\n``recommended_slippage_bps`` to `/order`.\n\nThe response carries:\n\n- **`quote`** \u2014 input/output token amounts, fees, and an\n ``est_fill_seconds`` upper bound.\n- **`recommended_slippage_bps`** \u2014 system-derived slippage tolerance\n that clears Fusion's current auction floor; pass back as\n ``slippage_bps`` on `/order` so the build call validates against the\n same floor the user was shown.\n- **`auction_range_bps`** \u2014 worst-case bps gap between the auction\n end amount and the reference quote amount. Use to surface a\n thin-liquidity warning to the user.",
7539
+ "summary": "Preview a tokenized-equity buy/sell quote (Ondo)",
7540
+ "description": "Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected here with 422 `WRONG_TRADE_FLOW`; they have no auction/quote step \u2014\nbuy/sell them directly via `/transact/buy` & `/transact/sell`.\n\nReturns the input/output amounts, fees, and slippage tolerance for an order.\n\nRead-only relative to Fusion: hits ``/quote/receive`` only and does not\nconsume a ``quote_id`` or commit an order. Pair with `POST /order`:\nsurface this preview to the user, and on confirm pass the body plus\n``recommended_slippage_bps`` to `/order`.\n\nThe response carries:\n\n- **`quote`** \u2014 input/output token amounts, fees, and an\n ``est_fill_seconds`` upper bound.\n- **`recommended_slippage_bps`** \u2014 system-derived slippage tolerance\n that clears Fusion's current auction floor; pass back as\n ``slippage_bps`` on `/order` so the build call validates against the\n same floor the user was shown.\n- **`auction_range_bps`** \u2014 worst-case bps gap between the auction\n end amount and the reference quote amount. Use to surface a\n thin-liquidity warning to the user.",
7523
7541
  "operationId": "v2_tokenized_assets_quote",
7524
7542
  "requestBody": {
7525
7543
  "content": {
@@ -7572,8 +7590,8 @@
7572
7590
  }
7573
7591
  }
7574
7592
  },
7575
- "502": {
7576
- "description": "`FUSION_API_UNAVAILABLE` \u2014 1inch Fusion is unavailable.",
7593
+ "422": {
7594
+ "description": "`WRONG_TRADE_FLOW` \u2014 an RWA yield token (mTBILL/mBASIS/mBTC) was passed to the equity quote endpoint. Quote/trade it via the swap endpoints (`/transact/buy`, `/transact/sell`) instead. (Standard input-validation 422s use FastAPI's `{detail: [...]}` shape.)",
7577
7595
  "content": {
7578
7596
  "application/json": {
7579
7597
  "schema": {
@@ -7582,12 +7600,12 @@
7582
7600
  }
7583
7601
  }
7584
7602
  },
7585
- "422": {
7586
- "description": "Validation Error",
7603
+ "502": {
7604
+ "description": "`FUSION_API_UNAVAILABLE` \u2014 1inch Fusion is unavailable.",
7587
7605
  "content": {
7588
7606
  "application/json": {
7589
7607
  "schema": {
7590
- "$ref": "#/components/schemas/HTTPValidationError"
7608
+ "$ref": "#/components/schemas/TokenizedAssetsErrorResponse"
7591
7609
  }
7592
7610
  }
7593
7611
  }
@@ -7601,8 +7619,8 @@
7601
7619
  "tags": [
7602
7620
  "Tokenized Assets"
7603
7621
  ],
7604
- "summary": "Build a buy/sell order",
7605
- "description": "Build a buy or sell order whose maker is the Tokenized Assets Account.\n\nReturns up to three pieces in a single round-trip:\n\n- **`quote`** \u2014 preview of the input/output amounts and fees.\n- **`approval_safe_tx_eip712`** \u2014 only present when the account's\n allowance to the settlement contract is below `amount`. The owner\n signs this EIP-712 payload, then it is broadcast via\n `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast\n directly) to set the on-chain allowance. Wait for that transaction\n to confirm before signing the order.\n- **`order`** \u2014 the order metadata (`order_hash`, `extension`,\n `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712\n payload the owner signs off-chain to authorize the order. The\n signature is submitted to `/order/submit` and is **never** broadcast\n on-chain.\n\nThe owner never broadcasts the order itself \u2014 only the (one-time)\napproval transaction ever hits the chain.",
7622
+ "summary": "Build a tokenized-equity buy/sell order (Ondo)",
7623
+ "description": "Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected with 422 `WRONG_TRADE_FLOW`; trade them via `/transact/buy` &\n`/transact/sell`. Equity orders are always USDC-paired (USDC\u2192equity to buy,\nequity\u2192USDC to sell) and settle through 1inch Fusion.\n\nReturns up to three pieces in a single round-trip:\n\n- **`quote`** \u2014 preview of the input/output amounts and fees.\n- **`approval_safe_tx_eip712`** \u2014 only present when the account's\n allowance to the settlement contract is below `amount`. The owner\n signs this EIP-712 payload, then it is broadcast via\n `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast\n directly) to set the on-chain allowance. Wait for that transaction\n to confirm before signing the order.\n- **`order`** \u2014 the order metadata (`order_hash`, `extension`,\n `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712\n payload the owner signs off-chain to authorize the order. The\n signature is submitted to `/order/submit` and is **never** broadcast\n on-chain.\n\nThe owner never broadcasts the order itself \u2014 only the (one-time)\napproval transaction ever hits the chain.",
7606
7624
  "operationId": "v2_tokenized_assets_order",
7607
7625
  "requestBody": {
7608
7626
  "content": {
@@ -7666,7 +7684,7 @@
7666
7684
  }
7667
7685
  },
7668
7686
  "422": {
7669
- "description": "`FUSION_SLIPPAGE_EXCEEDED` \u2014 Fusion's auction may fill below the requested `slippage_bps` tolerance. Raise `slippage_bps` or pick a more liquid market. (Also: standard 422 input-validation errors use FastAPI's default `{detail: [...]}` shape \u2014 only `FUSION_SLIPPAGE_EXCEEDED` uses the Compass envelope.)",
7687
+ "description": "`WRONG_TRADE_FLOW` \u2014 an RWA yield token (mTBILL/mBASIS/mBTC) was passed to this equity order endpoint; use `/transact/buy` or `/transact/sell` instead. **or** `FUSION_SLIPPAGE_EXCEEDED` \u2014 Fusion's auction may fill below the requested `slippage_bps` tolerance; raise `slippage_bps` or pick a more liquid market. (Standard 422 input-validation errors use FastAPI's default `{detail: [...]}` shape; both codes above use the Compass envelope.)",
7670
7688
  "content": {
7671
7689
  "application/json": {
7672
7690
  "schema": {
@@ -7694,7 +7712,7 @@
7694
7712
  "tags": [
7695
7713
  "Tokenized Assets"
7696
7714
  ],
7697
- "summary": "Submit a signed order",
7715
+ "summary": "Submit a signed tokenized-equity order (Ondo)",
7698
7716
  "description": "Submit a signed order to the resolver network.\n\nThe body echoes the `order` fields from `/order` (`signed_order`,\n`extension`, `quote_id`, optionally `order_hash`) plus the owner's\nsignature over `order.safe_message_eip712`. The maker on the order\nstruct is the Tokenized Assets Account, not the owner's wallet \u2014\npass `signed_order` back unchanged.\n\nReturns the order hash and a server-side ISO 8601 timestamp.\nSubsequent calls to `GET /order/{order_hash}` track the lifecycle\n(`pending` \u2192 `filled` / `expired` / `cancelled`).",
7699
7717
  "operationId": "v2_tokenized_assets_order_submit",
7700
7718
  "requestBody": {
@@ -7767,7 +7785,7 @@
7767
7785
  "tags": [
7768
7786
  "Tokenized Assets"
7769
7787
  ],
7770
- "summary": "Cancel an unfilled order",
7788
+ "summary": "Cancel an unfilled tokenized-equity order (Ondo)",
7771
7789
  "description": "Build the EIP-712 payload to cancel an unfilled order on-chain.\n\nReturns ``cancel_safe_tx_eip712``, an EIP-712 payload that authorizes\nthe on-chain cancellation. Sign with the Tokenized Assets Account's\nowner via ``wallet.signTypedData(...)`` and relay via\n``POST /v2/gas_sponsorship/prepare`` so the sponsor broadcasts the\ncancellation on the product account. The owner can also broadcast\nthe resulting transaction directly without using gas sponsorship.\n\nCancellation works on `pending` and `expired` orders only. Only the\nTokenized Assets Account that placed the order can cancel it.",
7772
7790
  "operationId": "v2_tokenized_assets_order_{order_hash}_cancel",
7773
7791
  "parameters": [
@@ -7871,8 +7889,8 @@
7871
7889
  "tags": [
7872
7890
  "Tokenized Assets"
7873
7891
  ],
7874
- "summary": "Buy a swap-traded tokenized asset",
7875
- "description": "Buy an RWA yield asset (e.g. `mTBILL`) inside the product account.\n\nSwaps `token_in` (already held by the Tokenized Assets Account \u2014 fund it\nwith a plain transfer first) into `token_out` via the 1inch Aggregation\nRouter, executed by the account. Returns an unsigned transaction for the\nowner to sign, or an EIP-712 payload when `gas_sponsorship` is true.\n\n`token_out` must be a swap-traded tokenized asset; equities trade via the\norder endpoints (`/quote`, `/order`, `/order/submit`).",
7892
+ "summary": "Buy an RWA yield token (Midas: mTBILL/mBASIS/mBTC)",
7893
+ "description": "Buy (mint) an RWA yield asset (e.g. `mTBILL`) inside the product account.\n\nMints `token_out` directly from Midas with `token_in` (a stablecoin already\nheld by the Tokenized Assets Account \u2014 fund it with a plain transfer first).\n`token_in` must be a payment token the Midas issuance vault accepts (USDC on\nevery supported network; mBASIS also accepts USDT/DAI on Ethereum). Returns\nan unsigned transaction for the owner to sign, or an EIP-712 payload when\n`gas_sponsorship` is true.\n\n`token_out` must be a Midas RWA asset; equities trade via the order\nendpoints (`/quote`, `/order`, `/order/submit`).",
7876
7894
  "operationId": "v2_tokenized_assets_transact_buy",
7877
7895
  "requestBody": {
7878
7896
  "content": {
@@ -7896,7 +7914,7 @@
7896
7914
  }
7897
7915
  },
7898
7916
  "422": {
7899
- "description": "The tokenized-asset side of the trade is not a swap-traded asset on the requested network. Equities trade via the order endpoints.",
7917
+ "description": "The tokenized-asset side of the trade is not a Midas RWA asset on the requested network, or the stablecoin is not accepted by the Midas vault. Equities trade via the order endpoints.",
7900
7918
  "content": {
7901
7919
  "application/json": {
7902
7920
  "schema": {
@@ -7914,8 +7932,8 @@
7914
7932
  "tags": [
7915
7933
  "Tokenized Assets"
7916
7934
  ],
7917
- "summary": "Sell a swap-traded tokenized asset",
7918
- "description": "Sell an RWA yield asset (e.g. `mTBILL`) inside the product account.\n\nSwaps `token_in` (a swap-traded tokenized asset held by the Tokenized\nAssets Account) into `token_out` via the 1inch Aggregation Router.\nReturns an unsigned transaction for the owner to sign, or an EIP-712\npayload when `gas_sponsorship` is true.",
7935
+ "summary": "Sell an RWA yield token (Midas: mTBILL/mBASIS/mBTC)",
7936
+ "description": "Sell (redeem) an RWA yield asset (e.g. `mTBILL`) inside the product account.\n\nRedeems `token_in` (a Midas RWA asset held by the Tokenized Assets Account)\ndirectly with Midas into `token_out` (USDC). Returns an unsigned transaction\nfor the owner to sign, or an EIP-712 payload when `gas_sponsorship` is true.\n\nInstant redemption draws on Midas's on-chain liquidity and is subject to a\nsmall redemption fee and daily limit.",
7919
7937
  "operationId": "v2_tokenized_assets_transact_sell",
7920
7938
  "requestBody": {
7921
7939
  "content": {
@@ -7939,7 +7957,7 @@
7939
7957
  }
7940
7958
  },
7941
7959
  "422": {
7942
- "description": "The tokenized-asset side of the trade is not a swap-traded asset on the requested network. Equities trade via the order endpoints.",
7960
+ "description": "The tokenized-asset side of the trade is not a Midas RWA asset on the requested network, or the stablecoin is not accepted by the Midas vault. Equities trade via the order endpoints.",
7943
7961
  "content": {
7944
7962
  "application/json": {
7945
7963
  "schema": {
@@ -21891,12 +21909,12 @@
21891
21909
  "token_in": {
21892
21910
  "type": "string",
21893
21911
  "title": "Token",
21894
- "description": "Token to spend. For a buy this is any supported token (e.g. 'USDC'); for a sell it must be a swap-traded tokenized asset (e.g. 'mTBILL')."
21912
+ "description": "Token to spend. For a buy this must be a stablecoin the Midas issuance vault accepts (USDC on every supported network; mBASIS also accepts USDT/DAI on Ethereum). For a sell it is the Midas RWA asset to redeem (e.g. 'mTBILL')."
21895
21913
  },
21896
21914
  "token_out": {
21897
21915
  "type": "string",
21898
21916
  "title": "Token",
21899
- "description": "Token to receive. For a buy this must be a swap-traded tokenized asset (e.g. 'mTBILL'); for a sell it is any supported token."
21917
+ "description": "Token to receive. For a buy this is the Midas RWA asset to mint (e.g. 'mTBILL'); for a sell it is the payout stablecoin (USDC)."
21900
21918
  },
21901
21919
  "amount_in": {
21902
21920
  "anyOf": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.63-rc.0",
3
+ "version": "2.2.64-rc.0",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -32,7 +32,10 @@ import { Result } from "../types/fp.js";
32
32
  * @remarks
33
33
  * Create a Tokenized Assets Account for a wallet address.
34
34
  *
35
- * Before placing orders, the owner must create a Tokenized Assets Account.
35
+ * Required once before **either** trade flow tokenized-equity orders
36
+ * (Ondo, via `/quote` + `/order`) and RWA-yield-token swaps (Midas, via
37
+ * `/transact/buy` + `/transact/sell`) both settle into this one account.
38
+ *
36
39
  * Each wallet address has one Tokenized Assets Account, isolated from the
37
40
  * owner's Earn, Credit, and other product accounts.
38
41
  *
@@ -33,13 +33,16 @@ import { Result } from "../types/fp.js";
33
33
  * @remarks
34
34
  * List tokenized asset markets: Ondo equities and Midas RWA yield tokens.
35
35
  *
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).
36
+ * Each entry carries `provider` (`ondo` | `midas`), `asset_class` (`EQUITY` |
37
+ * `T_BILLS` | `BASIS_TRADE` | `BTC_YIELD`), `chain`, the symbol, underlying
38
+ * ticker, contract address, latest USD price, and 24h change; RWA-yield entries
39
+ * add `apy_7d`/`apy_30d` and `tvl_usd`. Filter with `provider`, `asset_class`,
40
+ * and `chain`, plus `category` (sector tag — equities only) or `search`
41
+ * (substring match against symbol, ticker, or name).
40
42
  *
41
- * Only Ethereum-deployed tokens are returned; assets that exist only on
42
- * other chains are omitted.
43
+ * Equities are Ethereum-only; RWA yield tokens also list on Base pass
44
+ * `chain=base` to see them. How to trade each: `asset_class=EQUITY` →
45
+ * `/quote` + `/order`; the RWA classes → `/transact/buy` + `/transact/sell`.
43
46
  */
44
47
  export function tokenizedAssetsTokenizedAssetsMarkets(
45
48
  client: CompassApiSDKCore,
@@ -31,14 +31,17 @@ import { Result } from "../types/fp.js";
31
31
  * Get a single market
32
32
  *
33
33
  * @remarks
34
- * Get extended detail for a single tokenized equity (e.g. `TSLAon`).
34
+ * Get extended detail for a single tokenized market.
35
35
  *
36
- * Includes 52-week range, volume, market cap, holder count, and tradable
37
- * sessions in addition to the fields returned by `/markets`.
36
+ * Works for both asset families: an Ondo **equity** (e.g. `TSLAon`) or a
37
+ * Midas **RWA yield token** (e.g. `mTBILL`). Equities add 52-week range,
38
+ * volume, market cap, holder count, and tradable sessions on top of the
39
+ * `/markets` fields; RWA-yield entries instead carry `apy_7d`/`apy_30d` and
40
+ * `tvl_usd`.
38
41
  *
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
+ * **OHLC candles are an equities-only feature** opt in by passing both
43
+ * `interval` and `range` query params to include a `candles` array. They
44
+ * must be provided together and must form one of the supported pairs:
42
45
  *
43
46
  * - `1min` / `5min` / `15min` with `range=1day`
44
47
  * - `1hour` / `4hour` with `range=1month`
@@ -118,6 +121,7 @@ async function $do(
118
121
  const path = pathToFunc("/v2/tokenized_assets/markets/{symbol}")(pathParams);
119
122
 
120
123
  const query = encodeFormQuery({
124
+ "chain": payload.chain,
121
125
  "interval": payload.interval,
122
126
  "range": payload.range,
123
127
  });
@@ -27,10 +27,15 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Build a buy/sell order
30
+ * Build a tokenized-equity buy/sell order (Ondo)
31
31
  *
32
32
  * @remarks
33
- * Build a buy or sell order whose maker is the Tokenized Assets Account.
33
+ * Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.
34
+ *
35
+ * **Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
36
+ * rejected with 422 `WRONG_TRADE_FLOW`; trade them via `/transact/buy` &
37
+ * `/transact/sell`. Equity orders are always USDC-paired (USDC→equity to buy,
38
+ * equity→USDC to sell) and settle through 1inch Fusion.
34
39
  *
35
40
  * Returns up to three pieces in a single round-trip:
36
41
  *
@@ -28,10 +28,14 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * Get order status
31
+ * Get tokenized-equity order status (Ondo)
32
32
  *
33
33
  * @remarks
34
- * Get the lifecycle state of a submitted order.
34
+ * Get the lifecycle state of a submitted tokenized-**equity** order (Ondo).
35
+ *
36
+ * Equity-order flow only: RWA-yield trades (`/transact/buy`, `/transact/sell`)
37
+ * are plain swaps that settle in a single transaction and have no order
38
+ * lifecycle to poll.
35
39
  *
36
40
  * The `status` field is one of `pending`, `filled`, `expired`, or
37
41
  * `cancelled`. Partial fills stay in `pending` while `filled_amount` is
@@ -28,7 +28,7 @@ import { APICall, APIPromise } from "../types/async.js";
28
28
  import { Result } from "../types/fp.js";
29
29
 
30
30
  /**
31
- * Cancel an unfilled order
31
+ * Cancel an unfilled tokenized-equity order (Ondo)
32
32
  *
33
33
  * @remarks
34
34
  * Build the EIP-712 payload to cancel an unfilled order on-chain.
@@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Submit a signed order
30
+ * Submit a signed tokenized-equity order (Ondo)
31
31
  *
32
32
  * @remarks
33
33
  * Submit a signed order to the resolver network.
@@ -31,14 +31,16 @@ import { Result } from "../types/fp.js";
31
31
  * Get tokenized-asset positions for an owner
32
32
  *
33
33
  * @remarks
34
- * Get the tokenized-equity holdings for an owner.
34
+ * Get the tokenized-asset holdings for an owner.
35
35
  *
36
- * The owner's Tokenized Assets Account address is derived deterministically
37
- * from the `owner` query param; balances are read from that account (proceeds
38
- * from filled orders settle there). The response returns the balance of every
39
- * listed tokenized equity, plus the latest USD price and a USD-valued balance
40
- * when pricing is available. Zero balances are omitted, and a `total_usd`
41
- * aggregate is returned across all priced positions.
36
+ * Covers **both** asset families held in the account — Ondo equities and
37
+ * Midas RWA yield tokens (`mTBILL`, `mBASIS`, `mBTC`). The Tokenized Assets
38
+ * Account address is derived deterministically from the `owner` query param;
39
+ * balances are read from that account (proceeds from equity orders and RWA
40
+ * swaps both settle there). Equity positions are priced from the Ondo feed;
41
+ * RWA positions are valued at the latest indexed NAV. Pass `chain=base` for
42
+ * Base holdings (equities are Ethereum-only). Zero balances are omitted, and
43
+ * a `total_usd` aggregate is returned across all priced positions.
42
44
  *
43
45
  * Returns 400 `ACCOUNT_NOT_DEPLOYED` if the owner has no Tokenized Assets
44
46
  * Account deployed yet — create one via `/create_account` first.
@@ -27,10 +27,16 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Preview a buy/sell quote
30
+ * Preview a tokenized-equity buy/sell quote (Ondo)
31
31
  *
32
32
  * @remarks
33
- * Preview the input/output amounts, fees, and slippage tolerance for an order.
33
+ * Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).
34
+ *
35
+ * **Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
36
+ * rejected here with 422 `WRONG_TRADE_FLOW`; they have no auction/quote step —
37
+ * buy/sell them directly via `/transact/buy` & `/transact/sell`.
38
+ *
39
+ * Returns the input/output amounts, fees, and slippage tolerance for an order.
34
40
  *
35
41
  * Read-only relative to Fusion: hits ``/quote/receive`` only and does not
36
42
  * consume a ``quote_id`` or commit an order. Pair with `POST /order`:
@@ -57,7 +63,6 @@ export function tokenizedAssetsTokenizedAssetsQuote(
57
63
  Result<
58
64
  components.TokenizedAssetsQuoteResponse,
59
65
  | errors.TokenizedAssetsErrorResponse
60
- | errors.HTTPValidationError
61
66
  | CompassAPISDKError
62
67
  | ResponseValidationError
63
68
  | ConnectionError
@@ -84,7 +89,6 @@ async function $do(
84
89
  Result<
85
90
  components.TokenizedAssetsQuoteResponse,
86
91
  | errors.TokenizedAssetsErrorResponse
87
- | errors.HTTPValidationError
88
92
  | CompassAPISDKError
89
93
  | ResponseValidationError
90
94
  | ConnectionError
@@ -169,7 +173,6 @@ async function $do(
169
173
  const [result] = await M.match<
170
174
  components.TokenizedAssetsQuoteResponse,
171
175
  | errors.TokenizedAssetsErrorResponse
172
- | errors.HTTPValidationError
173
176
  | CompassAPISDKError
174
177
  | ResponseValidationError
175
178
  | ConnectionError
@@ -181,10 +184,9 @@ async function $do(
181
184
  >(
182
185
  M.json(200, components.TokenizedAssetsQuoteResponse$inboundSchema),
183
186
  M.jsonErr(
184
- [400, 404, 409],
187
+ [400, 404, 409, 422],
185
188
  errors.TokenizedAssetsErrorResponse$inboundSchema,
186
189
  ),
187
- M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
188
190
  M.jsonErr(502, errors.TokenizedAssetsErrorResponse$inboundSchema),
189
191
  M.fail("4XX"),
190
192
  M.fail("5XX"),
@@ -27,18 +27,20 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Buy a swap-traded tokenized asset
30
+ * Buy an RWA yield token (Midas: mTBILL/mBASIS/mBTC)
31
31
  *
32
32
  * @remarks
33
- * Buy an RWA yield asset (e.g. `mTBILL`) inside the product account.
33
+ * Buy (mint) an RWA yield asset (e.g. `mTBILL`) inside the product account.
34
34
  *
35
- * Swaps `token_in` (already held by the Tokenized Assets Account — fund it
36
- * with a plain transfer first) into `token_out` via the 1inch Aggregation
37
- * Router, executed by the account. Returns an unsigned transaction for the
38
- * owner to sign, or an EIP-712 payload when `gas_sponsorship` is true.
35
+ * Mints `token_out` directly from Midas with `token_in` (a stablecoin already
36
+ * held by the Tokenized Assets Account — fund it with a plain transfer first).
37
+ * `token_in` must be a payment token the Midas issuance vault accepts (USDC on
38
+ * every supported network; mBASIS also accepts USDT/DAI on Ethereum). Returns
39
+ * an unsigned transaction for the owner to sign, or an EIP-712 payload when
40
+ * `gas_sponsorship` is true.
39
41
  *
40
- * `token_out` must be a swap-traded tokenized asset; equities trade via the
41
- * order endpoints (`/quote`, `/order`, `/order/submit`).
42
+ * `token_out` must be a Midas RWA asset; equities trade via the order
43
+ * endpoints (`/quote`, `/order`, `/order/submit`).
42
44
  */
43
45
  export function tokenizedAssetsTokenizedAssetsTransactBuy(
44
46
  client: CompassApiSDKCore,
@@ -27,15 +27,17 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * Sell a swap-traded tokenized asset
30
+ * Sell an RWA yield token (Midas: mTBILL/mBASIS/mBTC)
31
31
  *
32
32
  * @remarks
33
- * Sell an RWA yield asset (e.g. `mTBILL`) inside the product account.
33
+ * Sell (redeem) an RWA yield asset (e.g. `mTBILL`) inside the product account.
34
34
  *
35
- * Swaps `token_in` (a swap-traded tokenized asset held by the Tokenized
36
- * Assets Account) into `token_out` via the 1inch Aggregation Router.
37
- * Returns an unsigned transaction for the owner to sign, or an EIP-712
38
- * payload when `gas_sponsorship` is true.
35
+ * Redeems `token_in` (a Midas RWA asset held by the Tokenized Assets Account)
36
+ * directly with Midas into `token_out` (USDC). Returns an unsigned transaction
37
+ * for the owner to sign, or an EIP-712 payload when `gas_sponsorship` is true.
38
+ *
39
+ * Instant redemption draws on Midas's on-chain liquidity and is subject to a
40
+ * small redemption fee and daily limit.
39
41
  */
40
42
  export function tokenizedAssetsTokenizedAssetsTransactSell(
41
43
  client: CompassApiSDKCore,
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
64
  sdkVersion: "2.0.0",
65
- genVersion: "2.899.1",
65
+ genVersion: "2.900.1",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 2.0.0 2.899.1 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 2.0.0 2.900.1 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -129,27 +129,55 @@ export class ClientSDK {
129
129
  if (path) {
130
130
  baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
131
131
  reqURL = new URL(path, baseURL);
132
+ if (!reqURL.search && baseURL.search) {
133
+ reqURL.search = baseURL.search;
134
+ }
132
135
  } else {
133
136
  reqURL = baseURL;
134
137
  }
135
138
  reqURL.hash = "";
136
139
 
137
- let finalQuery = query || "";
138
-
139
- const secQuery: string[] = [];
140
- for (const [k, v] of Object.entries(security?.queryParams || {})) {
141
- const q = encodeForm(k, v, { charEncoding: "percent" });
142
- if (typeof q !== "undefined") {
143
- secQuery.push(q);
140
+ // Appends already-encoded query pairs to a query string, replacing any
141
+ // existing pairs with the same key so later sources take precedence.
142
+ const mergeQuery = (current: string, additions: string): string => {
143
+ if (!additions) {
144
+ return current;
144
145
  }
145
- }
146
- if (secQuery.length) {
147
- finalQuery += `&${secQuery.join("&")}`;
148
- }
146
+ const additionKeys = new Set(
147
+ additions
148
+ .split("&")
149
+ .filter((pair) => pair !== "")
150
+ .map((pair) => pair.split("=")[0] ?? ""),
151
+ );
152
+ const kept = current.split("&").filter((pair) => {
153
+ return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
154
+ });
155
+ return [...kept, additions].join("&");
156
+ };
157
+
158
+ const encodeQueryRecord = (record: Record<string, unknown>): string => {
159
+ return Object.entries(record)
160
+ .map(([k, v]) => {
161
+ if (v == null) {
162
+ return undefined;
163
+ }
164
+ const value = v;
165
+ return encodeForm(k, value, {
166
+ explode: Array.isArray(value),
167
+ charEncoding: "percent",
168
+ });
169
+ })
170
+ .filter((pair): pair is string => typeof pair !== "undefined")
171
+ .join("&");
172
+ };
173
+
174
+ const finalQuery = [
175
+ query || "",
176
+ encodeQueryRecord(security?.queryParams || {}),
177
+ ].reduce(mergeQuery, reqURL.search.slice(1));
149
178
 
150
179
  if (finalQuery) {
151
- const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery;
152
- reqURL.search = `?${q}`;
180
+ reqURL.search = `?${finalQuery}`;
153
181
  }
154
182
 
155
183
  const headers = new Headers(opHeaders);
@@ -26,11 +26,11 @@ export type TokenizedAssetsTradeRequestSlippage = number | string;
26
26
  */
27
27
  export type TokenizedAssetsTradeRequest = {
28
28
  /**
29
- * Token to spend. For a buy this is any supported token (e.g. 'USDC'); for a sell it must be a swap-traded tokenized asset (e.g. 'mTBILL').
29
+ * Token to spend. For a buy this must be a stablecoin the Midas issuance vault accepts (USDC on every supported network; mBASIS also accepts USDT/DAI on Ethereum). For a sell it is the Midas RWA asset to redeem (e.g. 'mTBILL').
30
30
  */
31
31
  tokenIn: string;
32
32
  /**
33
- * Token to receive. For a buy this must be a swap-traded tokenized asset (e.g. 'mTBILL'); for a sell it is any supported token.
33
+ * Token to receive. For a buy this is the Midas RWA asset to mint (e.g. 'mTBILL'); for a sell it is the payout stablecoin (USDC).
34
34
  */
35
35
  tokenOut: string;
36
36
  /**