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.7.1 to 0.7.2

2

dist/cjs/routes/tokenBridge/automatic.d.ts
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import { ChainAddress } from "@wormhole-foundation/sdk-definitions";
import { TokenTransfer } from "../../protocols/tokenBridge/tokenTransfer.js";

@@ -9,3 +10,2 @@ import type { AttestationReceipt } from "../../types.js";

import type { Quote, QuoteResult, Receipt, TransferParams, ValidatedTransferParams, ValidationResult } from "../types.js";
import { ChainAddress } from "@wormhole-foundation/sdk-definitions";
export declare namespace AutomaticTokenBridgeRoute {

@@ -12,0 +12,0 @@ type Options = {

@@ -8,4 +8,4 @@ "use strict";

const types_js_1 = require("../../types.js");
const wormhole_js_1 = require("../../wormhole.js");
const route_js_1 = require("../route.js");
const wormhole_js_1 = require("../../wormhole.js");
class AutomaticTokenBridgeRoute extends route_js_1.AutomaticRoute {

@@ -40,3 +40,9 @@ NATIVE_GAS_DROPOFF_SUPPORTED = true;

try {
return [await tokenTransfer_js_1.TokenTransfer.lookupDestinationToken(fromChain, toChain, sourceToken)];
const expectedDestinationToken = await tokenTransfer_js_1.TokenTransfer.lookupDestinationToken(fromChain, toChain, sourceToken);
const atb = await toChain.getAutomaticTokenBridge();
const acceptable = await atb.isRegisteredToken(expectedDestinationToken.address);
if (!acceptable) {
throw new Error("Destination token is not accepted by the AutomaticTokenBridge");
}
return [expectedDestinationToken];
}

@@ -43,0 +49,0 @@ catch (e) {

import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import type { ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions";
import { ChainAddress } from "@wormhole-foundation/sdk-definitions";
import { TokenTransfer } from "../../protocols/tokenBridge/tokenTransfer.js";

@@ -9,3 +10,2 @@ import type { AttestationReceipt } from "../../types.js";

import type { Quote, QuoteResult, Receipt, TransferParams, ValidatedTransferParams, ValidationResult } from "../types.js";
import { ChainAddress } from "@wormhole-foundation/sdk-definitions";
export declare namespace AutomaticTokenBridgeRoute {

@@ -12,0 +12,0 @@ type Options = {

import { amount, contracts } from "@wormhole-foundation/sdk-base";
import { isNative, isTokenId, nativeTokenId } from "@wormhole-foundation/sdk-definitions";
import { isNative, isTokenId, nativeTokenId, } from "@wormhole-foundation/sdk-definitions";
import { TokenTransfer } from "../../protocols/tokenBridge/tokenTransfer.js";
import { TransferState } from "../../types.js";
import { Wormhole } from "../../wormhole.js";
import { AutomaticRoute } from "../route.js";
import { Wormhole } from "../../wormhole.js";
export class AutomaticTokenBridgeRoute extends AutomaticRoute {

@@ -36,3 +36,9 @@ NATIVE_GAS_DROPOFF_SUPPORTED = true;

try {
return [await TokenTransfer.lookupDestinationToken(fromChain, toChain, sourceToken)];
const expectedDestinationToken = await TokenTransfer.lookupDestinationToken(fromChain, toChain, sourceToken);
const atb = await toChain.getAutomaticTokenBridge();
const acceptable = await atb.isRegisteredToken(expectedDestinationToken.address);
if (!acceptable) {
throw new Error("Destination token is not accepted by the AutomaticTokenBridge");
}
return [expectedDestinationToken];
}

@@ -39,0 +45,0 @@ catch (e) {

{
"name": "@wormhole-foundation/sdk-connect",
"version": "0.7.1",
"version": "0.7.2",
"repository": {

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

"axios": "^1.4.0",
"@wormhole-foundation/sdk-base": "0.7.1",
"@wormhole-foundation/sdk-definitions": "0.7.1"
"@wormhole-foundation/sdk-base": "0.7.2",
"@wormhole-foundation/sdk-definitions": "0.7.2"
},
"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

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