New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@avalabs/bridge-unified

Package Overview
Dependencies
Maintainers
0
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avalabs/bridge-unified - npm Package Compare versions

Comparing version 0.0.0-CP-8544-expose-minimum-transfe-20240827202329 to 0.0.0-CP-8544-fix-get-fee-20240913161550

61

dist/index.d.ts

@@ -10,7 +10,9 @@ import { Address } from 'viem';

};
networkToken: Asset;
networkToken: NativeAsset;
};
declare enum Environment {
DEV = "dev",
PROD = "production",
STAGING = "staging",
TEST = "test"

@@ -56,11 +58,17 @@ }

declare enum ErrorReason {
UNKNOWN = "UNKNOWN",
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED",
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED",
CONFIG_NOT_AVAILABLE = "CONFIG_NOT_AVAILABLE",
INVALID_PARAMS = "INVALID_PARAMS",
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN",
ENVIRONMENT_NOT_SUPPORTED = "ENVIRONMENT_NOT_SUPPORTED",
IDENTICAL_CHAINS_PROVIDED = "IDENTICAL_CHAINS_PROVIDED",
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED",
INCORRECT_AMOUNT_PROVIDED = "INCORRECT_AMOUNT_PROVIDED",
INCORRECT_ADDRESS_PROVIDED = "INCORRECT_ADDRESS_PROVIDED",
CHAIN_NOT_SUPPORTED = "CHAIN_NOT_SUPPORTED",
ASSET_NOT_SUPPORTED = "ASSET_NOT_SUPPORTED",
CONFIRMATION_COUNT_UNKNOWN = "CONFIRMATION_COUNT_UNKNOWN"
INCORRECT_HASH_PROVIDED = "INCORRECT_HASH_PROVIDED",
INCORRECT_TXHASH_PROVIDED = "INCORRECT_TXHASH_PROVIDED",
INVALID_PARAMS = "INVALID_PARAMS",
UNKNOWN = "UNKNOWN",
VULNERABLE_TOKEN_APPROVAL_ADDRESS = "VULNERABLE_TOKEN_APPROVAL_ADDRESS",
WARDEN_CONFIG_MISMATCH = "WARDEN_CONFIG_MISMATCH",
WARDEN_CONFIG_MISSING_NETWORK = "WARDEN_CONFIG_MISSING_NETWORK"
}

@@ -74,4 +82,3 @@

amount: bigint;
amountDecimals: number;
symbol: string;
asset: BridgeAsset;
completedAt?: number;

@@ -85,3 +92,3 @@ errorCode?: ErrorCode;

sourceConfirmationCount: number;
requiredSourceConfirmationCount: number;
sourceRequiredConfirmationCount: number;
targetChain: Chain;

@@ -92,4 +99,4 @@ targetStartedAt?: number;

targetConfirmationCount: number;
requiredTargetConfirmationCount: number;
startBlockNumber?: bigint;
targetRequiredConfirmationCount: number;
targetStartBlockNumber?: bigint;
metadata?: Record<string, unknown>;

@@ -99,3 +106,5 @@ };

declare enum BridgeType {
CCTP = "cctp"
AVALANCHE_EVM = "avalanche-evm",
CCTP = "cctp",
ICTT_ERC20_ERC20 = "ictt-erc20-erc20"
}

@@ -111,3 +120,4 @@ type FeeParams = {

AllowanceApproval = "allowance-approval",
TokensTransfer = "tokens-transfer"
TokensTransfer = "tokens-transfer",
WrapToken = "wrap-token"
}

@@ -131,2 +141,3 @@ type BridgeStepDetails = {

};
type GasEstimationParams = Omit<TransferParams, 'sign'>;
type TrackingParams = {

@@ -140,4 +151,4 @@ bridgeTransfer: BridgeTransfer;

type: BridgeType;
estimateGas: (params: TransferParams) => Promise<bigint>;
getAssets: () => Promise<ChainAssetMap>;
estimateGas: (params: GasEstimationParams) => Promise<bigint>;
getAssets: () => ChainAssetMap;
getFees: (params: FeeParams) => Promise<AssetFeeMap>;

@@ -157,5 +168,3 @@ transferAsset: (params: TransferParams) => Promise<BridgeTransfer>;

}
type Asset = {
type: TokenType;
address?: Address;
type BaseAsset = {
name: string;

@@ -165,2 +174,12 @@ symbol: string;

};
type Erc20Asset = BaseAsset & {
type: TokenType.ERC20;
address: Address;
};
type NativeAsset = BaseAsset & {
type: TokenType.NATIVE;
};
declare const isErc20Asset: (asset: Asset) => asset is Erc20Asset;
declare const isNativeAsset: (asset: Asset) => asset is NativeAsset;
type Asset = Erc20Asset | NativeAsset;
type DestinationInfo = Record<string, BridgeType[]>;

@@ -183,3 +202,3 @@ type BridgeAsset = Asset & {

getFees: (params: FeeParams) => Promise<AssetFeeMap>;
estimateGas: (params: TransferParams) => Promise<bigint>;
estimateGas: (params: GasEstimationParams) => Promise<bigint>;
canTransferAsset: (asset: BridgeAsset, targetChainId: string) => boolean;

@@ -205,2 +224,2 @@ transferAsset: (params: TransferParams) => Promise<BridgeTransfer>;

export { Asset, AssetFeeMap, BridgeAsset, BridgeService, BridgeServiceConfig, BridgeServiceFactory, BridgeServicesMap, BridgeSignatureReason, BridgeStepDetails, BridgeTransfer, BridgeType, Chain, ChainAssetMap, DestinationInfo, Dispatch, Environment, ErrorCode, ErrorReason, FeeParams, Hex, Provider, Signer, TokenType, TrackingParams, TransactionRequest, TransferParams, _default as caip2, createUnifiedBridgeService, getEnabledBridgeServices };
export { Asset, AssetFeeMap, BridgeAsset, BridgeService, BridgeServiceConfig, BridgeServiceFactory, BridgeServicesMap, BridgeSignatureReason, BridgeStepDetails, BridgeTransfer, BridgeType, Chain, ChainAssetMap, DestinationInfo, Dispatch, Environment, Erc20Asset, ErrorCode, ErrorReason, FeeParams, GasEstimationParams, Hex, NativeAsset, Provider, Signer, TokenType, TrackingParams, TransactionRequest, TransferParams, _default as caip2, createUnifiedBridgeService, getEnabledBridgeServices, isErc20Asset, isNativeAsset };
{
"name": "@avalabs/bridge-unified",
"license": "Limited Ecosystem License",
"version": "0.0.0-CP-8544-expose-minimum-transfe-20240827202329",
"version": "0.0.0-CP-8544-fix-get-fee-20240913161550",
"main": "dist/index.cjs",

@@ -15,3 +15,4 @@ "module": "dist/index.js",

"lodash": "4.17.21",
"viem": "2.11.1"
"viem": "2.11.1",
"zod": "3.23.8"
},

@@ -29,2 +30,3 @@ "devDependencies": {

"build": "tsup",
"build:watch": "tsup --watch",
"lint": "eslint \"src/**/*.ts\"",

@@ -31,0 +33,0 @@ "test": "jest",

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 too big to display

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