damm-sdk 1.4.18 → 1.4.21

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 (48) hide show
  1. package/dist/index.cjs +689 -46
  2. package/dist/index.cjs.map +18 -3
  3. package/dist/index.js +47397 -40297
  4. package/dist/index.js.map +134 -72
  5. package/dist/integrations/ccip/ccip.router.abi.d.ts +85 -0
  6. package/dist/integrations/ccip/ccip.router.abi.d.ts.map +1 -0
  7. package/dist/integrations/ccip/ccip.router.d.ts +72 -0
  8. package/dist/integrations/ccip/ccip.router.d.ts.map +1 -0
  9. package/dist/integrations/ccip/index.d.ts +3 -0
  10. package/dist/integrations/ccip/index.d.ts.map +1 -0
  11. package/dist/integrations/index.d.ts +2 -0
  12. package/dist/integrations/index.d.ts.map +1 -1
  13. package/dist/integrations/wormhole/axelar.gmp.api.d.ts +47 -0
  14. package/dist/integrations/wormhole/axelar.gmp.api.d.ts.map +1 -0
  15. package/dist/integrations/wormhole/executor.quote.api.d.ts +100 -0
  16. package/dist/integrations/wormhole/executor.quote.api.d.ts.map +1 -0
  17. package/dist/integrations/wormhole/gmp.manager.abi.d.ts +32 -0
  18. package/dist/integrations/wormhole/gmp.manager.abi.d.ts.map +1 -0
  19. package/dist/integrations/wormhole/gmp.manager.d.ts +65 -0
  20. package/dist/integrations/wormhole/gmp.manager.d.ts.map +1 -0
  21. package/dist/integrations/wormhole/index.d.ts +10 -0
  22. package/dist/integrations/wormhole/index.d.ts.map +1 -0
  23. package/dist/integrations/wormhole/wormhole.multi.ntt.abi.d.ts +101 -0
  24. package/dist/integrations/wormhole/wormhole.multi.ntt.abi.d.ts.map +1 -0
  25. package/dist/integrations/wormhole/wormhole.multi.ntt.d.ts +149 -0
  26. package/dist/integrations/wormhole/wormhole.multi.ntt.d.ts.map +1 -0
  27. package/dist/integrations/wormhole/wormhole.scan.api.d.ts +56 -0
  28. package/dist/integrations/wormhole/wormhole.scan.api.d.ts.map +1 -0
  29. package/dist/integrations/wormhole/wormhole.transceiver.abi.d.ts +23 -0
  30. package/dist/integrations/wormhole/wormhole.transceiver.abi.d.ts.map +1 -0
  31. package/dist/integrations/wormhole/wormhole.transceiver.d.ts +28 -0
  32. package/dist/integrations/wormhole/wormhole.transceiver.d.ts.map +1 -0
  33. package/package.json +3 -2
  34. package/src/integrations/ccip/ccip.router.abi.ts +62 -0
  35. package/src/integrations/ccip/ccip.router.ts +172 -0
  36. package/src/integrations/ccip/index.ts +19 -0
  37. package/src/integrations/index.ts +2 -0
  38. package/src/integrations/wormhole/axelar.gmp.api.ts +85 -0
  39. package/src/integrations/wormhole/executor.quote.api.ts +182 -0
  40. package/src/integrations/wormhole/gmp.manager.abi.ts +26 -0
  41. package/src/integrations/wormhole/gmp.manager.ts +129 -0
  42. package/src/integrations/wormhole/index.ts +68 -0
  43. package/src/integrations/wormhole/wormhole.multi.ntt.abi.ts +68 -0
  44. package/src/integrations/wormhole/wormhole.multi.ntt.ts +259 -0
  45. package/src/integrations/wormhole/wormhole.scan.api.ts +95 -0
  46. package/src/integrations/wormhole/wormhole.transceiver.abi.ts +20 -0
  47. package/src/integrations/wormhole/wormhole.transceiver.ts +46 -0
  48. package/src/lib/contractsRegistry.json +6 -2
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Minimal ABI for Chainlink CCIP Router contract.
3
+ * Only includes functions needed for bridge operations.
4
+ *
5
+ * Full contract: https://etherscan.io/address/0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
6
+ */
7
+ declare const _default: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly name: "destinationChainSelector";
10
+ readonly type: "uint64";
11
+ }, {
12
+ readonly name: "message";
13
+ readonly type: "tuple";
14
+ readonly components: readonly [{
15
+ readonly name: "receiver";
16
+ readonly type: "bytes";
17
+ }, {
18
+ readonly name: "data";
19
+ readonly type: "bytes";
20
+ }, {
21
+ readonly name: "tokenAmounts";
22
+ readonly type: "tuple[]";
23
+ readonly components: readonly [{
24
+ readonly name: "token";
25
+ readonly type: "address";
26
+ }, {
27
+ readonly name: "amount";
28
+ readonly type: "uint256";
29
+ }];
30
+ }, {
31
+ readonly name: "feeToken";
32
+ readonly type: "address";
33
+ }, {
34
+ readonly name: "extraArgs";
35
+ readonly type: "bytes";
36
+ }];
37
+ }];
38
+ readonly name: "ccipSend";
39
+ readonly outputs: readonly [{
40
+ readonly name: "messageId";
41
+ readonly type: "bytes32";
42
+ }];
43
+ readonly stateMutability: "payable";
44
+ readonly type: "function";
45
+ }, {
46
+ readonly inputs: readonly [{
47
+ readonly name: "destinationChainSelector";
48
+ readonly type: "uint64";
49
+ }, {
50
+ readonly name: "message";
51
+ readonly type: "tuple";
52
+ readonly components: readonly [{
53
+ readonly name: "receiver";
54
+ readonly type: "bytes";
55
+ }, {
56
+ readonly name: "data";
57
+ readonly type: "bytes";
58
+ }, {
59
+ readonly name: "tokenAmounts";
60
+ readonly type: "tuple[]";
61
+ readonly components: readonly [{
62
+ readonly name: "token";
63
+ readonly type: "address";
64
+ }, {
65
+ readonly name: "amount";
66
+ readonly type: "uint256";
67
+ }];
68
+ }, {
69
+ readonly name: "feeToken";
70
+ readonly type: "address";
71
+ }, {
72
+ readonly name: "extraArgs";
73
+ readonly type: "bytes";
74
+ }];
75
+ }];
76
+ readonly name: "getFee";
77
+ readonly outputs: readonly [{
78
+ readonly name: "fee";
79
+ readonly type: "uint256";
80
+ }];
81
+ readonly stateMutability: "view";
82
+ readonly type: "function";
83
+ }];
84
+ export default _default;
85
+ //# sourceMappingURL=ccip.router.abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccip.router.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/ccip/ccip.router.abi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAuDW"}
@@ -0,0 +1,72 @@
1
+ import type { Call, HexString, Unwrapable } from "../../types";
2
+ import type { Address } from "viem";
3
+ /**
4
+ * CCIP chain selectors (uint64).
5
+ * Source: https://docs.chain.link/ccip/directory/mainnet
6
+ * Verified on-chain 2026-04-13 via typeAndVersion() on each Router.
7
+ */
8
+ export declare const CCIP_CHAIN_SELECTORS: Readonly<Record<number, string>>;
9
+ /**
10
+ * Get the CCIP chain selector for a given chain ID.
11
+ * @throws if the chain is not supported
12
+ */
13
+ export declare const getCCIPChainSelector: (chainId: number) => string;
14
+ export type CCIPTokenAmount = Readonly<{
15
+ token: Address;
16
+ amount: bigint;
17
+ }>;
18
+ export type EVM2AnyMessage = Readonly<{
19
+ /** abi.encode(destinationAddress) */
20
+ receiver: HexString;
21
+ /** Empty (0x) for token-only transfers */
22
+ data: HexString;
23
+ /** Tokens to bridge */
24
+ tokenAmounts: readonly CCIPTokenAmount[];
25
+ /** address(0) = pay fee in native ETH/MON */
26
+ feeToken: Address;
27
+ /** Extra args (0x for defaults) */
28
+ extraArgs: HexString;
29
+ }>;
30
+ export type GetFeeArgs = Readonly<{
31
+ destinationChainSelector: string;
32
+ message: EVM2AnyMessage;
33
+ }>;
34
+ /**
35
+ * Encode calldata for Router.getFee(destinationChainSelector, message).
36
+ * Use this to quote the CCIP fee via an RPC call.
37
+ */
38
+ export declare const CCIPGetFeeCalldata: (args: GetFeeArgs) => HexString;
39
+ /**
40
+ * Build a Call for Router.getFee (read-only, value=0).
41
+ */
42
+ export declare const CCIPGetFeeTrx: ({ routerAddress, args, }: {
43
+ routerAddress: Address;
44
+ args: GetFeeArgs;
45
+ }) => Unwrapable<Call>;
46
+ export type CCIPSendArgs = Readonly<{
47
+ destinationChainSelector: string;
48
+ message: EVM2AnyMessage;
49
+ /** Native fee (from getFee). The Router does NOT refund excess. */
50
+ nativeFee: bigint;
51
+ }>;
52
+ /**
53
+ * Encode calldata for Router.ccipSend(destinationChainSelector, message).
54
+ */
55
+ export declare const CCIPSendCalldata: (args: CCIPSendArgs) => HexString;
56
+ /**
57
+ * Build a Call for Router.ccipSend with msg.value = nativeFee.
58
+ */
59
+ export declare const ccipSendTrx: ({ routerAddress, args, }: {
60
+ routerAddress: Address;
61
+ args: CCIPSendArgs;
62
+ }) => Unwrapable<Call>;
63
+ /**
64
+ * Build a standard EVM2AnyMessage for bridging a single token.
65
+ * Receiver = abi.encode(destinationAddress), feeToken = address(0) (native).
66
+ */
67
+ export declare const buildCCIPMessage: ({ receiver, token, amount, }: {
68
+ receiver: Address;
69
+ token: Address;
70
+ amount: bigint;
71
+ }) => EVM2AnyMessage;
72
+ //# sourceMappingURL=ccip.router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccip.router.d.ts","sourceRoot":"","sources":["../../../src/integrations/ccip/ccip.router.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQhE,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAMtD,CAAC;AAIF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IAClC,qCAAqC;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB,0CAA0C;IAC1C,IAAI,EAAE,SAAS,CAAC;IAChB,uBAAuB;IACvB,YAAY,EAAE,SAAS,eAAe,EAAE,CAAC;IACzC,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,SAAS,EAAE,SAAS,CAAC;CACxB,CAAC,CAAC;AAIH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAC9B,wBAAwB,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,cAAc,CAAC;CAC3B,CAAC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,SAAU,UAAU,KAAG,SAcrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;mBAIP,OAAO;UAChB,UAAU;MAChB,WAAW,IAAI,CAOlB,CAAC;AAIF,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,cAAc,CAAC;IACxB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,SAcrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;mBAIL,OAAO;UAChB,YAAY;MAClB,WAAW,IAAI,CAOlB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;cAKf,OAAO;WACV,OAAO;YACN,MAAM;MACd,cAWH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as CCIPRouterAbi } from "./ccip.router.abi";
2
+ export { CCIP_CHAIN_SELECTORS, getCCIPChainSelector, CCIPGetFeeCalldata, CCIPGetFeeTrx, CCIPSendCalldata, ccipSendTrx, buildCCIPMessage, type CCIPTokenAmount, type EVM2AnyMessage, type GetFeeArgs, type CCIPSendArgs, } from "./ccip.router";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/ccip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAEH,oBAAoB,EACpB,oBAAoB,EAEpB,kBAAkB,EAClB,aAAa,EAEb,gBAAgB,EAChB,WAAW,EAEX,gBAAgB,EAEhB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,GACpB,MAAM,eAAe,CAAC"}
@@ -13,6 +13,7 @@ export * from "./slipstream";
13
13
  export * from "./morphoVault";
14
14
  export * from "./merkl";
15
15
  export * from "./oft";
16
+ export * from "./ccip";
16
17
  export * from "./cctp";
17
18
  export * from "./erc721";
18
19
  export * from "./iporFusion";
@@ -22,4 +23,5 @@ export * from "./gearbox";
22
23
  export * from "./fluidLite";
23
24
  export * from "./weth";
24
25
  export * from "./pendle";
26
+ export * from "./wormhole";
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Client for the Axelar GMP status API — used to track the Axelar side of
3
+ * Monad's 2/2 transceiver stack (Wormhole + Axelar).
4
+ *
5
+ * Axelar's relay network is independent of Wormhole's Executor: if the
6
+ * Executor aborts (e.g. gas-quote rejection), Axelar may still deliver on
7
+ * its own. Checking Axelar status helps decide how to recover.
8
+ *
9
+ * API reference: https://docs.axelarscan.io/gmp
10
+ */
11
+ import type { HexString } from "../../types";
12
+ export declare const AXELAR_GMP_API_MAINNET: "https://api.axelarscan.io";
13
+ export declare const AXELAR_GMP_API_TESTNET: "https://testnet.api.axelarscan.io";
14
+ export type AxelarNetwork = "Mainnet" | "Testnet";
15
+ export declare const getAxelarGmpApiUrl: (network?: AxelarNetwork) => string;
16
+ /**
17
+ * Simplified status returned by Axelar's GMP API.
18
+ * See {@link https://docs.axelarscan.io/gmp} for the full shape — this helper
19
+ * surfaces just the status flags most useful for recovery decisions.
20
+ */
21
+ export type AxelarGmpStatus = Readonly<{
22
+ /** Raw Axelar status — common values: "called", "confirming", "approved", "executed", "error". */
23
+ status: string;
24
+ /** Higher-level status — "received" when the message landed on the destination. */
25
+ simplifiedStatus?: string;
26
+ /** Did the destination-side execution succeed? */
27
+ executed: boolean;
28
+ /** Was the payload approved by Axelar validators? */
29
+ approved: boolean;
30
+ /** Destination-chain tx hash (if executed). */
31
+ destinationTxHash?: HexString;
32
+ /** Destination-chain block number (if executed). */
33
+ destinationBlockNumber?: number;
34
+ /** Underlying raw object — inspect for fields not surfaced above. */
35
+ raw: unknown;
36
+ }>;
37
+ /**
38
+ * Fetch the Axelar GMP status for a source-chain transaction that triggered
39
+ * an Axelar message (e.g. the Monad-side `MultiNTTWithExecutor.transfer`
40
+ * invocation).
41
+ *
42
+ * Returns `null` if Axelar has not yet indexed the transaction.
43
+ */
44
+ export declare const fetchAxelarGmpStatus: ({ sourceTxHash }: {
45
+ sourceTxHash: HexString;
46
+ }, network?: AxelarNetwork) => Promise<AxelarGmpStatus | null>;
47
+ //# sourceMappingURL=axelar.gmp.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axelar.gmp.api.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/axelar.gmp.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,sBAAsB,6BAAuC,CAAC;AAC3E,eAAO,MAAM,sBAAsB,qCAA+C,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,eAAO,MAAM,kBAAkB,aAAa,aAAa,KAAe,MACG,CAAC;AAI5E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,oDAAoD;IACpD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qEAAqE;IACrE,GAAG,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;kBACK,SAAS;aAClC,aAAa,KACvB,QAAQ,eAAe,GAAG,IAAI,CA6BhC,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Client for the Wormhole Executor quote API.
3
+ *
4
+ * The executor framework is a permissionless off-chain relay network that
5
+ * delivers cross-chain messages signed by Wormhole guardians. Integrators
6
+ * fetch a signed quote from a relay provider before calling any `*WithExecutor`
7
+ * wrapper contract — the quote binds the cost of relaying on the destination
8
+ * chain, and the wrapper verifies the signature on-chain.
9
+ *
10
+ * Endpoints:
11
+ * - Mainnet: https://executor.labsapis.com
12
+ * - Testnet: https://executor-testnet.labsapis.com
13
+ *
14
+ * API reference: https://github.com/wormholelabs-xyz/example-messaging-executor
15
+ */
16
+ import type { HexString } from "../../types";
17
+ export declare const WORMHOLE_EXECUTOR_API_MAINNET: "https://executor.labsapis.com";
18
+ export declare const WORMHOLE_EXECUTOR_API_TESTNET: "https://executor-testnet.labsapis.com";
19
+ export type WormholeNetwork = "Mainnet" | "Testnet";
20
+ export declare const getExecutorApiUrl: (network?: WormholeNetwork) => string;
21
+ export type FetchQuoteArgs = Readonly<{
22
+ /** Source Wormhole chain ID (e.g. 2 for Ethereum). */
23
+ srcChain: number;
24
+ /** Destination Wormhole chain ID (e.g. 48 for Monad). */
25
+ dstChain: number;
26
+ /**
27
+ * Serialized relay instructions (version 0x01 + uint128 gasLimit +
28
+ * uint128 msgValue). Build via `buildRelayInstructions` in the NTT helpers.
29
+ */
30
+ relayInstructions: HexString;
31
+ }>;
32
+ export type QuoteResponse = Readonly<{
33
+ /** Signed quote bytes — pass verbatim as `executorArgs.signedQuote`. */
34
+ signedQuote: HexString;
35
+ /** Estimated relay cost in wei (as a decimal string). */
36
+ estimatedCost?: string;
37
+ }>;
38
+ /**
39
+ * Fetch a signed executor quote.
40
+ *
41
+ * @example
42
+ * const quote = await fetchExecutorQuote({
43
+ * srcChain: 2,
44
+ * dstChain: 48,
45
+ * relayInstructions: buildRelayInstructions({ gasLimit: 250000n, msgValue: 0n }),
46
+ * });
47
+ * const relayFee = BigInt(quote.estimatedCost!);
48
+ */
49
+ export declare const fetchExecutorQuote: (args: FetchQuoteArgs, network?: WormholeNetwork) => Promise<QuoteResponse>;
50
+ /**
51
+ * A decoded EQ01 signed quote.
52
+ *
53
+ * Layout (165 bytes total):
54
+ * [0-4) prefix "EQ01"
55
+ * [4-24) quoterAddress (20 bytes)
56
+ * [24-56) payeeAddress (32 bytes)
57
+ * [56-58) srcChain (uint16 BE)
58
+ * [58-60) dstChain (uint16 BE)
59
+ * [60-68) expiryTime (uint64 BE) — unix seconds
60
+ * [68-76) baseFee (uint64 BE)
61
+ * [76-84) dstGasPrice (uint64 BE)
62
+ * [84-92) srcPrice (uint64 BE)
63
+ * [92-100) dstPrice (uint64 BE)
64
+ * [100-165) signature (65 bytes)
65
+ */
66
+ export type ParsedSignedQuote = Readonly<{
67
+ prefix: "EQ01";
68
+ quoterAddress: HexString;
69
+ payeeAddress: HexString;
70
+ srcChain: number;
71
+ dstChain: number;
72
+ expiryTimeSeconds: bigint;
73
+ baseFee: bigint;
74
+ dstGasPrice: bigint;
75
+ srcPrice: bigint;
76
+ dstPrice: bigint;
77
+ }>;
78
+ /**
79
+ * Parse an EQ01 signed quote.
80
+ * @throws if the prefix is not "EQ01" or the byte length is wrong.
81
+ */
82
+ export declare const parseSignedQuote: (signedQuote: HexString) => ParsedSignedQuote;
83
+ export type StatusResponse = Readonly<{
84
+ txHash: HexString;
85
+ chainId: number;
86
+ status: string;
87
+ blockNumber?: string;
88
+ blockTime?: string;
89
+ [k: string]: unknown;
90
+ }>;
91
+ /**
92
+ * Fetch the executor's view of a source-chain transaction.
93
+ * Returns an array with one entry per relay attempt.
94
+ */
95
+ export declare const fetchExecutorTxStatus: ({ txHash, chainId, }: {
96
+ txHash: HexString;
97
+ /** Wormhole chain ID of the source chain. */
98
+ chainId: number;
99
+ }, network?: WormholeNetwork) => Promise<readonly StatusResponse[]>;
100
+ //# sourceMappingURL=executor.quote.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.quote.api.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/executor.quote.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,6BAA6B,iCAA2C,CAAC;AACtF,eAAO,MAAM,6BAA6B,yCAAmD,CAAC;AAE9F,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpD,eAAO,MAAM,iBAAiB,aAAa,eAAe,KAAe,MACgB,CAAC;AAI1F,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IAClC,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,iBAAiB,EAAE,SAAS,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACjC,wEAAwE;IACxE,WAAW,EAAE,SAAS,CAAC;IACvB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,SACrB,cAAc,YACX,eAAe,KACzB,QAAQ,aAAa,CAmBvB,CAAC;AAIF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,SAAS,CAAC;IACzB,YAAY,EAAE,SAAS,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gBAAiB,SAAS,KAAG,iBAqBzD,CAAC;AAIF,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IAClC,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;YAKlB,SAAS;IACjB,6CAA6C;aACpC,MAAM;aAEV,eAAe,KACzB,QAAQ,SAAS,cAAc,EAAE,CAenC,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Minimal ABI for Wormhole `GmpManager` — the contract that orchestrates
3
+ * transceivers (Wormhole + any additional providers like Axelar) for
4
+ * `MultiTokenNTT` deployments.
5
+ *
6
+ * Mainnet: 0xc6793a32761a11e96c97A3D18fC6545ea931F0E9
7
+ * Monad: 0x92957b3D0CaB3eA7110fEd1ccc4eF564981a59Fc
8
+ *
9
+ * Only the view function we need: `quoteDeliveryPrice` returns per-transceiver
10
+ * delivery prices and the total (in wei of the source chain's native token).
11
+ */
12
+ declare const _default: readonly [{
13
+ readonly inputs: readonly [{
14
+ readonly name: "recipientChain";
15
+ readonly type: "uint16";
16
+ }, {
17
+ readonly name: "transceiverInstructions";
18
+ readonly type: "bytes";
19
+ }];
20
+ readonly name: "quoteDeliveryPrice";
21
+ readonly outputs: readonly [{
22
+ readonly name: "";
23
+ readonly type: "uint256[]";
24
+ }, {
25
+ readonly name: "";
26
+ readonly type: "uint256";
27
+ }];
28
+ readonly stateMutability: "view";
29
+ readonly type: "function";
30
+ }];
31
+ export default _default;
32
+ //# sourceMappingURL=gmp.manager.abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmp.manager.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/gmp.manager.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;AACH,wBAcW"}
@@ -0,0 +1,65 @@
1
+ import type { Address } from "viem";
2
+ import type { Call, HexString, Unwrapable } from "../../types";
3
+ export type QuoteDeliveryPriceArgs = Readonly<{
4
+ /** Destination Wormhole chain ID. */
5
+ recipientChain: number;
6
+ /**
7
+ * Serialized transceiver instructions. The GmpManager decodes these to
8
+ * know which transceivers will be used and what fee caps apply.
9
+ * For Wormhole-only deployments pass `"0x00"` (0 instructions).
10
+ * For Monad's 2/2 (Wormhole + Axelar) pass an Axelar-instruction-carrying
11
+ * buffer (see `buildMonadDefaultTransceiverInstructions`).
12
+ */
13
+ transceiverInstructions: HexString;
14
+ }>;
15
+ /**
16
+ * Encode calldata for the view function
17
+ * `GmpManager.quoteDeliveryPrice(recipientChain, transceiverInstructions)`.
18
+ *
19
+ * Use this to query per-transceiver delivery fees + total via RPC.
20
+ */
21
+ export declare const GmpManagerQuoteDeliveryPriceCalldata: (args: QuoteDeliveryPriceArgs) => HexString;
22
+ /**
23
+ * Build a Call for `GmpManager.quoteDeliveryPrice` (view, value=0).
24
+ */
25
+ export declare const GmpManagerQuoteDeliveryPriceTrx: ({ gmpManagerAddress, args, }: {
26
+ gmpManagerAddress: Address;
27
+ args: QuoteDeliveryPriceArgs;
28
+ }) => Unwrapable<Call>;
29
+ /**
30
+ * Decode the return data from a `quoteDeliveryPrice` eth_call.
31
+ *
32
+ * @returns tuple of (per-transceiver fees in wei, total fee in wei).
33
+ */
34
+ export declare const decodeQuoteDeliveryPriceResult: (resultHex: HexString) => {
35
+ readonly perTransceiver: readonly bigint[];
36
+ readonly total: bigint;
37
+ };
38
+ /**
39
+ * Encode a list of Wormhole NTT transceiver instructions.
40
+ *
41
+ * Output format: `uint8 numInstructions || concat(encodedInstructions)`.
42
+ */
43
+ export declare const encodeTransceiverInstructions: (instructions: readonly Readonly<{
44
+ index: number;
45
+ payload: HexString;
46
+ }>[]) => HexString;
47
+ /**
48
+ * Build transceiver instructions for Monad's MultiTokenNTT deployment.
49
+ *
50
+ * Monad uses a 2-of-2 transceiver stack:
51
+ * - index 0: Wormhole guardians (1-byte enable flag payload)
52
+ * - index 1: Axelar GMP (32-byte uint256 max-fee payload in native token wei)
53
+ *
54
+ * The Axelar max-fee acts as the upper bound the caller is willing to pay
55
+ * for Axelar's side of the relay — the GmpManager will revert with
56
+ * `DeliveryPaymentTooLow` if the current quote exceeds this cap.
57
+ *
58
+ * Set `axelarMaxFee` generously (e.g. 50e18 wei on Monad → Mainnet) to
59
+ * tolerate gas-price spikes between quote time and execution time.
60
+ */
61
+ export declare const buildMonadDefaultTransceiverInstructions: ({ axelarMaxFee, }: {
62
+ /** Max Axelar fee in wei of the source chain's native token. */
63
+ axelarMaxFee: bigint;
64
+ }) => HexString;
65
+ //# sourceMappingURL=gmp.manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmp.manager.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/gmp.manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO/D,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC1C,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,uBAAuB,EAAE,SAAS,CAAC;CACtC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,SAAU,sBAAsB,KAAG,SAKnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B;uBAIrB,OAAO;UACpB,sBAAsB;MAC5B,WAAW,IAAI,CAOlB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,cAC5B,SAAS;6BACM,SAAS,MAAM,EAAE;oBAAkB,MAAM;CAKtE,CAAC;AAoBF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,iBACxB,SAAS,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC,EAAE,KACzE,SAOF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wCAAwC;IAGjD,gEAAgE;kBAClD,MAAM;MACpB,SAMH,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { default as WormholeMultiNttAbi } from "./wormhole.multi.ntt.abi";
2
+ export { default as WormholeGmpManagerAbi } from "./gmp.manager.abi";
3
+ export { default as WormholeTransceiverAbi } from "./wormhole.transceiver.abi";
4
+ export { GmpManagerQuoteDeliveryPriceCalldata, GmpManagerQuoteDeliveryPriceTrx, decodeQuoteDeliveryPriceResult, encodeTransceiverInstructions, buildMonadDefaultTransceiverInstructions, type QuoteDeliveryPriceArgs, } from "./gmp.manager";
5
+ export { WormholeReceiveMessageCalldata, wormholeReceiveMessageTrx } from "./wormhole.transceiver";
6
+ export { WORMHOLESCAN_API_MAINNET, WORMHOLESCAN_API_TESTNET, getWormholeScanApiUrl, fetchWormholeVAA, decodeVaaBase64, normalizeEmitterForVaaLookup, type WormholeNetworkEnv, type VaaLookupArgs, type VaaLookupResponse, } from "./wormhole.scan.api";
7
+ export { AXELAR_GMP_API_MAINNET, AXELAR_GMP_API_TESTNET, getAxelarGmpApiUrl, fetchAxelarGmpStatus, type AxelarNetwork, type AxelarGmpStatus, } from "./axelar.gmp.api";
8
+ export { WORMHOLE_CHAIN_IDS, getWormholeChainId, addressToBytes32, buildRelayInstructions, DEFAULT_NTT_REDEMPTION_GAS_LIMIT, WormholeTransferCalldata, wormholeTransferTrx, WormholeCalculateFeeCalldata, buildWormholeTransferArgsFromAvatar, type ExecutorArgs, type FeeArgs, type WormholeTransferArgs, } from "./wormhole.multi.ntt";
9
+ export { WORMHOLE_EXECUTOR_API_MAINNET, WORMHOLE_EXECUTOR_API_TESTNET, getExecutorApiUrl, fetchExecutorQuote, fetchExecutorTxStatus, parseSignedQuote, type WormholeNetwork, type FetchQuoteArgs, type QuoteResponse, type ParsedSignedQuote, type StatusResponse, } from "./executor.quote.api";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EACH,oCAAoC,EACpC,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,wCAAwC,EACxC,KAAK,sBAAsB,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EACH,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEH,kBAAkB,EAClB,kBAAkB,EAElB,gBAAgB,EAEhB,sBAAsB,EACtB,gCAAgC,EAEhC,wBAAwB,EACxB,mBAAmB,EAEnB,4BAA4B,EAE5B,mCAAmC,EAEnC,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,oBAAoB,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEH,6BAA6B,EAC7B,6BAA6B,EAC7B,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EAErB,gBAAgB,EAEhB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACtB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Minimal ABI for Wormhole `MultiNTTWithExecutor` — the wrapper that bundles
3
+ * `MultiTokenNTT.transfer(...)` with automatic Executor-based relay.
4
+ *
5
+ * Mainnet: 0x03dB430D830601DB368991eE55DAa9A708df7912
6
+ * Monad: 0xFEA937F7124E19124671f1685671d3f04a9Af4E4
7
+ *
8
+ * Only the functions we actually call: transfer, calculateFee, executor, chainId.
9
+ */
10
+ declare const _default: readonly [{
11
+ readonly inputs: readonly [{
12
+ readonly name: "multiTokenNtt";
13
+ readonly type: "address";
14
+ }, {
15
+ readonly name: "token";
16
+ readonly type: "address";
17
+ }, {
18
+ readonly name: "amount";
19
+ readonly type: "uint256";
20
+ }, {
21
+ readonly name: "recipientChain";
22
+ readonly type: "uint16";
23
+ }, {
24
+ readonly name: "recipient";
25
+ readonly type: "bytes32";
26
+ }, {
27
+ readonly name: "refundAddress";
28
+ readonly type: "bytes32";
29
+ }, {
30
+ readonly name: "transceiverInstructions";
31
+ readonly type: "bytes";
32
+ }, {
33
+ readonly name: "executorArgs";
34
+ readonly type: "tuple";
35
+ readonly components: readonly [{
36
+ readonly name: "value";
37
+ readonly type: "uint256";
38
+ }, {
39
+ readonly name: "refundAddress";
40
+ readonly type: "address";
41
+ }, {
42
+ readonly name: "signedQuote";
43
+ readonly type: "bytes";
44
+ }, {
45
+ readonly name: "instructions";
46
+ readonly type: "bytes";
47
+ }];
48
+ }, {
49
+ readonly name: "feeArgs";
50
+ readonly type: "tuple";
51
+ readonly components: readonly [{
52
+ readonly name: "dbps";
53
+ readonly type: "uint16";
54
+ }, {
55
+ readonly name: "payee";
56
+ readonly type: "address";
57
+ }];
58
+ }];
59
+ readonly name: "transfer";
60
+ readonly outputs: readonly [{
61
+ readonly name: "sequence";
62
+ readonly type: "uint64";
63
+ }];
64
+ readonly stateMutability: "payable";
65
+ readonly type: "function";
66
+ }, {
67
+ readonly inputs: readonly [{
68
+ readonly name: "amount";
69
+ readonly type: "uint256";
70
+ }, {
71
+ readonly name: "dbps";
72
+ readonly type: "uint16";
73
+ }];
74
+ readonly name: "calculateFee";
75
+ readonly outputs: readonly [{
76
+ readonly name: "";
77
+ readonly type: "uint256";
78
+ }];
79
+ readonly stateMutability: "view";
80
+ readonly type: "function";
81
+ }, {
82
+ readonly inputs: readonly [];
83
+ readonly name: "executor";
84
+ readonly outputs: readonly [{
85
+ readonly name: "";
86
+ readonly type: "address";
87
+ }];
88
+ readonly stateMutability: "view";
89
+ readonly type: "function";
90
+ }, {
91
+ readonly inputs: readonly [];
92
+ readonly name: "chainId";
93
+ readonly outputs: readonly [{
94
+ readonly name: "";
95
+ readonly type: "uint16";
96
+ }];
97
+ readonly stateMutability: "view";
98
+ readonly type: "function";
99
+ }];
100
+ export default _default;
101
+ //# sourceMappingURL=wormhole.multi.ntt.abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wormhole.multi.ntt.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/wormhole/wormhole.multi.ntt.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBA0DW"}