Socket
Socket
Sign inDemoInstall

@wormhole-foundation/sdk-connect

Package Overview
Dependencies
Maintainers
6
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wormhole-foundation/sdk-connect - npm Package Compare versions

Comparing version 0.5.3-beta.6 to 0.5.3-beta.7

4

dist/cjs/routes/cctp/manual.d.ts
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { CircleAttestationReceipt } from "../../protocols/cctpTransfer.js";

@@ -40,3 +40,3 @@ import type { TransferReceipt } from "../../types.js";

initiate(signer: Signer, quote: Q): Promise<R>;
complete(signer: Signer, receipt: R): Promise<TransactionId[]>;
complete(signer: Signer, receipt: R): Promise<R>;
track(receipt: R, timeout?: number): AsyncGenerator<import("../../protocols/cctpTransfer.js").CircleTransferReceipt<"Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda", "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda">, void, unknown>;

@@ -43,0 +43,0 @@ private toTransferDetails;

@@ -92,7 +92,12 @@ "use strict";

const xfer = cb.redeem(this.request.to.address, message, attestation);
return await (0, common_js_1.signSendWait)(this.request.toChain, xfer, signer);
const dstTxids = await (0, common_js_1.signSendWait)(this.request.toChain, xfer, signer);
return {
...receipt,
state: types_js_1.TransferState.DestinationInitiated,
destinationTxs: dstTxids,
};
}
else {
//
return [];
return receipt;
}

@@ -99,0 +104,0 @@ }

import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { Wormhole } from "../wormhole.js";

@@ -57,3 +57,3 @@ import type { RouteTransferRequest } from "./request.js";

IS_AUTOMATIC: boolean;
abstract complete(sender: Signer, receipt: R): Promise<TransactionId[]>;
abstract complete(sender: Signer, receipt: R): Promise<R>;
}

@@ -66,5 +66,5 @@ export declare function isManual<N extends Network>(route: Route<N>): route is ManualRoute<N>;

export declare abstract class FinalizableRoute<N extends Network, OP extends Options = Options, VP extends ValidatedTransferParams<OP> = ValidatedTransferParams<OP>, R extends Receipt = Receipt> extends Route<N, OP, VP, R> {
abstract finalize(sender: Signer, receipt: R): Promise<TransactionId[]>;
abstract finalize(sender: Signer, receipt: R): Promise<R>;
}
export declare function isFinalizable<N extends Network>(route: Route<N>): route is FinalizableRoute<N>;
//# sourceMappingURL=route.d.ts.map
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { AttestationReceipt, TransferReceipt } from "../../types.js";

@@ -39,3 +39,3 @@ import type { StaticRouteMethods } from "../route.js";

initiate(signer: Signer, quote: Q): Promise<R>;
complete(signer: Signer, receipt: R): Promise<TransactionId[]>;
complete(signer: Signer, receipt: R): Promise<R>;
track(receipt: R, timeout?: number): AsyncGenerator<import("../../protocols/tokenTransfer.js").TokenTransferReceipt<"Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda", "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda">, void, unknown>;

@@ -42,0 +42,0 @@ private toTransferDetails;

@@ -69,5 +69,8 @@ "use strict";

throw new Error("The source must be finalized in order to complete the transfer");
return await tokenTransfer_js_1.TokenTransfer.redeem(this.request.toChain,
// todo: ew?
receipt.attestation.attestation, signer);
const dstTxIds = await tokenTransfer_js_1.TokenTransfer.redeem(this.request.toChain, receipt.attestation.attestation, signer);
return {
...receipt,
state: types_js_1.TransferState.DestinationInitiated,
destinationTxs: dstTxIds,
};
}

@@ -74,0 +77,0 @@ async *track(receipt, timeout) {

import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { CircleAttestationReceipt } from "../../protocols/cctpTransfer.js";

@@ -40,3 +40,3 @@ import type { TransferReceipt } from "../../types.js";

initiate(signer: Signer, quote: Q): Promise<R>;
complete(signer: Signer, receipt: R): Promise<TransactionId[]>;
complete(signer: Signer, receipt: R): Promise<R>;
track(receipt: R, timeout?: number): AsyncGenerator<import("../../protocols/cctpTransfer.js").CircleTransferReceipt<"Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda", "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda">, void, unknown>;

@@ -43,0 +43,0 @@ private toTransferDetails;

@@ -89,7 +89,12 @@ import { amount, circle, contracts } from "@wormhole-foundation/sdk-base";

const xfer = cb.redeem(this.request.to.address, message, attestation);
return await signSendWait(this.request.toChain, xfer, signer);
const dstTxids = await signSendWait(this.request.toChain, xfer, signer);
return {
...receipt,
state: TransferState.DestinationInitiated,
destinationTxs: dstTxids,
};
}
else {
//
return [];
return receipt;
}

@@ -96,0 +101,0 @@ }

import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { Wormhole } from "../wormhole.js";

@@ -57,3 +57,3 @@ import type { RouteTransferRequest } from "./request.js";

IS_AUTOMATIC: boolean;
abstract complete(sender: Signer, receipt: R): Promise<TransactionId[]>;
abstract complete(sender: Signer, receipt: R): Promise<R>;
}

@@ -66,5 +66,5 @@ export declare function isManual<N extends Network>(route: Route<N>): route is ManualRoute<N>;

export declare abstract class FinalizableRoute<N extends Network, OP extends Options = Options, VP extends ValidatedTransferParams<OP> = ValidatedTransferParams<OP>, R extends Receipt = Receipt> extends Route<N, OP, VP, R> {
abstract finalize(sender: Signer, receipt: R): Promise<TransactionId[]>;
abstract finalize(sender: Signer, receipt: R): Promise<R>;
}
export declare function isFinalizable<N extends Network>(route: Route<N>): route is FinalizableRoute<N>;
//# sourceMappingURL=route.d.ts.map
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId, TransactionId } from "@wormhole-foundation/sdk-definitions";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import type { AttestationReceipt, TransferReceipt } from "../../types.js";

@@ -39,3 +39,3 @@ import type { StaticRouteMethods } from "../route.js";

initiate(signer: Signer, quote: Q): Promise<R>;
complete(signer: Signer, receipt: R): Promise<TransactionId[]>;
complete(signer: Signer, receipt: R): Promise<R>;
track(receipt: R, timeout?: number): AsyncGenerator<import("../../protocols/tokenTransfer.js").TokenTransferReceipt<"Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda", "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Acala" | "Arbitrum" | "Aurora" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Karura" | "Klaytn" | "Moonbeam" | "Neon" | "Oasis" | "Optimism" | "Polygon" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Pythnet" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra" | "Terra2" | "Wormchain" | "Xpla" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda">, void, unknown>;

@@ -42,0 +42,0 @@ private toTransferDetails;

@@ -66,5 +66,8 @@ import { amount, contracts } from "@wormhole-foundation/sdk-base";

throw new Error("The source must be finalized in order to complete the transfer");
return await TokenTransfer.redeem(this.request.toChain,
// todo: ew?
receipt.attestation.attestation, signer);
const dstTxIds = await TokenTransfer.redeem(this.request.toChain, receipt.attestation.attestation, signer);
return {
...receipt,
state: TransferState.DestinationInitiated,
destinationTxs: dstTxIds,
};
}

@@ -71,0 +74,0 @@ async *track(receipt, timeout) {

{
"name": "@wormhole-foundation/sdk-connect",
"version": "0.5.3-beta.6",
"version": "0.5.3-beta.7",
"repository": {

@@ -78,6 +78,6 @@ "type": "git",

"axios": "^1.4.0",
"@wormhole-foundation/sdk-base": "0.5.3-beta.6",
"@wormhole-foundation/sdk-definitions": "0.5.3-beta.6"
"@wormhole-foundation/sdk-base": "0.5.3-beta.7",
"@wormhole-foundation/sdk-definitions": "0.5.3-beta.7"
},
"type": "module"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc