@avalabs/bridge-unified
Advanced tools
Comparing version 0.0.0-chore-bump-ci-versions-20240923192820 to 0.0.0-chore-trigger-release-20241030175404
import { Address } from 'viem'; | ||
import { Address as Address$1 } from 'abitype'; | ||
@@ -12,2 +13,10 @@ type Chain = { | ||
}; | ||
declare enum AvalancheChainIds { | ||
FUJI = "eip155:43113", | ||
MAINNET = "eip155:43114" | ||
} | ||
declare enum EthereumChainIds { | ||
MAINNET = "eip155:1", | ||
SEPOLIA = "eip155:11155111" | ||
} | ||
@@ -135,3 +144,3 @@ declare enum Environment { | ||
}; | ||
type GasEstimationParams = Omit<TransferParams, 'sign'>; | ||
type GasEstimationParams = Omit<TransferParams, 'sign' | 'onStepChange'>; | ||
type TrackingParams = { | ||
@@ -143,5 +152,28 @@ bridgeTransfer: BridgeTransfer; | ||
}; | ||
type AnalyzeTxParams = { | ||
chainId: string; | ||
from: Address$1; | ||
to: Address$1; | ||
tokenTransfers: { | ||
from: Address$1; | ||
to: Address$1; | ||
symbol: string; | ||
}[]; | ||
}; | ||
type AnalyzeTxResult = { | ||
isBridgeTx: true; | ||
bridgeType: BridgeType; | ||
sourceChainId?: string; | ||
targetChainId?: string; | ||
} | { | ||
isBridgeTx: false; | ||
}; | ||
type BridgeService = { | ||
type: BridgeType; | ||
analyzeTx: (params: AnalyzeTxParams) => AnalyzeTxResult; | ||
estimateGas: (params: GasEstimationParams) => Promise<bigint>; | ||
estimateReceiveAmount: (params: GasEstimationParams) => Promise<{ | ||
asset: Asset; | ||
amount: bigint; | ||
}>; | ||
getAssets: () => ChainAssetMap; | ||
@@ -191,8 +223,13 @@ getFees: (params: FeeParams) => Promise<AssetFeeMap>; | ||
declare const createUnifiedBridgeService: ({ environment, enabledBridgeServices }: BridgeServiceConfig) => { | ||
canTransferAsset: (asset: BridgeAsset, targetChainId: string) => boolean; | ||
environment: Environment; | ||
estimateGas: (params: GasEstimationParams) => Promise<bigint>; | ||
estimateReceiveAmount: (params: GasEstimationParams) => Promise<{ | ||
asset: Asset; | ||
amount: bigint; | ||
}>; | ||
getAssets: () => Promise<ChainAssetMap>; | ||
getFees: (params: FeeParams) => Promise<AssetFeeMap>; | ||
estimateGas: (params: GasEstimationParams) => Promise<bigint>; | ||
canTransferAsset: (asset: BridgeAsset, targetChainId: string) => boolean; | ||
transferAsset: (params: TransferParams) => Promise<BridgeTransfer>; | ||
analyzeTx: (params: AnalyzeTxParams) => AnalyzeTxResult; | ||
getMinimumTransferAmount: (params: FeeParams) => Promise<bigint>; | ||
trackTransfer: (params: TrackingParams) => { | ||
@@ -202,3 +239,3 @@ cancel: () => void; | ||
}; | ||
getMinimumTransferAmount: (params: FeeParams) => Promise<bigint>; | ||
transferAsset: (params: TransferParams) => Promise<BridgeTransfer>; | ||
}; | ||
@@ -217,2 +254,2 @@ | ||
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 }; | ||
export { AnalyzeTxParams, AnalyzeTxResult, Asset, AssetFeeMap, AvalancheChainIds, BridgeAsset, BridgeService, BridgeServiceConfig, BridgeServiceFactory, BridgeServicesMap, BridgeSignatureReason, BridgeStepDetails, BridgeTransfer, BridgeType, Chain, ChainAssetMap, DestinationInfo, Dispatch, Environment, Erc20Asset, ErrorCode, ErrorReason, EthereumChainIds, 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-chore-bump-ci-versions-20240923192820", | ||
"version": "0.0.0-chore-trigger-release-20241030175404", | ||
"main": "dist/index.cjs", | ||
@@ -13,2 +13,4 @@ "module": "dist/index.js", | ||
"dependencies": { | ||
"@noble/hashes": "1.5.0", | ||
"@scure/base": "1.1.9", | ||
"abitype": "0.9.3", | ||
@@ -15,0 +17,0 @@ "lodash": "4.17.21", |
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
851158
953
6
6
+ Added@noble/hashes@1.5.0
+ Added@scure/base@1.1.9
+ Added@noble/hashes@1.3.31.5.0(transitive)