@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
@@ -13,31 +13,30 @@ import {
13
13
  } from "./safemessageeip712response.js";
14
14
 
15
15
  /**
16
- * Fusion order metadata bundled with the SafeMessage EIP-712 to sign.
16
+ * Order metadata plus the EIP-712 payload the owner signs to authorize it.
17
17
  *
18
18
  * @remarks
19
19
  *
20
- * The owner signs ``safe_message_eip712`` (a `SafeMessage(bytes message)`
21
- * payload wrapping ``order_hash`` for ERC-1271). At submit time the SDK
22
- * relays the resulting 65-byte ECDSA together with ``order_message``,
23
- * ``extension``, and ``quote_id`` so 1inch's relayer can broadcast the
24
- * order; resolvers fill it via ``Safe.isValidSignature``.
20
+ * The owner signs ``safe_message_eip712`` off-chain. At submit time the
21
+ * signature is sent back to ``/order/submit`` together with
22
+ * ``order_message``, ``extension``, and ``quote_id``; resolvers validate
23
+ * the signature against the Tokenized Assets Account at fill time.
25
24
  */
26
25
  export type OrderToSign = {
27
26
  /**
28
- * The 1inch LOP order hash. Wrapped inside `safe_message_eip712.message.message` for ERC-1271 signing; also relayed to `/order/submit` so the API can fall back to it if the upstream submit response omits the hash.
27
+ * The on-chain order hash. Wrapped inside `safe_message_eip712.message.message` for the owner to sign; also passed back to `/order/submit` so the API can return a usable handle even if the upstream submit response omits the hash.
29
28
  */
30
29
  orderHash: string;
31
30
  /**
32
- * Opaque hex blob from 1inch — pass back to `/order/submit` unchanged.
31
+ * Opaque hex blob from the upstream quote — pass back to `/order/submit` unchanged.
33
32
  */
34
33
  extension: string;
35
34
  /**
36
- * 1inch quote identifier — must be echoed back at `/order/submit`.
35
+ * Upstream quote identifier — must be echoed back at `/order/submit`.
37
36
  */
38
37
  quoteId: string;
39
38
  /**
40
- * Fusion order struct (maker, makerAsset, makingAmount, etc.) — pass back to `/order/submit` unchanged. Maker is the Tokenized Assets Account, not the EOA owner.
39
+ * Order struct (maker, makerAsset, makingAmount, etc.) — pass back to `/order/submit` unchanged. The maker is the Tokenized Assets Account, not the owner's wallet.
41
40
  */
42
41
  orderMessage: { [k: string]: any };
43
42
  /**
@@ -23,11 +23,11 @@ export type Quote = {
23
23
  */
24
24
  output: TokenAmount;
25
25
  /**
26
- * Aggregate fee charged by the Fusion auction (resolver + protocol).
26
+ * Aggregate fee charged for the order.
27
27
  */
28
28
  fee: QuoteFee;
29
29
  /**
30
- * Auction duration upper-bound in seconds.
30
+ * Estimated upper bound on time-to-fill, in seconds.
31
31
  */
32
32
  estFillSeconds: number;
33
33
  };
@@ -9,11 +9,11 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * Aggregate fee charged by the Fusion auction (resolver + protocol).
12
+ * Aggregate fee charged for the order.
13
13
  */
14
14
  export type QuoteFee = {
15
15
  /**
16
- * Total fee in USD, decimal string.
16
+ * Total fee in USD as a decimal string.
17
17
  */
18
18
  amountUsd?: string | null | undefined;
19
19
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  /**
9
- * Build a buy/sell order against the 1inch Fusion intent flow.
9
+ * Build a buy or sell order for a tokenized equity.
10
10
  */
11
11
  export type TokenizedAssetsBuildOrderRequest = {
12
12
  /**
@@ -22,11 +22,11 @@ export type TokenizedAssetsBuildOrderRequest = {
22
22
  */
23
23
  amount: string;
24
24
  /**
25
- * EOA that owns the Tokenized Assets Account. Determines the product account address and signs the EIP-712 envelopes returned by this endpoint (the approve SafeTx and the SafeMessage wrapping the order hash).
25
+ * Wallet that owns the Tokenized Assets Account. The product account address is derived deterministically from this owner. The owner signs the EIP-712 payloads returned by this endpoint (the optional approval and the order itself).
26
26
  */
27
27
  owner: string;
28
28
  /**
29
- * Max acceptable slippage in basis points (1 bp = 0.01%).
29
+ * Max acceptable slippage in basis points (1 bp = 0.01%). Range 1-1000 (0.01%-10%); defaults to 50 (0.5%).
30
30
  */
31
31
  slippageBps?: number | undefined;
32
32
  };
@@ -15,7 +15,7 @@ import { OrderToSign, OrderToSign$inboundSchema } from "./ordertosign.js";
15
15
  import { Quote, Quote$inboundSchema } from "./quote.js";
16
16
 
17
17
  /**
18
- * Composed response: quote + optional approval SafeTx + EIP-712 order to sign.
18
+ * Quote, optional approval payload, and the EIP-712 order to sign.
19
19
  */
20
20
  export type TokenizedAssetsBuildOrderResponse = {
21
21
  /**
@@ -23,19 +23,18 @@ export type TokenizedAssetsBuildOrderResponse = {
23
23
  */
24
24
  quote: Quote;
25
25
  /**
26
- * EIP-712 `Safe.execTransaction` wrapping `USDC.approve(LOP_v4, max_uint256)`. Populated when the Tokenized Assets Account's allowance to LOP v4 is below `amount`; sign with `wallet.signTypedData(...)` and relay via `POST /v2/gas_sponsorship/prepare`. `null` when allowance is already sufficient.
26
+ * EIP-712 payload that authorizes a one-time max-approve of `from_token` to the settlement contract. Populated when the Tokenized Assets Account's existing allowance is below `amount`. The owner signs it, then it is broadcast via `POST /v2/gas_sponsorship/prepare` (or directly by the owner) to set the allowance on-chain. `null` when the allowance is already sufficient.
27
27
  */
28
28
  approvalSafeTxEip712?: BatchedSafeOperationsResponseOutput | null | undefined;
29
29
  /**
30
- * Fusion order metadata bundled with the SafeMessage EIP-712 to sign.
30
+ * Order metadata plus the EIP-712 payload the owner signs to authorize it.
31
31
  *
32
32
  * @remarks
33
33
  *
34
- * The owner signs ``safe_message_eip712`` (a `SafeMessage(bytes message)`
35
- * payload wrapping ``order_hash`` for ERC-1271). At submit time the SDK
36
- * relays the resulting 65-byte ECDSA together with ``order_message``,
37
- * ``extension``, and ``quote_id`` so 1inch's relayer can broadcast the
38
- * order; resolvers fill it via ``Safe.isValidSignature``.
34
+ * The owner signs ``safe_message_eip712`` off-chain. At submit time the
35
+ * signature is sent back to ``/order/submit`` together with
36
+ * ``order_message``, ``extension``, and ``quote_id``; resolvers validate
37
+ * the signature against the Tokenized Assets Account at fill time.
39
38
  */
40
39
  order: OrderToSign;
41
40
  };
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type TokenizedAssetsCancelOrderRequest = {
8
8
  /**
9
- * EOA that owns the Tokenized Assets Account. The product account predicted from this owner must match the order's on-chain maker; the API rejects otherwise (only the order's maker can cancel it).
9
+ * Wallet that owns the Tokenized Assets Account. The account address derived from this owner must match the order's on-chain maker; the API rejects otherwise (only the order's maker can cancel it).
10
10
  */
11
11
  owner: string;
12
12
  };
@@ -6,23 +6,21 @@ import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  /**
9
- * Relay an owner-signed Fusion order to the 1inch relayer.
9
+ * Submit an owner-signed order to the resolver network.
10
10
  *
11
11
  * @remarks
12
12
  *
13
- * The shape mirrors what `POST /order` returned plus the wallet's
14
- * EIP-712 signature all fields are required by the upstream relayer.
15
- * Maker is the Tokenized Assets Account (the Safe), so the signature is
16
- * validated via ERC-1271 (`Safe.isValidSignature`) at fill time rather
17
- * than as an EOA personal-sign.
13
+ * The shape echoes what `POST /order` returned plus the owner's
14
+ * EIP-712 signature. The maker is the Tokenized Assets Account, so the
15
+ * signature is validated against the product account at fill time.
18
16
  */
19
17
  export type TokenizedAssetsSubmitOrderRequest = {
20
18
  /**
21
- * The Fusion order struct returned by `/order` (`order.order_message`). `maker` is the Tokenized Assets Account, not the EOA owner — relay this dict back to the API verbatim.
19
+ * The order struct returned by `/order` (`order.order_message`). `maker` is the Tokenized Assets Account, not the owner's wallet pass this dict back to the API verbatim.
22
20
  */
23
21
  signedOrder: { [k: string]: any };
24
22
  /**
25
- * EIP-712 signature produced by `wallet.signTypedData(order.safe_message_eip712)` from the `/order` response. The Tokenized Assets Account validates this via ERC-1271 (`Safe.isValidSignature`) at fill time, so the signature must be the owner's signature over the SafeMessage hash, not the raw Fusion order hash. For a single-owner Safe this is the standard 65-byte ECDSA `(r, s, v)` blob; multi-owner Safes and pre-approved-hash flows produce variable-length signatures and are also accepted — the relayer enforces its own checks downstream.
23
+ * Owner's EIP-712 signature over `order.safe_message_eip712` from the `/order` response. The signature is validated against the Tokenized Assets Account at fill time, so it must be a signature over the typed-data hash, not the raw order hash.
26
24
  */
27
25
  signature: string;
28
26
  /**
@@ -30,11 +28,11 @@ export type TokenizedAssetsSubmitOrderRequest = {
30
28
  */
31
29
  extension: string;
32
30
  /**
33
- * `order.quote_id` from the `/order` response.
31
+ * `order.quote_id` from the `/order` response — pass back unchanged.
34
32
  */
35
33
  quoteId: string;
36
34
  /**
37
- * EIP-712 order hash from `order.order_hash` in the `/order` response. Optional but recommended: 1inch's relayer occasionally accepts a submit with a 2xx empty body; passing the hash through lets the API still return a usable handle for status / cancel lookups instead of failing.
35
+ * `order.order_hash` from the `/order` response. Optional but recommended: the upstream relayer occasionally returns a 2xx with an empty body, and supplying the hash lets the API still return a usable handle for status and cancel lookups instead of failing.
38
36
  */
39
37
  orderHash?: string | null | undefined;
40
38
  };
@@ -17,13 +17,18 @@ import { unwrapAsync } from "../types/fp.js";
17
17
 
18
18
  export class TokenizedAssets extends ClientSDK {
19
19
  /**
20
- * List equity markets
20
+ * List tokenized equity markets
21
21
  *
22
22
  * @remarks
23
- * List tokenized equities surfaced on Ethereum.
23
+ * List the tokenized US equities available on Ethereum.
24
24
  *
25
- * Composed from Ondo's metadata + enhanced-prices feeds. Non-Ethereum-only
26
- * assets (BSC/Solana deployments without an Ethereum twin) are skipped.
25
+ * Each entry includes the symbol, the underlying ticker, the on-chain
26
+ * contract address, the latest USD price, and 24h price change. Filter
27
+ * by `category` (sector tag) or `search` (substring match against symbol,
28
+ * ticker, or name).
29
+ *
30
+ * Only Ethereum-deployed tokens are returned; assets that exist only on
31
+ * other chains are omitted.
27
32
  */
28
33
  async tokenizedAssetsMarkets(
29
34
  request: operations.V2TokenizedAssetsMarketsRequest,
@@ -40,13 +45,21 @@ export class TokenizedAssets extends ClientSDK {
40
45
  * Get a single market
41
46
  *
42
47
  * @remarks
43
- * Single-market detail for the on-chain Ondo symbol (e.g. `TSLAon`).
48
+ * Get extended detail for a single tokenized equity (e.g. `TSLAon`).
49
+ *
50
+ * Includes 52-week range, volume, market cap, holder count, and tradable
51
+ * sessions in addition to the fields returned by `/markets`.
52
+ *
53
+ * **OHLC candles** are opt-in: pass both `interval` and `range` query
54
+ * params to include a `candles` array in the response. They must be
55
+ * provided together and must form one of the supported pairs:
44
56
  *
45
- * OHLC candles are opt-in via `interval` + `range`:
57
+ * - `1min` / `5min` / `15min` with `range=1day`
58
+ * - `1hour` / `4hour` with `range=1month`
59
+ * - `12hour` with `range=3month`
60
+ * - `1day` with `range=3month` / `6month` / `1year` / `all`
46
61
  *
47
- * - Both omitted: 200 with `candles` absent.
48
- * - Both supplied and forming a valid Ondo pair: 200 with `candles` populated.
49
- * - Exactly one supplied, or both supplied with an invalid pair: 400.
62
+ * Omitting both returns the market detail without `candles`.
50
63
  */
51
64
  async tokenizedAssetsMarketsSymbol(
52
65
  request: operations.V2TokenizedAssetsMarketsSymbolRequest,
@@ -60,14 +73,19 @@ export class TokenizedAssets extends ClientSDK {
60
73
  }
61
74
 
62
75
  /**
63
- * Get on-chain positions for a wallet
76
+ * Get tokenized-asset positions for a wallet
64
77
  *
65
78
  * @remarks
66
- * On-chain ERC-20 balance reads for a wallet across all listed Ondo GM tokens.
79
+ * Get the tokenized-asset holdings for a wallet.
67
80
  *
68
- * Reads each Ethereum-deployed Ondo GM token's `balanceOf(wallet)` via a
69
- * single Multicall3 batch and enriches non-zero balances with the latest USD
70
- * price. Returns human-readable amounts (decimals applied).
81
+ * Returns the balance of every listed tokenized equity at the queried
82
+ * address, plus the latest USD price and a USD-valued balance when
83
+ * pricing is available. Zero balances are omitted, and a `total_usd`
84
+ * aggregate is returned across all priced positions.
85
+ *
86
+ * Pass the **Tokenized Assets Account address** (returned by
87
+ * `/create_account`), not the owner's wallet — proceeds from filled
88
+ * orders settle into the Tokenized Assets Account.
71
89
  */
72
90
  async tokenizedAssetsPositions(
73
91
  request: operations.V2TokenizedAssetsPositionsRequest,
@@ -84,11 +102,15 @@ export class TokenizedAssets extends ClientSDK {
84
102
  * Get order status
85
103
  *
86
104
  * @remarks
87
- * Status of a relayed Fusion order — `pending` / `filled` / `expired` / `cancelled`.
105
+ * Get the lifecycle state of a submitted order.
106
+ *
107
+ * The `status` field is one of `pending`, `filled`, `expired`, or
108
+ * `cancelled`. Partial fills stay in `pending` while `filled_amount` is
109
+ * populated as fills come in; once an order fully fills, `fill_tx_hash`
110
+ * is also returned.
88
111
  *
89
- * Fusion's finer-grained states (`refunded`, `false-predicate`, etc.) are
90
- * collapsed into the 4-value enum the SDK promises. Unknown upstream states
91
- * surface as 502 to alert on schema drift.
112
+ * Upstream protocol states beyond these four (e.g. `partially-filled`,
113
+ * `refunded`) are mapped onto this set.
92
114
  */
93
115
  async tokenizedAssetsOrderOrderHash(
94
116
  request: operations.V2TokenizedAssetsOrderOrderHashRequest,
@@ -102,22 +124,26 @@ export class TokenizedAssets extends ClientSDK {
102
124
  }
103
125
 
104
126
  /**
105
- * Create account
127
+ * Create a Tokenized Assets Account
106
128
  *
107
129
  * @remarks
108
130
  * Create a Tokenized Assets Account for a wallet address.
109
131
  *
110
- * Each wallet address has one Tokenized Assets Account per chain. It is owned by
111
- * `owner` and isolated from the owner's Earn, Credit, and Traditional Investing
112
- * accounts.
132
+ * Before placing orders, the owner must create a Tokenized Assets Account.
133
+ * Each wallet address has one Tokenized Assets Account, isolated from the
134
+ * owner's Earn, Credit, and other product accounts.
113
135
  *
114
- * Returns an unsigned transaction to create the account. The `sender` signs and
115
- * broadcasts this transaction.
136
+ * The account address is deterministic. If it already exists, the
137
+ * response returns `transaction: null` and you can skip straight to
138
+ * building orders.
139
+ *
140
+ * Returns an unsigned transaction to create the account. The `sender`
141
+ * signs and broadcasts this transaction.
116
142
  *
117
143
  * **If owner pays gas:** Set `sender` to the owner's address.
118
144
  *
119
- * **If someone else pays gas:** Set `sender` to the wallet that will sign and
120
- * broadcast the transaction on behalf of the owner.
145
+ * **If someone else pays gas:** Set `sender` to the wallet that will
146
+ * sign and broadcast the transaction on behalf of the owner.
121
147
  */
122
148
  async tokenizedAssetsCreateAccount(
123
149
  request: components.CreateTokenizedAssetsAccountRequest,
@@ -134,24 +160,25 @@ export class TokenizedAssets extends ClientSDK {
134
160
  * Build a buy/sell order
135
161
  *
136
162
  * @remarks
137
- * Build a quote, optional approve SafeTx, and SafeMessage EIP-712 to sign.
138
- *
139
- * Returns everything the SDK needs to take an `owner` from "I want to buy"
140
- * to a relayed Fusion order whose maker is the Tokenized Assets Account.
141
- * The flow is **signing-based, not transaction-based**:
142
- *
143
- * 1. If `approval_safe_tx_eip712` is populated (Safe→LOP allowance is
144
- * insufficient), sign it with `wallet.signTypedData(...)` and relay via
145
- * `POST /v2/gas_sponsorship/prepare` so the sponsor broadcasts the resulting
146
- * `Safe.execTransaction(USDC.approve(LOP_v4, ...))`. Wait for that tx
147
- * to confirm before signing the order.
148
- * 2. Sign `order.safe_message_eip712` with the same owner wallet — this is
149
- * a Safe ERC-1271 wrapper around the Fusion order hash. POST the
150
- * resulting 65-byte ECDSA together with the rest of the `order` fields
151
- * to `/order/submit`.
152
- *
153
- * The owner never broadcasts an on-chain transaction in this flow; all
154
- * on-chain action goes through the product account via the sponsor relay.
163
+ * Build a buy or sell order whose maker is the Tokenized Assets Account.
164
+ *
165
+ * Returns up to three pieces in a single round-trip:
166
+ *
167
+ * - **`quote`** preview of the input/output amounts and fees.
168
+ * - **`approval_safe_tx_eip712`** — only present when the account's
169
+ * allowance to the settlement contract is below `amount`. The owner
170
+ * signs this EIP-712 payload, then it is broadcast via
171
+ * `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast
172
+ * directly) to set the on-chain allowance. Wait for that transaction
173
+ * to confirm before signing the order.
174
+ * - **`order`** the order metadata (`order_hash`, `extension`,
175
+ * `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712
176
+ * payload the owner signs off-chain to authorize the order. The
177
+ * signature is submitted to `/order/submit` and is **never** broadcast
178
+ * on-chain.
179
+ *
180
+ * The owner never broadcasts the order itself only the (one-time)
181
+ * approval transaction ever hits the chain.
155
182
  */
156
183
  async tokenizedAssetsOrder(
157
184
  request: components.TokenizedAssetsBuildOrderRequest,
@@ -165,21 +192,20 @@ export class TokenizedAssets extends ClientSDK {
165
192
  }
166
193
 
167
194
  /**
168
- * Submit a signed order to 1inch Fusion
195
+ * Submit a signed order
169
196
  *
170
197
  * @remarks
171
- * Relay an owner-signed Fusion order to the 1inch relayer.
172
- *
173
- * The body carries the signature produced by
174
- * `wallet.signTypedData(order.safe_message_eip712)` from the `/order`
175
- * response, plus the order struct (`signed_order`), opaque `extension`,
176
- * and `quote_id`. The signature is validated via ERC-1271
177
- * (`Safe.isValidSignature`) at fill time — the maker on the order struct
178
- * is the Tokenized Assets Account, not the EOA owner.
179
- *
180
- * Returns the order hash and a server-side timestamp. Subsequent calls to
181
- * `GET /order/{order_hash}` track lifecycle (`pending` → `filled` /
182
- * `expired` / `cancelled`).
198
+ * Submit a signed order to the resolver network.
199
+ *
200
+ * The body echoes the `order` fields from `/order` (`signed_order`,
201
+ * `extension`, `quote_id`, optionally `order_hash`) plus the owner's
202
+ * signature over `order.safe_message_eip712`. The maker on the order
203
+ * struct is the Tokenized Assets Account, not the owner's wallet —
204
+ * pass `signed_order` back unchanged.
205
+ *
206
+ * Returns the order hash and a server-side ISO 8601 timestamp.
207
+ * Subsequent calls to `GET /order/{order_hash}` track the lifecycle
208
+ * (`pending` → `filled` / `expired` / `cancelled`).
183
209
  */
184
210
  async tokenizedAssetsOrderSubmit(
185
211
  request: components.TokenizedAssetsSubmitOrderRequest,
@@ -196,19 +222,17 @@ export class TokenizedAssets extends ClientSDK {
196
222
  * Cancel an unfilled order
197
223
  *
198
224
  * @remarks
199
- * Build a SafeTx EIP-712 wrapping the on-chain cancel for a Fusion order.
200
- *
201
- * Returns ``cancel_safe_tx_eip712``: an EIP-712 ``Safe.execTransaction``
202
- * payload whose inner call is ``LOP.cancelOrder(makerTraits, orderHash)``.
203
- * Sign with the Tokenized Assets Account's owner via
204
- * ``wallet.signTypedData(...)`` and relay via ``POST /v2/gas_sponsorship/prepare``
205
- * so the sponsor broadcasts ``execTransaction`` on the product account
206
- * (the order's maker). The owner can also broadcast ``execTransaction``
207
- * directly if not using gas sponsorship.
208
- *
209
- * Authorization is on the *predicted* Safe address: the Tokenized Assets
210
- * Account computed from ``owner`` must match the order's on-chain maker.
211
- * Mismatches return 403 ``OWNER_NOT_MAKER`` before any on-chain reads.
225
+ * Build the EIP-712 payload to cancel an unfilled order on-chain.
226
+ *
227
+ * Returns ``cancel_safe_tx_eip712``, an EIP-712 payload that authorizes
228
+ * the on-chain cancellation. Sign with the Tokenized Assets Account's
229
+ * owner via ``wallet.signTypedData(...)`` and relay via
230
+ * ``POST /v2/gas_sponsorship/prepare`` so the sponsor broadcasts the
231
+ * cancellation on the product account. The owner can also broadcast
232
+ * the resulting transaction directly without using gas sponsorship.
233
+ *
234
+ * Cancellation works on `pending` and `expired` orders only. Only the
235
+ * Tokenized Assets Account that placed the order can cancel it.
212
236
  */
213
237
  async tokenizedAssetsOrderOrderHashCancel(
214
238
  request: operations.V2TokenizedAssetsOrderOrderHashCancelRequest,