@rash2x/bridge-widget 0.1.4 → 0.1.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
@@ -1,5 +1,7 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
+ import { PublicClient } from 'viem';
2
3
  import { StoreApi } from 'zustand';
4
+ import { TonClient } from '@ton/ton';
3
5
  import { TronWeb } from 'tronweb';
4
6
  import { UseBoundStore } from 'zustand';
5
7
 
@@ -163,6 +165,9 @@ export declare const EvaaBridge: (props: EvaaBridgeProps) => JSX.Element;
163
165
 
164
166
  export declare interface EvaaBridgeProps {
165
167
  className?: string;
168
+ tonClient?: TonClient;
169
+ tonApiKey?: string;
170
+ modalContainerId?: string;
166
171
  onInitialized?: () => void;
167
172
  onSwapStart?: (data: SwapStartData) => void;
168
173
  onSwapSuccess?: (data: SwapSuccessData) => void;
@@ -238,7 +243,7 @@ export declare function getDeliveryStatus(params: DeliveryStatusParams): Promise
238
243
 
239
244
  export declare function getDestTokens(srcChainKey: string, srcTokenAddr: string): Promise<TokenWithDestination[]>;
240
245
 
241
- export declare function getEvmBalances(address: string, tokens: Token[]): Promise<WalletBalances>;
246
+ export declare function getEvmBalances(publicClient: PublicClient, address: string, tokens: Token[]): Promise<WalletBalances>;
242
247
 
243
248
  /**
244
249
  * Get human-readable amounts from quote
@@ -290,10 +295,10 @@ export declare function getQuoteFees(quote: Quote | undefined, tokens: Token[] |
290
295
  */
291
296
  export declare function getQuotesByPriority(req: QuoteRequest): Promise<Quote | null>;
292
297
 
293
- export declare function getSwapBalances(accountFriendly: string): Promise<BalancesMap>;
294
-
295
298
  export declare function getTokens(): Promise<Token[]>;
296
299
 
300
+ export declare function getTonBalances(address: string, tokens: Token[], customTonClient?: TonClient, tonApiKey?: string): Promise<WalletBalances>;
301
+
297
302
  export declare function getTronBalances(tronWeb: TronWeb, address: string, tokens: Token[]): Promise<WalletBalances>;
298
303
 
299
304
  export declare function isAddressValidForChain(chainKey?: string, addr?: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rash2x/bridge-widget",
3
- "version": "0.1.4",
3
+ "version": "0.1.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",
@@ -50,18 +50,17 @@
50
50
  "license": "MIT",
51
51
  "peerDependencies": {
52
52
  "@tanstack/react-query": "^5.0.0",
53
- "@ton/core": "^0.61.0",
53
+ "@ton/core": "^0.62.0",
54
54
  "@ton/crypto": "^3.0.0",
55
55
  "@ton/ton": "^15.0.0",
56
56
  "@tonconnect/ui-react": "^2.0.0",
57
57
  "@tronweb3/tronwallet-adapter-react-hooks": "^1.0.0",
58
58
  "@tronweb3/tronwallet-adapters": "^1.0.0",
59
- "connectkit": "^1.9.1",
60
59
  "ethers": "^6.0.0",
61
60
  "react": "^19.0.0",
62
61
  "react-dom": "^19.0.0",
63
62
  "tronweb": "^6.0.0",
64
- "viem": "^2.0.0",
63
+ "viem": "^2.38.1",
65
64
  "wagmi": "^2.0.0"
66
65
  },
67
66
  "peerDependenciesMeta": {
@@ -71,9 +70,6 @@
71
70
  "viem": {
72
71
  "optional": true
73
72
  },
74
- "connectkit": {
75
- "optional": true
76
- },
77
73
  "ethers": {
78
74
  "optional": true
79
75
  },
@@ -99,6 +95,9 @@
99
95
  "optional": true
100
96
  }
101
97
  },
98
+ "overrides": {
99
+ "viem": "^2.38.1"
100
+ },
102
101
  "dependencies": {
103
102
  "@hookform/resolvers": "^5.2.1",
104
103
  "@radix-ui/react-accordion": "^1.2.12",
@@ -109,7 +108,6 @@
109
108
  "@radix-ui/react-switch": "^1.2.6",
110
109
  "@radix-ui/react-tooltip": "^1.2.8",
111
110
  "@types/react-window": "^1.8.8",
112
- "axios": "^1.11.0",
113
111
  "class-variance-authority": "^0.7.1",
114
112
  "clsx": "^2.1.1",
115
113
  "cmdk": "^1.1.1",
@@ -130,7 +128,7 @@
130
128
  "@eslint/js": "^9.30.1",
131
129
  "@tailwindcss/vite": "^4.1.11",
132
130
  "@tanstack/react-query": "^5.85.3",
133
- "@ton/core": "^0.61.0",
131
+ "@ton/core": "^0.62.0",
134
132
  "@ton/crypto": "^3.3.0",
135
133
  "@ton/ton": "^15.3.1",
136
134
  "@tonconnect/ui-react": "^2.2.0",
@@ -143,7 +141,6 @@
143
141
  "@vitejs/plugin-react": "^5.0.0",
144
142
  "ajv": "^8.17.1",
145
143
  "buffer": "^6.0.3",
146
- "connectkit": "^1.9.1",
147
144
  "eslint": "^9.30.1",
148
145
  "eslint-plugin-react-hooks": "^5.2.0",
149
146
  "eslint-plugin-react-refresh": "^0.4.20",
@@ -157,7 +154,6 @@
157
154
  "tw-animate-css": "^1.3.6",
158
155
  "typescript": "~5.8.3",
159
156
  "typescript-eslint": "^8.35.1",
160
- "view": "^1.1.1",
161
157
  "vite": "^7.0.4",
162
158
  "vite-plugin-dts": "^4.5.4",
163
159
  "wagmi": "^2.16.9"