@gibs/bridge-sdk 1.13.1 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +295 -18
  2. package/abis/package.json +6 -0
  3. package/bridge-limits/package.json +6 -0
  4. package/chain-info/package.json +6 -0
  5. package/chain-names/package.json +6 -0
  6. package/chains/package.json +6 -0
  7. package/claims/package.json +6 -0
  8. package/config/package.json +6 -0
  9. package/consolidated-quote/package.json +6 -0
  10. package/destination-calldata/package.json +6 -0
  11. package/dist/chain-info.d.ts +1 -1
  12. package/dist/chain-info.js +11 -12
  13. package/dist/chains.d.ts +25 -0
  14. package/dist/chains.js +55 -20
  15. package/dist/cjs/abis.d.ts +1 -0
  16. package/dist/cjs/abis.js +19 -0
  17. package/dist/cjs/bridge-limits.d.ts +103 -0
  18. package/dist/cjs/bridge-limits.js +89 -0
  19. package/dist/cjs/chain-info.d.ts +169 -0
  20. package/dist/cjs/chain-info.js +452 -0
  21. package/dist/cjs/chain-names.d.ts +160 -0
  22. package/dist/cjs/chain-names.js +207 -0
  23. package/dist/cjs/chains.d.ts +90 -0
  24. package/dist/cjs/chains.js +357 -0
  25. package/dist/cjs/claims.d.ts +198 -0
  26. package/dist/cjs/claims.js +182 -0
  27. package/dist/cjs/config.d.ts +255 -0
  28. package/dist/cjs/config.js +569 -0
  29. package/dist/cjs/consolidated-quote.d.ts +648 -0
  30. package/dist/cjs/consolidated-quote.js +1048 -0
  31. package/dist/cjs/destination-calldata.d.ts +118 -0
  32. package/dist/cjs/destination-calldata.js +156 -0
  33. package/dist/cjs/ecosystems.d.ts +217 -0
  34. package/dist/cjs/ecosystems.js +298 -0
  35. package/dist/cjs/execution.d.ts +359 -0
  36. package/dist/cjs/execution.js +495 -0
  37. package/dist/cjs/fee-type.d.ts +10 -0
  38. package/dist/cjs/fee-type.js +10 -0
  39. package/dist/cjs/hyperliquid-execution.d.ts +152 -0
  40. package/dist/cjs/hyperliquid-execution.js +175 -0
  41. package/dist/cjs/image-links.d.ts +117 -0
  42. package/dist/cjs/image-links.js +153 -0
  43. package/dist/cjs/index.d.ts +24 -0
  44. package/dist/cjs/index.js +40 -0
  45. package/dist/cjs/lifi-execution-guard.d.ts +210 -0
  46. package/dist/cjs/lifi-execution-guard.js +409 -0
  47. package/dist/cjs/near-intents-conformance.d.ts +85 -0
  48. package/dist/cjs/near-intents-conformance.js +337 -0
  49. package/dist/cjs/near-intents-route.d.ts +47 -0
  50. package/dist/cjs/near-intents-route.js +303 -0
  51. package/dist/cjs/near-intents.d.ts +524 -0
  52. package/dist/cjs/near-intents.js +1071 -0
  53. package/dist/cjs/origin-deposit.d.ts +326 -0
  54. package/dist/cjs/origin-deposit.js +82 -0
  55. package/dist/cjs/package.json +3 -0
  56. package/dist/cjs/pre-quote.d.ts +198 -0
  57. package/dist/cjs/pre-quote.js +180 -0
  58. package/dist/cjs/prices.d.ts +117 -0
  59. package/dist/cjs/prices.js +224 -0
  60. package/dist/cjs/providers.d.ts +238 -0
  61. package/dist/cjs/providers.js +171 -0
  62. package/dist/cjs/quote-fees.d.ts +102 -0
  63. package/dist/cjs/quote-fees.js +201 -0
  64. package/dist/cjs/referral.d.ts +85 -0
  65. package/dist/cjs/referral.js +85 -0
  66. package/dist/cjs/relay-currencies.d.ts +47 -0
  67. package/dist/cjs/relay-currencies.js +95 -0
  68. package/dist/cjs/relay-depository.d.ts +2 -0
  69. package/dist/cjs/relay-depository.js +85 -0
  70. package/dist/cjs/relay-quote.d.ts +301 -0
  71. package/dist/cjs/relay-quote.js +996 -0
  72. package/dist/cjs/route-steps.d.ts +138 -0
  73. package/dist/cjs/route-steps.js +310 -0
  74. package/dist/cjs/routing/amounts.d.ts +80 -0
  75. package/dist/cjs/routing/amounts.js +126 -0
  76. package/dist/cjs/routing/candidate-route.d.ts +43 -0
  77. package/dist/cjs/routing/candidate-route.js +50 -0
  78. package/dist/cjs/routing/candidate.d.ts +237 -0
  79. package/dist/cjs/routing/candidate.js +100 -0
  80. package/dist/cjs/routing/carrier-provider-key.d.ts +31 -0
  81. package/dist/cjs/routing/carrier-provider-key.js +42 -0
  82. package/dist/cjs/routing/carriers/ask-answer.d.ts +77 -0
  83. package/dist/cjs/routing/carriers/ask-answer.js +2 -0
  84. package/dist/cjs/routing/carriers/omnibridge.d.ts +137 -0
  85. package/dist/cjs/routing/carriers/omnibridge.js +459 -0
  86. package/dist/cjs/routing/carriers/pulsex-paths.d.ts +80 -0
  87. package/dist/cjs/routing/carriers/pulsex-paths.js +97 -0
  88. package/dist/cjs/routing/carriers/pulsex-split.d.ts +175 -0
  89. package/dist/cjs/routing/carriers/pulsex-split.js +193 -0
  90. package/dist/cjs/routing/carriers/pulsex.d.ts +184 -0
  91. package/dist/cjs/routing/carriers/pulsex.js +615 -0
  92. package/dist/cjs/routing/carriers/wrap.d.ts +25 -0
  93. package/dist/cjs/routing/carriers/wrap.js +119 -0
  94. package/dist/cjs/routing/composed-route-quality.d.ts +125 -0
  95. package/dist/cjs/routing/composed-route-quality.js +144 -0
  96. package/dist/cjs/routing/entry-chain-anchor.d.ts +88 -0
  97. package/dist/cjs/routing/entry-chain-anchor.js +59 -0
  98. package/dist/cjs/routing/format.d.ts +31 -0
  99. package/dist/cjs/routing/format.js +64 -0
  100. package/dist/cjs/routing/index.d.ts +42 -0
  101. package/dist/cjs/routing/index.js +142 -0
  102. package/dist/cjs/routing/producers.d.ts +770 -0
  103. package/dist/cjs/routing/producers.js +1617 -0
  104. package/dist/cjs/routing/providers.d.ts +31 -0
  105. package/dist/cjs/routing/providers.js +48 -0
  106. package/dist/cjs/routing/route-data.d.ts +397 -0
  107. package/dist/cjs/routing/route-data.js +2 -0
  108. package/dist/cjs/routing/search/compose.d.ts +168 -0
  109. package/dist/cjs/routing/search/compose.js +104 -0
  110. package/dist/cjs/routing/search/graph.d.ts +668 -0
  111. package/dist/cjs/routing/search/graph.js +461 -0
  112. package/dist/cjs/routing/search/plan-route-data.d.ts +285 -0
  113. package/dist/cjs/routing/search/plan-route-data.js +871 -0
  114. package/dist/cjs/routing/search/score.d.ts +356 -0
  115. package/dist/cjs/routing/search/score.js +445 -0
  116. package/dist/cjs/routing/swap-transactions.d.ts +95 -0
  117. package/dist/cjs/routing/swap-transactions.js +133 -0
  118. package/dist/cjs/routing/usd-value.d.ts +17 -0
  119. package/dist/cjs/routing/usd-value.js +29 -0
  120. package/dist/cjs/settings.d.ts +785 -0
  121. package/dist/cjs/settings.js +1074 -0
  122. package/dist/cjs/swap-venues.d.ts +43 -0
  123. package/dist/cjs/swap-venues.js +29 -0
  124. package/dist/cjs/ton-connect.d.ts +98 -0
  125. package/dist/cjs/ton-connect.js +206 -0
  126. package/dist/cjs/ton-execution.d.ts +7 -0
  127. package/dist/cjs/ton-execution.js +23 -0
  128. package/dist/cjs/ton.d.ts +37 -0
  129. package/dist/cjs/ton.js +83 -0
  130. package/dist/cjs/tron-execution.d.ts +146 -0
  131. package/dist/cjs/tron-execution.js +248 -0
  132. package/dist/cjs/types.d.ts +51 -0
  133. package/dist/cjs/types.js +2 -0
  134. package/dist/claims.d.ts +198 -0
  135. package/dist/claims.js +140 -0
  136. package/dist/config.d.ts +42 -3
  137. package/dist/config.js +87 -21
  138. package/dist/consolidated-quote.d.ts +109 -15
  139. package/dist/consolidated-quote.js +310 -52
  140. package/dist/execution.d.ts +359 -0
  141. package/dist/execution.js +455 -0
  142. package/dist/hyperliquid-execution.js +2 -3
  143. package/dist/index.d.ts +4 -0
  144. package/dist/index.js +4 -0
  145. package/dist/lifi-execution-guard.d.ts +13 -2
  146. package/dist/lifi-execution-guard.js +4 -0
  147. package/dist/near-intents.js +2 -3
  148. package/dist/pre-quote.d.ts +6 -6
  149. package/dist/pre-quote.js +10 -14
  150. package/dist/prices.d.ts +10 -0
  151. package/dist/prices.js +52 -1
  152. package/dist/providers.d.ts +17 -0
  153. package/dist/providers.js +6 -0
  154. package/dist/referral.d.ts +12 -4
  155. package/dist/referral.js +12 -4
  156. package/dist/relay-depository.d.ts +2 -0
  157. package/dist/relay-depository.js +82 -0
  158. package/dist/relay-quote.js +2 -3
  159. package/dist/routing/candidate.d.ts +3 -3
  160. package/dist/routing/candidate.js +3 -3
  161. package/dist/routing/carrier-provider-key.d.ts +31 -0
  162. package/dist/routing/carrier-provider-key.js +37 -0
  163. package/dist/routing/carriers/ask-answer.d.ts +17 -0
  164. package/dist/routing/carriers/omnibridge.js +23 -21
  165. package/dist/routing/carriers/pulsex-paths.d.ts +80 -0
  166. package/dist/routing/carriers/pulsex-paths.js +92 -0
  167. package/dist/routing/carriers/pulsex-split.d.ts +175 -0
  168. package/dist/routing/carriers/pulsex-split.js +185 -0
  169. package/dist/routing/carriers/pulsex.d.ts +81 -46
  170. package/dist/routing/carriers/pulsex.js +267 -148
  171. package/dist/routing/composed-route-quality.d.ts +28 -6
  172. package/dist/routing/composed-route-quality.js +36 -5
  173. package/dist/routing/entry-chain-anchor.d.ts +1 -1
  174. package/dist/routing/entry-chain-anchor.js +1 -1
  175. package/dist/routing/index.d.ts +11 -3
  176. package/dist/routing/index.js +8 -2
  177. package/dist/routing/producers.js +1 -1
  178. package/dist/routing/providers.d.ts +5 -0
  179. package/dist/routing/providers.js +5 -0
  180. package/dist/routing/route-data.d.ts +47 -5
  181. package/dist/routing/search/graph.d.ts +15 -0
  182. package/dist/routing/search/plan-route-data.d.ts +42 -1
  183. package/dist/routing/search/plan-route-data.js +68 -9
  184. package/dist/routing/search/score.d.ts +3 -0
  185. package/dist/routing/search/score.js +11 -3
  186. package/dist/routing/swap-transactions.d.ts +95 -0
  187. package/dist/routing/swap-transactions.js +127 -0
  188. package/dist/settings.d.ts +94 -1
  189. package/dist/settings.js +95 -3
  190. package/dist/swap-venues.d.ts +43 -0
  191. package/dist/swap-venues.js +24 -0
  192. package/dist/ton-connect.d.ts +98 -0
  193. package/dist/ton-connect.js +200 -0
  194. package/dist/ton-execution.d.ts +4 -114
  195. package/dist/ton-execution.js +4 -244
  196. package/dist/ton.d.ts +37 -0
  197. package/dist/ton.js +65 -0
  198. package/docs/examples/example-a-ether-to-pulse.ts +300 -0
  199. package/docs/examples/example-b-token-pulsechain-to-ethereum.ts +270 -0
  200. package/docs/examples/shared.ts +261 -0
  201. package/docs/examples/tsconfig.json +18 -0
  202. package/docs/integration-guide.md +617 -0
  203. package/ecosystems/package.json +6 -0
  204. package/execution/package.json +6 -0
  205. package/fee-type/package.json +6 -0
  206. package/hyperliquid-execution/package.json +6 -0
  207. package/image-links/package.json +6 -0
  208. package/lifi-execution-guard/package.json +6 -0
  209. package/llms.txt +75 -10
  210. package/near-intents/package.json +6 -0
  211. package/near-intents-route/package.json +6 -0
  212. package/origin-deposit/package.json +6 -0
  213. package/package.json +817 -10
  214. package/pre-quote/package.json +6 -0
  215. package/prices/package.json +6 -0
  216. package/providers/package.json +6 -0
  217. package/quote-fees/package.json +6 -0
  218. package/referral/package.json +6 -0
  219. package/relay-currencies/package.json +6 -0
  220. package/relay-quote/package.json +6 -0
  221. package/route-steps/package.json +6 -0
  222. package/routing/package.json +6 -0
  223. package/settings/package.json +6 -0
  224. package/ton/package.json +6 -0
  225. package/ton-connect/package.json +6 -0
  226. package/ton-execution/package.json +6 -0
  227. package/tron-execution/package.json +6 -0
  228. package/types/package.json +6 -0
@@ -0,0 +1,301 @@
1
+ import { type Hex } from 'viem';
2
+ import { type ConsolidatedQuote, type ConsolidatedQuoteRequest, type ConsolidatedStatus } from './consolidated-quote.js';
3
+ import type { Ecosystem } from './ecosystems.js';
4
+ /**
5
+ * Relay (relay.link) as a second consolidated-route quote provider, competing
6
+ * with LI.FI on price. Relay quotes the same backwards-from-destination route:
7
+ * deliver exactly `toAmount` of the Ethereum-side token, then run our omnibridge
8
+ * entry call against it.
9
+ *
10
+ * One semantic differs from LI.FI and the difference is load-bearing. Relay has
11
+ * NO destination-chain fallback address. When the destination call cannot fill,
12
+ * Relay refunds on the ORIGIN chain to `refundTo`, in the origin currency — the
13
+ * user ends up back where they started, not holding the Ethereum-side token at
14
+ * a fallback. We therefore map our `fallbackAddress` onto `refundTo`; a failed
15
+ * Relay route is recovered on the origin chain, never stranded on Ethereum.
16
+ */
17
+ /**
18
+ * Relay's API root. Steps carry RELATIVE post endpoints (`/authorize`), so a
19
+ * caller completing one has to resolve it against this.
20
+ */
21
+ export declare const relayApiBaseUrl = "https://api.relay.link";
22
+ /** Relay quote endpoint. Anonymous access works at a 50-requests-per-minute tier. */
23
+ export declare const relayQuoteUrl = "https://api.relay.link/quote/v2";
24
+ /** Relay requests endpoint; filters by origin or destination transaction hash. */
25
+ /**
26
+ * The request-lookup endpoint, used to poll a route's progress.
27
+ *
28
+ * v3 RATHER THAN v2 BECAUSE v2 IS GOING AWAY. Relay began staged rate limiting
29
+ * of `/requests/v2` on 2026-09-01 and retires it on 2026-11-24, saying so in a
30
+ * `deprecation` block on every v2 response. v3 REQUIRES `x-api-key` - it
31
+ * answers 400 without one, where v2 served anonymous callers from a shared
32
+ * pool - so a caller must send `relayRequestHeaders(yourRelayApiKey)`.
33
+ */
34
+ export declare const relayRequestsUrl = "https://api.relay.link/requests/v3";
35
+ /**
36
+ * Builds the headers for a Relay request. `apiKey` is Relay's `x-api-key`
37
+ * value. This package ships no key: the caller supplies its own (the Gibs
38
+ * interface keeps its key in `packages/ui/src/lib/config.ts`).
39
+ * Relay raises the account's rate limit and attributes traffic to it when the
40
+ * header is present.
41
+ *
42
+ * When `apiKey` is absent or an empty string, the returned headers carry NO
43
+ * `x-api-key` entry at all — not an empty one.
44
+ *
45
+ * WHETHER THAT IS SURVIVABLE DEPENDS ENTIRELY ON WHICH ENDPOINT IS BEING CALLED,
46
+ * and this note used to say only the reassuring half. Measured against the live
47
+ * service:
48
+ *
49
+ * POST /quote no key -> 200 routing works anonymously
50
+ * GET /requests/v3 no key -> 400 "headers must have required
51
+ * property 'x-api-key'"
52
+ *
53
+ * So a missing key is a normal operating state for ROUTING — a reader on a
54
+ * local build or the anonymous InterPlanetary File System deployment still gets
55
+ * real quotes, and clearing the key disables attribution rather than the
56
+ * product. It is NOT survivable for STATUS. Every status poll from a keyless
57
+ * build fails, which means a consolidated record never learns its provider
58
+ * finished, never records the entry-chain transaction, and never releases from
59
+ * the pending list. That is not a degraded rate limit; it is the feature not
60
+ * working at all, silently.
61
+ */
62
+ export declare const relayRequestHeaders: (apiKey?: string) => Record<string, string>;
63
+ /**
64
+ * Gibs Finance's own Relay `referrer`, for callers that want to attribute to
65
+ * Gibs Finance. The request builders do NOT default to it: pass it, or your
66
+ * own, as `relayReferrer` on the request. Relay reads any `referrer` as "a
67
+ * referrer was supplied" and then requires an API key, so a default would
68
+ * break every caller without one.
69
+ */
70
+ export declare const relayReferrer = "gibs.finance";
71
+ /**
72
+ * Application fee in basis points charged on Relay routes. Ten basis points is
73
+ * one tenth of a percent. Sent as `appFees[0].fee` when a payout recipient is
74
+ * configured; absent entirely when the recipient is missing.
75
+ */
76
+ export declare const relayReferralFeeBasisPoints = 10n;
77
+ export { relayReferralRecipient } from './referral.js';
78
+ /** Extra gas added to the destination budget to cover a prepended approval call. */
79
+ export declare const relayApprovalGasBuffer = 60000n;
80
+ /**
81
+ * Relay's chain identifiers and their display names live in `chain-names.ts`
82
+ * so the route-step normalizer can name a Relay chain without importing this
83
+ * module, which imports it. Re-exported here because callers reach for them
84
+ * alongside the rest of the Relay surface.
85
+ */
86
+ export { relayChainIds, relayChainNames } from './chain-names.js';
87
+ /**
88
+ * Maps a chain identifier to its virtual-machine ecosystem. Relay's non-Ethereum
89
+ * pseudo chain identifiers map to their own ecosystem; every other identifier
90
+ * (every Ethereum Virtual Machine chain) maps to `evm`. Total — never throws.
91
+ *
92
+ * Lives here rather than in `ecosystems.ts` because it depends on
93
+ * `relayChainIds` (defined in this file); the `Ecosystem` import is type-only,
94
+ * so `ecosystems.ts` stays a dependency-free leaf and no import cycle is formed.
95
+ *
96
+ * @param chainId - a chain identifier (an Ethereum chain id, or a Relay pseudo id)
97
+ * @returns the ecosystem that chain belongs to
98
+ */
99
+ export declare const ecosystemByChainId: (chainId: number) => Ecosystem;
100
+ /**
101
+ * Relay's native-currency address strings, used verbatim as `originCurrency`
102
+ * when the origin pays in the chain's native asset.
103
+ *
104
+ * Source: https://api.relay.link/chains.
105
+ */
106
+ export declare const relayNativeCurrencyAddresses: {
107
+ /**
108
+ * Ethereum Virtual Machine native currency (Ether, native gas tokens). The
109
+ * all-zero address Relay uses across every Ethereum Virtual Machine chain.
110
+ */
111
+ readonly ethereumVirtualMachine: "0x0000000000000000000000000000000000000000";
112
+ /**
113
+ * Solana native currency (SOL), addressed by the System Program. Nine
114
+ * decimals.
115
+ */
116
+ readonly solana: "11111111111111111111111111111111";
117
+ /** Bitcoin native currency (BTC). Eight decimals. */
118
+ readonly bitcoin: "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8";
119
+ /** Tron native currency (TRX). Six decimals. */
120
+ readonly tron: "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb";
121
+ /**
122
+ * The Open Network's native currency as Relay reports it: Gram, NOT the
123
+ * Toncoin gas asset. Nine decimals.
124
+ */
125
+ readonly ton: "EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c";
126
+ /**
127
+ * Hyperliquid's native currency as Relay reports it: USD Coin, NOT the Hype
128
+ * gas asset, addressed by a sixteen-byte HyperCore token identifier. Eight
129
+ * decimals. Deliberately NOT the twenty-byte all-zero Ethereum address.
130
+ */
131
+ readonly hyperliquid: "0x00000000000000000000000000000000";
132
+ };
133
+ /**
134
+ * Relay's solving direction for a quote.
135
+ *
136
+ * - `EXACT_OUTPUT` — solve BACKWARD to a fixed delivered amount; this is what
137
+ * the consolidated route uses, because the omnibridge entry call encodes a
138
+ * fixed anchor amount that must arrive exactly.
139
+ * - `EXACT_INPUT` — solve FORWARD from a fixed input amount; this is what the
140
+ * two-phase pre-quote uses to LEARN the delivered anchor amount for a fixed
141
+ * user input before building the EXACT_OUTPUT execution quote.
142
+ */
143
+ export type RelayTradeType = 'EXACT_OUTPUT' | 'EXACT_INPUT';
144
+ /** One destination transaction in a Relay quote request. */
145
+ export type RelayTransaction = {
146
+ to: Hex;
147
+ value: string;
148
+ data: Hex;
149
+ };
150
+ /** The JSON body for `POST /quote/v2` with attached destination calls. */
151
+ export type RelayQuoteRequestBody = {
152
+ /**
153
+ * The user's origin-chain address. Typed as `string` because a non-Ethereum
154
+ * origin (Solana base58, Bitcoin bech32) supplies a non-`Hex` address here.
155
+ */
156
+ user: string;
157
+ originChainId: number;
158
+ /**
159
+ * The origin currency address. Typed as `string` because a non-Ethereum
160
+ * origin's native currency address (Solana System Program, Bitcoin native) is
161
+ * not `Hex`.
162
+ */
163
+ originCurrency: string;
164
+ destinationChainId: number;
165
+ /** The Ethereum-side entry-chain token; always an Ethereum Virtual Machine address. */
166
+ destinationCurrency: Hex;
167
+ amount: string;
168
+ tradeType: RelayTradeType;
169
+ /**
170
+ * Origin-chain refund address; without it Relay disables automatic refunds.
171
+ * Typed as `string` because for a non-Ethereum origin the refund lands on the
172
+ * origin chain and so carries that chain's (non-`Hex`) address.
173
+ */
174
+ refundTo: string;
175
+ /** Omitted unless the request names a `relayReferrer`. */
176
+ referrer?: string;
177
+ /**
178
+ * Where the funds land, for a route that names no transaction to run.
179
+ *
180
+ * A route into the omnibridge carries its recipient INSIDE the entry call's
181
+ * calldata, so this is absent there and Relay delivers to the executor that
182
+ * performs the call. A direct route has no call, so the recipient has to be
183
+ * said out loud.
184
+ */
185
+ recipient?: Hex;
186
+ /**
187
+ * The calls the executor performs on arrival, in order.
188
+ *
189
+ * Absent on a direct route. Its presence is what tells Relay this is a
190
+ * deliver-and-call rather than a plain transfer, so an empty array would be a
191
+ * different request from an omitted field and must not be sent instead.
192
+ */
193
+ txs?: RelayTransaction[];
194
+ /** Aggregate gas budget across every entry in `txs`. Absent when `txs` is. */
195
+ txsGasLimit?: number;
196
+ /** Maximum slippage in basis points (50 means half a percent). */
197
+ slippageTolerance?: string;
198
+ /**
199
+ * Solana fee-payer address that sponsors the deposit transaction's fee. Only
200
+ * present for a Solana origin; omitted entirely for every other origin.
201
+ */
202
+ depositFeePayer?: string;
203
+ /**
204
+ * Extra data Relay needs for non-Ethereum deposits. Only the Bitcoin
205
+ * pay-to-script-hash public key is carried today, and only for a Bitcoin
206
+ * origin; omitted entirely otherwise.
207
+ */
208
+ additionalData?: {
209
+ /** The Bitcoin pay-to-script-hash public key. */
210
+ userPublicKey?: string;
211
+ };
212
+ /**
213
+ * Application fees collected by the integrator. Each entry names a payout
214
+ * recipient and a rate in basis points (as a string). Omitted entirely when
215
+ * no recipient is configured — Relay rejects a recipient-less fee entry.
216
+ */
217
+ appFees?: Array<{
218
+ recipient: string;
219
+ fee: string;
220
+ }>;
221
+ };
222
+ /**
223
+ * Converts a slippage fraction into the basis-point string Relay expects.
224
+ *
225
+ * @param slippage - tolerance as a fraction (0.005 means half a percent)
226
+ * @returns basis points as a string (0.005 becomes "50")
227
+ */
228
+ export declare const slippageToBasisPoints: (slippage: number) => string;
229
+ /**
230
+ * The `referrer` field of a Relay request body, present only when the caller
231
+ * named one. Relay reads any `referrer`, an empty one included, as "a referrer
232
+ * was supplied" and then requires an API key, so absence is the safe default.
233
+ *
234
+ * @param request - carries the caller's `relayReferrer`, if any
235
+ * @returns `{ referrer }`, or an empty object
236
+ */
237
+ export declare const relayReferrerField: (request: {
238
+ relayReferrer?: string | null;
239
+ }) => {
240
+ referrer?: string;
241
+ };
242
+ /**
243
+ * Builds the Relay contract-call quote request from a provider-agnostic
244
+ * consolidated request. The omnibridge entry call becomes the final `txs`
245
+ * entry; when it needs an ERC20 allowance (the relayTokens shape, where
246
+ * `approvalTarget` is set) an `approve` call is prepended so Relay's executor
247
+ * grants it before relaying.
248
+ *
249
+ * @returns the request body, or null when the inputs cannot form a valid call
250
+ */
251
+ export declare const buildRelayQuoteRequest: (request: ConsolidatedQuoteRequest) => RelayQuoteRequestBody | null;
252
+ /**
253
+ * Normalizes a Relay `/quote/v2` response into the shared consolidated quote
254
+ * shape. The origin approval Relay returns as its own step is folded back into
255
+ * `approvalAddress` so the executor raises it through the same path as LI.FI;
256
+ * the deposit step becomes the single `originDeposit`.
257
+ *
258
+ * @returns the normalized quote, or null when the payload shape is unexpected
259
+ */
260
+ export declare const parseRelayQuote: (payload: unknown) => ConsolidatedQuote | null;
261
+ /**
262
+ * Builds the requests-lookup address for a Relay route BY ITS QUOTE
263
+ * IDENTIFIER.
264
+ *
265
+ * IT USED TO ASK BY ORIGIN TRANSACTION HASH, AND THAT RETURNED OTHER PEOPLE'S
266
+ * TRANSFERS. `/requests/v3` does not accept a `hash` filter: it ignores the
267
+ * parameter entirely and answers with the twenty most recent requests ACROSS
268
+ * ALL USERS. Measured, with two different origin hashes a minute apart:
269
+ *
270
+ * ?hash=0x447149ed… -> 20 requests, first is 8453:0x7d7c3de2… -> 4663:…
271
+ * ?hash=0xa650d2d7… -> the SAME 20 requests, same first entry
272
+ *
273
+ * `parseRelayStatus` reads `requests[0]`, so both of this account's transfers
274
+ * were updated from a stranger's — they took the same entry-chain transaction
275
+ * hash, and neither was their own. A transfer was reported finished because
276
+ * somebody else's had finished.
277
+ *
278
+ * `id` is the filter v3 actually honours. The same lookup by quote identifier
279
+ * returns exactly ONE request, and its `inTxs` name the origin transaction the
280
+ * reader really signed. The caller should assert that correspondence rather
281
+ * than trust it — see `checkConsolidatedRecord`.
282
+ */
283
+ export declare const relayStatusUrl: ({ quoteId }: {
284
+ quoteId: string;
285
+ }) => string;
286
+ /**
287
+ * Maps a Relay request status onto the provider-agnostic consolidated status.
288
+ * `success` reports `DONE`/`COMPLETED` because for this route the destination
289
+ * fill IS our omnibridge entry call; `refund` reports `DONE`/`REFUNDED` because
290
+ * the user was made whole on the origin chain. Relay never strands funds on
291
+ * Ethereum, so the partial/stranded status LI.FI can return has no analogue.
292
+ *
293
+ * @param payload - a `/requests/v2?hash=` response body
294
+ * @param options.destinationChainId - the omnibridge entry chain the route
295
+ * targeted (Ethereum or Binance Smart Chain); defaults to Ethereum,
296
+ * preserving the original single-entry behavior
297
+ * @returns the normalized status, or null when no matching request is present
298
+ */
299
+ export declare const parseRelayStatus: (payload: unknown, { destinationChainId }?: {
300
+ destinationChainId?: number;
301
+ }) => ConsolidatedStatus | null;