@aptos-labs/cross-chain-core 6.0.0 → 6.1.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/dist/CrossChainCore.d.ts +2 -2
- package/dist/CrossChainCore.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/mainnet/chains.d.ts +1 -1
- package/dist/config/mainnet/chains.d.ts.map +1 -1
- package/dist/config/mainnet/tokens.d.ts +1 -1
- package/dist/config/mainnet/tokens.d.ts.map +1 -1
- package/dist/config/testnet/chains.d.ts +1 -1
- package/dist/config/testnet/chains.d.ts.map +1 -1
- package/dist/config/testnet/tokens.d.ts +1 -1
- package/dist/config/testnet/tokens.d.ts.map +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1366 -1297
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1377 -1302
- package/dist/index.mjs.map +1 -1
- package/dist/providers/wormhole/index.d.ts +4 -4
- package/dist/providers/wormhole/index.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/AptosLocalSigner.d.ts +5 -5
- package/dist/providers/wormhole/signers/AptosLocalSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/AptosSigner.d.ts +6 -6
- package/dist/providers/wormhole/signers/AptosSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/EthereumSigner.d.ts +3 -3
- package/dist/providers/wormhole/signers/EthereumSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/Signer.d.ts +6 -6
- package/dist/providers/wormhole/signers/Signer.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/SolanaLocalSigner.d.ts +4 -4
- package/dist/providers/wormhole/signers/SolanaLocalSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/SolanaSigner.d.ts +8 -9
- package/dist/providers/wormhole/signers/SolanaSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/SuiSigner.d.ts +3 -3
- package/dist/providers/wormhole/signers/SuiSigner.d.ts.map +1 -1
- package/dist/providers/wormhole/signers/solanaUtils.d.ts +1 -1
- package/dist/providers/wormhole/signers/solanaUtils.d.ts.map +1 -1
- package/dist/providers/wormhole/types.d.ts +10 -4
- package/dist/providers/wormhole/types.d.ts.map +1 -1
- package/dist/providers/wormhole/utils.d.ts +2 -2
- package/dist/providers/wormhole/utils.d.ts.map +1 -1
- package/dist/providers/wormhole/wormhole.d.ts +3 -3
- package/dist/providers/wormhole/wormhole.d.ts.map +1 -1
- package/dist/utils/getUsdcBalance.d.ts +1 -1
- package/dist/utils/getUsdcBalance.d.ts.map +1 -1
- package/dist/utils/receiptSerialization.d.ts +1 -1
- package/dist/utils/receiptSerialization.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +6 -8
- package/src/CrossChainCore.ts +15 -17
- package/src/config/index.ts +1 -1
- package/src/config/mainnet/chains.ts +1 -1
- package/src/config/mainnet/tokens.ts +1 -1
- package/src/config/testnet/chains.ts +1 -1
- package/src/config/testnet/tokens.ts +1 -1
- package/src/config/types.ts +1 -1
- package/src/index.ts +1 -1
- package/src/providers/wormhole/index.ts +4 -4
- package/src/providers/wormhole/signers/AptosLocalSigner.ts +12 -16
- package/src/providers/wormhole/signers/AptosSigner.ts +29 -22
- package/src/providers/wormhole/signers/EthereumSigner.ts +6 -6
- package/src/providers/wormhole/signers/Signer.ts +20 -22
- package/src/providers/wormhole/signers/SolanaLocalSigner.ts +7 -7
- package/src/providers/wormhole/signers/SolanaSigner.ts +13 -14
- package/src/providers/wormhole/signers/SuiSigner.ts +8 -8
- package/src/providers/wormhole/signers/solanaUtils.ts +43 -25
- package/src/providers/wormhole/types.ts +28 -16
- package/src/providers/wormhole/utils.ts +3 -4
- package/src/providers/wormhole/wormhole.ts +50 -48
- package/src/utils/getUsdcBalance.ts +8 -10
- package/src/utils/receiptSerialization.ts +2 -3
- package/src/version.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "./types";
|
|
3
|
-
export * from "./utils";
|
|
1
|
+
export * from "../../config";
|
|
4
2
|
export * from "./signers/AptosLocalSigner";
|
|
5
3
|
export * from "./signers/SolanaLocalSigner";
|
|
6
|
-
export * from "
|
|
4
|
+
export * from "./types";
|
|
5
|
+
export * from "./utils";
|
|
6
|
+
export * from "./wormhole";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Account } from "@aptos-labs/ts-sdk";
|
|
2
|
-
import { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
|
-
import { AptosChains } from "@wormhole-foundation/sdk-aptos";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { type Account } from "@aptos-labs/ts-sdk";
|
|
2
|
+
import type { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
|
+
import type { AptosChains } from "@wormhole-foundation/sdk-aptos";
|
|
4
|
+
import type { CrossChainCore } from "../../../CrossChainCore";
|
|
5
|
+
import { type OnTransactionSigned } from "../types";
|
|
6
6
|
export declare class AptosLocalSigner<N extends Network, C extends Chain> implements SignAndSendSigner<N, C> {
|
|
7
7
|
_chain: C;
|
|
8
8
|
_options: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AptosLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AptosLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,WAAW,EAEZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,mBAAmB,EAA2B,MAAM,UAAU,CAAC;AAE7E,qBAAa,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CAC9D,YAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;IAElC,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Account, Network as AptosNetwork } from "@aptos-labs/ts-sdk";
|
|
2
|
-
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
-
import { Network } from "@wormhole-foundation/sdk";
|
|
4
|
-
import { AptosChains, AptosUnsignedTransaction } from "@wormhole-foundation/sdk-aptos";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { type Account, type Network as AptosNetwork } from "@aptos-labs/ts-sdk";
|
|
2
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
+
import type { Network } from "@wormhole-foundation/sdk";
|
|
4
|
+
import type { AptosChains, AptosUnsignedTransaction } from "@wormhole-foundation/sdk-aptos";
|
|
5
|
+
import type { CrossChainCore } from "../../../CrossChainCore";
|
|
6
|
+
import { type GasStationApiKey } from "..";
|
|
7
7
|
export declare function signAndSendTransaction(request: AptosUnsignedTransaction<Network, AptosChains>, wallet: AdapterWallet, sponsorAccount: Account | GasStationApiKey | undefined, dappNetwork: AptosNetwork, crossChainCore?: CrossChainCore): Promise<string>;
|
|
8
8
|
export declare function isAccount(obj: Account | GasStationApiKey): obj is Account;
|
|
9
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":"
|
|
1
|
+
{"version":3,"file":"AptosSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/AptosSigner.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,OAAO,EAMZ,KAAK,OAAO,IAAI,YAAY,EAI7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,gBAAgB,EAA2B,MAAM,IAAI,CAAC;AAEpE,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,mBAqHhC;AA0BD,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,GAAG,GAAG,IAAI,OAAO,CAEzE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Network } from "@wormhole-foundation/sdk";
|
|
3
|
-
import {
|
|
1
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
2
|
+
import type { Network } from "@wormhole-foundation/sdk";
|
|
3
|
+
import type { EvmChains, EvmUnsignedTransaction } from "@wormhole-foundation/sdk-evm";
|
|
4
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":"
|
|
1
|
+
{"version":3,"file":"EthereumSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/EthereumSigner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EACV,SAAS,EACT,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAGtC,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
-
import {
|
|
4
|
-
import { CrossChainCore } from "../../../CrossChainCore";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import type { Account } from "@aptos-labs/ts-sdk";
|
|
2
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
+
import type { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
4
|
+
import type { CrossChainCore } from "../../../CrossChainCore";
|
|
5
|
+
import type { ChainConfig } from "../../../config";
|
|
6
|
+
import type { GasStationApiKey, OnTransactionSigned } from "../types";
|
|
7
7
|
export declare class Signer<N extends Network, C extends Chain> implements SignAndSendSigner<N, C> {
|
|
8
8
|
_chain: ChainConfig;
|
|
9
9
|
_address: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signer.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/Signer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Signer.d.ts","sourceRoot":"","sources":["../../../../src/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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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type Commitment, type Connection, type Keypair } from "@solana/web3.js";
|
|
2
|
+
import type { Chain, Network, SignAndSendSigner, TxHash, UnsignedTransaction } from "@wormhole-foundation/sdk";
|
|
3
|
+
import type { OnTransactionSigned } from "../types";
|
|
4
|
+
import { type PriorityFeeConfig } from "./solanaUtils";
|
|
5
5
|
export interface SolanaLocalSignerConfig {
|
|
6
6
|
/** The Solana keypair to sign transactions with */
|
|
7
7
|
keypair: Keypair;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,
|
|
1
|
+
{"version":3,"file":"SolanaLocalSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaLocalSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,OAAO,EAEb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,mBAAmB,EACpB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B,EAAE,CAAC"}
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
* This function signs and sends the transaction while constantly checking for confirmation
|
|
4
4
|
* and resending the transaction if it hasn't been confirmed after the specified interval.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { Connection } from "@solana/web3.js";
|
|
8
|
-
import { Network } from "@wormhole-foundation/sdk";
|
|
9
|
-
import { SolanaUnsignedTransaction } from "@wormhole-foundation/sdk-solana";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export { sleep, isEmptyObject, determineRpcProvider, } from "./solanaUtils";
|
|
6
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
7
|
+
import { type ConfirmOptions, Connection, Transaction, type VersionedTransaction } from "@solana/web3.js";
|
|
8
|
+
import type { Network } from "@wormhole-foundation/sdk";
|
|
9
|
+
import type { SolanaUnsignedTransaction } from "@wormhole-foundation/sdk-solana";
|
|
10
|
+
import type { CrossChainCore } from "../../../CrossChainCore";
|
|
11
|
+
import { type PriorityFeeConfig } from "./solanaUtils";
|
|
12
|
+
export type { PriorityFeeConfig, SolanaRpcProvider } from "./solanaUtils";
|
|
13
|
+
export { determineRpcProvider, isEmptyObject, sleep, } from "./solanaUtils";
|
|
15
14
|
export declare function signAndSendTransaction(request: SolanaUnsignedTransaction<Network>, wallet: AdapterWallet | undefined, options?: ConfirmOptions, crossChainCore?: CrossChainCore): Promise<string>;
|
|
16
15
|
/**
|
|
17
16
|
* Prepares a transaction with priority fee instructions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaSigner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"SolanaSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SolanaSigner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,KAAK,cAAc,EACnB,UAAU,EACV,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,eAAe,CAAC;AAGvB,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,KAAK,GACN,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
2
|
-
import { Network } from "@wormhole-foundation/sdk";
|
|
3
|
-
import { SuiChains, SuiUnsignedTransaction } from "@wormhole-foundation/sdk-sui";
|
|
1
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
2
|
+
import type { Network } from "@wormhole-foundation/sdk";
|
|
3
|
+
import type { SuiChains, SuiUnsignedTransaction } from "@wormhole-foundation/sdk-sui";
|
|
4
4
|
export declare function signAndSendTransaction(request: SuiUnsignedTransaction<Network, SuiChains>, wallet: AdapterWallet): Promise<string>;
|
|
5
5
|
//# sourceMappingURL=SuiSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuiSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SuiSigner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuiSigner.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/SuiSigner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAKrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EACV,SAAS,EACT,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,EACnD,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared utilities for Solana transaction handling.
|
|
3
3
|
* Used by both SolanaLocalSigner (server-side) and SolanaSigner (client-side).
|
|
4
4
|
*/
|
|
5
|
-
import { Connection, Transaction, TransactionInstruction,
|
|
5
|
+
import { type Commitment, type Connection, type Transaction, type TransactionInstruction, type VersionedTransaction } from "@solana/web3.js";
|
|
6
6
|
/** Configuration for priority fees */
|
|
7
7
|
export interface PriorityFeeConfig {
|
|
8
8
|
/** Percentile of recent fees to use (default: 0.9) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solanaUtils.d.ts","sourceRoot":"","sources":["../../../../src/providers/wormhole/signers/solanaUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"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B;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;AAqJD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAsBxE;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { Account, AccountAddressInput, Network } from "@aptos-labs/ts-sdk";
|
|
2
|
+
import type { AdapterWallet } from "@aptos-labs/wallet-adapter-core";
|
|
3
|
+
import type { AttestationReceipt, routes } from "@wormhole-foundation/sdk/dist/cjs";
|
|
4
|
+
import type { AptosAccount, Chain } from "../..";
|
|
5
5
|
export type WormholeRouteResponse = routes.Route<"Mainnet" | "Testnet", routes.Options, routes.ValidatedTransferParams<routes.Options>, routes.Receipt>;
|
|
6
6
|
export type WormholeRequest = routes.RouteTransferRequest<"Mainnet" | "Testnet">;
|
|
7
7
|
export type WormholeQuoteResponse = routes.Quote<routes.Options, routes.ValidatedTransferParams<routes.Options>, any>;
|
|
@@ -102,6 +102,12 @@ export interface WormholeClaimWithdrawRequest {
|
|
|
102
102
|
wallet?: AdapterWallet;
|
|
103
103
|
/** Optional callback fired before and after each individual transaction is signed. */
|
|
104
104
|
onTransactionSigned?: OnTransactionSigned;
|
|
105
|
+
/**
|
|
106
|
+
* When true, skip the server-side claim path (serverClaimUrl) and instead
|
|
107
|
+
* perform a client-side wallet-signed claim. Useful as a fallback when the
|
|
108
|
+
* server endpoint is unreachable. Requires `wallet` to be provided.
|
|
109
|
+
*/
|
|
110
|
+
skipServerClaim?: boolean;
|
|
105
111
|
}
|
|
106
112
|
export interface WormholeClaimWithdrawResponse {
|
|
107
113
|
destinationChainTxnId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACP,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEjD,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,CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAC9C,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,OAAO,CAAC,EAC9C,GAAG,CACJ,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,KAAK,C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AAED,MAAM,WAAW,yBACf,SAAQ,4BAA4B;IACpC,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,0BACf,SAAQ,6BAA6B;IACrC,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAO3D;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,iGAAiG;IACjG,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAMvE;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,gFAAgF;IAChF,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;gBAGvB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,OAAO;CAQlB"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* These helpers can be used both by WormholeProvider and server-side claim endpoints.
|
|
4
4
|
*/
|
|
5
5
|
import { routes, Wormhole } from "@wormhole-foundation/sdk";
|
|
6
|
-
import { Chain } from "../../CrossChainCore";
|
|
7
|
-
import { TokenConfig } from "../../config";
|
|
6
|
+
import type { Chain } from "../../CrossChainCore";
|
|
7
|
+
import type { TokenConfig } from "../../config";
|
|
8
8
|
export interface CCTPRouteResult {
|
|
9
9
|
route: routes.ManualRoute<"Mainnet" | "Testnet">;
|
|
10
10
|
request: routes.RouteTransferRequest<"Mainnet" | "Testnet">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,MAAM,EAEN,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,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,7 +1,7 @@
|
|
|
1
1
|
import { routes, Wormhole } from "@wormhole-foundation/sdk";
|
|
2
|
-
import { Chain,
|
|
3
|
-
import { ChainConfig } from "../../config";
|
|
4
|
-
import {
|
|
2
|
+
import { type Chain, type CrossChainCore, type CrossChainProvider } from "../../CrossChainCore";
|
|
3
|
+
import type { ChainConfig } from "../../config";
|
|
4
|
+
import { type RetryWithdrawClaimRequest, type RetryWithdrawClaimResponse, type WormholeClaimTransferRequest, type WormholeClaimWithdrawRequest, type WormholeClaimWithdrawResponse, type WormholeInitiateWithdrawRequest, type WormholeInitiateWithdrawResponse, type WormholeQuoteRequest, type WormholeQuoteResponse, type WormholeStartTransferResponse, type WormholeSubmitTransferRequest, type WormholeTransferRequest, type WormholeTransferResponse, type WormholeWithdrawRequest, type WormholeWithdrawResponse } from "./types";
|
|
5
5
|
export declare class WormholeProvider implements CrossChainProvider<WormholeQuoteRequest, WormholeQuoteResponse, WormholeTransferRequest, WormholeTransferResponse, WormholeWithdrawRequest, WormholeWithdrawResponse> {
|
|
6
6
|
private crossChainCore;
|
|
7
7
|
private _wormholeContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wormhole.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/wormhole.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wormhole.d.ts","sourceRoot":"","sources":["../../../src/providers/wormhole/wormhole.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,MAAM,EAEN,QAAQ,EAET,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,KAAK,KAAK,EACV,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAExB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAG/B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAG1B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC9B,MAAM,SAAS,CAAC;AAGjB,q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ACG,kBAAkB,CACtB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,CAAC;IAgCtC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW;CAU1C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Network } from "@aptos-labs/ts-sdk";
|
|
2
|
-
import { Chain } from "../CrossChainCore";
|
|
2
|
+
import type { Chain } from "../CrossChainCore";
|
|
3
3
|
export declare const getSolanaWalletUSDCBalance: (walletAddress: string, aptosNetwork: Network, rpc: string) => Promise<string>;
|
|
4
4
|
export declare const getEthereumWalletUSDCBalance: (walletAddress: string, aptosNetwork: Network, chain: Chain, rpc: string) => Promise<string>;
|
|
5
5
|
export declare const getAptosWalletUSDCBalance: (walletAddress: string, aptosNetwork: Network) => Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUsdcBalance.d.ts","sourceRoot":"","sources":["../../src/utils/getUsdcBalance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"getUsdcBalance.d.ts","sourceRoot":"","sources":["../../src/utils/getUsdcBalance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,eAAO,MAAM,0BAA0B,GACrC,eAAe,MAAM,EACrB,cAAc,OAAO,EACrB,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CA0BhB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,eAAe,MAAM,EACrB,cAAc,OAAO,EACrB,OAAO,KAAK,EACZ,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CAYhB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,eAAe,MAAM,EACrB,cAAc,OAAO,KACpB,OAAO,CAAC,MAAM,CAoBhB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,MAAM,EACrB,cAAc,OAAO,EACrB,KAAK,MAAM,KACV,OAAO,CAAC,MAAM,CAahB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receiptSerialization.d.ts","sourceRoot":"","sources":["../../src/utils/receiptSerialization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"receiptSerialization.d.ts","sourceRoot":"","sources":["../../src/utils/receiptSerialization.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,MAAM,EAEZ,MAAM,0BAA0B,CAAC;AAoBlC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAC1C,OAAO,CAuBT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,GACX,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAoDpC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CROSS_CHAIN_CORE_VERSION = "6.
|
|
1
|
+
export declare const CROSS_CHAIN_CORE_VERSION = "6.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-labs/cross-chain-core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Aptos Cross Chain Core",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -29,11 +29,9 @@
|
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.10.4",
|
|
32
|
-
"eslint": "^8.57.1",
|
|
33
32
|
"tsup": "^8.4.0",
|
|
34
33
|
"typescript": "^5.8.3",
|
|
35
34
|
"vitest": "^2.1.8",
|
|
36
|
-
"@aptos-labs/eslint-config-adapter": "0.0.2",
|
|
37
35
|
"@aptos-labs/wallet-adapter-tsconfig": "0.0.2"
|
|
38
36
|
},
|
|
39
37
|
"dependencies": {
|
|
@@ -56,10 +54,10 @@
|
|
|
56
54
|
"ethers": "^6.13.5",
|
|
57
55
|
"eventemitter3": "^4.0.7",
|
|
58
56
|
"tweetnacl": "^1.0.3",
|
|
59
|
-
"@aptos-labs/derived-wallet-ethereum": "0.9.
|
|
60
|
-
"@aptos-labs/derived-wallet-
|
|
61
|
-
"@aptos-labs/wallet-
|
|
62
|
-
"@aptos-labs/
|
|
57
|
+
"@aptos-labs/derived-wallet-ethereum": "0.9.1",
|
|
58
|
+
"@aptos-labs/derived-wallet-solana": "0.12.2",
|
|
59
|
+
"@aptos-labs/derived-wallet-sui": "0.2.1",
|
|
60
|
+
"@aptos-labs/wallet-adapter-core": "8.5.0"
|
|
63
61
|
},
|
|
64
62
|
"peerDependencies": {
|
|
65
63
|
"@aptos-labs/ts-sdk": "^5.1.1"
|
|
@@ -76,7 +74,7 @@
|
|
|
76
74
|
"build": "pnpm run update-version && pnpm run build-package",
|
|
77
75
|
"dev": "export $(cat .env | xargs) && tsup src/index.ts --format esm,cjs --watch --dts --env.GAID $GAID",
|
|
78
76
|
"test": "vitest run",
|
|
79
|
-
"lint": "
|
|
77
|
+
"lint": "biome lint src",
|
|
80
78
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
81
79
|
}
|
|
82
80
|
}
|
package/src/CrossChainCore.ts
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import { Account, Network } from "@aptos-labs/ts-sdk";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
WormholeTransferRequest,
|
|
5
|
-
WormholeTransferResponse,
|
|
6
|
-
WormholeProvider,
|
|
7
|
-
WormholeQuoteRequest,
|
|
8
|
-
WormholeQuoteResponse,
|
|
9
|
-
WormholeWithdrawRequest,
|
|
10
|
-
WormholeWithdrawResponse,
|
|
11
|
-
} from "./providers/wormhole";
|
|
12
|
-
|
|
1
|
+
import { type Account, Network } from "@aptos-labs/ts-sdk";
|
|
13
2
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
testnetTokens,
|
|
3
|
+
type ChainConfig,
|
|
4
|
+
type ChainsConfig,
|
|
17
5
|
mainnetChains,
|
|
18
6
|
mainnetTokens,
|
|
19
|
-
TokenConfig,
|
|
20
|
-
|
|
7
|
+
type TokenConfig,
|
|
8
|
+
testnetChains,
|
|
9
|
+
testnetTokens,
|
|
21
10
|
} from "./config";
|
|
11
|
+
import {
|
|
12
|
+
WormholeProvider,
|
|
13
|
+
type WormholeQuoteRequest,
|
|
14
|
+
type WormholeQuoteResponse,
|
|
15
|
+
type WormholeTransferRequest,
|
|
16
|
+
type WormholeTransferResponse,
|
|
17
|
+
type WormholeWithdrawRequest,
|
|
18
|
+
type WormholeWithdrawResponse,
|
|
19
|
+
} from "./providers/wormhole";
|
|
22
20
|
import {
|
|
23
21
|
getAptosWalletUSDCBalance,
|
|
24
22
|
getEthereumWalletUSDCBalance,
|
package/src/config/index.ts
CHANGED
package/src/config/types.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { Network } from "@aptos-labs/ts-sdk";
|
|
1
2
|
export * from "./CrossChainCore";
|
|
2
3
|
export * from "./config";
|
|
3
4
|
export * from "./providers/wormhole/index";
|
|
4
5
|
export * from "./providers/wormhole/types";
|
|
5
6
|
export * from "./utils/receiptSerialization";
|
|
6
|
-
export { Network } from "@aptos-labs/ts-sdk";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "./types";
|
|
3
|
-
export * from "./utils";
|
|
1
|
+
export * from "../../config";
|
|
4
2
|
export * from "./signers/AptosLocalSigner";
|
|
5
3
|
export * from "./signers/SolanaLocalSigner";
|
|
6
|
-
export * from "
|
|
4
|
+
export * from "./types";
|
|
5
|
+
export * from "./utils";
|
|
6
|
+
export * from "./wormhole";
|
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Account,
|
|
3
|
+
type AccountAuthenticator,
|
|
4
|
+
type AnyRawTransaction,
|
|
4
5
|
Aptos,
|
|
5
6
|
AptosConfig,
|
|
6
|
-
Account,
|
|
7
7
|
} from "@aptos-labs/ts-sdk";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import type {
|
|
10
10
|
Chain,
|
|
11
11
|
Network,
|
|
12
12
|
SignAndSendSigner,
|
|
13
13
|
TxHash,
|
|
14
14
|
UnsignedTransaction,
|
|
15
15
|
} from "@wormhole-foundation/sdk";
|
|
16
|
-
import {
|
|
17
|
-
AptosUnsignedTransaction,
|
|
16
|
+
import type {
|
|
18
17
|
AptosChains,
|
|
18
|
+
AptosUnsignedTransaction,
|
|
19
19
|
} from "@wormhole-foundation/sdk-aptos";
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
validateExpireTimestamp,
|
|
23
|
-
} from "../types";
|
|
24
|
-
import { CrossChainCore } from "../../../CrossChainCore";
|
|
20
|
+
import type { CrossChainCore } from "../../../CrossChainCore";
|
|
21
|
+
import { type OnTransactionSigned, validateExpireTimestamp } from "../types";
|
|
25
22
|
|
|
26
|
-
export class AptosLocalSigner<
|
|
27
|
-
N
|
|
28
|
-
|
|
29
|
-
> implements SignAndSendSigner<N, C> {
|
|
23
|
+
export class AptosLocalSigner<N extends Network, C extends Chain>
|
|
24
|
+
implements SignAndSendSigner<N, C>
|
|
25
|
+
{
|
|
30
26
|
_chain: C;
|
|
31
27
|
_options: any;
|
|
32
28
|
_wallet: Account;
|
|
@@ -116,7 +112,7 @@ export async function signAndSendTransaction(
|
|
|
116
112
|
const txnToSign = await aptos.transaction.build.simple({
|
|
117
113
|
data: payload,
|
|
118
114
|
sender: wallet.accountAddress.toString(),
|
|
119
|
-
withFeePayer: sponsorAccount
|
|
115
|
+
withFeePayer: !!sponsorAccount,
|
|
120
116
|
...(typeof expireTimestamp !== "undefined"
|
|
121
117
|
? { options: { expireTimestamp } }
|
|
122
118
|
: {}),
|