@provablehq/aleo-bridge-sdk 0.8.0-rc.0 → 0.9.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -18
- package/dist/agent/index.d.ts +1 -1
- package/dist/{createBridgeClient-CjHY-JvW.d.ts → createBridgeClient-BwVZIJl1.d.ts} +38 -1
- package/dist/index.d.ts +41 -14
- package/dist/index.js +74 -10
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -211,10 +211,11 @@ xReserve entries include Circle's published Ethereum/Sepolia USDC contracts,
|
|
|
211
211
|
Aleo domain, and USDCx program identifiers. Ethereum-to-Aleo ETH, WBTC, and USDT
|
|
212
212
|
routes pin router, domain, ISM, token, Mailbox, and gas-payment metadata to
|
|
213
213
|
Hyperlane Registry commit `2621c16f2db1ccb46643265c110dac5ca2c7c51a` and are
|
|
214
|
-
active.
|
|
215
|
-
|
|
214
|
+
active. The reviewed Aleo-origin ETH, WBTC, USDT, and SOL withdrawal routes are
|
|
215
|
+
also active (reviewed 2026-08-26); other Hyperlane routes remain
|
|
216
|
+
`metadata-required` until their deployment metadata is complete and reviewed.
|
|
216
217
|
|
|
217
|
-
### Aleo-origin Hyperlane
|
|
218
|
+
### Aleo-origin Hyperlane withdrawals
|
|
218
219
|
|
|
219
220
|
The Aleo-origin ETH, WBTC, USDT, SOL, and USAD routes expose the complete
|
|
220
221
|
`transfer_remote` call shape for these programs:
|
|
@@ -225,14 +226,22 @@ The Aleo-origin ETH, WBTC, USDT, SOL, and USAD routes expose the complete
|
|
|
225
226
|
- `hyp_warp_token_sol_v2.aleo`
|
|
226
227
|
- `hyp_warp_token_usad_v2.aleo`
|
|
227
228
|
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
The ETH, WBTC, USDT, and SOL routes are active. Every static field is reviewed;
|
|
230
|
+
the one dynamic value — the interchain gas paymaster's hook payment — is read
|
|
231
|
+
live from `hyp_hook_manager.aleo/destination_gas_configs` by
|
|
232
|
+
`quoteAleoHyperlaneGasPayment` and passed to execution as
|
|
233
|
+
`gasPaymentMicrocredits`. The on-chain hook asserts the payment exactly equals
|
|
234
|
+
its own recomputed quote, so a stale quote aborts at finalization without
|
|
235
|
+
moving funds, and `executeAleoHyperlaneTransferRemote` throws before wallet
|
|
236
|
+
access when no quote is supplied.
|
|
237
|
+
|
|
238
|
+
**The USAD route contains dummy development values and is not executable.** It
|
|
239
|
+
remains `metadata-required`, carries `aleoPlaceholderConfiguration: true`, and
|
|
230
240
|
`executeAleoHyperlaneTransferRemote` throws before calling the wallet. Use
|
|
231
|
-
`buildAleoHyperlaneTransferRemoteCall` only to inspect and integrate
|
|
232
|
-
until the configuration
|
|
241
|
+
`buildAleoHyperlaneTransferRemoteCall` only to inspect and integrate its ABI
|
|
242
|
+
until the configuration has been reviewed and replaced.
|
|
233
243
|
|
|
234
|
-
|
|
235
|
-
the current dummy values are:
|
|
244
|
+
For USAD, the current dummy values are:
|
|
236
245
|
|
|
237
246
|
- `token_type`: `0u8`; `token_id`: `0field`
|
|
238
247
|
- `token_owner`, `ism`, `hook`, and all four allowance spenders: the same
|
|
@@ -246,8 +255,7 @@ The WBTC route is partially populated from mainnet
|
|
|
246
255
|
[`hyp_warp_token_wbtc_v2.aleo`](https://explorer.provable.com/program/hyp_warp_token_wbtc_v2.aleo),
|
|
247
256
|
edition `0`. Its `app_metadata[true]` token type, owner, ISM, hook, token ID,
|
|
248
257
|
and `8u8` local/remote decimals are verified and are not placeholders. Its
|
|
249
|
-
first hook allowance amount
|
|
250
|
-
non-executable.
|
|
258
|
+
first hook allowance amount is the live gas quote supplied at execution time.
|
|
251
259
|
|
|
252
260
|
The WBTC Ethereum remote router is also verified: domain `1u32`, recipient
|
|
253
261
|
`0x20CDC85778b732073F7EecEF3DF25c0d310f8772` left-padded to `[u8; 32]`, and
|
|
@@ -262,8 +270,8 @@ The ETH route is populated from current mainnet app metadata and the reviewed
|
|
|
262
270
|
Its Ethereum router is `0x38D447694f5c1f773ae3132cf93bF30B7Ec1Fa5A`,
|
|
263
271
|
left-padded to `[u8; 32]`, with domain `1u32` and gas `44000u128`. The
|
|
264
272
|
transaction's `8174147u64` first allowance is an observed dispatch quote and is
|
|
265
|
-
not stored as a route-wide cap. As with WBTC,
|
|
266
|
-
|
|
273
|
+
not stored as a route-wide cap. As with WBTC, the first hook allowance amount
|
|
274
|
+
is quoted live at execution time. Ethereum recipient limbs are derived from
|
|
267
275
|
`plan.recipient`.
|
|
268
276
|
|
|
269
277
|
The USDT route uses current edition `1` app metadata and the verified Ethereum
|
|
@@ -293,10 +301,11 @@ default ISM, dispatch proxy, owner, and the nonce/process count observed during
|
|
|
293
301
|
the 2026-08-17 review. The nonce and process count are mutable observations and
|
|
294
302
|
are not transaction inputs.
|
|
295
303
|
|
|
296
|
-
Before enabling submission, replace and verify every field still reported
|
|
297
|
-
`placeholderFields` for that route.
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
Before enabling USAD submission, replace and verify every field still reported
|
|
305
|
+
by `placeholderFields` for that route. Then remove
|
|
306
|
+
`aleoPlaceholderConfiguration` and change the route availability to `active` in
|
|
307
|
+
a reviewed registry snapshot, as the 2026-08-26 review did for ETH, WBTC, USDT,
|
|
308
|
+
and SOL.
|
|
300
309
|
|
|
301
310
|
## Exports
|
|
302
311
|
|
|
@@ -321,5 +330,5 @@ fund-moving wallet actions.
|
|
|
321
330
|
## Next implementation phases
|
|
322
331
|
|
|
323
332
|
1. Add protocol delivery tracking for relayer-driven xReserve and Hyperlane mints.
|
|
324
|
-
2. Replace and review the Aleo-origin
|
|
333
|
+
2. Replace and review the Aleo-origin USAD placeholders, then add destination confirmation for withdrawals.
|
|
325
334
|
3. Add injected Solana execution and gated protocol testnets.
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentTool } from '@provablehq/veil-core/agent';
|
|
2
2
|
export { AgentTool, AgentToolHandler, AgentToolSchema } from '@provablehq/veil-core/agent';
|
|
3
|
-
import {
|
|
3
|
+
import { C as BridgeClient } from '../createBridgeClient-BwVZIJl1.js';
|
|
4
4
|
import '@provablehq/veil-core';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
|
@@ -505,6 +505,35 @@ type XReserveBurnExecution = {
|
|
|
505
505
|
transactionId: string;
|
|
506
506
|
receipt: BridgeTransferReceipt;
|
|
507
507
|
};
|
|
508
|
+
/**
|
|
509
|
+
* Configures one live Hyperlane hook gas payment quote.
|
|
510
|
+
*
|
|
511
|
+
* @property routeId Aleo-origin Hyperlane route whose destination gas is quoted.
|
|
512
|
+
*/
|
|
513
|
+
type QuoteAleoHyperlaneGasPaymentParameters = {
|
|
514
|
+
routeId: string;
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Captures one live destination gas quote for an Aleo-origin Hyperlane transfer.
|
|
518
|
+
*
|
|
519
|
+
* The on-chain hook asserts that the paid amount exactly equals the quote it
|
|
520
|
+
* recomputes at finalization, so the caller should quote shortly before submission.
|
|
521
|
+
*
|
|
522
|
+
* @property routeId Route the quote applies to.
|
|
523
|
+
* @property gasLimit Destination gas limit charged by the route, after the on-chain 50000 zero-limit fallback.
|
|
524
|
+
* @property gasOverhead Destination gas overhead added by the interchain gas paymaster.
|
|
525
|
+
* @property gasPrice Destination gas price reported by the on-chain oracle.
|
|
526
|
+
* @property exchangeRate Destination-to-Aleo exchange rate reported by the on-chain oracle.
|
|
527
|
+
* @property paymentMicrocredits Exact hook payment in microcredits (u64) the transfer must allow.
|
|
528
|
+
*/
|
|
529
|
+
type AleoHyperlaneGasQuote = {
|
|
530
|
+
routeId: string;
|
|
531
|
+
gasLimit: bigint;
|
|
532
|
+
gasOverhead: bigint;
|
|
533
|
+
gasPrice: bigint;
|
|
534
|
+
exchangeRate: bigint;
|
|
535
|
+
paymentMicrocredits: bigint;
|
|
536
|
+
};
|
|
508
537
|
/**
|
|
509
538
|
* Describes one locally constructed Aleo Hyperlane transfer call.
|
|
510
539
|
*
|
|
@@ -531,11 +560,13 @@ type AleoHyperlaneTransferRemoteCall = {
|
|
|
531
560
|
* @property plan Aleo-origin Hyperlane plan returned by `prepareTransfer`.
|
|
532
561
|
* @property mode Whether the program burns from `self.caller` or the EOA-bound `self.signer`. Defaults to `caller`.
|
|
533
562
|
* @property privateFee Whether the Aleo wallet should pay its fee privately. Defaults to false.
|
|
563
|
+
* @property gasPaymentMicrocredits Live hook payment in microcredits (u64) from `quoteAleoHyperlaneGasPayment`. Optional for inspection-only call construction; required for execution.
|
|
534
564
|
*/
|
|
535
565
|
type ExecuteAleoHyperlaneTransferRemoteParameters = {
|
|
536
566
|
plan: BridgeTransferPlan;
|
|
537
567
|
mode?: 'caller' | 'signer' | undefined;
|
|
538
568
|
privateFee?: boolean | undefined;
|
|
569
|
+
gasPaymentMicrocredits?: bigint | undefined;
|
|
539
570
|
};
|
|
540
571
|
/**
|
|
541
572
|
* Captures a submitted Aleo Hyperlane dispatch.
|
|
@@ -675,12 +706,14 @@ type EvmHyperlaneTransferExecution = {
|
|
|
675
706
|
* @property registry Reviewed snapshot supplying chains, assets, and routes.
|
|
676
707
|
* @property executors Optional wallet capabilities injected at construction.
|
|
677
708
|
* @property xReserveHttpTransport Optional HTTP capability for Circle attestation lookups.
|
|
709
|
+
* @property aleoPublicClient Optional Aleo public client for on-chain reads such as Hyperlane gas quotes.
|
|
678
710
|
*/
|
|
679
711
|
type BridgeActionsConfig = {
|
|
680
712
|
environment: BridgeEnvironment;
|
|
681
713
|
registry: BridgeRegistry;
|
|
682
714
|
executors?: BridgeExecutors | undefined;
|
|
683
715
|
xReserveHttpTransport?: XReserveHttpTransport | undefined;
|
|
716
|
+
aleoPublicClient?: Client | undefined;
|
|
684
717
|
};
|
|
685
718
|
/**
|
|
686
719
|
* Lists the protocol-oriented actions bound to a bridge client.
|
|
@@ -696,6 +729,7 @@ type BridgeActionsConfig = {
|
|
|
696
729
|
* @property executeXReservePrivateMint Prompts the Aleo wallet for the wrapper private mint.
|
|
697
730
|
* @property executeXReserveBurn Prompts the Aleo wallet for one of the reviewed USDCx burn transitions.
|
|
698
731
|
* @property buildAleoHyperlaneTransferRemoteCall Constructs the seven-input Aleo Warp Route call without wallet access.
|
|
732
|
+
* @property quoteAleoHyperlaneGasPayment Reads the live interchain gas paymaster quote through the injected Aleo public client.
|
|
699
733
|
* @property executeAleoHyperlaneTransferRemote Submits only fully reviewed, non-placeholder Aleo Warp Route calls.
|
|
700
734
|
*/
|
|
701
735
|
type BridgeActions = {
|
|
@@ -710,6 +744,7 @@ type BridgeActions = {
|
|
|
710
744
|
executeXReservePrivateMint: (params: ExecuteXReservePrivateMintParameters) => Promise<XReservePrivateMintExecution>;
|
|
711
745
|
executeXReserveBurn: (params: ExecuteXReserveBurnParameters) => Promise<XReserveBurnExecution>;
|
|
712
746
|
buildAleoHyperlaneTransferRemoteCall: (params: ExecuteAleoHyperlaneTransferRemoteParameters) => AleoHyperlaneTransferRemoteCall;
|
|
747
|
+
quoteAleoHyperlaneGasPayment: (params: QuoteAleoHyperlaneGasPaymentParameters) => Promise<AleoHyperlaneGasQuote>;
|
|
713
748
|
executeAleoHyperlaneTransferRemote: (params: ExecuteAleoHyperlaneTransferRemoteParameters) => Promise<AleoHyperlaneTransferRemoteExecution>;
|
|
714
749
|
};
|
|
715
750
|
/**
|
|
@@ -735,6 +770,7 @@ declare function bridgeActions(_client: Client, config: BridgeActionsConfig): Br
|
|
|
735
770
|
* @property registry Reviewed protocol deployment snapshot. Defaults to {@link DEFAULT_BRIDGE_REGISTRY}.
|
|
736
771
|
* @property executors Optional wallet capabilities used by fund-moving protocol actions.
|
|
737
772
|
* @property xReserveHttpTransport Optional fetch-compatible transport used for Circle attestation requests.
|
|
773
|
+
* @property aleoPublicClient Optional Aleo public client used for on-chain reads such as Hyperlane gas quotes.
|
|
738
774
|
* @property key Client identifier. Defaults to `bridge`.
|
|
739
775
|
* @property name Human-readable client name. Defaults to `Bridge Client`.
|
|
740
776
|
*/
|
|
@@ -743,6 +779,7 @@ type BridgeClientConfig = {
|
|
|
743
779
|
registry?: BridgeRegistry | undefined;
|
|
744
780
|
executors?: BridgeExecutors | undefined;
|
|
745
781
|
xReserveHttpTransport?: XReserveHttpTransport | undefined;
|
|
782
|
+
aleoPublicClient?: Client | undefined;
|
|
746
783
|
key?: string | undefined;
|
|
747
784
|
name?: string | undefined;
|
|
748
785
|
};
|
|
@@ -776,4 +813,4 @@ type BridgeClient = Client<BridgeActions & BridgeClientState>;
|
|
|
776
813
|
*/
|
|
777
814
|
declare function createBridgeClient(config?: BridgeClientConfig): BridgeClient;
|
|
778
815
|
|
|
779
|
-
export { type
|
|
816
|
+
export { type ProtocolBridgeRoute as $, type AleoBridgeExecutor as A, type BridgeRegistry as B, type BridgeClient as C, type BridgeClientConfig as D, type EvmBridgeExecutor as E, type BridgeExecutionStep as F, type GetXReserveAttestationParameters as G, type BridgeExecutionStepKind as H, type BridgeExecutors as I, type BridgeFee as J, type BridgeProtocol as K, type BridgeQuoteStatus as L, type BridgeRouteAvailability as M, type BridgeStepExecutor as N, type BridgeTransferQuote as O, type PrepareTransferParameters as P, type QuoteEvmHyperlaneTransferParameters as Q, type BridgeTransferReceipt as R, type BridgeTransferStatus as S, type EvmHyperlaneRouteMetadata as T, type EvmHyperlaneRouterType as U, type EvmXReserveRouteMetadata as V, type GetProtocolAssetsParameters as W, type XReserveHttpTransport as X, type GetProtocolRoutesParameters as Y, type ProtocolBridgeAsset as Z, type ProtocolBridgeChain as _, type BridgeTransferPlan as a, type XReserveBurnMode as a0, type XReserveHttpResponse as a1, bridgeActions as a2, createBridgeClient as a3, getProtocolAssets as a4, getProtocolRoutes as a5, type ExecuteEvmHyperlaneTransferParameters as b, type EvmHyperlaneTransferExecution as c, type EvmHyperlaneTransferQuote as d, type ExecuteEvmXReserveTransferParameters as e, type EvmXReserveTransferExecution as f, type XReserveAttestationResult as g, type QuoteEvmXReserveTransferParameters as h, type EvmXReserveTransferQuote as i, type ExecuteXReservePrivateMintParameters as j, type XReservePrivateMintExecution as k, type ExecuteXReserveBurnParameters as l, type XReserveBurnCall as m, type XReserveBurnExecution as n, type ExecuteAleoHyperlaneTransferRemoteParameters as o, type AleoHyperlaneTransferRemoteCall as p, type AleoHyperlaneTransferRemoteExecution as q, type QuoteAleoHyperlaneGasPaymentParameters as r, type AleoHyperlaneGasQuote as s, type BridgeEnvironment as t, type AleoMintMode as u, type BridgeActions as v, type BridgeActionsConfig as w, type BridgeAssetKind as x, type BridgeAssetLocator as y, type BridgeChainFamily as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BridgeRegistry, P as PrepareTransferParameters, a as BridgeTransferPlan, E as EvmBridgeExecutor, b as ExecuteEvmHyperlaneTransferParameters, c as EvmHyperlaneTransferExecution, Q as QuoteEvmHyperlaneTransferParameters, d as EvmHyperlaneTransferQuote, e as ExecuteEvmXReserveTransferParameters, f as EvmXReserveTransferExecution, X as XReserveHttpTransport, G as GetXReserveAttestationParameters, g as XReserveAttestationResult, h as QuoteEvmXReserveTransferParameters, i as EvmXReserveTransferQuote, A as AleoBridgeExecutor, j as ExecuteXReservePrivateMintParameters, k as XReservePrivateMintExecution, l as ExecuteXReserveBurnParameters, m as XReserveBurnCall, n as XReserveBurnExecution, o as ExecuteAleoHyperlaneTransferRemoteParameters, p as AleoHyperlaneTransferRemoteCall, q as AleoHyperlaneTransferRemoteExecution, r as
|
|
2
|
-
export {
|
|
1
|
+
import { B as BridgeRegistry, P as PrepareTransferParameters, a as BridgeTransferPlan, E as EvmBridgeExecutor, b as ExecuteEvmHyperlaneTransferParameters, c as EvmHyperlaneTransferExecution, Q as QuoteEvmHyperlaneTransferParameters, d as EvmHyperlaneTransferQuote, e as ExecuteEvmXReserveTransferParameters, f as EvmXReserveTransferExecution, X as XReserveHttpTransport, G as GetXReserveAttestationParameters, g as XReserveAttestationResult, h as QuoteEvmXReserveTransferParameters, i as EvmXReserveTransferQuote, A as AleoBridgeExecutor, j as ExecuteXReservePrivateMintParameters, k as XReservePrivateMintExecution, l as ExecuteXReserveBurnParameters, m as XReserveBurnCall, n as XReserveBurnExecution, o as ExecuteAleoHyperlaneTransferRemoteParameters, p as AleoHyperlaneTransferRemoteCall, q as AleoHyperlaneTransferRemoteExecution, r as QuoteAleoHyperlaneGasPaymentParameters, s as AleoHyperlaneGasQuote, t as BridgeEnvironment, u as AleoMintMode } from './createBridgeClient-BwVZIJl1.js';
|
|
2
|
+
export { v as BridgeActions, w as BridgeActionsConfig, x as BridgeAssetKind, y as BridgeAssetLocator, z as BridgeChainFamily, C as BridgeClient, D as BridgeClientConfig, F as BridgeExecutionStep, H as BridgeExecutionStepKind, I as BridgeExecutors, J as BridgeFee, K as BridgeProtocol, L as BridgeQuoteStatus, M as BridgeRouteAvailability, N as BridgeStepExecutor, O as BridgeTransferQuote, R as BridgeTransferReceipt, S as BridgeTransferStatus, T as EvmHyperlaneRouteMetadata, U as EvmHyperlaneRouterType, V as EvmXReserveRouteMetadata, W as GetAssetsParameters, Y as GetRoutesParameters, Z as ProtocolBridgeAsset, _ as ProtocolBridgeChain, $ as ProtocolBridgeRoute, a0 as XReserveBurnMode, a1 as XReserveHttpResponse, a2 as bridgeActions, a3 as createBridgeClient, a4 as getAssets, a5 as getRoutes } from './createBridgeClient-BwVZIJl1.js';
|
|
3
|
+
import { Client } from '@provablehq/veil-core';
|
|
3
4
|
import { Hex, Address, Hash } from 'viem';
|
|
4
|
-
import '@provablehq/veil-core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Prepares the ordered operations for a protocol bridge transfer.
|
|
@@ -175,17 +175,42 @@ declare function buildXReserveBurnCall(registry: BridgeRegistry, params: Execute
|
|
|
175
175
|
*/
|
|
176
176
|
declare function executeXReserveBurn(registry: BridgeRegistry, executor: AleoBridgeExecutor, params: ExecuteXReserveBurnParameters): Promise<XReserveBurnExecution>;
|
|
177
177
|
|
|
178
|
+
/**
|
|
179
|
+
* Quotes the exact Hyperlane hook payment for one Aleo-origin transfer.
|
|
180
|
+
*
|
|
181
|
+
* Reads the interchain gas paymaster's destination gas configuration from
|
|
182
|
+
* `hyp_hook_manager.aleo` through the supplied Aleo public client and applies
|
|
183
|
+
* the same formula the hook enforces at finalization:
|
|
184
|
+
* `(gas_limit + gas_overhead) * gas_price * exchange_rate / 10^10`.
|
|
185
|
+
* The hook asserts exact equality with its own recomputation, so quote shortly
|
|
186
|
+
* before submission and requote after any delay. Hits the network; does not sign.
|
|
187
|
+
*
|
|
188
|
+
* @param registry Reviewed route snapshot supplying the hook and domain identifiers.
|
|
189
|
+
* @param client Aleo public client whose transport serves the mapping read.
|
|
190
|
+
* @param params Aleo-origin Hyperlane route to quote.
|
|
191
|
+
* @returns The oracle components and the exact payment in microcredits (u64).
|
|
192
|
+
* @throws BridgeError When the route is not an Aleo-origin Hyperlane route, the
|
|
193
|
+
* on-chain configuration is missing or unpriced, or the payment overflows u64.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* const quote = await quoteAleoHyperlaneGasPayment(registry, publicClient, {
|
|
197
|
+
* routeId: 'hyperlane:aleo/eth->ethereum/eth',
|
|
198
|
+
* })
|
|
199
|
+
*/
|
|
200
|
+
declare function quoteAleoHyperlaneGasPayment(registry: BridgeRegistry, client: Client, params: QuoteAleoHyperlaneGasPaymentParameters): Promise<AleoHyperlaneGasQuote>;
|
|
178
201
|
/**
|
|
179
202
|
* Builds an Aleo Hyperlane `transfer_remote` call without prompting a wallet.
|
|
180
203
|
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
204
|
+
* Routes still under review produce non-executable calls containing conspicuous
|
|
205
|
+
* placeholder deployment values, keeping the seven-input ABI inspectable while
|
|
206
|
+
* preventing those values from being mistaken for live data. Active routes
|
|
207
|
+
* embed the supplied live gas payment as the hook allowance; without one the
|
|
208
|
+
* call reports `aleoAllowanceAmount0` as unresolved.
|
|
184
209
|
*
|
|
185
210
|
* @param registry Reviewed route snapshot supplying the Aleo Warp Route configuration.
|
|
186
|
-
* @param params Prepared Aleo-origin Hyperlane plan.
|
|
211
|
+
* @param params Prepared Aleo-origin Hyperlane plan and optional live gas payment.
|
|
187
212
|
* @returns Exact program, transition, and ordered Aleo inputs.
|
|
188
|
-
* @throws BridgeError When the plan or route metadata is inconsistent.
|
|
213
|
+
* @throws BridgeError When the plan or route metadata is inconsistent, or the gas payment is not a positive u64.
|
|
189
214
|
*
|
|
190
215
|
* @example
|
|
191
216
|
* const call = buildAleoHyperlaneTransferRemoteCall(registry, { plan })
|
|
@@ -194,15 +219,17 @@ declare function buildAleoHyperlaneTransferRemoteCall(registry: BridgeRegistry,
|
|
|
194
219
|
/**
|
|
195
220
|
* Submits a fully configured Aleo Hyperlane `transfer_remote` transaction.
|
|
196
221
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
222
|
+
* Submission requires an active reviewed route with no placeholder values and
|
|
223
|
+
* a live hook gas payment from `quoteAleoHyperlaneGasPayment`. The on-chain
|
|
224
|
+
* hook asserts the payment exactly equals its own recomputed quote, so a stale
|
|
225
|
+
* quote aborts at finalization without moving funds.
|
|
200
226
|
*
|
|
201
227
|
* @param registry Reviewed route snapshot supplying the Aleo Warp Route configuration.
|
|
202
228
|
* @param executor Connected Aleo wallet client that proves, signs, and broadcasts.
|
|
203
|
-
* @param params Prepared Aleo-origin Hyperlane plan and
|
|
229
|
+
* @param params Prepared Aleo-origin Hyperlane plan, fee preference, and live gas payment.
|
|
204
230
|
* @returns The Aleo transaction id and resumable Hyperlane receipt.
|
|
205
|
-
* @throws BridgeError When configuration is placeholder
|
|
231
|
+
* @throws BridgeError When configuration is placeholder or inactive, the gas
|
|
232
|
+
* payment is absent, or the wallet returns no id.
|
|
206
233
|
*/
|
|
207
234
|
declare function executeAleoHyperlaneTransferRemote(registry: BridgeRegistry, executor: AleoBridgeExecutor, params: ExecuteAleoHyperlaneTransferRemoteParameters): Promise<AleoHyperlaneTransferRemoteExecution>;
|
|
208
235
|
|
|
@@ -418,4 +445,4 @@ declare class BridgeError extends Error {
|
|
|
418
445
|
*/
|
|
419
446
|
declare function parseDecimalAmount(amount: string, decimals: number): bigint;
|
|
420
447
|
|
|
421
|
-
export { AleoBridgeExecutor, AleoHyperlaneTransferRemoteCall, AleoHyperlaneTransferRemoteExecution, AleoMintMode, BridgeEnvironment, BridgeError, BridgeRegistry, BridgeTransferPlan, DEFAULT_BRIDGE_REGISTRY, EvmBridgeExecutor, EvmHyperlaneTransferExecution, EvmHyperlaneTransferQuote, EvmXReserveTransferExecution, EvmXReserveTransferQuote, ExecuteAleoHyperlaneTransferRemoteParameters, ExecuteEvmHyperlaneTransferParameters, ExecuteEvmXReserveTransferParameters, ExecuteXReserveBurnParameters, ExecuteXReservePrivateMintParameters, GetXReserveAttestationParameters, PrepareTransferParameters, QuoteEvmHyperlaneTransferParameters, QuoteEvmXReserveTransferParameters, XReserveAttestationResult, XReserveBurnCall, XReserveBurnExecution, XReserveHttpTransport, XReservePrivateMintExecution, aleoAddressToBytes32, aleoProgramAddress, buildAleoHyperlaneTransferRemoteCall, buildXReserveBurnCall, buildXReserveDepositPayload, buildXReserveHookData, calculateXReserveDepositNonce, calculateXReserveMessageHash, evmAddressToAleoHyperlaneRecipient, evmAddressToXReserveBytes32, executeAleoHyperlaneTransferRemote, executeEvmHyperlaneTransfer, executeEvmXReserveTransfer, executeXReserveBurn, executeXReservePrivateMint, getXReserveAttestation, parseDecimalAmount, prepareTransfer, quoteEvmHyperlaneTransfer, quoteEvmXReserveTransfer, solanaAddressToAleoHyperlaneRecipient, validateBridgeRegistry, xReserveHexToAleoBytes };
|
|
448
|
+
export { AleoBridgeExecutor, AleoHyperlaneGasQuote, AleoHyperlaneTransferRemoteCall, AleoHyperlaneTransferRemoteExecution, AleoMintMode, BridgeEnvironment, BridgeError, BridgeRegistry, BridgeTransferPlan, DEFAULT_BRIDGE_REGISTRY, EvmBridgeExecutor, EvmHyperlaneTransferExecution, EvmHyperlaneTransferQuote, EvmXReserveTransferExecution, EvmXReserveTransferQuote, ExecuteAleoHyperlaneTransferRemoteParameters, ExecuteEvmHyperlaneTransferParameters, ExecuteEvmXReserveTransferParameters, ExecuteXReserveBurnParameters, ExecuteXReservePrivateMintParameters, GetXReserveAttestationParameters, PrepareTransferParameters, QuoteAleoHyperlaneGasPaymentParameters, QuoteEvmHyperlaneTransferParameters, QuoteEvmXReserveTransferParameters, XReserveAttestationResult, XReserveBurnCall, XReserveBurnExecution, XReserveHttpTransport, XReservePrivateMintExecution, aleoAddressToBytes32, aleoProgramAddress, buildAleoHyperlaneTransferRemoteCall, buildXReserveBurnCall, buildXReserveDepositPayload, buildXReserveHookData, calculateXReserveDepositNonce, calculateXReserveMessageHash, evmAddressToAleoHyperlaneRecipient, evmAddressToXReserveBytes32, executeAleoHyperlaneTransferRemote, executeEvmHyperlaneTransfer, executeEvmXReserveTransfer, executeXReserveBurn, executeXReservePrivateMint, getXReserveAttestation, parseDecimalAmount, prepareTransfer, quoteAleoHyperlaneGasPayment, quoteEvmHyperlaneTransfer, quoteEvmXReserveTransfer, solanaAddressToAleoHyperlaneRecipient, validateBridgeRegistry, xReserveHexToAleoBytes };
|
package/dist/index.js
CHANGED
|
@@ -955,6 +955,9 @@ async function executeXReserveBurn(registry, executor2, params) {
|
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
957
|
|
|
958
|
+
// src/actions/aleoHyperlane.ts
|
|
959
|
+
import { parsePlaintextValue, readContract } from "@provablehq/veil-core";
|
|
960
|
+
|
|
958
961
|
// src/utils/hyperlane.ts
|
|
959
962
|
import bs58 from "bs58";
|
|
960
963
|
import { getAddress as getAddress4, hexToBytes as hexToBytes2, isAddress as isAddress4, padHex as padHex2 } from "viem";
|
|
@@ -987,6 +990,9 @@ function solanaAddressToAleoHyperlaneRecipient(address) {
|
|
|
987
990
|
}
|
|
988
991
|
|
|
989
992
|
// src/actions/aleoHyperlane.ts
|
|
993
|
+
var MAX_U64 = (1n << 64n) - 1n;
|
|
994
|
+
var GAS_QUOTE_SCALE = 10000000000n;
|
|
995
|
+
var ZERO_GAS_LIMIT_FALLBACK = 50000n;
|
|
990
996
|
var PLACEHOLDER_FIELDS = [
|
|
991
997
|
"aleoTokenType",
|
|
992
998
|
"aleoTokenOwner",
|
|
@@ -1061,13 +1067,52 @@ function validatedRoute2(registry, params) {
|
|
|
1061
1067
|
if (!program.endsWith(".aleo")) throw new BridgeError(`Aleo Warp Route program is invalid: ${route2.id}`);
|
|
1062
1068
|
return { route: route2, program, destinationChain };
|
|
1063
1069
|
}
|
|
1064
|
-
function allowance(route2, index) {
|
|
1065
|
-
|
|
1070
|
+
function allowance(route2, index, amountOverride) {
|
|
1071
|
+
const amount = amountOverride ?? metadataString(route2, `aleoAllowanceAmount${index}`);
|
|
1072
|
+
return `{ spender: ${metadataString(route2, `aleoAllowanceSpender${index}`)}, amount: ${amount}u64 }`;
|
|
1073
|
+
}
|
|
1074
|
+
function gasConfigBigint(config, field, routeId) {
|
|
1075
|
+
const value = config[field];
|
|
1076
|
+
if (typeof value !== "bigint" || value < 0n) throw new BridgeError(`Hyperlane gas configuration field ${field} is invalid: ${routeId}`);
|
|
1077
|
+
return value;
|
|
1078
|
+
}
|
|
1079
|
+
async function quoteAleoHyperlaneGasPayment(registry, client, params) {
|
|
1080
|
+
const route2 = registry.routes.find((entry) => entry.id === params.routeId);
|
|
1081
|
+
if (!route2 || route2.protocol !== "hyperlane") throw new BridgeError(`Hyperlane route is not configured: ${params.routeId}`);
|
|
1082
|
+
const sourceAsset = registry.assets.find((asset) => asset.id === route2.sourceAssetId);
|
|
1083
|
+
const sourceChain = registry.chains.find((chain) => chain.id === sourceAsset?.chainId);
|
|
1084
|
+
if (sourceChain?.family !== "aleo") throw new BridgeError(`Hyperlane gas quotes require an Aleo source asset: ${params.routeId}`);
|
|
1085
|
+
const hookManager = metadataString(route2, "aleoHookManagerProgram");
|
|
1086
|
+
const igp = metadataString(route2, "aleoMailboxDefaultHook");
|
|
1087
|
+
const destination = metadataNumber(route2, "aleoDestinationDomain");
|
|
1088
|
+
const gasLimitMetadata = BigInt(metadataString(route2, "aleoRemoteRouterGas"));
|
|
1089
|
+
const literal = await readContract(client, {
|
|
1090
|
+
programId: hookManager,
|
|
1091
|
+
mapping: "destination_gas_configs",
|
|
1092
|
+
key: `{ igp: ${igp}, destination: ${destination}u32 }`
|
|
1093
|
+
});
|
|
1094
|
+
if (literal == null) throw new BridgeError(`Hyperlane destination gas configuration is missing on chain: ${params.routeId}`);
|
|
1095
|
+
const config = parsePlaintextValue(literal);
|
|
1096
|
+
if (typeof config !== "object" || Array.isArray(config)) throw new BridgeError(`Hyperlane destination gas configuration is malformed: ${params.routeId}`);
|
|
1097
|
+
const gasOverhead = gasConfigBigint(config, "gas_overhead", route2.id);
|
|
1098
|
+
const exchangeRate = gasConfigBigint(config, "exchange_rate", route2.id);
|
|
1099
|
+
const gasPrice = gasConfigBigint(config, "gas_price", route2.id);
|
|
1100
|
+
if (exchangeRate === 0n || gasPrice === 0n) throw new BridgeError(`Hyperlane destination gas configuration is unpriced: ${params.routeId}`);
|
|
1101
|
+
const gasLimit = gasLimitMetadata === 0n ? ZERO_GAS_LIMIT_FALLBACK : gasLimitMetadata;
|
|
1102
|
+
const paymentMicrocredits = (gasLimit + gasOverhead) * gasPrice * exchangeRate / GAS_QUOTE_SCALE;
|
|
1103
|
+
if (paymentMicrocredits <= 0n || paymentMicrocredits > MAX_U64) {
|
|
1104
|
+
throw new BridgeError(`Hyperlane hook payment does not fit a positive u64: ${paymentMicrocredits}`);
|
|
1105
|
+
}
|
|
1106
|
+
return { routeId: route2.id, gasLimit, gasOverhead, gasPrice, exchangeRate, paymentMicrocredits };
|
|
1066
1107
|
}
|
|
1067
1108
|
function buildAleoHyperlaneTransferRemoteCall(registry, params) {
|
|
1068
1109
|
if (params.mode != null && params.mode !== "caller" && params.mode !== "signer") {
|
|
1069
1110
|
throw new BridgeError(`Unsupported Aleo Hyperlane transfer mode: ${String(params.mode)}`);
|
|
1070
1111
|
}
|
|
1112
|
+
const gasPayment = params.gasPaymentMicrocredits;
|
|
1113
|
+
if (gasPayment != null && (gasPayment <= 0n || gasPayment > MAX_U64)) {
|
|
1114
|
+
throw new BridgeError(`gasPaymentMicrocredits must be a positive u64: ${gasPayment}`);
|
|
1115
|
+
}
|
|
1071
1116
|
const { route: route2, program, destinationChain } = validatedRoute2(registry, params);
|
|
1072
1117
|
const amountAtomic = parseDecimalAmount(params.plan.amountIn, params.plan.sourceAsset.decimals);
|
|
1073
1118
|
const destination = metadataNumber(route2, "aleoDestinationDomain");
|
|
@@ -1078,7 +1123,7 @@ function buildAleoHyperlaneTransferRemoteCall(registry, params) {
|
|
|
1078
1123
|
const remoteRouter = `{ domain: ${destination}u32, recipient: ${metadataString(route2, "aleoRemoteRouterRecipient")}, gas: ${metadataString(route2, "aleoRemoteRouterGas")}u128 }`;
|
|
1079
1124
|
const recipientLimbs = destinationChain.family === "evm" ? evmAddressToAleoHyperlaneRecipient(params.plan.recipient) : destinationChain.family === "solana" ? solanaAddressToAleoHyperlaneRecipient(params.plan.recipient) : void 0;
|
|
1080
1125
|
const recipient = recipientLimbs ? `[${recipientLimbs[0]}u128, ${recipientLimbs[1]}u128]` : metadataString(route2, "aleoRecipient");
|
|
1081
|
-
const allowances = `[${[0, 1, 2, 3].map((index) => allowance(route2, index)).join(", ")}]`;
|
|
1126
|
+
const allowances = `[${[0, 1, 2, 3].map((index) => allowance(route2, index, index === 0 ? gasPayment?.toString() : void 0)).join(", ")}]`;
|
|
1082
1127
|
const usesPlaceholderConfiguration = route2.metadata?.aleoPlaceholderConfiguration === true;
|
|
1083
1128
|
let placeholderFields = route2.metadata?.aleoAppMetadataVerified === true ? PLACEHOLDER_FIELDS.filter((field) => !APP_METADATA_FIELDS.has(field)) : PLACEHOLDER_FIELDS;
|
|
1084
1129
|
if (route2.metadata?.aleoMailboxStateVerified === true) {
|
|
@@ -1096,6 +1141,9 @@ function buildAleoHyperlaneTransferRemoteCall(registry, params) {
|
|
|
1096
1141
|
if (recipientLimbs) {
|
|
1097
1142
|
placeholderFields = placeholderFields.filter((field) => field !== "aleoRecipient");
|
|
1098
1143
|
}
|
|
1144
|
+
if (gasPayment != null) {
|
|
1145
|
+
placeholderFields = placeholderFields.filter((field) => field !== "aleoAllowanceAmount0");
|
|
1146
|
+
}
|
|
1099
1147
|
const functionName = params.mode === "signer" ? "transfer_remote_as_signer" : "transfer_remote";
|
|
1100
1148
|
return {
|
|
1101
1149
|
routeId: route2.id,
|
|
@@ -1112,7 +1160,7 @@ function buildAleoHyperlaneTransferRemoteCall(registry, params) {
|
|
|
1112
1160
|
],
|
|
1113
1161
|
amountAtomic,
|
|
1114
1162
|
usesPlaceholderConfiguration,
|
|
1115
|
-
placeholderFields: usesPlaceholderConfiguration ? placeholderFields : []
|
|
1163
|
+
placeholderFields: usesPlaceholderConfiguration ? placeholderFields : gasPayment == null ? ["aleoAllowanceAmount0"] : []
|
|
1116
1164
|
};
|
|
1117
1165
|
}
|
|
1118
1166
|
async function executeAleoHyperlaneTransferRemote(registry, executor2, params) {
|
|
@@ -1124,6 +1172,9 @@ async function executeAleoHyperlaneTransferRemote(registry, executor2, params) {
|
|
|
1124
1172
|
if (route2?.availability !== "active") {
|
|
1125
1173
|
throw new BridgeError(`Aleo Hyperlane route is not active: ${call.routeId}`);
|
|
1126
1174
|
}
|
|
1175
|
+
if (params.gasPaymentMicrocredits == null) {
|
|
1176
|
+
throw new BridgeError(`Aleo Hyperlane execution requires a live hook gas payment; call quoteAleoHyperlaneGasPayment first: ${call.routeId}`);
|
|
1177
|
+
}
|
|
1127
1178
|
const result = await executor2.executeTransaction({
|
|
1128
1179
|
program: call.program,
|
|
1129
1180
|
function: call.function,
|
|
@@ -1160,6 +1211,10 @@ function bridgeActions(_client, config) {
|
|
|
1160
1211
|
if (!config.executors?.aleo) throw new BridgeError("An Aleo executor is required for Aleo bridge transactions");
|
|
1161
1212
|
return config.executors.aleo;
|
|
1162
1213
|
};
|
|
1214
|
+
const aleoPublicClient = () => {
|
|
1215
|
+
if (!config.aleoPublicClient) throw new BridgeError("An Aleo public client is required for Hyperlane gas quotes");
|
|
1216
|
+
return config.aleoPublicClient;
|
|
1217
|
+
};
|
|
1163
1218
|
return {
|
|
1164
1219
|
getAssets: (params = {}) => getProtocolAssets(config.registry, {
|
|
1165
1220
|
...params,
|
|
@@ -1178,6 +1233,7 @@ function bridgeActions(_client, config) {
|
|
|
1178
1233
|
executeXReservePrivateMint: async (params) => executeXReservePrivateMint(config.registry, aleoExecutor(), params),
|
|
1179
1234
|
executeXReserveBurn: async (params) => executeXReserveBurn(config.registry, aleoExecutor(), params),
|
|
1180
1235
|
buildAleoHyperlaneTransferRemoteCall: (params) => buildAleoHyperlaneTransferRemoteCall(config.registry, params),
|
|
1236
|
+
quoteAleoHyperlaneGasPayment: async (params) => quoteAleoHyperlaneGasPayment(config.registry, aleoPublicClient(), params),
|
|
1181
1237
|
executeAleoHyperlaneTransferRemote: async (params) => executeAleoHyperlaneTransferRemote(config.registry, aleoExecutor(), params)
|
|
1182
1238
|
};
|
|
1183
1239
|
}
|
|
@@ -1270,6 +1326,8 @@ var ALEO_PLACEHOLDER_ADDRESS = "aleo1kypwp5m7qtk9mwazgcpg0tq8aal23mnrvwfvug65qgc
|
|
|
1270
1326
|
var ALEO_PLACEHOLDER_BYTES32 = `[${Array.from({ length: 32 }, () => "0u8").join(", ")}]`;
|
|
1271
1327
|
var ALEO_MAILBOX_METADATA = {
|
|
1272
1328
|
aleoMailboxStateVerified: true,
|
|
1329
|
+
aleoHookManagerProgram: "hyp_hook_manager.aleo",
|
|
1330
|
+
aleoHookManagerProgramSource: "https://explorer.provable.com/program/hyp_hook_manager.aleo",
|
|
1273
1331
|
aleoMailboxProgram: "hyp_mailbox.aleo",
|
|
1274
1332
|
aleoMailboxProgramEdition: 0,
|
|
1275
1333
|
aleoMailboxProgramSource: ALEO_MAILBOX_PROGRAM_SOURCE,
|
|
@@ -1443,6 +1501,10 @@ var ALEO_SOL_REMOTE_ROUTER = {
|
|
|
1443
1501
|
aleoAllowanceAmount2: "0",
|
|
1444
1502
|
aleoAllowanceAmount3: "0"
|
|
1445
1503
|
};
|
|
1504
|
+
var ALEO_WITHDRAWAL_ACTIVATION = {
|
|
1505
|
+
aleoPlaceholderConfiguration: false,
|
|
1506
|
+
aleoWithdrawalReviewedAt: "2026-08-26"
|
|
1507
|
+
};
|
|
1446
1508
|
function route(id, protocol, environment, sourceAssetId, destinationAssetId, availability, deploymentId, metadata2) {
|
|
1447
1509
|
return {
|
|
1448
1510
|
id,
|
|
@@ -1494,13 +1556,13 @@ var routes = [
|
|
|
1494
1556
|
attestationBaseUrl: "https://xreserve-api-testnet.circle.com/v1/attestations"
|
|
1495
1557
|
}, "active"),
|
|
1496
1558
|
route("hyperlane:ethereum/eth->aleo/eth", "hyperlane", "mainnet", "ethereum/eth", "aleo/eth", "active", "ETH/aleo", { ...ETH_HYPERLANE_METADATA, ...ALEO_MAILBOX_METADATA }),
|
|
1497
|
-
route("hyperlane:aleo/eth->ethereum/eth", "hyperlane", "mainnet", "aleo/eth", "ethereum/eth", "
|
|
1559
|
+
route("hyperlane:aleo/eth->ethereum/eth", "hyperlane", "mainnet", "aleo/eth", "ethereum/eth", "active", "ETH/aleo", { ...ETH_HYPERLANE_METADATA, ...aleoHyperlanePlaceholders("hyp_warp_token_eth_v2.aleo", 1), ...ALEO_ETH_APP_METADATA, ...ALEO_ETH_REMOTE_ROUTER, ...ALEO_WITHDRAWAL_ACTIVATION }),
|
|
1498
1560
|
route("hyperlane:ethereum/wbtc->aleo/wbtc", "hyperlane", "mainnet", "ethereum/wbtc", "aleo/wbtc", "active", "WBTC/aleo", { ...WBTC_HYPERLANE_METADATA, ...ALEO_MAILBOX_METADATA }),
|
|
1499
|
-
route("hyperlane:aleo/wbtc->ethereum/wbtc", "hyperlane", "mainnet", "aleo/wbtc", "ethereum/wbtc", "
|
|
1561
|
+
route("hyperlane:aleo/wbtc->ethereum/wbtc", "hyperlane", "mainnet", "aleo/wbtc", "ethereum/wbtc", "active", "WBTC/aleo", { ...WBTC_HYPERLANE_METADATA, ...aleoHyperlanePlaceholders("hyp_warp_token_wbtc_v2.aleo", 1), ...ALEO_WBTC_APP_METADATA, ...ALEO_WBTC_REMOTE_ROUTER, ...ALEO_WITHDRAWAL_ACTIVATION }),
|
|
1500
1562
|
route("hyperlane:ethereum/usdt->aleo/usdt", "hyperlane", "mainnet", "ethereum/usdt", "aleo/usdt", "active", "USDT/aleo", { ...USDT_HYPERLANE_METADATA, ...ALEO_MAILBOX_METADATA }),
|
|
1501
|
-
route("hyperlane:aleo/usdt->ethereum/usdt", "hyperlane", "mainnet", "aleo/usdt", "ethereum/usdt", "
|
|
1563
|
+
route("hyperlane:aleo/usdt->ethereum/usdt", "hyperlane", "mainnet", "aleo/usdt", "ethereum/usdt", "active", "USDT/aleo", { ...USDT_HYPERLANE_METADATA, ...aleoHyperlanePlaceholders("hyp_warp_token_usdt_v2.aleo", 1), ...ALEO_USDT_APP_METADATA, ...ALEO_USDT_ETHEREUM_REMOTE_ROUTER, ...ALEO_WITHDRAWAL_ACTIVATION }),
|
|
1502
1564
|
route("hyperlane:solana/sol->aleo/sol", "hyperlane", "mainnet", "solana/sol", "aleo/sol", "metadata-required", "SOL/aleo", ALEO_MAILBOX_METADATA),
|
|
1503
|
-
route("hyperlane:aleo/sol->solana/sol", "hyperlane", "mainnet", "aleo/sol", "solana/sol", "
|
|
1565
|
+
route("hyperlane:aleo/sol->solana/sol", "hyperlane", "mainnet", "aleo/sol", "solana/sol", "active", "SOL/aleo", { ...aleoHyperlanePlaceholders("hyp_warp_token_sol_v2.aleo", 1399811149), ...ALEO_SOL_APP_METADATA, ...ALEO_SOL_REMOTE_ROUTER, ...ALEO_WITHDRAWAL_ACTIVATION }),
|
|
1504
1566
|
...pair("hyperlane", "mainnet", "aleo/aleo", "ethereum/aleo", "metadata-required", "ALEO/aleo", ALEO_MAILBOX_METADATA),
|
|
1505
1567
|
...pair("hyperlane", "mainnet", "aleo/aleo", "solana/aleo", "metadata-required", "ALEO/aleo", ALEO_MAILBOX_METADATA),
|
|
1506
1568
|
...pair("hyperlane", "mainnet", "aleo/aleo", "base/aleo", "metadata-required", "ALEO/aleo", ALEO_MAILBOX_METADATA),
|
|
@@ -1509,7 +1571,7 @@ var routes = [
|
|
|
1509
1571
|
route("hyperlane:aleo/usad->ethereum/usad", "hyperlane", "mainnet", "aleo/usad", "ethereum/usad", "metadata-required", "USAD/aleo", aleoHyperlanePlaceholders("hyp_warp_token_usad_v2.aleo", 1))
|
|
1510
1572
|
];
|
|
1511
1573
|
var DEFAULT_BRIDGE_REGISTRY = Object.freeze({
|
|
1512
|
-
version: "2026-08-
|
|
1574
|
+
version: "2026-08-26.aleo-withdrawals.1",
|
|
1513
1575
|
chains: Object.freeze(chains),
|
|
1514
1576
|
assets: Object.freeze(assets),
|
|
1515
1577
|
routes: Object.freeze(routes),
|
|
@@ -1582,6 +1644,7 @@ function createBridgeClient(config = {}) {
|
|
|
1582
1644
|
registry = DEFAULT_BRIDGE_REGISTRY,
|
|
1583
1645
|
executors = {},
|
|
1584
1646
|
xReserveHttpTransport,
|
|
1647
|
+
aleoPublicClient,
|
|
1585
1648
|
key = "bridge",
|
|
1586
1649
|
name = "Bridge Client"
|
|
1587
1650
|
} = config;
|
|
@@ -1590,7 +1653,7 @@ function createBridgeClient(config = {}) {
|
|
|
1590
1653
|
return client.extend((inner) => ({
|
|
1591
1654
|
environment,
|
|
1592
1655
|
registry: validated,
|
|
1593
|
-
...bridgeActions(inner, { environment, registry: validated, executors, xReserveHttpTransport })
|
|
1656
|
+
...bridgeActions(inner, { environment, registry: validated, executors, xReserveHttpTransport, aleoPublicClient })
|
|
1594
1657
|
}));
|
|
1595
1658
|
}
|
|
1596
1659
|
export {
|
|
@@ -1618,6 +1681,7 @@ export {
|
|
|
1618
1681
|
getXReserveAttestation,
|
|
1619
1682
|
parseDecimalAmount,
|
|
1620
1683
|
prepareTransfer,
|
|
1684
|
+
quoteAleoHyperlaneGasPayment,
|
|
1621
1685
|
quoteEvmHyperlaneTransfer,
|
|
1622
1686
|
quoteEvmXReserveTransfer,
|
|
1623
1687
|
solanaAddressToAleoHyperlaneRecipient,
|