@rash2x/bridge-widget 0.7.4 → 0.7.6

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/index.d.ts CHANGED
@@ -198,7 +198,7 @@ declare class ChainStrategyRegistry {
198
198
  * Compute fee breakdown: message fee in native token, bridge fee in transfer token,
199
199
  * gas on destination in dst native token, total in USD
200
200
  */
201
- export declare function computeFeeBreakdownUsd(quote: Quote | undefined, srcToken: Token | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined): FeeBreakdown;
201
+ export declare function computeFeeBreakdownUsd(quote: Quote | undefined, srcToken: Token | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined, srcChain?: Chain, dstChain?: Chain): FeeBreakdown;
202
202
 
203
203
  declare interface ConnectedWalletActions {
204
204
  setTonConnected: (connected: boolean) => void;
@@ -391,7 +391,7 @@ export declare function getQuoteAmounts(quote: Quote | undefined, srcToken: Toke
391
391
  /**
392
392
  * Get complete quote details for UI display
393
393
  */
394
- export declare function getQuoteDetails(quote: Quote | undefined, srcToken: Token | undefined, dstToken: Token | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined, slippageBps: number): {
394
+ export declare function getQuoteDetails(quote: Quote | undefined, srcToken: Token | undefined, dstToken: Token | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined, slippageBps: number, srcChain?: Chain, dstChain?: Chain): {
395
395
  inputAmount: number;
396
396
  outputAmount: number;
397
397
  outputAmountRounded: string;
@@ -415,6 +415,10 @@ export declare function getTonBalances(address: string, tokens: Token[], customT
415
415
 
416
416
  export declare function getTronBalances(tronWeb: TronWeb, address: string, tokens: Token[]): Promise<WalletBalances>;
417
417
 
418
+ export declare function isAllowedFromChain(chainKey: string): boolean;
419
+
420
+ export declare function isAllowedToChain(chainKey: string): boolean;
421
+
418
422
  export declare function isNativeAddrEqual(chain: Chain | undefined, tokenAddr?: string): boolean;
419
423
 
420
424
  export declare function isNativeAddress(addr?: string): boolean;
@@ -467,7 +471,9 @@ declare interface PollUntilDeliveredParams {
467
471
 
468
472
  export declare interface Quote {
469
473
  route: string;
470
- error: string | null;
474
+ error: {
475
+ message: string;
476
+ } | null;
471
477
  srcAmount: string;
472
478
  dstAmount: string;
473
479
  srcAmountMax: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rash2x/bridge-widget",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Cross-chain bridge widget powered by Stargate Protocol with multi-chain wallet support",
5
5
  "type": "module",
6
6
  "main": "./dist/evaa-bridge.cjs",