@rhinestone/sdk 2.16.0 → 2.16.2

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.
@@ -439,8 +439,6 @@ export interface operations {
439
439
  header: {
440
440
  /** @description API version. Required; pinned to this document. */
441
441
  'x-api-version': '2026-04.blanc';
442
- /** @description API key. */
443
- 'x-api-key': string;
444
442
  };
445
443
  path?: never;
446
444
  cookie?: never;
@@ -788,8 +786,6 @@ export interface operations {
788
786
  header: {
789
787
  /** @description API version. Required; pinned to this document. */
790
788
  'x-api-version': '2026-04.blanc';
791
- /** @description API key. */
792
- 'x-api-key': string;
793
789
  };
794
790
  path: {
795
791
  /** @description Unique identifier of the intent operation */
@@ -859,6 +855,60 @@ export interface operations {
859
855
  * @enum {boolean}
860
856
  */
861
857
  debitsAccount?: true;
858
+ /** @description Blanc only. Present only on operations the CALLER earned: the allocation's stamped `counterparty`, or — before conversion stamps one — the operation's canonical receipt sender, is one of the caller's registered `scopes.relayer.fillAddresses`. Holding the relayer scope is not sufficient, because `/intents/:id` is nonce-only and scope alone would disclose another relayer's counterparties, amounts and settlement dates off a guessed intent id. Everything else fails closed. Amounts are micro-USD. */
859
+ allocation?: {
860
+ /**
861
+ * @description Sponsor-covered gas planned for this operation (micro-USD)
862
+ * @example 100
863
+ */
864
+ plannedGasMicroUsd: string;
865
+ /**
866
+ * @description Fixed non-gas compensation (micro-USD); nonzero only on FILL allocations
867
+ * @example 0
868
+ */
869
+ fixedCompensationMicroUsd: string;
870
+ /**
871
+ * @description Receipt-derived actual gas (micro-USD); null means the planned fallback applies
872
+ * @example 80
873
+ */
874
+ executedGasMicroUsd: string | null;
875
+ /**
876
+ * @description fixedCompensation + (executedGas ?? plannedGas), in micro-USD
877
+ * @example 80
878
+ */
879
+ payableMicroUsd: string;
880
+ /** @description Canonical earner, stamped from the receipt sender this allocation reconciled to; null until earned */
881
+ counterparty: string | null;
882
+ /**
883
+ * @description Pinned POST (PATH-fallback) native-token USD price the gas micro-USD was valued at, as a decimal string; null when no price snapshot exists
884
+ * @example 2000
885
+ */
886
+ nativeTokenPriceUsd: string | null;
887
+ /** @description Canonical receipt evidence; txHash/timestamp already sit on the item */
888
+ receipt: {
889
+ /** @description Block hash */
890
+ blockHash: string | null;
891
+ /** @description Block number */
892
+ blockNumber: string;
893
+ /** @description Gas used */
894
+ gasUsed: string | null;
895
+ /** @description Effective gas price (wei) */
896
+ effectiveGasPriceWei: string | null;
897
+ /** @description L1 fee (wei), OP-stack chains only */
898
+ l1FeeWei: string | null;
899
+ /** @description Blob fee (wei) */
900
+ blobFeeWei: string | null;
901
+ } | null;
902
+ /** @description Treasury settlement of this allocation; null until settled. Destinations, references, and operator fields are never exposed. */
903
+ payment: {
904
+ /** @enum {string} */
905
+ kind: 'PAYMENT' | 'ADJUSTMENT';
906
+ /** Format: date-time */
907
+ effectiveDate: string;
908
+ /** Format: date-time */
909
+ createdAt: string;
910
+ } | null;
911
+ };
862
912
  }[];
863
913
  }[];
864
914
  /** @description Bridge refunds observed for this intent — a settlement layer returned the funds to the account instead of delivering them. Not operations: Rhinestone neither built nor broadcast these transactions, and a refund never makes the intent succeed. Omitted when none are known, which is every delivered intent and also a failed one whose refund we have not (or not yet) observed — so its absence is not evidence that funds were kept. */
@@ -874,6 +924,23 @@ export interface operations {
874
924
  */
875
925
  txHash: string;
876
926
  }[];
927
+ /**
928
+ * @description What Hyperliquid did with this intent's `options.hyperCore` action, and the only record of it — the action is the one leg of an intent that is not a transaction. Omitted for every intent that carried none.
929
+ *
930
+ * It DECIDES `status` rather than annotating it: an intent whose action was refused reports FAILED even though every operation completed, because the delivery landed and the trade did not. The funds are in the account's own HyperCore balance either way, so a refusal is recoverable by trading again — it is not a loss.
931
+ */
932
+ hyperCore?: {
933
+ /**
934
+ * @description `pending` while the action is still owed — the POST runs after the fill transaction commits, so this is normal for a few seconds after delivery. `accepted` means Hyperliquid took it; an order filled for less than asked is accepted, simply for less. `refused` is the exchange declining a well-formed action — an `Ioc` that no longer crossed by the time the bridge delivered is the expected one — and `error` is it never answering before the intent expired.
935
+ *
936
+ * `unknown` means a delivery attempt got no response at all, so the action MAY have been applied and only its answer lost. `partial` means some orders of one batch were placed and others rejected — an `order` action carries up to 100 and each is matched independently.
937
+ *
938
+ * Every non-`accepted` terminal value reports the intent as FAILED, because reporting success on a maybe is the failure this field exists to prevent. Do NOT re-send a `partial` batch as-is: the orders that filled would open a second time. Check the account on Hyperliquid for `partial` and `unknown` alike — it holds the per-order record, and the funds are in its own HyperCore balance whatever happened.
939
+ * @example accepted
940
+ * @enum {string}
941
+ */
942
+ outcome: 'pending' | 'accepted' | 'refused' | 'error' | 'unknown' | 'partial';
943
+ };
877
944
  /** @description Extended intent details, returned only when `full=true` */
878
945
  details?: {
879
946
  /**
@@ -887,7 +954,7 @@ export interface operations {
887
954
  */
888
955
  nonce: string;
889
956
  /**
890
- * @description Destination recipient account
957
+ * @description Destination recipient account, in the destination chain's own address format
891
958
  * @example 0x3672e268a79bd4acc5ee646bdda652547c7a435c
892
959
  */
893
960
  recipient: string;
@@ -1038,12 +1105,12 @@ export interface operations {
1038
1105
  */
1039
1106
  sponsored: boolean;
1040
1107
  /**
1041
- * @description Sponsored value actually charged, in integer micro-USD (1 USD = 1,000,000 units). Once the intent executes this is reconciled from the receipt (planned gas replaced by executed), so it matches the sponsorship balance and the usage/billing reads rather than the amount reserved at quote time.
1108
+ * @description Sponsored value actually charged, in integer micro-USD (1 USD = 1,000,000 units). Once the intent executes this is reconciled from the receipt (planned gas replaced by executed), so it matches the sponsorship balance and the usage/billing reads rather than the amount reserved at quote time. On an allocation-backed intent this is the sum of its per-operation allocations, which is where reconciliation writes executed gas.
1042
1109
  * @example 210000
1043
1110
  */
1044
1111
  sponsoredValue?: string;
1045
1112
  /**
1046
- * @description Rhinestone-owed slice of the sponsor charge, in integer micro-USD (1 USD = 1,000,000 units): the sponsor surcharge plus a sponsored protocol fee (`sponsorSettings.protocolFees`) where one applies.
1113
+ * @description Rhinestone-owed slice of the sponsor charge, in integer micro-USD (1 USD = 1,000,000 units): the sponsor surcharge plus a sponsored protocol fee (`sponsorSettings.protocolFees`) where one applies. Charged on allocation-backed intents too — the allocation ledger carries the relayer liability only.
1047
1114
  * @example 10000
1048
1115
  */
1049
1116
  protocolFee?: string;
@@ -1469,8 +1536,6 @@ export interface operations {
1469
1536
  header: {
1470
1537
  /** @description API version. Required; pinned to this document. */
1471
1538
  'x-api-version': '2026-04.blanc';
1472
- /** @description API key. */
1473
- 'x-api-key': string;
1474
1539
  };
1475
1540
  path: {
1476
1541
  accountAddress: string;
@@ -1834,8 +1899,6 @@ export interface operations {
1834
1899
  header: {
1835
1900
  /** @description API version. Required; pinned to this document. */
1836
1901
  'x-api-version': '2026-04.blanc';
1837
- /** @description API key. */
1838
- 'x-api-key': string;
1839
1902
  };
1840
1903
  path?: never;
1841
1904
  cookie?: never;
@@ -2227,8 +2290,6 @@ export interface operations {
2227
2290
  header: {
2228
2291
  /** @description API version. Required; pinned to this document. */
2229
2292
  'x-api-version': '2026-04.blanc';
2230
- /** @description API key. */
2231
- 'x-api-key': string;
2232
2293
  };
2233
2294
  path?: never;
2234
2295
  cookie?: never;
@@ -2744,8 +2805,6 @@ export interface operations {
2744
2805
  header: {
2745
2806
  /** @description API version. Required; pinned to this document. */
2746
2807
  'x-api-version': '2026-04.blanc';
2747
- /** @description API key. */
2748
- 'x-api-key': string;
2749
2808
  };
2750
2809
  path?: never;
2751
2810
  cookie?: never;
@@ -3147,8 +3206,6 @@ export interface operations {
3147
3206
  header: {
3148
3207
  /** @description API version. Required; pinned to this document. */
3149
3208
  'x-api-version': '2026-04.blanc';
3150
- /** @description API key. */
3151
- 'x-api-key': string;
3152
3209
  };
3153
3210
  path?: never;
3154
3211
  cookie?: never;
@@ -3234,6 +3291,33 @@ export interface operations {
3234
3291
  */
3235
3292
  data: string;
3236
3293
  }[];
3294
+ /** @description Solana instructions to run, in order, out of the account's own wallet on a Solana destination — the Solana counterpart of `destinationExecutions`, which it cannot be combined with. The wallet executes them, so `recipient` must be omitted: a payee is encoded inside the instructions. No route serves them yet, so a request carrying them is refused with `UNSUPPORTED_DESTINATION_INSTRUCTIONS`. */
3295
+ destinationInstructions?: {
3296
+ /**
3297
+ * @description Program to invoke, base58.
3298
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
3299
+ */
3300
+ programId: string;
3301
+ /** @description Accounts the instruction reads or writes, in the order the program expects. */
3302
+ accounts: {
3303
+ /**
3304
+ * @description Account address, base58.
3305
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
3306
+ */
3307
+ pubkey: string;
3308
+ /** @description Whether the instruction requires this account to sign. */
3309
+ isSigner: boolean;
3310
+ /** @description Whether the instruction writes to this account. */
3311
+ isWritable: boolean;
3312
+ }[];
3313
+ /**
3314
+ * @description Instruction data, base64.
3315
+ * @example CQ==
3316
+ */
3317
+ data: string;
3318
+ }[];
3319
+ /** @description Address lookup tables the `destinationInstructions` resolve accounts through, base58, as Jupiter `/swap-instructions` returns them. Only with `destinationInstructions`. */
3320
+ addressLookupTableAddresses?: string[];
3237
3321
  /**
3238
3322
  * @description Execution calls to perform before the claim on each origin chain, keyed by CAIP-2 chain ID. Max 10 ops per chain, max 5 chains.
3239
3323
  * @example {
@@ -3272,50 +3356,6 @@ export interface operations {
3272
3356
  * @example 100000
3273
3357
  */
3274
3358
  destinationGasLimit?: string;
3275
- /** @description Account access list specifying which CAIP-2 chains and tokens an account may access */
3276
- accountAccessList?: {
3277
- chainIds?: string[];
3278
- tokens?: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
3279
- /**
3280
- * @description Tokens keyed by CAIP-2 chain ID.
3281
- * @example {
3282
- * "eip155:8453": [
3283
- * "USDC"
3284
- * ]
3285
- * }
3286
- */
3287
- chainTokens?: {
3288
- [key: string]: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
3289
- };
3290
- /**
3291
- * @description Per-token maximum input amounts keyed by CAIP-2 chain ID.
3292
- * @example {
3293
- * "eip155:8453": {
3294
- * "USDC": "1000000"
3295
- * }
3296
- * }
3297
- */
3298
- chainTokenAmounts?: {
3299
- [key: string]: {
3300
- [key: string]: string;
3301
- };
3302
- };
3303
- exclude?: {
3304
- chainIds?: string[];
3305
- tokens?: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
3306
- /**
3307
- * @description Tokens keyed by CAIP-2 chain ID.
3308
- * @example {
3309
- * "eip155:8453": [
3310
- * "USDC"
3311
- * ]
3312
- * }
3313
- */
3314
- chainTokens?: {
3315
- [key: string]: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
3316
- };
3317
- };
3318
- };
3319
3359
  recipient?: {
3320
3360
  /**
3321
3361
  * @description Recipient address. Format depends on destination chain — 0x-hex for EVM destinations, base58 for Solana, T-address for Tron.
@@ -3421,6 +3461,8 @@ export interface operations {
3421
3461
  * @default false
3422
3462
  */
3423
3463
  swapFees?: boolean;
3464
+ /** @description Whether to sponsor the VALUE of an eligible same-chain swap, so the user trades at par: the user contributes the 1:1 amount and the sponsor pays whatever the market is short. Applies only to pairs where par is a meaningful rate (both sides USD-pegged) and only up to a configured per-swap ceiling; outside those bounds the route plans as an ordinary unsponsored swap. Distinct from `swapFees`, which waives a solver's commission. */
3465
+ swapValue?: boolean;
3424
3466
  /**
3425
3467
  * @description Whether to sponsor the Rhinestone protocol fee (`options.protocolFees`) for the intent. When `true`, the fee is charged to the integrator's sponsorship balance instead of carved from the user, without the sponsorship surcharge.
3426
3468
  * @default false
@@ -3479,12 +3521,8 @@ export interface operations {
3479
3521
  */
3480
3522
  customDeadline?: number;
3481
3523
  hyperCore?: {
3482
- /**
3483
- * @description The Hyperliquid action to authorise. An action that needs collateral (opening a position) must be paired with `tokenRequests` that deliver it; one that does not (a reduce-only close, a cancel, a leverage change) rides a tokenless intent.
3484
- *
3485
- * One action per intent: an agent authorises exactly one, and registering a second evicts the first, so an intent submitted while another is in flight for the same account is refused.
3486
- */
3487
- action: {
3524
+ /** @description A single Hyperliquid action to authorise. Shorthand for a one-element `actions`; give one or the other, not both. */
3525
+ action?: {
3488
3526
  /** @enum {string} */
3489
3527
  type: 'order';
3490
3528
  orders: {
@@ -3743,170 +3781,577 @@ export interface operations {
3743
3781
  * @example 1000000
3744
3782
  */
3745
3783
  ntli: number;
3746
- };
3747
- };
3748
- };
3749
- };
3750
- };
3751
- };
3752
- responses: {
3753
- /** @description OK */
3754
- 200: {
3755
- headers: {
3756
- [name: string]: unknown;
3757
- };
3758
- content: {
3759
- 'application/json': {
3760
- /** @description Route candidates ranked by the orchestrator's internal scoring (cheaper + faster wins). The first entry is the recommended route — most clients should submit it without inspecting the rest. */
3761
- routes: {
3762
- /** @description Server-stored intent identifier. Pass back to `POST /intents` to submit. */
3763
- intentId: string;
3764
- /**
3765
- * @description Quote expiry timestamp (Unix seconds). After this point, assume the quote is dead and re-quote.
3766
- * @example 1733493192
3767
- */
3768
- expiresAt: number;
3769
- /** @description Estimated fill time for the route */
3770
- estimatedFillTime: {
3771
- /**
3772
- * @description Typical end-to-end fill time for this route in seconds. Directional, not guaranteed.
3773
- * @example 3
3774
- */
3775
- seconds: number;
3776
- };
3777
- /**
3778
- * @description Settlement layer selected for this route
3779
- * @example RELAY
3780
- * @enum {string}
3781
- */
3782
- settlementLayer: 'INTENT_EXECUTOR' | 'SAME_CHAIN' | 'ACROSS' | 'ECO' | 'RELAY' | 'OFT' | 'NEAR' | 'RHINO' | 'CCTP' | 'LZ';
3783
- /** @description EIP-712 sign payloads the client submits back on `POST /intents` */
3784
- signData: {
3785
- /** @description Payloads for the origin legs, in submission order. Sign each entry and submit the signatures in matching order via `signatures.origin`. Discriminate on `kind`: `eip712` is signed as typed data, `personalSign` as a message. */
3786
- origin: ({
3787
- /** @description EIP-712 domain separator fields */
3788
- domain: {
3789
- name?: string;
3790
- version?: string;
3791
- chainId?: number;
3792
- verifyingContract?: string;
3793
- salt?: string;
3794
- };
3795
- /** @description EIP-712 type definitions keyed by type name */
3796
- types: {
3797
- [key: string]: {
3798
- name: string;
3799
- type: string;
3800
- }[];
3801
- };
3784
+ } | {
3785
+ /** @enum {string} */
3786
+ type: 'twapOrder';
3787
+ twap: {
3802
3788
  /**
3803
- * @description Name of the top-level type to sign
3804
- * @example PermitBatchWitnessTransferFrom
3789
+ * @description Asset index, as for an order.
3790
+ * @example 0
3805
3791
  */
3806
- primaryType: string;
3807
- /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
3808
- message: {
3809
- [key: string]: unknown;
3810
- };
3811
- /** @enum {string} */
3812
- kind: 'eip712';
3813
- } | {
3814
- /** @enum {string} */
3815
- kind: 'personalSign';
3792
+ a: number;
3816
3793
  /**
3817
- * @description Sign these characters as UTF-8 TEXT — viem `signMessage({ message })`, never `{ raw }`. Signing the decoded bytes yields a well-formed signature that the chain rejects.
3818
- * @example a3f2c1d4e5b6a7980f1e2d3c4b5a69788796a5b4c3d2e1f0a1b2c3d4e5f60718
3794
+ * @description Buy (`true`) or sell (`false`).
3795
+ * @example true
3819
3796
  */
3820
- message: string;
3797
+ b: boolean;
3821
3798
  /**
3822
- * @description Solana slot after which this payload is dead. Much shorter than the route `expiresAt` — about 24 seconds — and it is the binding one. Re-quote when it passes.
3823
- * @example 370123456
3799
+ * @description Total size to work, in units of the asset.
3800
+ * @example 0.01
3824
3801
  */
3825
- expiresAtSlot: string;
3826
- })[];
3827
- /** @description Typed data for the destination leg. Absent when a third-party bridge performs the delivery and there is nothing for the user to sign there. */
3828
- destination?: {
3829
- /** @description EIP-712 domain separator fields */
3830
- domain: {
3831
- name?: string;
3832
- version?: string;
3833
- chainId?: number;
3834
- verifyingContract?: string;
3835
- salt?: string;
3836
- };
3837
- /** @description EIP-712 type definitions keyed by type name */
3838
- types: {
3839
- [key: string]: {
3840
- name: string;
3841
- type: string;
3842
- }[];
3843
- };
3802
+ s: string;
3844
3803
  /**
3845
- * @description Name of the top-level type to sign
3846
- * @example PermitBatchWitnessTransferFrom
3804
+ * @description Reduce-only.
3805
+ * @example false
3847
3806
  */
3848
- primaryType: string;
3849
- /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
3850
- message: {
3851
- [key: string]: unknown;
3852
- };
3853
- };
3854
- /** @description Typed data for the target execution, smart sessions only. Omitted for EOA accounts. */
3855
- targetExecution?: {
3856
- /** @description EIP-712 domain separator fields */
3857
- domain: {
3858
- name?: string;
3859
- version?: string;
3860
- chainId?: number;
3861
- verifyingContract?: string;
3862
- salt?: string;
3863
- };
3864
- /** @description EIP-712 type definitions keyed by type name */
3865
- types: {
3866
- [key: string]: {
3867
- name: string;
3868
- type: string;
3869
- }[];
3870
- };
3807
+ r: boolean;
3871
3808
  /**
3872
- * @description Name of the top-level type to sign
3873
- * @example PermitBatchWitnessTransferFrom
3809
+ * @description Duration in MINUTES. Hyperliquid enforces its own bounds and refuses a duration outside them ("Invalid TWAP duration"), so none are imposed here.
3810
+ * @example 30
3874
3811
  */
3875
- primaryType: string;
3876
- /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
3877
- message: {
3878
- [key: string]: unknown;
3879
- };
3812
+ m: number;
3813
+ /**
3814
+ * @description Randomize the timing of the sub-orders rather than spacing them evenly.
3815
+ * @example true
3816
+ */
3817
+ t: boolean;
3880
3818
  };
3819
+ } | {
3820
+ /** @enum {string} */
3821
+ type: 'twapCancel';
3822
+ /**
3823
+ * @description Asset index of the running TWAP.
3824
+ * @example 0
3825
+ */
3826
+ a: number;
3827
+ /**
3828
+ * @description The TWAP id, which Hyperliquid returns when it accepts the `twapOrder` and is not echoed on the intent. Read it back from the exchange — the agent that placed the TWAP authorised only that one action, so cancelling is a second intent.
3829
+ * @example 12345
3830
+ */
3831
+ t: number;
3881
3832
  };
3882
- /** @description Route cost: inputs, outputs, and fee breakdown */
3883
- cost: {
3884
- /** @description Tokens debited from the user, coalesced by (chainId, tokenAddress) */
3885
- input: {
3833
+ /**
3834
+ * @description The Hyperliquid actions to authorise, IN ORDER. Each gets its own agent in its own API-wallet slot, registered ONE AT A TIME and some seconds apart, and they are sent to the exchange in the order given once every agent is live — the first refusal stops the rest, so a later action never runs against a state an earlier one failed to reach.
3835
+ *
3836
+ * Order is what makes this more than a batch: `updateLeverage` has to land before the order it applies to, since leverage applied afterwards does not resize an open position. So opening a leveraged position is `[updateLeverage, order]` in ONE intent rather than two.
3837
+ *
3838
+ * Capped at three, which is Hyperliquid's: an account has three NAMED API-wallet slots and the unnamed one belongs to the account holder. More than one action requires `tokenRequests`: HyperCore refuses a registration while the eviction the previous one queued is still pending, so each rides a dispatch stage of its own, released a few seconds after the one before it landed, and an intent that delivers nothing has only the one. An action that needs collateral must be paired with `tokenRequests` anyway; one that does not (a reduce-only close, a cancel, a leverage change) rides a tokenless intent, one at a time — a few seconds after the previous intent's last registration, or it is refused as `HYPERCORE_TRADE_IN_FLIGHT`.
3839
+ */
3840
+ actions?: ({
3841
+ /** @enum {string} */
3842
+ type: 'order';
3843
+ orders: {
3886
3844
  /**
3887
- * @description Chain where this token leg settles (CAIP-2, any namespace)
3888
- * @example eip155:8453
3845
+ * @description Asset index. Perps use the index in the `meta` universe; spot uses `10000 + index` from `spotMeta`. This is an INDEX, not a ticker — resolve it from the info endpoint, and note that an index built against the wrong universe places a valid order in the wrong market.
3846
+ * @example 0
3889
3847
  */
3890
- chainId: string;
3848
+ a: number;
3891
3849
  /**
3892
- * @description Contract address of the debited token (EVM 0x or non-EVM base58)
3893
- * @example 0xaf88d065e77c8cc2239327c5edb3a432268e5831
3850
+ * @description Buy (`true`) or sell (`false`).
3851
+ * @example true
3894
3852
  */
3895
- tokenAddress: string;
3853
+ b: boolean;
3896
3854
  /**
3897
- * @description Token symbol, from the internal token registry or, for a token it has no entry for, read on-chain while planning. `null` when neither resolved one.
3898
- * @example USDC
3855
+ * @description Limit price. Must satisfy Hyperliquid's tick rules — at most 5 significant figures and at most `6 - szDecimals` decimals for a perp — and is refused there, not here.
3856
+ *
3857
+ * This price is fixed when you sign, and an intent that bridges to HyperCore takes ~30s to deliver. Price it to still cross after that move, or the order is refused with your funds already delivered.
3858
+ * @example 64250.5
3899
3859
  */
3900
- symbol: string | null;
3860
+ p: string;
3901
3861
  /**
3902
- * @description Token decimals, from the internal token registry or, for a token it has no entry for, read on-chain while planning. `null` when neither resolved one.
3903
- * @example 6
3862
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
3863
+ * @example 0.0002
3904
3864
  */
3905
- decimals: number | null;
3906
- /** @description Unit price in USD. `null` when neither the price oracle nor this quote priced the token. */
3907
- price: {
3908
- /**
3909
- * @description Unit price in USD
3865
+ s: string;
3866
+ /**
3867
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
3868
+ * @example false
3869
+ */
3870
+ r: boolean;
3871
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
3872
+ t: {
3873
+ limit: {
3874
+ /**
3875
+ * @description Time in force. `Ioc` fills what it can and cancels the rest, which is how a market order is expressed here — there is no market order type. `Alo` is post-only. `Gtc` rests on the book.
3876
+ *
3877
+ * Prefer `Ioc` for anything an intent delivers funds for: a resting order leaves the account holding USDC and no position, and the agent that could have cancelled it is already spent.
3878
+ * @example Ioc
3879
+ * @enum {string}
3880
+ */
3881
+ tif: 'Alo' | 'Ioc' | 'Gtc';
3882
+ };
3883
+ } | {
3884
+ trigger: {
3885
+ isMarket: boolean;
3886
+ triggerPx: string;
3887
+ /**
3888
+ * @description Take-profit or stop-loss.
3889
+ * @example sl
3890
+ * @enum {string}
3891
+ */
3892
+ tpsl: 'tp' | 'sl';
3893
+ };
3894
+ };
3895
+ /**
3896
+ * @description Optional client order id — 128-bit hex. Your handle on the order afterwards: the exchange echoes it back, so it is the only way to correlate a fill with the intent that placed it without polling by asset.
3897
+ * @example 0x1234567890abcdef1234567890abcdef
3898
+ */
3899
+ c?: string;
3900
+ }[];
3901
+ /**
3902
+ * @description `na` for a plain order. The TP/SL groupings attach the orders as a bracket around a position.
3903
+ * @example na
3904
+ * @enum {string}
3905
+ */
3906
+ grouping: 'na' | 'normalTpsl' | 'positionTpsl';
3907
+ builder?: {
3908
+ /** @description Address receiving the builder fee. */
3909
+ b: string;
3910
+ /**
3911
+ * @description Builder fee in TENTHS of a basis point — `10` is 1bp of order notional.
3912
+ * @example 10
3913
+ */
3914
+ f: number;
3915
+ };
3916
+ } | {
3917
+ /** @enum {string} */
3918
+ type: 'cancel';
3919
+ cancels: {
3920
+ /** @description Asset index. */
3921
+ a: number;
3922
+ /** @description Order id. */
3923
+ o: number;
3924
+ }[];
3925
+ /** @description Fast cancel. */
3926
+ f?: boolean;
3927
+ } | {
3928
+ /** @enum {string} */
3929
+ type: 'cancelByCloid';
3930
+ cancels: {
3931
+ asset: number;
3932
+ /**
3933
+ * @description Optional client order id — 128-bit hex. Your handle on the order afterwards: the exchange echoes it back, so it is the only way to correlate a fill with the intent that placed it without polling by asset.
3934
+ * @example 0x1234567890abcdef1234567890abcdef
3935
+ */
3936
+ cloid: string;
3937
+ }[];
3938
+ f?: boolean;
3939
+ } | {
3940
+ /** @enum {string} */
3941
+ type: 'modify';
3942
+ oid: number | string;
3943
+ order: {
3944
+ /**
3945
+ * @description Asset index. Perps use the index in the `meta` universe; spot uses `10000 + index` from `spotMeta`. This is an INDEX, not a ticker — resolve it from the info endpoint, and note that an index built against the wrong universe places a valid order in the wrong market.
3946
+ * @example 0
3947
+ */
3948
+ a: number;
3949
+ /**
3950
+ * @description Buy (`true`) or sell (`false`).
3951
+ * @example true
3952
+ */
3953
+ b: boolean;
3954
+ /**
3955
+ * @description Limit price. Must satisfy Hyperliquid's tick rules — at most 5 significant figures and at most `6 - szDecimals` decimals for a perp — and is refused there, not here.
3956
+ *
3957
+ * This price is fixed when you sign, and an intent that bridges to HyperCore takes ~30s to deliver. Price it to still cross after that move, or the order is refused with your funds already delivered.
3958
+ * @example 64250.5
3959
+ */
3960
+ p: string;
3961
+ /**
3962
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
3963
+ * @example 0.0002
3964
+ */
3965
+ s: string;
3966
+ /**
3967
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
3968
+ * @example false
3969
+ */
3970
+ r: boolean;
3971
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
3972
+ t: {
3973
+ limit: {
3974
+ /**
3975
+ * @description Time in force. `Ioc` fills what it can and cancels the rest, which is how a market order is expressed here — there is no market order type. `Alo` is post-only. `Gtc` rests on the book.
3976
+ *
3977
+ * Prefer `Ioc` for anything an intent delivers funds for: a resting order leaves the account holding USDC and no position, and the agent that could have cancelled it is already spent.
3978
+ * @example Ioc
3979
+ * @enum {string}
3980
+ */
3981
+ tif: 'Alo' | 'Ioc' | 'Gtc';
3982
+ };
3983
+ } | {
3984
+ trigger: {
3985
+ isMarket: boolean;
3986
+ triggerPx: string;
3987
+ /**
3988
+ * @description Take-profit or stop-loss.
3989
+ * @example sl
3990
+ * @enum {string}
3991
+ */
3992
+ tpsl: 'tp' | 'sl';
3993
+ };
3994
+ };
3995
+ /**
3996
+ * @description Optional client order id — 128-bit hex. Your handle on the order afterwards: the exchange echoes it back, so it is the only way to correlate a fill with the intent that placed it without polling by asset.
3997
+ * @example 0x1234567890abcdef1234567890abcdef
3998
+ */
3999
+ c?: string;
4000
+ };
4001
+ /**
4002
+ * @description Place the replacement even if the cancel failed. Omit it entirely for the default — Hyperliquid rejects an action hashed with `a: false`, so `false` is not a legal value.
4003
+ * @enum {boolean}
4004
+ */
4005
+ a?: true;
4006
+ } | {
4007
+ /** @enum {string} */
4008
+ type: 'batchModify';
4009
+ modifies: {
4010
+ oid: number | string;
4011
+ order: {
4012
+ /**
4013
+ * @description Asset index. Perps use the index in the `meta` universe; spot uses `10000 + index` from `spotMeta`. This is an INDEX, not a ticker — resolve it from the info endpoint, and note that an index built against the wrong universe places a valid order in the wrong market.
4014
+ * @example 0
4015
+ */
4016
+ a: number;
4017
+ /**
4018
+ * @description Buy (`true`) or sell (`false`).
4019
+ * @example true
4020
+ */
4021
+ b: boolean;
4022
+ /**
4023
+ * @description Limit price. Must satisfy Hyperliquid's tick rules — at most 5 significant figures and at most `6 - szDecimals` decimals for a perp — and is refused there, not here.
4024
+ *
4025
+ * This price is fixed when you sign, and an intent that bridges to HyperCore takes ~30s to deliver. Price it to still cross after that move, or the order is refused with your funds already delivered.
4026
+ * @example 64250.5
4027
+ */
4028
+ p: string;
4029
+ /**
4030
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
4031
+ * @example 0.0002
4032
+ */
4033
+ s: string;
4034
+ /**
4035
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
4036
+ * @example false
4037
+ */
4038
+ r: boolean;
4039
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
4040
+ t: {
4041
+ limit: {
4042
+ /**
4043
+ * @description Time in force. `Ioc` fills what it can and cancels the rest, which is how a market order is expressed here — there is no market order type. `Alo` is post-only. `Gtc` rests on the book.
4044
+ *
4045
+ * Prefer `Ioc` for anything an intent delivers funds for: a resting order leaves the account holding USDC and no position, and the agent that could have cancelled it is already spent.
4046
+ * @example Ioc
4047
+ * @enum {string}
4048
+ */
4049
+ tif: 'Alo' | 'Ioc' | 'Gtc';
4050
+ };
4051
+ } | {
4052
+ trigger: {
4053
+ isMarket: boolean;
4054
+ triggerPx: string;
4055
+ /**
4056
+ * @description Take-profit or stop-loss.
4057
+ * @example sl
4058
+ * @enum {string}
4059
+ */
4060
+ tpsl: 'tp' | 'sl';
4061
+ };
4062
+ };
4063
+ /**
4064
+ * @description Optional client order id — 128-bit hex. Your handle on the order afterwards: the exchange echoes it back, so it is the only way to correlate a fill with the intent that placed it without polling by asset.
4065
+ * @example 0x1234567890abcdef1234567890abcdef
4066
+ */
4067
+ c?: string;
4068
+ };
4069
+ }[];
4070
+ /**
4071
+ * @description Place the replacement even if the cancel failed. Omit it entirely for the default — Hyperliquid rejects an action hashed with `a: false`, so `false` is not a legal value.
4072
+ * @enum {boolean}
4073
+ */
4074
+ a?: true;
4075
+ } | {
4076
+ /** @enum {string} */
4077
+ type: 'updateLeverage';
4078
+ asset: number;
4079
+ /**
4080
+ * @description Cross margin (`true`) or isolated (`false`).
4081
+ * @example true
4082
+ */
4083
+ isCross: boolean;
4084
+ /**
4085
+ * @description New leverage, capped by the asset's own maximum. Set it BEFORE the intent that opens the position: leverage applied afterwards does not resize an existing one.
4086
+ * @example 5
4087
+ */
4088
+ leverage: number;
4089
+ } | {
4090
+ /** @enum {string} */
4091
+ type: 'updateIsolatedMargin';
4092
+ asset: number;
4093
+ isBuy: boolean;
4094
+ /**
4095
+ * @description Margin to add (positive) or remove (negative), in USDC with 6 decimals — `1000000` is 1 USD.
4096
+ * @example 1000000
4097
+ */
4098
+ ntli: number;
4099
+ } | {
4100
+ /** @enum {string} */
4101
+ type: 'twapOrder';
4102
+ twap: {
4103
+ /**
4104
+ * @description Asset index, as for an order.
4105
+ * @example 0
4106
+ */
4107
+ a: number;
4108
+ /**
4109
+ * @description Buy (`true`) or sell (`false`).
4110
+ * @example true
4111
+ */
4112
+ b: boolean;
4113
+ /**
4114
+ * @description Total size to work, in units of the asset.
4115
+ * @example 0.01
4116
+ */
4117
+ s: string;
4118
+ /**
4119
+ * @description Reduce-only.
4120
+ * @example false
4121
+ */
4122
+ r: boolean;
4123
+ /**
4124
+ * @description Duration in MINUTES. Hyperliquid enforces its own bounds and refuses a duration outside them ("Invalid TWAP duration"), so none are imposed here.
4125
+ * @example 30
4126
+ */
4127
+ m: number;
4128
+ /**
4129
+ * @description Randomize the timing of the sub-orders rather than spacing them evenly.
4130
+ * @example true
4131
+ */
4132
+ t: boolean;
4133
+ };
4134
+ } | {
4135
+ /** @enum {string} */
4136
+ type: 'twapCancel';
4137
+ /**
4138
+ * @description Asset index of the running TWAP.
4139
+ * @example 0
4140
+ */
4141
+ a: number;
4142
+ /**
4143
+ * @description The TWAP id, which Hyperliquid returns when it accepts the `twapOrder` and is not echoed on the intent. Read it back from the exchange — the agent that placed the TWAP authorised only that one action, so cancelling is a second intent.
4144
+ * @example 12345
4145
+ */
4146
+ t: number;
4147
+ })[];
4148
+ };
4149
+ };
4150
+ /** @description Account access list specifying which CAIP-2 chains and tokens an account may access */
4151
+ accountAccessList?: {
4152
+ chainIds?: string[];
4153
+ tokens?: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'ensUSDC2' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
4154
+ /**
4155
+ * @description Tokens keyed by CAIP-2 chain ID.
4156
+ * @example {
4157
+ * "eip155:8453": [
4158
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
4159
+ * ]
4160
+ * }
4161
+ */
4162
+ chainTokens?: {
4163
+ [key: string]: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'ensUSDC2' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
4164
+ };
4165
+ /**
4166
+ * @description Per-token maximum input amounts keyed by CAIP-2 chain ID.
4167
+ * @example {
4168
+ * "eip155:8453": {
4169
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": "1000000"
4170
+ * }
4171
+ * }
4172
+ */
4173
+ chainTokenAmounts?: {
4174
+ [key: string]: {
4175
+ [key: string]: string;
4176
+ };
4177
+ };
4178
+ exclude?: {
4179
+ chainIds?: string[];
4180
+ tokens?: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'ensUSDC2' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
4181
+ /**
4182
+ * @description Tokens keyed by CAIP-2 chain ID.
4183
+ * @example {
4184
+ * "eip155:8453": [
4185
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
4186
+ * ]
4187
+ * }
4188
+ */
4189
+ chainTokens?: {
4190
+ [key: string]: (string | ('ETH' | 'USDC' | 'WETH' | 'USDT' | 'USDT0' | 'BNB' | 'WBNB' | 'XDAI' | 'WXDAI' | 'POL' | 'WPOL' | 'MON' | 'WMON' | 'S' | 'WS' | 'OKB' | 'WOKB' | 'HYPE' | 'WHYPE' | 'USDG' | 'XPL' | 'WXPL' | 'AVAX' | 'WAVAX' | 'MockUSD' | 'XLM' | 'ensUSDC' | 'ensUSDC2' | 'TRX' | 'WTRX' | 'SOL' | 'WSOL'))[];
4191
+ };
4192
+ };
4193
+ };
4194
+ };
4195
+ };
4196
+ };
4197
+ responses: {
4198
+ /** @description OK */
4199
+ 200: {
4200
+ headers: {
4201
+ [name: string]: unknown;
4202
+ };
4203
+ content: {
4204
+ 'application/json': {
4205
+ /** @description Route candidates ranked by the orchestrator's internal scoring (cheaper + faster wins). The first entry is the recommended route — most clients should submit it without inspecting the rest. */
4206
+ routes: {
4207
+ /** @description Server-stored intent identifier. Pass back to `POST /intents` to submit. */
4208
+ intentId: string;
4209
+ /**
4210
+ * @description Quote expiry timestamp (Unix seconds). After this point, assume the quote is dead and re-quote.
4211
+ * @example 1733493192
4212
+ */
4213
+ expiresAt: number;
4214
+ /** @description Estimated fill time for the route */
4215
+ estimatedFillTime: {
4216
+ /**
4217
+ * @description Typical end-to-end fill time for this route in seconds. Directional, not guaranteed.
4218
+ * @example 3
4219
+ */
4220
+ seconds: number;
4221
+ };
4222
+ /**
4223
+ * @description Settlement layer selected for this route
4224
+ * @example RELAY
4225
+ * @enum {string}
4226
+ */
4227
+ settlementLayer: 'INTENT_EXECUTOR' | 'SAME_CHAIN' | 'ACROSS' | 'ECO' | 'RELAY' | 'OFT' | 'NEAR' | 'RHINO' | 'CCTP' | 'LZ';
4228
+ /** @description EIP-712 sign payloads the client submits back on `POST /intents` */
4229
+ signData: {
4230
+ /** @description Payloads for the origin legs, in submission order. Sign each entry and submit the signatures in matching order via `signatures.origin`. Discriminate on `kind`: `eip712` is signed as typed data, `personalSign` as a message. */
4231
+ origin: ({
4232
+ /** @description EIP-712 domain separator fields */
4233
+ domain: {
4234
+ name?: string;
4235
+ version?: string;
4236
+ chainId?: number;
4237
+ verifyingContract?: string;
4238
+ salt?: string;
4239
+ };
4240
+ /** @description EIP-712 type definitions keyed by type name */
4241
+ types: {
4242
+ [key: string]: {
4243
+ name: string;
4244
+ type: string;
4245
+ }[];
4246
+ };
4247
+ /**
4248
+ * @description Name of the top-level type to sign
4249
+ * @example PermitBatchWitnessTransferFrom
4250
+ */
4251
+ primaryType: string;
4252
+ /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
4253
+ message: {
4254
+ [key: string]: unknown;
4255
+ };
4256
+ /** @enum {string} */
4257
+ kind: 'eip712';
4258
+ } | {
4259
+ /** @enum {string} */
4260
+ kind: 'personalSign';
4261
+ /**
4262
+ * @description Sign these characters as UTF-8 TEXT — viem `signMessage({ message })`, never `{ raw }`. Signing the decoded bytes yields a well-formed signature that the chain rejects.
4263
+ * @example a3f2c1d4e5b6a7980f1e2d3c4b5a69788796a5b4c3d2e1f0a1b2c3d4e5f60718
4264
+ */
4265
+ message: string;
4266
+ /**
4267
+ * @description Solana slot after which this payload is dead. Much shorter than the route `expiresAt` — about 24 seconds — and it is the binding one. Re-quote when it passes.
4268
+ * @example 370123456
4269
+ */
4270
+ expiresAtSlot: string;
4271
+ })[];
4272
+ /** @description Typed data for the destination leg. Absent when a third-party bridge performs the delivery and there is nothing for the user to sign there. */
4273
+ destination?: {
4274
+ /** @description EIP-712 domain separator fields */
4275
+ domain: {
4276
+ name?: string;
4277
+ version?: string;
4278
+ chainId?: number;
4279
+ verifyingContract?: string;
4280
+ salt?: string;
4281
+ };
4282
+ /** @description EIP-712 type definitions keyed by type name */
4283
+ types: {
4284
+ [key: string]: {
4285
+ name: string;
4286
+ type: string;
4287
+ }[];
4288
+ };
4289
+ /**
4290
+ * @description Name of the top-level type to sign
4291
+ * @example PermitBatchWitnessTransferFrom
4292
+ */
4293
+ primaryType: string;
4294
+ /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
4295
+ message: {
4296
+ [key: string]: unknown;
4297
+ };
4298
+ };
4299
+ /** @description Typed data for the target execution, smart sessions only. Omitted for EOA accounts. */
4300
+ targetExecution?: {
4301
+ /** @description EIP-712 domain separator fields */
4302
+ domain: {
4303
+ name?: string;
4304
+ version?: string;
4305
+ chainId?: number;
4306
+ verifyingContract?: string;
4307
+ salt?: string;
4308
+ };
4309
+ /** @description EIP-712 type definitions keyed by type name */
4310
+ types: {
4311
+ [key: string]: {
4312
+ name: string;
4313
+ type: string;
4314
+ }[];
4315
+ };
4316
+ /**
4317
+ * @description Name of the top-level type to sign
4318
+ * @example PermitBatchWitnessTransferFrom
4319
+ */
4320
+ primaryType: string;
4321
+ /** @description Message values keyed by field name. uint256 fields are encoded as decimal strings on the wire and re-coerced to bigint client-side before signing. */
4322
+ message: {
4323
+ [key: string]: unknown;
4324
+ };
4325
+ };
4326
+ };
4327
+ /** @description Route cost: inputs, outputs, and fee breakdown */
4328
+ cost: {
4329
+ /** @description Tokens debited from the user, coalesced by (chainId, tokenAddress) */
4330
+ input: {
4331
+ /**
4332
+ * @description Chain where this token leg settles (CAIP-2, any namespace)
4333
+ * @example eip155:8453
4334
+ */
4335
+ chainId: string;
4336
+ /**
4337
+ * @description Contract address of the debited token (EVM 0x or non-EVM base58)
4338
+ * @example 0xaf88d065e77c8cc2239327c5edb3a432268e5831
4339
+ */
4340
+ tokenAddress: string;
4341
+ /**
4342
+ * @description Token symbol, from the internal token registry or, for a token it has no entry for, read on-chain while planning. `null` when neither resolved one.
4343
+ * @example USDC
4344
+ */
4345
+ symbol: string | null;
4346
+ /**
4347
+ * @description Token decimals, from the internal token registry or, for a token it has no entry for, read on-chain while planning. `null` when neither resolved one.
4348
+ * @example 6
4349
+ */
4350
+ decimals: number | null;
4351
+ /** @description Unit price in USD. `null` when neither the price oracle nor this quote priced the token. */
4352
+ price: {
4353
+ /**
4354
+ * @description Unit price in USD
3910
4355
  * @example 1
3911
4356
  */
3912
4357
  usd: number;
@@ -4132,6 +4577,8 @@ export interface operations {
4132
4577
  intentHash: string;
4133
4578
  /** @description Eco's own id for the delivery chain, present only where it differs from `destinationChainId` (non-EVM destinations). Eco's status API reports fulfilment against this id. */
4134
4579
  providerDestinationChainId?: number;
4580
+ /** @description Eco's own id for the chain the reward was funded on, present only where it differs from the deposit chain (non-EVM origins). */
4581
+ providerSourceChainId?: number;
4135
4582
  } | {
4136
4583
  /** @description Destination chain ID for the bridge fill */
4137
4584
  destinationChainId: number;
@@ -4158,7 +4605,7 @@ export interface operations {
4158
4605
  * @enum {string}
4159
4606
  */
4160
4607
  type: 'NEAR';
4161
- /** @description NEAR Intents deposit address. Track fill status via the NEAR Intents status API keyed on this address. */
4608
+ /** @description NEAR Intents deposit address on the origin chain, in its native form (EVM 0x or Solana base58). Track fill status via the NEAR Intents status API keyed on this address. */
4162
4609
  depositAddress: string;
4163
4610
  } | {
4164
4611
  /** @description Destination chain ID for the bridge fill */
@@ -4521,8 +4968,6 @@ export interface operations {
4521
4968
  header: {
4522
4969
  /** @description API version. Required; pinned to this document. */
4523
4970
  'x-api-version': '2026-04.blanc';
4524
- /** @description API key. */
4525
- 'x-api-key': string;
4526
4971
  };
4527
4972
  path?: never;
4528
4973
  cookie?: never;
@@ -4537,12 +4982,12 @@ export interface operations {
4537
4982
  */
4538
4983
  direction: 'exactIn' | 'exactOut';
4539
4984
  /**
4540
- * @description Source chain id (CAIP-2, eip155)
4985
+ * @description Source chain id (CAIP-2): EVM (`eip155:*`), or `solana:…` where this deployment spends from a Solana origin.
4541
4986
  * @example eip155:8453
4542
4987
  */
4543
4988
  sourceChainId: string;
4544
4989
  /**
4545
- * @description Source token address
4990
+ * @description Source token address — EVM `0x…`, or a Solana base58 mint.
4546
4991
  * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
4547
4992
  */
4548
4993
  sourceToken: string;
@@ -4595,7 +5040,7 @@ export interface operations {
4595
5040
  exclude: ('ACROSS' | 'ECO' | 'RELAY' | 'OFT' | 'NEAR' | 'RHINO' | 'CCTP' | 'LZ')[];
4596
5041
  };
4597
5042
  /**
4598
- * @description Which fee categories to treat as sponsored. Sponsored categories are absorbed by the sponsor and do not reduce the delivered amount.
5043
+ * @description Which fee categories to treat as sponsored. Sponsored categories are absorbed by the sponsor and do not reduce the delivered amount. `swapValue` is NOT accepted here: the estimator prices swaps at market, so an estimate cannot yet reflect a par-sponsored swap and is rejected rather than returning a figure `POST /quotes` would not honour (RHI-7069).
4599
5044
  * @example {
4600
5045
  * "gas": true,
4601
5046
  * "bridgeFees": true,
@@ -4619,6 +5064,8 @@ export interface operations {
4619
5064
  * @default false
4620
5065
  */
4621
5066
  swapFees?: boolean;
5067
+ /** @description Whether to sponsor the VALUE of an eligible same-chain swap, so the user trades at par: the user contributes the 1:1 amount and the sponsor pays whatever the market is short. Applies only to pairs where par is a meaningful rate (both sides USD-pegged) and only up to a configured per-swap ceiling; outside those bounds the route plans as an ordinary unsponsored swap. Distinct from `swapFees`, which waives a solver's commission. */
5068
+ swapValue?: boolean;
4622
5069
  /**
4623
5070
  * @description Whether to sponsor the Rhinestone protocol fee (`options.protocolFees`) for the intent. When `true`, the fee is charged to the integrator's sponsorship balance instead of carved from the user, without the sponsorship surcharge.
4624
5071
  * @default false
@@ -5063,6 +5510,106 @@ export interface operations {
5063
5510
  };
5064
5511
  };
5065
5512
  };
5513
+ /** @description Sponsorship or a request option refuses the route */
5514
+ 422: {
5515
+ headers: {
5516
+ [name: string]: unknown;
5517
+ };
5518
+ content: {
5519
+ 'application/json': {
5520
+ /** @enum {string} */
5521
+ code: 'VALIDATION_ERROR';
5522
+ /**
5523
+ * @description Human-readable error message
5524
+ * @example Invalid input
5525
+ */
5526
+ message: string;
5527
+ /** @description Per-field validation issues */
5528
+ details?: {
5529
+ /** @description Human-readable issue description */
5530
+ message: string;
5531
+ /** @description Structured issue context (e.g. `{ path: "body.accountAddress" }`) */
5532
+ context?: {
5533
+ [key: string]: unknown;
5534
+ };
5535
+ }[];
5536
+ } | {
5537
+ /** @enum {string} */
5538
+ code: 'SIMULATION_FAILED';
5539
+ /**
5540
+ * @description Human-readable error message
5541
+ * @example Invalid input
5542
+ */
5543
+ message: string;
5544
+ /** @description Classified on-chain simulation failure details */
5545
+ details?: {
5546
+ nonce?: string;
5547
+ category: string;
5548
+ errorSelector: string;
5549
+ errorName: string;
5550
+ errorArgs?: {
5551
+ [key: string]: string;
5552
+ };
5553
+ retryable: boolean;
5554
+ /** @enum {string} */
5555
+ retryHint?: 'RE_PREPARE' | 'RETRY_LATER';
5556
+ simulations?: unknown;
5557
+ } & {
5558
+ [key: string]: unknown;
5559
+ };
5560
+ } | {
5561
+ /** @enum {string} */
5562
+ code: 'INSUFFICIENT_LIQUIDITY';
5563
+ /**
5564
+ * @description Human-readable error message
5565
+ * @example Invalid input
5566
+ */
5567
+ message: string;
5568
+ /** @description Fillable subset and unfillable remainder */
5569
+ details?: {
5570
+ /** @description Intents fillable with current liquidity */
5571
+ availableIntents: {
5572
+ [key: string]: string;
5573
+ }[];
5574
+ /** @description Token amounts that cannot be filled */
5575
+ unfillable: {
5576
+ [key: string]: string;
5577
+ };
5578
+ };
5579
+ } | {
5580
+ /** @enum {string} */
5581
+ code: 'KEY_SCOPE_DENIED';
5582
+ /**
5583
+ * @description Human-readable error message
5584
+ * @example Invalid input
5585
+ */
5586
+ message: string;
5587
+ /** @description Single-element list describing the failing scope */
5588
+ details?: {
5589
+ message: string;
5590
+ context: {
5591
+ /**
5592
+ * @description Which scope rejected the request
5593
+ * @enum {string}
5594
+ */
5595
+ scope: 'allowMainnet' | 'intents' | 'deposits';
5596
+ /** @description Minimum level the endpoint demands */
5597
+ required: boolean | ('read' | 'write');
5598
+ /** @description Level resolved on the key */
5599
+ actual: boolean | ('none' | 'read' | 'write');
5600
+ };
5601
+ }[];
5602
+ } | {
5603
+ /** @enum {string} */
5604
+ code: 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'WITHDRAWAL_IN_PROGRESS' | 'UNPROCESSABLE_CONTENT' | 'TOO_MANY_REQUESTS' | 'SETTLEMENT_QUOTE_ERROR' | 'SETTLEMENT_EXECUTION_ERROR' | 'EXTERNAL_SERVICE_TIMEOUT' | 'RELAYER_MARKET_UNAVAILABLE' | 'INTERNAL_ERROR';
5605
+ /**
5606
+ * @description Human-readable error message
5607
+ * @example Invalid input
5608
+ */
5609
+ message: string;
5610
+ };
5611
+ };
5612
+ };
5066
5613
  /** @description Server error */
5067
5614
  500: {
5068
5615
  headers: {
@@ -5171,8 +5718,6 @@ export interface operations {
5171
5718
  header: {
5172
5719
  /** @description API version. Required; pinned to this document. */
5173
5720
  'x-api-version': '2026-04.blanc';
5174
- /** @description API key. */
5175
- 'x-api-key': string;
5176
5721
  };
5177
5722
  path?: never;
5178
5723
  cookie?: never;
@@ -5499,8 +6044,6 @@ export interface operations {
5499
6044
  header: {
5500
6045
  /** @description API version. Required; pinned to this document. */
5501
6046
  'x-api-version': '2026-04.blanc';
5502
- /** @description API key. */
5503
- 'x-api-key': string;
5504
6047
  };
5505
6048
  path?: never;
5506
6049
  cookie?: never;
@@ -5934,8 +6477,6 @@ export interface operations {
5934
6477
  header: {
5935
6478
  /** @description API version. Required; pinned to this document. */
5936
6479
  'x-api-version': '2026-04.blanc';
5937
- /** @description API key. */
5938
- 'x-api-key': string;
5939
6480
  };
5940
6481
  path?: never;
5941
6482
  cookie?: never;
@@ -6374,8 +6915,6 @@ export interface operations {
6374
6915
  header: {
6375
6916
  /** @description API version. Required; pinned to this document. */
6376
6917
  'x-api-version': '2026-04.blanc';
6377
- /** @description API key. */
6378
- 'x-api-key': string;
6379
6918
  };
6380
6919
  path?: never;
6381
6920
  cookie?: never;
@@ -6808,8 +7347,6 @@ export interface operations {
6808
7347
  header: {
6809
7348
  /** @description API version. Required; pinned to this document. */
6810
7349
  'x-api-version': '2026-04.blanc';
6811
- /** @description API key. */
6812
- 'x-api-key': string;
6813
7350
  };
6814
7351
  path: {
6815
7352
  nonce: string;