@rhinestone/sdk 2.16.1 → 2.16.3

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.
@@ -98,7 +98,7 @@ export interface paths {
98
98
  put?: never;
99
99
  /**
100
100
  * Create Intent
101
- * @description Submits a quoted intent for execution. Takes the `intentId` from `POST /quotes` (`routes[].intentId`) plus signatures (origin, destination, optionally target-execution) and optional EIP-7702 authorizations.
101
+ * @description Submits a quoted intent for execution. Takes the `intentId` from `POST /quotes` (`routes[].intentId`) plus the proofs authorizing it: on `2026-09.caucasus` one ordered `proofs[]` answering the quote's `signingRequests[]` position by position; on earlier versions the role-keyed signatures (origin, destination, optionally target-execution) and optional EIP-7702 authorizations.
102
102
  */
103
103
  post: operations['createIntent'];
104
104
  delete?: never;
@@ -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, in the chain's own address format (EVM hex, Solana base58); 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;
@@ -1030,6 +1097,50 @@ export interface operations {
1030
1097
  */
1031
1098
  data: string;
1032
1099
  }[];
1100
+ /** @description Caller-supplied Solana instructions and lookup tables committed to by the intent. Present on instruction-only Solana intents. */
1101
+ solanaExecution?: {
1102
+ /** @description The executor of the disclosed calls */
1103
+ executedBy: {
1104
+ /**
1105
+ * @description Who runs the calls: the account itself, or a solver-operated contract running them on its behalf.
1106
+ * @example account
1107
+ * @enum {string}
1108
+ */
1109
+ kind: 'account' | 'solver';
1110
+ /**
1111
+ * @description Address of the executing contract or account
1112
+ * @example 0x579d5631f76126991c00fb8fe5467fa9d49e5f6a
1113
+ */
1114
+ address: string;
1115
+ };
1116
+ /** @description The caller's own instructions, in execution order */
1117
+ instructions: {
1118
+ /**
1119
+ * @description Program to invoke, base58.
1120
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
1121
+ */
1122
+ programId: string;
1123
+ /** @description Accounts the instruction reads or writes, in the order the program expects. */
1124
+ accounts: {
1125
+ /**
1126
+ * @description Account address, base58.
1127
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
1128
+ */
1129
+ pubkey: string;
1130
+ /** @description Whether the instruction requires this account to sign. */
1131
+ isSigner: boolean;
1132
+ /** @description Whether the instruction writes to this account. */
1133
+ isWritable: boolean;
1134
+ }[];
1135
+ /**
1136
+ * @description Instruction data, base64.
1137
+ * @example CQ==
1138
+ */
1139
+ data: string;
1140
+ }[];
1141
+ /** @description Address lookup tables the instructions resolve against */
1142
+ addressLookupTables: string[];
1143
+ };
1033
1144
  /** @description Cost summary from the recorded fee sponsorship. Amounts are integer micro-USD; omitted when no sponsorship row exists. */
1034
1145
  cost: {
1035
1146
  /**
@@ -1038,12 +1149,12 @@ export interface operations {
1038
1149
  */
1039
1150
  sponsored: boolean;
1040
1151
  /**
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.
1152
+ * @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
1153
  * @example 210000
1043
1154
  */
1044
1155
  sponsoredValue?: string;
1045
1156
  /**
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.
1157
+ * @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
1158
  * @example 10000
1048
1159
  */
1049
1160
  protocolFee?: string;
@@ -1469,8 +1580,6 @@ export interface operations {
1469
1580
  header: {
1470
1581
  /** @description API version. Required; pinned to this document. */
1471
1582
  'x-api-version': '2026-04.blanc';
1472
- /** @description API key. */
1473
- 'x-api-key': string;
1474
1583
  };
1475
1584
  path: {
1476
1585
  accountAddress: string;
@@ -1834,8 +1943,6 @@ export interface operations {
1834
1943
  header: {
1835
1944
  /** @description API version. Required; pinned to this document. */
1836
1945
  'x-api-version': '2026-04.blanc';
1837
- /** @description API key. */
1838
- 'x-api-key': string;
1839
1946
  };
1840
1947
  path?: never;
1841
1948
  cookie?: never;
@@ -2227,8 +2334,6 @@ export interface operations {
2227
2334
  header: {
2228
2335
  /** @description API version. Required; pinned to this document. */
2229
2336
  'x-api-version': '2026-04.blanc';
2230
- /** @description API key. */
2231
- 'x-api-key': string;
2232
2337
  };
2233
2338
  path?: never;
2234
2339
  cookie?: never;
@@ -2744,8 +2849,6 @@ export interface operations {
2744
2849
  header: {
2745
2850
  /** @description API version. Required; pinned to this document. */
2746
2851
  'x-api-version': '2026-04.blanc';
2747
- /** @description API key. */
2748
- 'x-api-key': string;
2749
2852
  };
2750
2853
  path?: never;
2751
2854
  cookie?: never;
@@ -3147,8 +3250,6 @@ export interface operations {
3147
3250
  header: {
3148
3251
  /** @description API version. Required; pinned to this document. */
3149
3252
  'x-api-version': '2026-04.blanc';
3150
- /** @description API key. */
3151
- 'x-api-key': string;
3152
3253
  };
3153
3254
  path?: never;
3154
3255
  cookie?: never;
@@ -3234,6 +3335,33 @@ export interface operations {
3234
3335
  */
3235
3336
  data: string;
3236
3337
  }[];
3338
+ /** @description Solana instructions to run, in order, out of the account's own Swig wallet on a Solana destination. They carry any transfers and payees, so omit `recipient` and `tokenRequests`; they cannot be combined with `destinationExecutions`. Unsponsored execution is paid from an eligible wallet SOL or SPL balance; `options.sponsorSettings.gas` bills the sponsor instead. */
3339
+ destinationInstructions?: {
3340
+ /**
3341
+ * @description Program to invoke, base58.
3342
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
3343
+ */
3344
+ programId: string;
3345
+ /** @description Accounts the instruction reads or writes, in the order the program expects. */
3346
+ accounts: {
3347
+ /**
3348
+ * @description Account address, base58.
3349
+ * @example TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
3350
+ */
3351
+ pubkey: string;
3352
+ /** @description Whether the instruction requires this account to sign. */
3353
+ isSigner: boolean;
3354
+ /** @description Whether the instruction writes to this account. */
3355
+ isWritable: boolean;
3356
+ }[];
3357
+ /**
3358
+ * @description Instruction data, base64.
3359
+ * @example CQ==
3360
+ */
3361
+ data: string;
3362
+ }[];
3363
+ /** @description Address lookup tables the `destinationInstructions` resolve accounts through, base58, as Jupiter `/swap-instructions` returns them. Only with `destinationInstructions`. */
3364
+ addressLookupTableAddresses?: string[];
3237
3365
  /**
3238
3366
  * @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
3367
  * @example {
@@ -3272,50 +3400,6 @@ export interface operations {
3272
3400
  * @example 100000
3273
3401
  */
3274
3402
  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
3403
  recipient?: {
3320
3404
  /**
3321
3405
  * @description Recipient address. Format depends on destination chain — 0x-hex for EVM destinations, base58 for Solana, T-address for Tron.
@@ -3417,7 +3501,7 @@ export interface operations {
3417
3501
  */
3418
3502
  bridgeFees?: boolean;
3419
3503
  /**
3420
- * @description Whether to sponsor swap fees for the intent
3504
+ * @description Whether to sponsor swap fees for the intent. For an integrator enabled for it, this also sponsors 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. That 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 swap is priced at market.
3421
3505
  * @default false
3422
3506
  */
3423
3507
  swapFees?: boolean;
@@ -3479,12 +3563,8 @@ export interface operations {
3479
3563
  */
3480
3564
  customDeadline?: number;
3481
3565
  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: {
3566
+ /** @description A single Hyperliquid action to authorise. Shorthand for a one-element `actions`; give one or the other, not both. */
3567
+ action?: {
3488
3568
  /** @enum {string} */
3489
3569
  type: 'order';
3490
3570
  orders: {
@@ -3743,161 +3823,568 @@ export interface operations {
3743
3823
  * @example 1000000
3744
3824
  */
3745
3825
  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
- };
3826
+ } | {
3827
+ /** @enum {string} */
3828
+ type: 'twapOrder';
3829
+ twap: {
3802
3830
  /**
3803
- * @description Name of the top-level type to sign
3804
- * @example PermitBatchWitnessTransferFrom
3831
+ * @description Asset index, as for an order.
3832
+ * @example 0
3805
3833
  */
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';
3834
+ a: number;
3816
3835
  /**
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
3836
+ * @description Buy (`true`) or sell (`false`).
3837
+ * @example true
3819
3838
  */
3820
- message: string;
3839
+ b: boolean;
3821
3840
  /**
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
3841
+ * @description Total size to work, in units of the asset.
3842
+ * @example 0.01
3824
3843
  */
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
- };
3844
+ s: string;
3844
3845
  /**
3845
- * @description Name of the top-level type to sign
3846
- * @example PermitBatchWitnessTransferFrom
3846
+ * @description Reduce-only.
3847
+ * @example false
3847
3848
  */
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
- };
3849
+ r: boolean;
3871
3850
  /**
3872
- * @description Name of the top-level type to sign
3873
- * @example PermitBatchWitnessTransferFrom
3851
+ * @description Duration in MINUTES. Hyperliquid enforces its own bounds and refuses a duration outside them ("Invalid TWAP duration"), so none are imposed here.
3852
+ * @example 30
3874
3853
  */
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
- };
3854
+ m: number;
3855
+ /**
3856
+ * @description Randomize the timing of the sub-orders rather than spacing them evenly.
3857
+ * @example true
3858
+ */
3859
+ t: boolean;
3880
3860
  };
3861
+ } | {
3862
+ /** @enum {string} */
3863
+ type: 'twapCancel';
3864
+ /**
3865
+ * @description Asset index of the running TWAP.
3866
+ * @example 0
3867
+ */
3868
+ a: number;
3869
+ /**
3870
+ * @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.
3871
+ * @example 12345
3872
+ */
3873
+ t: number;
3881
3874
  };
3882
- /** @description Route cost: inputs, outputs, and fee breakdown */
3883
- cost: {
3884
- /** @description Tokens debited from the user, coalesced by (chainId, tokenAddress) */
3885
- input: {
3875
+ /**
3876
+ * @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.
3877
+ *
3878
+ * 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.
3879
+ *
3880
+ * 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`.
3881
+ */
3882
+ actions?: ({
3883
+ /** @enum {string} */
3884
+ type: 'order';
3885
+ orders: {
3886
3886
  /**
3887
- * @description Chain where this token leg settles (CAIP-2, any namespace)
3888
- * @example eip155:8453
3887
+ * @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.
3888
+ * @example 0
3889
3889
  */
3890
- chainId: string;
3890
+ a: number;
3891
3891
  /**
3892
- * @description Contract address of the debited token (EVM 0x or non-EVM base58)
3893
- * @example 0xaf88d065e77c8cc2239327c5edb3a432268e5831
3892
+ * @description Buy (`true`) or sell (`false`).
3893
+ * @example true
3894
3894
  */
3895
- tokenAddress: string;
3895
+ b: boolean;
3896
3896
  /**
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
3899
- */
3900
- symbol: string | null;
3897
+ * @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.
3898
+ *
3899
+ * 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.
3900
+ * @example 64250.5
3901
+ */
3902
+ p: string;
3903
+ /**
3904
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
3905
+ * @example 0.0002
3906
+ */
3907
+ s: string;
3908
+ /**
3909
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
3910
+ * @example false
3911
+ */
3912
+ r: boolean;
3913
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
3914
+ t: {
3915
+ limit: {
3916
+ /**
3917
+ * @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.
3918
+ *
3919
+ * 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.
3920
+ * @example Ioc
3921
+ * @enum {string}
3922
+ */
3923
+ tif: 'Alo' | 'Ioc' | 'Gtc';
3924
+ };
3925
+ } | {
3926
+ trigger: {
3927
+ isMarket: boolean;
3928
+ triggerPx: string;
3929
+ /**
3930
+ * @description Take-profit or stop-loss.
3931
+ * @example sl
3932
+ * @enum {string}
3933
+ */
3934
+ tpsl: 'tp' | 'sl';
3935
+ };
3936
+ };
3937
+ /**
3938
+ * @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.
3939
+ * @example 0x1234567890abcdef1234567890abcdef
3940
+ */
3941
+ c?: string;
3942
+ }[];
3943
+ /**
3944
+ * @description `na` for a plain order. The TP/SL groupings attach the orders as a bracket around a position.
3945
+ * @example na
3946
+ * @enum {string}
3947
+ */
3948
+ grouping: 'na' | 'normalTpsl' | 'positionTpsl';
3949
+ builder?: {
3950
+ /** @description Address receiving the builder fee. */
3951
+ b: string;
3952
+ /**
3953
+ * @description Builder fee in TENTHS of a basis point — `10` is 1bp of order notional.
3954
+ * @example 10
3955
+ */
3956
+ f: number;
3957
+ };
3958
+ } | {
3959
+ /** @enum {string} */
3960
+ type: 'cancel';
3961
+ cancels: {
3962
+ /** @description Asset index. */
3963
+ a: number;
3964
+ /** @description Order id. */
3965
+ o: number;
3966
+ }[];
3967
+ /** @description Fast cancel. */
3968
+ f?: boolean;
3969
+ } | {
3970
+ /** @enum {string} */
3971
+ type: 'cancelByCloid';
3972
+ cancels: {
3973
+ asset: number;
3974
+ /**
3975
+ * @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.
3976
+ * @example 0x1234567890abcdef1234567890abcdef
3977
+ */
3978
+ cloid: string;
3979
+ }[];
3980
+ f?: boolean;
3981
+ } | {
3982
+ /** @enum {string} */
3983
+ type: 'modify';
3984
+ oid: number | string;
3985
+ order: {
3986
+ /**
3987
+ * @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.
3988
+ * @example 0
3989
+ */
3990
+ a: number;
3991
+ /**
3992
+ * @description Buy (`true`) or sell (`false`).
3993
+ * @example true
3994
+ */
3995
+ b: boolean;
3996
+ /**
3997
+ * @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.
3998
+ *
3999
+ * 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.
4000
+ * @example 64250.5
4001
+ */
4002
+ p: string;
4003
+ /**
4004
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
4005
+ * @example 0.0002
4006
+ */
4007
+ s: string;
4008
+ /**
4009
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
4010
+ * @example false
4011
+ */
4012
+ r: boolean;
4013
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
4014
+ t: {
4015
+ limit: {
4016
+ /**
4017
+ * @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.
4018
+ *
4019
+ * 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.
4020
+ * @example Ioc
4021
+ * @enum {string}
4022
+ */
4023
+ tif: 'Alo' | 'Ioc' | 'Gtc';
4024
+ };
4025
+ } | {
4026
+ trigger: {
4027
+ isMarket: boolean;
4028
+ triggerPx: string;
4029
+ /**
4030
+ * @description Take-profit or stop-loss.
4031
+ * @example sl
4032
+ * @enum {string}
4033
+ */
4034
+ tpsl: 'tp' | 'sl';
4035
+ };
4036
+ };
4037
+ /**
4038
+ * @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.
4039
+ * @example 0x1234567890abcdef1234567890abcdef
4040
+ */
4041
+ c?: string;
4042
+ };
4043
+ /**
4044
+ * @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.
4045
+ * @enum {boolean}
4046
+ */
4047
+ a?: true;
4048
+ } | {
4049
+ /** @enum {string} */
4050
+ type: 'batchModify';
4051
+ modifies: {
4052
+ oid: number | string;
4053
+ order: {
4054
+ /**
4055
+ * @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.
4056
+ * @example 0
4057
+ */
4058
+ a: number;
4059
+ /**
4060
+ * @description Buy (`true`) or sell (`false`).
4061
+ * @example true
4062
+ */
4063
+ b: boolean;
4064
+ /**
4065
+ * @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.
4066
+ *
4067
+ * 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.
4068
+ * @example 64250.5
4069
+ */
4070
+ p: string;
4071
+ /**
4072
+ * @description Size in units of the asset, to at most the asset's `szDecimals`. Hyperliquid refuses an order worth under ~$10.
4073
+ * @example 0.0002
4074
+ */
4075
+ s: string;
4076
+ /**
4077
+ * @description Reduce-only. `true` is how a position is CLOSED — pair it with a tokenless intent, since closing needs no delivered collateral.
4078
+ * @example false
4079
+ */
4080
+ r: boolean;
4081
+ /** @description Either `{ limit: { tif } }` or `{ trigger: { isMarket, triggerPx, tpsl } }`. */
4082
+ t: {
4083
+ limit: {
4084
+ /**
4085
+ * @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.
4086
+ *
4087
+ * 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.
4088
+ * @example Ioc
4089
+ * @enum {string}
4090
+ */
4091
+ tif: 'Alo' | 'Ioc' | 'Gtc';
4092
+ };
4093
+ } | {
4094
+ trigger: {
4095
+ isMarket: boolean;
4096
+ triggerPx: string;
4097
+ /**
4098
+ * @description Take-profit or stop-loss.
4099
+ * @example sl
4100
+ * @enum {string}
4101
+ */
4102
+ tpsl: 'tp' | 'sl';
4103
+ };
4104
+ };
4105
+ /**
4106
+ * @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.
4107
+ * @example 0x1234567890abcdef1234567890abcdef
4108
+ */
4109
+ c?: string;
4110
+ };
4111
+ }[];
4112
+ /**
4113
+ * @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.
4114
+ * @enum {boolean}
4115
+ */
4116
+ a?: true;
4117
+ } | {
4118
+ /** @enum {string} */
4119
+ type: 'updateLeverage';
4120
+ asset: number;
4121
+ /**
4122
+ * @description Cross margin (`true`) or isolated (`false`).
4123
+ * @example true
4124
+ */
4125
+ isCross: boolean;
4126
+ /**
4127
+ * @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.
4128
+ * @example 5
4129
+ */
4130
+ leverage: number;
4131
+ } | {
4132
+ /** @enum {string} */
4133
+ type: 'updateIsolatedMargin';
4134
+ asset: number;
4135
+ isBuy: boolean;
4136
+ /**
4137
+ * @description Margin to add (positive) or remove (negative), in USDC with 6 decimals — `1000000` is 1 USD.
4138
+ * @example 1000000
4139
+ */
4140
+ ntli: number;
4141
+ } | {
4142
+ /** @enum {string} */
4143
+ type: 'twapOrder';
4144
+ twap: {
4145
+ /**
4146
+ * @description Asset index, as for an order.
4147
+ * @example 0
4148
+ */
4149
+ a: number;
4150
+ /**
4151
+ * @description Buy (`true`) or sell (`false`).
4152
+ * @example true
4153
+ */
4154
+ b: boolean;
4155
+ /**
4156
+ * @description Total size to work, in units of the asset.
4157
+ * @example 0.01
4158
+ */
4159
+ s: string;
4160
+ /**
4161
+ * @description Reduce-only.
4162
+ * @example false
4163
+ */
4164
+ r: boolean;
4165
+ /**
4166
+ * @description Duration in MINUTES. Hyperliquid enforces its own bounds and refuses a duration outside them ("Invalid TWAP duration"), so none are imposed here.
4167
+ * @example 30
4168
+ */
4169
+ m: number;
4170
+ /**
4171
+ * @description Randomize the timing of the sub-orders rather than spacing them evenly.
4172
+ * @example true
4173
+ */
4174
+ t: boolean;
4175
+ };
4176
+ } | {
4177
+ /** @enum {string} */
4178
+ type: 'twapCancel';
4179
+ /**
4180
+ * @description Asset index of the running TWAP.
4181
+ * @example 0
4182
+ */
4183
+ a: number;
4184
+ /**
4185
+ * @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.
4186
+ * @example 12345
4187
+ */
4188
+ t: number;
4189
+ })[];
4190
+ };
4191
+ };
4192
+ /** @description Account access list specifying which CAIP-2 chains and tokens an account may access */
4193
+ accountAccessList?: {
4194
+ chainIds?: string[];
4195
+ 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'))[];
4196
+ /**
4197
+ * @description Tokens keyed by CAIP-2 chain ID.
4198
+ * @example {
4199
+ * "eip155:8453": [
4200
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
4201
+ * ]
4202
+ * }
4203
+ */
4204
+ chainTokens?: {
4205
+ [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'))[];
4206
+ };
4207
+ /**
4208
+ * @description Per-token maximum input amounts keyed by CAIP-2 chain ID.
4209
+ * @example {
4210
+ * "eip155:8453": {
4211
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": "1000000"
4212
+ * }
4213
+ * }
4214
+ */
4215
+ chainTokenAmounts?: {
4216
+ [key: string]: {
4217
+ [key: string]: string;
4218
+ };
4219
+ };
4220
+ exclude?: {
4221
+ chainIds?: string[];
4222
+ 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'))[];
4223
+ /**
4224
+ * @description Tokens keyed by CAIP-2 chain ID.
4225
+ * @example {
4226
+ * "eip155:8453": [
4227
+ * "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
4228
+ * ]
4229
+ * }
4230
+ */
4231
+ chainTokens?: {
4232
+ [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'))[];
4233
+ };
4234
+ };
4235
+ };
4236
+ };
4237
+ };
4238
+ };
4239
+ responses: {
4240
+ /** @description OK */
4241
+ 200: {
4242
+ headers: {
4243
+ [name: string]: unknown;
4244
+ };
4245
+ content: {
4246
+ 'application/json': {
4247
+ /** @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. */
4248
+ routes: {
4249
+ /** @description Server-stored intent identifier. Pass back to `POST /intents` to submit. */
4250
+ intentId: string;
4251
+ /**
4252
+ * @description Quote expiry timestamp (Unix seconds). After this point, assume the quote is dead and re-quote.
4253
+ * @example 1733493192
4254
+ */
4255
+ expiresAt: number;
4256
+ /** @description Estimated fill time for the route */
4257
+ estimatedFillTime: {
4258
+ /**
4259
+ * @description Typical end-to-end fill time for this route in seconds. Directional, not guaranteed.
4260
+ * @example 3
4261
+ */
4262
+ seconds: number;
4263
+ };
4264
+ /**
4265
+ * @description Settlement layer selected for this route
4266
+ * @example RELAY
4267
+ * @enum {string}
4268
+ */
4269
+ settlementLayer: 'INTENT_EXECUTOR' | 'SAME_CHAIN' | 'ACROSS' | 'ECO' | 'RELAY' | 'OFT' | 'NEAR' | 'RHINO' | 'CCTP' | 'LZ';
4270
+ /** @description EIP-712 sign payloads the client submits back on `POST /intents` */
4271
+ signData: {
4272
+ /** @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. */
4273
+ origin: ({
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
+ /** @enum {string} */
4299
+ kind: 'eip712';
4300
+ } | {
4301
+ /** @enum {string} */
4302
+ kind: 'personalSign';
4303
+ /**
4304
+ * @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.
4305
+ * @example a3f2c1d4e5b6a7980f1e2d3c4b5a69788796a5b4c3d2e1f0a1b2c3d4e5f60718
4306
+ */
4307
+ message: string;
4308
+ /**
4309
+ * @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.
4310
+ * @example 370123456
4311
+ */
4312
+ expiresAtSlot: string;
4313
+ })[];
4314
+ /** @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. */
4315
+ destination?: {
4316
+ /** @description EIP-712 domain separator fields */
4317
+ domain: {
4318
+ name?: string;
4319
+ version?: string;
4320
+ chainId?: number;
4321
+ verifyingContract?: string;
4322
+ salt?: string;
4323
+ };
4324
+ /** @description EIP-712 type definitions keyed by type name */
4325
+ types: {
4326
+ [key: string]: {
4327
+ name: string;
4328
+ type: string;
4329
+ }[];
4330
+ };
4331
+ /**
4332
+ * @description Name of the top-level type to sign
4333
+ * @example PermitBatchWitnessTransferFrom
4334
+ */
4335
+ primaryType: string;
4336
+ /** @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. */
4337
+ message: {
4338
+ [key: string]: unknown;
4339
+ };
4340
+ };
4341
+ /** @description Typed data for the target execution, smart sessions only. Omitted for EOA accounts. */
4342
+ targetExecution?: {
4343
+ /** @description EIP-712 domain separator fields */
4344
+ domain: {
4345
+ name?: string;
4346
+ version?: string;
4347
+ chainId?: number;
4348
+ verifyingContract?: string;
4349
+ salt?: string;
4350
+ };
4351
+ /** @description EIP-712 type definitions keyed by type name */
4352
+ types: {
4353
+ [key: string]: {
4354
+ name: string;
4355
+ type: string;
4356
+ }[];
4357
+ };
4358
+ /**
4359
+ * @description Name of the top-level type to sign
4360
+ * @example PermitBatchWitnessTransferFrom
4361
+ */
4362
+ primaryType: string;
4363
+ /** @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. */
4364
+ message: {
4365
+ [key: string]: unknown;
4366
+ };
4367
+ };
4368
+ };
4369
+ /** @description Route cost: inputs, outputs, and fee breakdown */
4370
+ cost: {
4371
+ /** @description Tokens debited from the user, coalesced by (chainId, tokenAddress) */
4372
+ input: {
4373
+ /**
4374
+ * @description Chain where this token leg settles (CAIP-2, any namespace)
4375
+ * @example eip155:8453
4376
+ */
4377
+ chainId: string;
4378
+ /**
4379
+ * @description Contract address of the debited token (EVM 0x or non-EVM base58)
4380
+ * @example 0xaf88d065e77c8cc2239327c5edb3a432268e5831
4381
+ */
4382
+ tokenAddress: string;
4383
+ /**
4384
+ * @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.
4385
+ * @example USDC
4386
+ */
4387
+ symbol: string | null;
3901
4388
  /**
3902
4389
  * @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
4390
  * @example 6
@@ -4047,6 +4534,51 @@ export interface operations {
4047
4534
  };
4048
4535
  };
4049
4536
  };
4537
+ /** @description Solana instruction execution only: the exact fixed wallet debit, or confirmation that the sponsor pays and the wallet has no execution debit. The wallet debit also appears in input. */
4538
+ executionPayment?: {
4539
+ /** @enum {string} */
4540
+ paidBy: 'wallet';
4541
+ /** @description A single (chain, token) leg with amount, price, and metadata */
4542
+ walletDebit: {
4543
+ /**
4544
+ * @description Chain where this token leg settles (CAIP-2, any namespace)
4545
+ * @example eip155:8453
4546
+ */
4547
+ chainId: string;
4548
+ /**
4549
+ * @description Contract address of the debited token (EVM 0x or non-EVM base58)
4550
+ * @example 0xaf88d065e77c8cc2239327c5edb3a432268e5831
4551
+ */
4552
+ tokenAddress: string;
4553
+ /**
4554
+ * @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.
4555
+ * @example USDC
4556
+ */
4557
+ symbol: string | null;
4558
+ /**
4559
+ * @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.
4560
+ * @example 6
4561
+ */
4562
+ decimals: number | null;
4563
+ /** @description Unit price in USD. `null` when neither the price oracle nor this quote priced the token. */
4564
+ price: {
4565
+ /**
4566
+ * @description Unit price in USD
4567
+ * @example 1
4568
+ */
4569
+ usd: number;
4570
+ } | null;
4571
+ /**
4572
+ * Format: uint256
4573
+ * @description Token amount in the token's smallest unit
4574
+ * @example 1050000
4575
+ */
4576
+ amount: string;
4577
+ };
4578
+ } | {
4579
+ /** @enum {string} */
4580
+ paidBy: 'sponsor';
4581
+ };
4050
4582
  };
4051
4583
  /**
4052
4584
  * @description Pre-flight token operations the user must perform before submitting this route (approvals, wrapping). Emitted for EOA accounts only — smart accounts handle these internally.
@@ -4132,6 +4664,8 @@ export interface operations {
4132
4664
  intentHash: string;
4133
4665
  /** @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
4666
  providerDestinationChainId?: number;
4667
+ /** @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). */
4668
+ providerSourceChainId?: number;
4135
4669
  } | {
4136
4670
  /** @description Destination chain ID for the bridge fill */
4137
4671
  destinationChainId: number;
@@ -4158,7 +4692,7 @@ export interface operations {
4158
4692
  * @enum {string}
4159
4693
  */
4160
4694
  type: 'NEAR';
4161
- /** @description NEAR Intents deposit address. Track fill status via the NEAR Intents status API keyed on this address. */
4695
+ /** @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
4696
  depositAddress: string;
4163
4697
  } | {
4164
4698
  /** @description Destination chain ID for the bridge fill */
@@ -4521,8 +5055,6 @@ export interface operations {
4521
5055
  header: {
4522
5056
  /** @description API version. Required; pinned to this document. */
4523
5057
  'x-api-version': '2026-04.blanc';
4524
- /** @description API key. */
4525
- 'x-api-key': string;
4526
5058
  };
4527
5059
  path?: never;
4528
5060
  cookie?: never;
@@ -4537,12 +5069,12 @@ export interface operations {
4537
5069
  */
4538
5070
  direction: 'exactIn' | 'exactOut';
4539
5071
  /**
4540
- * @description Source chain id (CAIP-2, eip155)
5072
+ * @description Source chain id (CAIP-2): EVM (`eip155:*`), or `solana:…` where this deployment spends from a Solana origin.
4541
5073
  * @example eip155:8453
4542
5074
  */
4543
5075
  sourceChainId: string;
4544
5076
  /**
4545
- * @description Source token address
5077
+ * @description Source token address — EVM `0x…`, or a Solana base58 mint.
4546
5078
  * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
4547
5079
  */
4548
5080
  sourceToken: string;
@@ -4595,7 +5127,7 @@ export interface operations {
4595
5127
  exclude: ('ACROSS' | 'ECO' | 'RELAY' | 'OFT' | 'NEAR' | 'RHINO' | 'CCTP' | 'LZ')[];
4596
5128
  };
4597
5129
  /**
4598
- * @description Which fee categories to treat as sponsored. Sponsored categories are absorbed by the sponsor and do not reduce the delivered amount.
5130
+ * @description Which fee categories to treat as sponsored. Sponsored categories are absorbed by the sponsor and do not reduce the delivered amount. The estimator prices every swap at market, so a same-chain swap `POST /quotes` sponsors to par under `swapFees` is estimated below what it delivers (RHI-7069).
4599
5131
  * @example {
4600
5132
  * "gas": true,
4601
5133
  * "bridgeFees": true,
@@ -4615,7 +5147,7 @@ export interface operations {
4615
5147
  */
4616
5148
  bridgeFees?: boolean;
4617
5149
  /**
4618
- * @description Whether to sponsor swap fees for the intent
5150
+ * @description Whether to sponsor swap fees for the intent. For an integrator enabled for it, this also sponsors 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. That 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 swap is priced at market.
4619
5151
  * @default false
4620
5152
  */
4621
5153
  swapFees?: boolean;
@@ -5063,6 +5595,106 @@ export interface operations {
5063
5595
  };
5064
5596
  };
5065
5597
  };
5598
+ /** @description Sponsorship or a request option refuses the route */
5599
+ 422: {
5600
+ headers: {
5601
+ [name: string]: unknown;
5602
+ };
5603
+ content: {
5604
+ 'application/json': {
5605
+ /** @enum {string} */
5606
+ code: 'VALIDATION_ERROR';
5607
+ /**
5608
+ * @description Human-readable error message
5609
+ * @example Invalid input
5610
+ */
5611
+ message: string;
5612
+ /** @description Per-field validation issues */
5613
+ details?: {
5614
+ /** @description Human-readable issue description */
5615
+ message: string;
5616
+ /** @description Structured issue context (e.g. `{ path: "body.accountAddress" }`) */
5617
+ context?: {
5618
+ [key: string]: unknown;
5619
+ };
5620
+ }[];
5621
+ } | {
5622
+ /** @enum {string} */
5623
+ code: 'SIMULATION_FAILED';
5624
+ /**
5625
+ * @description Human-readable error message
5626
+ * @example Invalid input
5627
+ */
5628
+ message: string;
5629
+ /** @description Classified on-chain simulation failure details */
5630
+ details?: {
5631
+ nonce?: string;
5632
+ category: string;
5633
+ errorSelector: string;
5634
+ errorName: string;
5635
+ errorArgs?: {
5636
+ [key: string]: string;
5637
+ };
5638
+ retryable: boolean;
5639
+ /** @enum {string} */
5640
+ retryHint?: 'RE_PREPARE' | 'RETRY_LATER';
5641
+ simulations?: unknown;
5642
+ } & {
5643
+ [key: string]: unknown;
5644
+ };
5645
+ } | {
5646
+ /** @enum {string} */
5647
+ code: 'INSUFFICIENT_LIQUIDITY';
5648
+ /**
5649
+ * @description Human-readable error message
5650
+ * @example Invalid input
5651
+ */
5652
+ message: string;
5653
+ /** @description Fillable subset and unfillable remainder */
5654
+ details?: {
5655
+ /** @description Intents fillable with current liquidity */
5656
+ availableIntents: {
5657
+ [key: string]: string;
5658
+ }[];
5659
+ /** @description Token amounts that cannot be filled */
5660
+ unfillable: {
5661
+ [key: string]: string;
5662
+ };
5663
+ };
5664
+ } | {
5665
+ /** @enum {string} */
5666
+ code: 'KEY_SCOPE_DENIED';
5667
+ /**
5668
+ * @description Human-readable error message
5669
+ * @example Invalid input
5670
+ */
5671
+ message: string;
5672
+ /** @description Single-element list describing the failing scope */
5673
+ details?: {
5674
+ message: string;
5675
+ context: {
5676
+ /**
5677
+ * @description Which scope rejected the request
5678
+ * @enum {string}
5679
+ */
5680
+ scope: 'allowMainnet' | 'intents' | 'deposits';
5681
+ /** @description Minimum level the endpoint demands */
5682
+ required: boolean | ('read' | 'write');
5683
+ /** @description Level resolved on the key */
5684
+ actual: boolean | ('none' | 'read' | 'write');
5685
+ };
5686
+ }[];
5687
+ } | {
5688
+ /** @enum {string} */
5689
+ 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';
5690
+ /**
5691
+ * @description Human-readable error message
5692
+ * @example Invalid input
5693
+ */
5694
+ message: string;
5695
+ };
5696
+ };
5697
+ };
5066
5698
  /** @description Server error */
5067
5699
  500: {
5068
5700
  headers: {
@@ -5171,8 +5803,6 @@ export interface operations {
5171
5803
  header: {
5172
5804
  /** @description API version. Required; pinned to this document. */
5173
5805
  'x-api-version': '2026-04.blanc';
5174
- /** @description API key. */
5175
- 'x-api-key': string;
5176
5806
  };
5177
5807
  path?: never;
5178
5808
  cookie?: never;
@@ -5499,8 +6129,6 @@ export interface operations {
5499
6129
  header: {
5500
6130
  /** @description API version. Required; pinned to this document. */
5501
6131
  'x-api-version': '2026-04.blanc';
5502
- /** @description API key. */
5503
- 'x-api-key': string;
5504
6132
  };
5505
6133
  path?: never;
5506
6134
  cookie?: never;
@@ -5934,8 +6562,6 @@ export interface operations {
5934
6562
  header: {
5935
6563
  /** @description API version. Required; pinned to this document. */
5936
6564
  'x-api-version': '2026-04.blanc';
5937
- /** @description API key. */
5938
- 'x-api-key': string;
5939
6565
  };
5940
6566
  path?: never;
5941
6567
  cookie?: never;
@@ -6374,8 +7000,6 @@ export interface operations {
6374
7000
  header: {
6375
7001
  /** @description API version. Required; pinned to this document. */
6376
7002
  'x-api-version': '2026-04.blanc';
6377
- /** @description API key. */
6378
- 'x-api-key': string;
6379
7003
  };
6380
7004
  path?: never;
6381
7005
  cookie?: never;
@@ -6808,8 +7432,6 @@ export interface operations {
6808
7432
  header: {
6809
7433
  /** @description API version. Required; pinned to this document. */
6810
7434
  'x-api-version': '2026-04.blanc';
6811
- /** @description API key. */
6812
- 'x-api-key': string;
6813
7435
  };
6814
7436
  path: {
6815
7437
  nonce: string;