@aptos-labs/cross-chain-core 5.8.2 → 6.0.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.
- package/README.md +26 -0
- package/dist/CrossChainCore.d.ts +95 -0
- package/dist/CrossChainCore.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +908 -404
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +914 -409
- package/dist/index.mjs.map +1 -1
- package/dist/providers/wormhole/index.d.ts +2 -0
- package/dist/providers/wormhole/index.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/AptosLocalSigner.d.ts +9 -7
- package/dist/providers/wormhole/signers/AptosLocalSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/AptosSigner.d.ts +2 -1
- package/dist/providers/wormhole/signers/AptosSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/EthereumSigner.d.ts +1 -1
- package/dist/providers/wormhole/signers/EthereumSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/Signer.d.ts +11 -3
- package/dist/providers/wormhole/signers/Signer.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/SolanaLocalSigner.d.ts +69 -0
- package/dist/providers/wormhole/signers/SolanaLocalSigner.d.ts.map +1 -0
- package/dist/providers/wormhole/signers/SolanaSigner.d.ts +12 -20
- package/dist/providers/wormhole/signers/SolanaSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/solanaUtils.d.ts +68 -0
- package/dist/providers/wormhole/signers/solanaUtils.d.ts.map +1 -0
- package/dist/providers/wormhole/types.d.ts +120 -0
- package/dist/providers/wormhole/types.d.ts.map +1 -1
- package/dist/providers/wormhole/utils.d.ts +26 -0
- package/dist/providers/wormhole/utils.d.ts.map +1 -0
- package/dist/providers/wormhole/wormhole.d.ts +62 -6
- package/dist/providers/wormhole/wormhole.d.ts.map +1 -1
- package/dist/utils/receiptSerialization.d.ts +38 -0
- package/dist/utils/receiptSerialization.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/CrossChainCore.ts +110 -3
- package/src/config/mainnet/chains.ts +2 -2
- package/src/config/testnet/chains.ts +2 -2
- package/src/index.ts +1 -0
- package/src/providers/wormhole/index.ts +2 -0
- package/src/providers/wormhole/signers/AptosLocalSigner.ts +31 -18
- package/src/providers/wormhole/signers/AptosSigner.ts +11 -2
- package/src/providers/wormhole/signers/EthereumSigner.ts +59 -8
- package/src/providers/wormhole/signers/Signer.ts +23 -6
- package/src/providers/wormhole/signers/SolanaLocalSigner.ts +250 -0
- package/src/providers/wormhole/signers/SolanaSigner.ts +49 -338
- package/src/providers/wormhole/signers/solanaUtils.ts +446 -0
- package/src/providers/wormhole/types.ts +167 -0
- package/src/providers/wormhole/utils.ts +72 -0
- package/src/providers/wormhole/wormhole.ts +309 -137
- package/src/utils/receiptSerialization.ts +141 -0
- package/src/version.ts +1 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Account } from "@aptos-labs/ts-sdk";
|
|
2
2
|
import { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
3
|
import { AptosChains } from "@wormhole-foundation/sdk-aptos";
|
|
4
|
-
import {
|
|
4
|
+
import { OnTransactionSigned } from "../types";
|
|
5
|
+
import { CrossChainCore } from "../../../CrossChainCore";
|
|
5
6
|
export declare class AptosLocalSigner<N extends Network, C extends Chain> implements SignAndSendSigner<N, C> {
|
|
6
7
|
_chain: C;
|
|
7
8
|
_options: any;
|
|
8
9
|
_wallet: Account;
|
|
9
|
-
_sponsorAccount: Account |
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
_sponsorAccount: Account | undefined;
|
|
11
|
+
_onTransactionSigned: OnTransactionSigned | undefined;
|
|
12
|
+
_crossChainCore: CrossChainCore;
|
|
13
|
+
_claimedTransactionHashes: string[];
|
|
14
|
+
constructor(chain: C, options: any, wallet: Account, feePayerAccount: Account | undefined, crossChainCore: CrossChainCore, onTransactionSigned?: OnTransactionSigned);
|
|
13
15
|
chain(): C;
|
|
14
16
|
address(): string;
|
|
15
17
|
claimedTransactionHashes(): string;
|
|
16
18
|
signAndSend(txs: UnsignedTransaction<N, C>[]): Promise<TxHash[]>;
|
|
17
19
|
}
|
|
18
|
-
export declare function signAndSendTransaction(request: UnsignedTransaction<Network, AptosChains>, wallet: Account, sponsorAccount: Account |
|
|
20
|
+
export declare function signAndSendTransaction(request: UnsignedTransaction<Network, AptosChains>, wallet: Account, sponsorAccount: Account | undefined, crossChainCore: CrossChainCore): Promise<string>;
|
|
19
21
|
//# sourceMappingURL=AptosLocalSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AptosLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,OAAO,
|
|
1
|
+
{"version":3,"file":"AptosLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,OAAO,EACR,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,WAAW,EACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EAEpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,KAAK,CACf,YAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC;IACV,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;IACrC,oBAAoB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACtD,eAAe,EAAE,cAAc,CAAC;IAChC,yBAAyB,EAAE,MAAM,EAAE,CAAM;gBAEvC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,OAAO,EACf,eAAe,EAAE,OAAO,GAAG,SAAS,EACpC,cAAc,EAAE,cAAc,EAC9B,mBAAmB,CAAC,EAAE,mBAAmB;IAU3C,KAAK,IAAI,CAAC;IAGV,OAAO,IAAI,MAAM;IAIjB,wBAAwB,IAAI,MAAM;IAI5B,WAAW,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAkBvE;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,EAClD,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,OAAO,GAAG,SAAS,EACnC,cAAc,EAAE,cAAc,mBAiE/B"}
|
|
@@ -3,6 +3,7 @@ import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
|
3
3
|
import { Network } from "@wormhole-foundation/sdk";
|
|
4
4
|
import { AptosChains, AptosUnsignedTransaction } from "@wormhole-foundation/sdk-aptos";
|
|
5
5
|
import { GasStationApiKey } from "..";
|
|
6
|
-
|
|
6
|
+
import { CrossChainCore } from "../../../CrossChainCore";
|
|
7
|
+
export declare function signAndSendTransaction(request: AptosUnsignedTransaction<Network, AptosChains>, wallet: AdapterWallet, sponsorAccount: Account | GasStationApiKey | undefined, dappNetwork: AptosNetwork, crossChainCore?: CrossChainCore): Promise<string>;
|
|
7
8
|
export declare function isAccount(obj: Account | GasStationApiKey): obj is Account;
|
|
8
9
|
//# sourceMappingURL=AptosSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AptosSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAMP,OAAO,IAAI,YAAY,EAIxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EACL,WAAW,EACX,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AptosSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAMP,OAAO,IAAI,YAAY,EAIxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EACL,WAAW,EACX,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAA2B,MAAM,IAAI,CAAC;AAG/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,EACvD,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,EACtD,WAAW,EAAE,YAAY,EACzB,cAAc,CAAC,EAAE,cAAc,mBAiHhC;AA0BD,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,GAAG,GAAG,IAAI,OAAO,CAEzE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EvmUnsignedTransaction, EvmChains } from "@wormhole-foundation/sdk-evm";
|
|
2
2
|
import { Network } from "@wormhole-foundation/sdk";
|
|
3
3
|
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
4
|
-
export declare function signAndSendTransaction(request: EvmUnsignedTransaction<Network, EvmChains>, wallet: AdapterWallet, chainName: string
|
|
4
|
+
export declare function signAndSendTransaction(request: EvmUnsignedTransaction<Network, EvmChains>, wallet: AdapterWallet, chainName: string): Promise<string>;
|
|
5
5
|
//# sourceMappingURL=EthereumSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/EthereumSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"EthereumSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/EthereumSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAGhE,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,EACnD,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAsFjB"}
|
|
@@ -2,7 +2,7 @@ import { UnsignedTransaction, Network, Chain, TxHash, SignAndSendSigner } from "
|
|
|
2
2
|
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
3
|
import { ChainConfig } from "../../../config";
|
|
4
4
|
import { CrossChainCore } from "../../../CrossChainCore";
|
|
5
|
-
import { GasStationApiKey } from "../types";
|
|
5
|
+
import { GasStationApiKey, OnTransactionSigned } from "../types";
|
|
6
6
|
import { Account } from "@aptos-labs/ts-sdk";
|
|
7
7
|
export declare class Signer<N extends Network, C extends Chain> implements SignAndSendSigner<N, C> {
|
|
8
8
|
_chain: ChainConfig;
|
|
@@ -11,8 +11,16 @@ export declare class Signer<N extends Network, C extends Chain> implements SignA
|
|
|
11
11
|
_wallet: AdapterWallet;
|
|
12
12
|
_crossChainCore: CrossChainCore;
|
|
13
13
|
_sponsorAccount: Account | GasStationApiKey | undefined;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
_onTransactionSigned: OnTransactionSigned | undefined;
|
|
15
|
+
_claimedTransactionHashes: string[];
|
|
16
|
+
/**
|
|
17
|
+
* When true, signed tx hashes are written to
|
|
18
|
+
* `_crossChainCore._lastSourceChainTxId` as a recovery side-channel.
|
|
19
|
+
* Set to false for destination-chain claim signers so they don't
|
|
20
|
+
* overwrite the source-chain burn hash.
|
|
21
|
+
*/
|
|
22
|
+
_trackAsSourceChain: boolean;
|
|
23
|
+
constructor(chain: ChainConfig, address: string, options: any, wallet: AdapterWallet, crossChainCore: CrossChainCore, sponsorAccount?: Account | GasStationApiKey | undefined, onTransactionSigned?: OnTransactionSigned, trackAsSourceChain?: boolean);
|
|
16
24
|
chain(): C;
|
|
17
25
|
address(): string;
|
|
18
26
|
claimedTransactionHashes(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signer.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/Signer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,OAAO,EACP,KAAK,EACL,MAAM,EACN,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAehE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAE,gBAA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I,MAAM;IAIjB,wBAAwB,IAAI,MAAM;IAI5B,WAAW,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAuBvE;AAED,eAAO,MAAM,sBAAsB,GACjC,OAAO,WAAW,EAClB,SAAS,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,EAC5C,QAAQ,aAAa,EACrB,SAAS,GAAG,YAAK,EACjB,gBAAgB,cAAc,EAC9B,iBAAiB,OAAO,GAAG,gBAAgB,GAAG,SAAS,KACtD,OAAO,CAAC,MAAM,CAwChB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Connection, Keypair, type Commitment } from "@solana/web3.js";
|
|
2
|
+
import { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
|
+
import { PriorityFeeConfig } from "./solanaUtils";
|
|
4
|
+
import { OnTransactionSigned } from "../types";
|
|
5
|
+
export interface SolanaLocalSignerConfig {
|
|
6
|
+
/** The Solana keypair to sign transactions with */
|
|
7
|
+
keypair: Keypair;
|
|
8
|
+
/** The Solana RPC connection */
|
|
9
|
+
connection: Connection;
|
|
10
|
+
/** Transaction confirmation commitment level (default: "finalized") */
|
|
11
|
+
commitment?: Commitment;
|
|
12
|
+
/** Retry interval in ms when transaction is not confirmed (default: 5000) */
|
|
13
|
+
retryIntervalMs?: number;
|
|
14
|
+
/** Priority fee configuration for faster transaction landing */
|
|
15
|
+
priorityFeeConfig?: PriorityFeeConfig;
|
|
16
|
+
/** Enable verbose logging (default: false) */
|
|
17
|
+
verbose?: boolean;
|
|
18
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
19
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Server-side Solana signer for programmatic transaction signing.
|
|
23
|
+
* Use this when you want to sign Solana transactions without user wallet interaction,
|
|
24
|
+
* such as for server-side claim operations.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { SolanaLocalSigner } from "@aptos-labs/cross-chain-core";
|
|
29
|
+
* import { Connection, Keypair } from "@solana/web3.js";
|
|
30
|
+
* import bs58 from "bs58";
|
|
31
|
+
*
|
|
32
|
+
* const keypair = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_CLAIM_SIGNER_KEY));
|
|
33
|
+
* const connection = new Connection("https://api.mainnet-beta.solana.com");
|
|
34
|
+
*
|
|
35
|
+
* const signer = new SolanaLocalSigner({
|
|
36
|
+
* keypair,
|
|
37
|
+
* connection,
|
|
38
|
+
* // Optional: configure priority fees for faster landing
|
|
39
|
+
* priorityFeeConfig: {
|
|
40
|
+
* percentile: 0.9,
|
|
41
|
+
* min: 100_000,
|
|
42
|
+
* max: 1_000_000,
|
|
43
|
+
* },
|
|
44
|
+
* });
|
|
45
|
+
* await cctpRoute.complete(signer, receipt);
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare class SolanaLocalSigner<N extends Network, C extends Chain> implements SignAndSendSigner<N, C> {
|
|
49
|
+
private keypair;
|
|
50
|
+
private connection;
|
|
51
|
+
private commitment;
|
|
52
|
+
private retryIntervalMs;
|
|
53
|
+
private priorityFeeConfig?;
|
|
54
|
+
private verbose;
|
|
55
|
+
private _onTransactionSigned?;
|
|
56
|
+
private _claimedTransactionHashes;
|
|
57
|
+
constructor(config: SolanaLocalSignerConfig);
|
|
58
|
+
chain(): C;
|
|
59
|
+
address(): string;
|
|
60
|
+
/**
|
|
61
|
+
* Returns all transaction hashes from the most recent signAndSend call,
|
|
62
|
+
* joined by comma. If only one transaction was signed, returns a single hash string.
|
|
63
|
+
*/
|
|
64
|
+
claimedTransactionHashes(): string;
|
|
65
|
+
signAndSend(txs: UnsignedTransaction<N, C>[]): Promise<TxHash[]>;
|
|
66
|
+
private signAndSendTransaction;
|
|
67
|
+
}
|
|
68
|
+
export type { PriorityFeeConfig };
|
|
69
|
+
//# sourceMappingURL=SolanaLocalSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EAEP,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,iBAAiB,EAElB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAC/D,YAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,iBAAiB,CAAC,CAAoB;IAC9C,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,oBAAoB,CAAC,CAAsB;IACnD,OAAO,CAAC,yBAAyB,CAAgB;gBAErC,MAAM,EAAE,uBAAuB;IAU3C,KAAK,IAAI,CAAC;IAIV,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,wBAAwB,IAAI,MAAM;IAI5B,WAAW,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAcxD,sBAAsB;CAkIrC;AAGD,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Client-side Solana signer for wallet-based transaction signing.
|
|
3
|
+
* This function signs and sends the transaction while constantly checking for confirmation
|
|
4
|
+
* and resending the transaction if it hasn't been confirmed after the specified interval.
|
|
5
|
+
*/
|
|
6
|
+
import { ConfirmOptions, Transaction, VersionedTransaction } from "@solana/web3.js";
|
|
4
7
|
import { Connection } from "@solana/web3.js";
|
|
5
8
|
import { Network } from "@wormhole-foundation/sdk";
|
|
9
|
+
import { SolanaUnsignedTransaction } from "@wormhole-foundation/sdk-solana";
|
|
6
10
|
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
7
11
|
import { CrossChainCore } from "../../../CrossChainCore";
|
|
8
|
-
|
|
12
|
+
import { PriorityFeeConfig } from "./solanaUtils";
|
|
13
|
+
export type { SolanaRpcProvider, PriorityFeeConfig } from "./solanaUtils";
|
|
14
|
+
export { sleep, isEmptyObject, determineRpcProvider, } from "./solanaUtils";
|
|
9
15
|
export declare function signAndSendTransaction(request: SolanaUnsignedTransaction<Network>, wallet: AdapterWallet | undefined, options?: ConfirmOptions, crossChainCore?: CrossChainCore): Promise<string>;
|
|
10
|
-
export declare function setPriorityFeeInstructions(connection: Connection, blockhash: string, lastValidBlockHeight: number, request: SolanaUnsignedTransaction<Network>, crossChainCore?: CrossChainCore): Promise<Transaction | VersionedTransaction>;
|
|
11
|
-
export declare function sleep(timeout: number): Promise<unknown>;
|
|
12
16
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* isEmptyObject(null)
|
|
16
|
-
* // => true
|
|
17
|
-
*
|
|
18
|
-
* isEmptyObject(undefined)
|
|
19
|
-
* // => true
|
|
20
|
-
*
|
|
21
|
-
* isEmptyObject({})
|
|
22
|
-
* // => true
|
|
23
|
-
*
|
|
24
|
-
* isEmptyObject({ 'a': 1 })
|
|
25
|
-
* // => false
|
|
17
|
+
* Prepares a transaction with priority fee instructions.
|
|
26
18
|
*/
|
|
27
|
-
export declare
|
|
19
|
+
export declare function setPriorityFeeInstructions(connection: Connection, blockhash: string, lastValidBlockHeight: number, request: SolanaUnsignedTransaction<Network>, priorityFeeConfig?: PriorityFeeConfig): Promise<Transaction | VersionedTransaction>;
|
|
28
20
|
//# sourceMappingURL=SolanaSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaSigner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaSigner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAGL,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAGvB,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EACL,KAAK,EACL,aAAa,EACb,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAGvB,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,yBAAyB,CAAC,OAAO,CAAC,EAC3C,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,OAAO,CAAC,EAAE,cAAc,EACxB,cAAc,CAAC,EAAE,cAAc,mBA0DhC;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,yBAAyB,CAAC,OAAO,CAAC,EAC3C,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,OAAO,CAAC,WAAW,GAAG,oBAAoB,CAAC,CAe7C"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for Solana transaction handling.
|
|
3
|
+
* Used by both SolanaLocalSigner (server-side) and SolanaSigner (client-side).
|
|
4
|
+
*/
|
|
5
|
+
import { Connection, Transaction, TransactionInstruction, VersionedTransaction, type Commitment } from "@solana/web3.js";
|
|
6
|
+
/** Configuration for priority fees */
|
|
7
|
+
export interface PriorityFeeConfig {
|
|
8
|
+
/** Percentile of recent fees to use (default: 0.9) */
|
|
9
|
+
percentile?: number;
|
|
10
|
+
/** Multiplier for the percentile fee (default: 1) */
|
|
11
|
+
percentileMultiple?: number;
|
|
12
|
+
/** Minimum fee in microlamports (default: 100_000) */
|
|
13
|
+
min?: number;
|
|
14
|
+
/** Maximum fee in microlamports (default: 100_000_000) */
|
|
15
|
+
max?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Configuration for sending and confirming transactions */
|
|
18
|
+
export interface SendAndConfirmConfig {
|
|
19
|
+
connection: Connection;
|
|
20
|
+
commitment: Commitment;
|
|
21
|
+
retryIntervalMs?: number;
|
|
22
|
+
/** Enable verbose logging (default: false) */
|
|
23
|
+
verbose?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** RPC provider type for priority fee calculation */
|
|
26
|
+
export type SolanaRpcProvider = "triton" | "helius" | "ankr" | "unknown";
|
|
27
|
+
/**
|
|
28
|
+
* Sends a serialized transaction and waits for confirmation with automatic retries.
|
|
29
|
+
*
|
|
30
|
+
* @param serializedTx - The serialized transaction bytes
|
|
31
|
+
* @param blockhash - The recent blockhash used in the transaction
|
|
32
|
+
* @param lastValidBlockHeight - The last valid block height for the transaction
|
|
33
|
+
* @param config - Configuration for sending and confirming
|
|
34
|
+
* @returns The transaction signature
|
|
35
|
+
*/
|
|
36
|
+
export declare function sendAndConfirmTransaction(serializedTx: Buffer | Uint8Array, blockhash: string, lastValidBlockHeight: number, config: SendAndConfirmConfig): Promise<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Formats a transaction error into a readable string.
|
|
39
|
+
*/
|
|
40
|
+
export declare function formatTransactionError(err: unknown): string;
|
|
41
|
+
/**
|
|
42
|
+
* Adds priority fee instructions to a transaction.
|
|
43
|
+
* Simulates the transaction to determine compute units and calculates optimal fees.
|
|
44
|
+
*
|
|
45
|
+
* @param connection - Solana RPC connection
|
|
46
|
+
* @param transaction - The transaction to add priority fees to
|
|
47
|
+
* @param priorityFeeConfig - Configuration for priority fees
|
|
48
|
+
* @param verbose - Enable verbose logging
|
|
49
|
+
* @returns The transaction with priority fee instructions added
|
|
50
|
+
*/
|
|
51
|
+
export declare function addPriorityFeeInstructions(connection: Connection, transaction: Transaction, priorityFeeConfig?: PriorityFeeConfig, verbose?: boolean): Promise<Transaction>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates priority fee instructions based on simulation and fee estimation.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createPriorityFeeInstructions(connection: Connection, transaction: Transaction | VersionedTransaction, priorityFeeConfig?: PriorityFeeConfig, verbose?: boolean): Promise<TransactionInstruction[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Determines the RPC provider from the endpoint URL.
|
|
58
|
+
*/
|
|
59
|
+
export declare function determineRpcProvider(endpoint: string): SolanaRpcProvider;
|
|
60
|
+
/**
|
|
61
|
+
* Sleep for a specified duration.
|
|
62
|
+
*/
|
|
63
|
+
export declare function sleep(timeout: number): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Checks whether an object is empty.
|
|
66
|
+
*/
|
|
67
|
+
export declare const isEmptyObject: (value: object | null | undefined) => boolean;
|
|
68
|
+
//# sourceMappingURL=solanaUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solanaUtils.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/solanaUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,UAAU,EAKV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAUzB,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAMzE;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,GAAG,UAAU,EACjC,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA4EjB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAa3D;AAMD;;;;;;;;;GASG;AACH,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,OAAO,GAAE,OAAe,GACvB,OAAO,CAAC,WAAW,CAAC,CAiBtB;AAED;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GAAG,oBAAoB,EAC/C,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,OAAO,GAAE,OAAe,GACvB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CA8CnC;AAiJD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAgBxE;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAYhE,CAAC"}
|
|
@@ -18,22 +18,52 @@ export interface WormholeTransferRequest {
|
|
|
18
18
|
mainSigner: Account;
|
|
19
19
|
amount?: string;
|
|
20
20
|
sponsorAccount?: Account;
|
|
21
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
22
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
21
23
|
}
|
|
24
|
+
export type WithdrawPhase = "initiating" | "tracking" | "claiming";
|
|
25
|
+
/**
|
|
26
|
+
* Callback fired before and after each individual transaction is signed
|
|
27
|
+
* and submitted during a bridge flow.
|
|
28
|
+
*
|
|
29
|
+
* @param description - A human-readable description of the transaction
|
|
30
|
+
* (e.g. "Approving USDC transfer"). Comes from the Wormhole SDK's
|
|
31
|
+
* `UnsignedTransaction.description`.
|
|
32
|
+
* @param txId - `null` when called *before* signing; the on-chain
|
|
33
|
+
* transaction hash when called *after* signing.
|
|
34
|
+
*/
|
|
35
|
+
export type OnTransactionSigned = (description: string, txId: string | null) => void;
|
|
22
36
|
export interface WormholeWithdrawRequest {
|
|
37
|
+
/**
|
|
38
|
+
* The non-Aptos chain involved in the withdrawal. For a withdrawal from
|
|
39
|
+
* Aptos → Solana, this is `"Solana"`.
|
|
40
|
+
*
|
|
41
|
+
* Note: despite the name, this is the *destination* of the bridge transfer
|
|
42
|
+
* (where USDC will be claimed), not the chain that burns USDC (which is
|
|
43
|
+
* always Aptos for withdrawals).
|
|
44
|
+
*/
|
|
23
45
|
sourceChain: Chain;
|
|
24
46
|
wallet: AdapterWallet;
|
|
25
47
|
destinationAddress: AccountAddressInput;
|
|
26
48
|
sponsorAccount?: Account | GasStationApiKey;
|
|
49
|
+
/** Optional callback fired when the withdraw progresses to a new phase. */
|
|
50
|
+
onPhaseChange?: (phase: WithdrawPhase) => void;
|
|
51
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
52
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
27
53
|
}
|
|
28
54
|
export interface WormholeSubmitTransferRequest {
|
|
29
55
|
sourceChain: Chain;
|
|
30
56
|
wallet: AdapterWallet;
|
|
31
57
|
destinationAddress: AccountAddressInput;
|
|
58
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
59
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
32
60
|
}
|
|
33
61
|
export interface WormholeClaimTransferRequest {
|
|
34
62
|
receipt: routes.Receipt<AttestationReceipt>;
|
|
35
63
|
mainSigner: AptosAccount;
|
|
36
64
|
sponsorAccount?: AptosAccount | GasStationApiKey;
|
|
65
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
66
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
37
67
|
}
|
|
38
68
|
export interface WormholeTransferResponse {
|
|
39
69
|
destinationChainTxnId: string;
|
|
@@ -47,4 +77,94 @@ export interface WormholeStartTransferResponse {
|
|
|
47
77
|
originChainTxnId: string;
|
|
48
78
|
receipt: routes.Receipt<AttestationReceipt>;
|
|
49
79
|
}
|
|
80
|
+
export interface WormholeInitiateWithdrawRequest {
|
|
81
|
+
wallet: AdapterWallet;
|
|
82
|
+
destinationAddress: AccountAddressInput;
|
|
83
|
+
sponsorAccount?: Account | GasStationApiKey;
|
|
84
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
85
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
86
|
+
}
|
|
87
|
+
export interface WormholeInitiateWithdrawResponse {
|
|
88
|
+
originChainTxnId: string;
|
|
89
|
+
receipt: routes.Receipt<AttestationReceipt>;
|
|
90
|
+
}
|
|
91
|
+
export interface WormholeClaimWithdrawRequest {
|
|
92
|
+
/**
|
|
93
|
+
* The chain on which the claim transaction will be executed (the destination
|
|
94
|
+
* chain of the withdrawal).
|
|
95
|
+
*
|
|
96
|
+
* For example, when withdrawing from Aptos → Solana, `claimChain` is
|
|
97
|
+
* `"Solana"` because that's where the USDC is minted/claimed.
|
|
98
|
+
*/
|
|
99
|
+
claimChain: Chain;
|
|
100
|
+
destinationAddress: string;
|
|
101
|
+
receipt: routes.Receipt<AttestationReceipt>;
|
|
102
|
+
wallet?: AdapterWallet;
|
|
103
|
+
/** Optional callback fired before and after each individual transaction is signed. */
|
|
104
|
+
onTransactionSigned?: OnTransactionSigned;
|
|
105
|
+
}
|
|
106
|
+
export interface WormholeClaimWithdrawResponse {
|
|
107
|
+
destinationChainTxnId: string;
|
|
108
|
+
}
|
|
109
|
+
export interface RetryWithdrawClaimRequest extends WormholeClaimWithdrawRequest {
|
|
110
|
+
/** Maximum number of retry attempts (default: 5). */
|
|
111
|
+
maxRetries?: number;
|
|
112
|
+
/** Initial delay in ms before the first retry (default: 2000). */
|
|
113
|
+
initialDelayMs?: number;
|
|
114
|
+
/** Multiplier applied to the delay after each failed attempt (default: 2). */
|
|
115
|
+
backoffMultiplier?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface RetryWithdrawClaimResponse extends WormholeClaimWithdrawResponse {
|
|
118
|
+
/** Number of retry attempts that were needed (0 means first attempt succeeded). */
|
|
119
|
+
retriesUsed: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Validates that a value returned by `getExpireTimestamp` is a non-negative
|
|
123
|
+
* integer suitable for use as an epoch-second expiration timestamp.
|
|
124
|
+
* Throws immediately for NaN, Infinity, negative values, or floats so that
|
|
125
|
+
* misconfigured callbacks fail fast instead of producing silent misbehaviour.
|
|
126
|
+
*/
|
|
127
|
+
export declare function validateExpireTimestamp(value: number): void;
|
|
128
|
+
/**
|
|
129
|
+
* Error thrown when the transfer (deposit) flow fails *after* the source-chain
|
|
130
|
+
* burn transaction has already been submitted (i.e. during attestation tracking
|
|
131
|
+
* or Aptos claiming).
|
|
132
|
+
*
|
|
133
|
+
* Consumers should check `instanceof TransferError` in their catch block
|
|
134
|
+
* to recover the `originChainTxnId` and display an explorer link so the
|
|
135
|
+
* user can verify their burn on-chain.
|
|
136
|
+
*/
|
|
137
|
+
export declare class TransferError extends Error {
|
|
138
|
+
/** Source-chain burn transaction hash — available when the burn succeeded before the failure. */
|
|
139
|
+
readonly originChainTxnId: string;
|
|
140
|
+
/**
|
|
141
|
+
* The underlying error that caused this failure.
|
|
142
|
+
* Mirrors ES2022 Error.cause — declared explicitly because the project's
|
|
143
|
+
* TypeScript lib target does not include ES2022 ErrorOptions.
|
|
144
|
+
*/
|
|
145
|
+
readonly cause?: unknown;
|
|
146
|
+
constructor(message: string, originChainTxnId: string, cause?: unknown);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Error thrown when the withdraw flow fails *after* the Aptos burn
|
|
150
|
+
* transaction has already been submitted (i.e. during attestation tracking
|
|
151
|
+
* or destination-chain claiming).
|
|
152
|
+
*
|
|
153
|
+
* Consumers should check `instanceof WithdrawError` in their catch block
|
|
154
|
+
* to recover the `originChainTxnId` and display an explorer link so the
|
|
155
|
+
* user can verify their burn on-chain.
|
|
156
|
+
*/
|
|
157
|
+
export declare class WithdrawError extends Error {
|
|
158
|
+
/** Aptos burn transaction hash — always available when this error is thrown. */
|
|
159
|
+
readonly originChainTxnId: string;
|
|
160
|
+
/** The withdraw phase that failed ("tracking" or "claiming"). */
|
|
161
|
+
readonly phase: WithdrawPhase;
|
|
162
|
+
/**
|
|
163
|
+
* The underlying error that caused this failure.
|
|
164
|
+
* Mirrors ES2022 Error.cause — declared explicitly because the project's
|
|
165
|
+
* TypeScript lib target does not include ES2022 ErrorOptions.
|
|
166
|
+
*/
|
|
167
|
+
readonly cause?: unknown;
|
|
168
|
+
constructor(message: string, originChainTxnId: string, phase: WithdrawPhase, cause?: unknown);
|
|
169
|
+
}
|
|
50
170
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAC9C,SAAS,GAAG,SAAS,EACrB,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,OAAO,CAAC,EAC9C,MAAM,CAAC,OAAO,CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,oBAAoB,CACvD,SAAS,GAAG,SAAS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,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for Wormhole CCTP route creation.
|
|
3
|
+
* These helpers can be used both by WormholeProvider and server-side claim endpoints.
|
|
4
|
+
*/
|
|
5
|
+
import { routes, Wormhole } from "@wormhole-foundation/sdk";
|
|
6
|
+
import { Chain } from "../../CrossChainCore";
|
|
7
|
+
import { TokenConfig } from "../../config";
|
|
8
|
+
export interface CCTPRouteResult {
|
|
9
|
+
route: routes.ManualRoute<"Mainnet" | "Testnet">;
|
|
10
|
+
request: routes.RouteTransferRequest<"Mainnet" | "Testnet">;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates a CCTP route for transferring USDC between two chains.
|
|
14
|
+
*
|
|
15
|
+
* This is a standalone helper that can be used both by WormholeProvider
|
|
16
|
+
* (client-side) and server-side claim endpoints to avoid code duplication.
|
|
17
|
+
*
|
|
18
|
+
* @param wh - Initialized Wormhole context
|
|
19
|
+
* @param sourceChain - Source chain (e.g., "Aptos")
|
|
20
|
+
* @param destChain - Destination chain (e.g., "Solana")
|
|
21
|
+
* @param tokens - Token configuration mapping (mainnetTokens or testnetTokens)
|
|
22
|
+
* @returns The CCTP route and request for completing transfers
|
|
23
|
+
* @throws Error if no valid CCTP route is found
|
|
24
|
+
*/
|
|
25
|
+
export declare function createCCTPRoute(wh: Wormhole<"Mainnet" | "Testnet">, sourceChain: Chain, destChain: Chain, tokens: Record<string, TokenConfig>): Promise<CCTPRouteResult>;
|
|
26
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,EACnC,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,KAAK,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAClC,OAAO,CAAC,eAAe,CAAC,CAiC1B"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { routes, Wormhole } from "@wormhole-foundation/sdk";
|
|
2
2
|
import { Chain, CrossChainProvider, CrossChainCore } from "../../CrossChainCore";
|
|
3
3
|
import { ChainConfig } from "../../config";
|
|
4
|
-
import { WormholeQuoteRequest, WormholeQuoteResponse, WormholeTransferRequest, WormholeTransferResponse, WormholeSubmitTransferRequest, WormholeStartTransferResponse, WormholeClaimTransferRequest, WormholeWithdrawRequest, WormholeWithdrawResponse } from "./types";
|
|
4
|
+
import { WormholeQuoteRequest, WormholeQuoteResponse, WormholeTransferRequest, WormholeTransferResponse, WormholeSubmitTransferRequest, WormholeStartTransferResponse, WormholeClaimTransferRequest, WormholeWithdrawRequest, WormholeWithdrawResponse, WormholeInitiateWithdrawRequest, WormholeInitiateWithdrawResponse, WormholeClaimWithdrawRequest, WormholeClaimWithdrawResponse, RetryWithdrawClaimRequest, RetryWithdrawClaimResponse } from "./types";
|
|
5
5
|
export declare class WormholeProvider implements CrossChainProvider<WormholeQuoteRequest, WormholeQuoteResponse, WormholeTransferRequest, WormholeTransferResponse, WormholeWithdrawRequest, WormholeWithdrawResponse> {
|
|
6
6
|
private crossChainCore;
|
|
7
7
|
private _wormholeContext;
|
|
8
8
|
private wormholeRoute;
|
|
9
9
|
private wormholeRequest;
|
|
10
10
|
private wormholeQuote;
|
|
11
|
+
private destinationChain?;
|
|
11
12
|
constructor(core: CrossChainCore);
|
|
12
13
|
get wormholeContext(): Wormhole<"Mainnet" | "Testnet"> | undefined;
|
|
13
14
|
private setWormholeContext;
|
|
@@ -23,11 +24,66 @@ export declare class WormholeProvider implements CrossChainProvider<WormholeQuot
|
|
|
23
24
|
* @returns
|
|
24
25
|
*/
|
|
25
26
|
transfer(input: WormholeTransferRequest): Promise<WormholeTransferResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Phase 1: Initiates a withdraw by burning USDC on Aptos.
|
|
29
|
+
* The user signs the Aptos burn transaction via their wallet.
|
|
30
|
+
* Returns a receipt that can be tracked and later claimed.
|
|
31
|
+
*/
|
|
32
|
+
initiateWithdraw(input: WormholeInitiateWithdrawRequest): Promise<WormholeInitiateWithdrawResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Phase 2: Tracks a withdraw receipt until attestation is ready.
|
|
35
|
+
* This polls Wormhole and returns once the receipt reaches the Attested state.
|
|
36
|
+
*/
|
|
37
|
+
trackWithdraw(receipt: routes.Receipt): Promise<routes.Receipt>;
|
|
38
|
+
/**
|
|
39
|
+
* Phase 3: Claims the withdraw on the destination chain.
|
|
40
|
+
*
|
|
41
|
+
* If the destination is Solana and `solanaConfig.serverClaimUrl` is configured
|
|
42
|
+
* in the dapp config, the SDK automatically POSTs the attested receipt to that
|
|
43
|
+
* URL — no wallet popup required. The dapp's server endpoint handles signing
|
|
44
|
+
* and submitting the claim transaction.
|
|
45
|
+
*
|
|
46
|
+
* Otherwise falls back to the wallet-based Signer (triggers wallet popup).
|
|
47
|
+
*/
|
|
48
|
+
claimWithdraw(input: WormholeClaimWithdrawRequest): Promise<WormholeClaimWithdrawResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Withdraws USDC from Aptos to a destination chain.
|
|
51
|
+
* Orchestrates all three phases internally:
|
|
52
|
+
* 1. Initiate — user signs the Aptos burn transaction
|
|
53
|
+
* 2. Track — wait for Wormhole attestation
|
|
54
|
+
* 3. Claim — if serverClaimUrl is configured for Solana, delegates to
|
|
55
|
+
* the server; otherwise uses the wallet-based signer.
|
|
56
|
+
*
|
|
57
|
+
* The optional `onPhaseChange` callback lets the dapp update its UI
|
|
58
|
+
* as the flow progresses.
|
|
59
|
+
*/
|
|
26
60
|
withdraw(input: WormholeWithdrawRequest): Promise<WormholeWithdrawResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Retries a failed `claimWithdraw` call with configurable exponential backoff.
|
|
63
|
+
*
|
|
64
|
+
* Use this when the claim phase of a withdrawal fails (e.g., RPC instability,
|
|
65
|
+
* network congestion) but the Aptos burn transaction has already been submitted.
|
|
66
|
+
* The attested receipt can be recovered from the `WithdrawError` thrown by
|
|
67
|
+
* `withdraw()` and passed directly to this method.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* try {
|
|
72
|
+
* await provider.withdraw({ ... });
|
|
73
|
+
* } catch (error) {
|
|
74
|
+
* if (error instanceof WithdrawError && error.phase === "claiming") {
|
|
75
|
+
* const result = await provider.retryWithdrawClaim({
|
|
76
|
+
* sourceChain,
|
|
77
|
+
* destinationAddress,
|
|
78
|
+
* receipt: attestedReceipt,
|
|
79
|
+
* wallet,
|
|
80
|
+
* maxRetries: 5,
|
|
81
|
+
* });
|
|
82
|
+
* }
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
retryWithdrawClaim(input: RetryWithdrawClaimRequest): Promise<RetryWithdrawClaimResponse>;
|
|
27
87
|
getChainConfig(chain: Chain): ChainConfig;
|
|
28
|
-
getTokenInfo(sourceChain: Chain, destinationChain: Chain): {
|
|
29
|
-
sourceToken: TokenId;
|
|
30
|
-
destToken: TokenId;
|
|
31
|
-
};
|
|
32
88
|
}
|
|
33
89
|
//# sourceMappingURL=wormhole.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wormhole.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/wormhole.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"wormhole.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/wormhole.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EACL,KAAK,EACL,kBAAkB,EAClB,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EAGxB,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,+BAA+B,EAC/B,gCAAgC,EAChC,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAG3B,MAAM,SAAS,CAAC;AAKjB,qBAAa,gBAAiB,YAAW,kBAAkB,CACzD,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,CACzB;IACC,OAAO,CAAC,cAAc,CAAiB;IAEvC,OAAO,CAAC,gBAAgB,CAA8C;IAEtE,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,gBAAgB,CAAC,CAAQ;gBAErB,IAAI,EAAE,cAAc;IAIhC,IAAI,eAAe,IAAI,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS,CAEjE;YAEa,kBAAkB;YAyClB,QAAQ;IAyBhB,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAuCrE,kBAAkB,CACtB,KAAK,EAAE,6BAA6B,GACnC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