@rash2x/bridge-widget 0.5.0 → 0.5.5

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
@@ -4,7 +4,6 @@ import { PublicClient } from 'viem';
4
4
  import { StoreApi } from 'zustand';
5
5
  import { TonClient } from '@ton/ton';
6
6
  import { TronWeb } from 'tronweb';
7
- import { Types } from 'tronweb';
8
7
  import { UseBoundStore } from 'zustand';
9
8
 
10
9
  /**
@@ -62,6 +61,13 @@ declare type BridgeQuoteStatus = "idle" | "loading" | "success" | "error";
62
61
 
63
62
  declare type BridgeQuoteStore = BridgeQuoteState & BridgeQuoteActions;
64
63
 
64
+ export declare interface BridgeUrlParams {
65
+ srcToken?: string;
66
+ srcChain?: string;
67
+ dstChain?: string;
68
+ amount?: string;
69
+ }
70
+
65
71
  export declare function buildAssetMatrix(tokens: Token[]): AssetMatrix;
66
72
 
67
73
  /**
@@ -208,9 +214,12 @@ export declare interface EvaaBridgeProps {
208
214
  className?: string;
209
215
  tonClient?: TonClient;
210
216
  tonApiKey?: string;
211
- tronWalletConnectConfig?: TronWalletConnectConfig;
217
+ walletConnectProjectId?: string;
212
218
  defaultLanguage?: string;
213
219
  transactionIcons?: TransactionIcons;
220
+ enableUrlSync?: boolean;
221
+ urlParams?: BridgeUrlParams;
222
+ onUrlParamsChange?: (params: BridgeUrlParams) => void;
214
223
  onInitialized?: () => void;
215
224
  onSwapStart?: (data: SwapStartData) => void;
216
225
  onSwapSuccess?: (data: SwapSuccessData) => void;
@@ -634,18 +643,6 @@ declare interface TronMonitorReceipt {
634
643
  };
635
644
  }
636
645
 
637
- declare interface TronWalletConnectConfig {
638
- projectId: string;
639
- metadata?: {
640
- name: string;
641
- description: string;
642
- url: string;
643
- icons: string[];
644
- };
645
- themeMode?: "light" | "dark";
646
- themeVariables?: Record<string, string>;
647
- }
648
-
649
646
  /**
650
647
  * Обрезает число до указанного количества десятичных знаков без округления
651
648
  * Например: truncateToDecimals(3.389, 2) = "3.38" (не "3.39")
@@ -701,24 +698,6 @@ export declare const useTokensStore: UseBoundStore<StoreApi<TokensStoreType>>;
701
698
 
702
699
  export declare const useTransactionStore: UseBoundStore<StoreApi<Store>>;
703
700
 
704
- export declare function useTronWalletConnect(options: UseTronWalletConnectOptions): UseTronWalletConnectReturn;
705
-
706
- export declare interface UseTronWalletConnectOptions {
707
- projectId: string;
708
- metadata?: WalletMetadata;
709
- themeMode?: "light" | "dark";
710
- themeVariables?: Record<string, string>;
711
- }
712
-
713
- export declare interface UseTronWalletConnectReturn {
714
- address: string | null;
715
- isConnected: boolean;
716
- isConnecting: boolean;
717
- connect: () => Promise<void>;
718
- disconnect: () => Promise<void>;
719
- signTransaction: (transaction: Types.Transaction) => Promise<Types.Transaction>;
720
- }
721
-
722
701
  export declare interface WalletBalance {
723
702
  balance: number;
724
703
  address: string;
@@ -728,11 +707,4 @@ export declare type WalletBalances = Record<string, WalletBalance>;
728
707
 
729
708
  export declare type WalletKind = "ton" | "evm" | "tron" | null;
730
709
 
731
- export declare interface WalletMetadata {
732
- name: string;
733
- description: string;
734
- url: string;
735
- icons: string[];
736
- }
737
-
738
710
  export { }