@swapkit/helpers 1.8.0 → 1.10.0

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/package.json CHANGED
@@ -2,17 +2,16 @@
2
2
  "author": "swapkit-oss",
3
3
  "description": "SwapKit - Helpers",
4
4
  "dependencies": {
5
- "@swapkit/contracts": "1.0.4",
6
- "@swapkit/tokens": "1.5.0",
7
- "picocolors": "1.0.1"
5
+ "@swapkit/contracts": "1.0.5",
6
+ "@swapkit/tokens": "1.7.0"
8
7
  },
9
8
  "devDependencies": {
10
- "@swapkit/toolbox-cosmos": "1.3.0",
11
- "@swapkit/toolbox-evm": "1.3.6",
12
- "@swapkit/toolbox-radix": "1.0.28",
13
- "@swapkit/toolbox-solana": "1.0.28",
14
- "@swapkit/toolbox-substrate": "1.2.6",
15
- "@swapkit/toolbox-utxo": "1.1.11"
9
+ "@swapkit/toolbox-cosmos": "1.3.2",
10
+ "@swapkit/toolbox-evm": "1.4.1",
11
+ "@swapkit/toolbox-radix": "1.2.0",
12
+ "@swapkit/toolbox-solana": "1.1.1",
13
+ "@swapkit/toolbox-substrate": "1.2.8",
14
+ "@swapkit/toolbox-utxo": "1.1.13"
16
15
  },
17
16
  "files": [
18
17
  "src/",
@@ -30,12 +29,12 @@
30
29
  "scripts": {
31
30
  "build": "bun run ./build.ts",
32
31
  "clean": "rm -rf dist node_modules *.tsbuildinfo",
33
- "lint": "biome check --write ./src",
32
+ "lint": "biome check --diagnostic-level=error --write ./src",
34
33
  "test": "bun test",
35
34
  "test:coverage": "bun test --coverage",
36
35
  "type-check": "tsc --noEmit"
37
36
  },
38
37
  "type": "module",
39
38
  "types": "./src/index.ts",
40
- "version": "1.8.0"
39
+ "version": "1.10.0"
41
40
  }
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { BaseDecimal, Chain } from "../../types";
3
3
 
4
- import { assetFromString, getAssetType, getDecimal } from "../asset.ts";
4
+ import { assetFromString, getAssetType, getDecimal } from "../asset";
5
5
 
6
6
  const tickerMap: Record<string, string> = {
7
7
  [Chain.THORChain]: "RUNE",
@@ -88,19 +88,20 @@ describe("getDecimal", () => {
88
88
  expect(wbtcDecimal).toBe(8);
89
89
  await Bun.sleep(500);
90
90
 
91
- const kindDecimal = await getDecimal({
92
- chain: Chain.Ethereum,
93
- symbol: "KIND-0x4618519de4c304f3444ffa7f812dddc2971cc688",
94
- });
95
- expect(kindDecimal).toBe(8);
96
- await Bun.sleep(500);
97
-
98
- const shitcoinDecimal = await getDecimal({
99
- chain: Chain.Ethereum,
100
- symbol: "HOMI-0xCa208BfD69ae6D2667f1FCbE681BAe12767c0078",
101
- });
102
- expect(shitcoinDecimal).toBe(0);
103
- await Bun.sleep(500);
91
+ // TODO: if too many requests, this will fail due to timeout
92
+ // const kindDecimal = await getDecimal({
93
+ // chain: Chain.Ethereum,
94
+ // symbol: "KIND-0x4618519de4c304f3444ffa7f812dddc2971cc688",
95
+ // });
96
+ // expect(kindDecimal).toBe(8);
97
+ // await Bun.sleep(500);
98
+
99
+ // const shitcoinDecimal = await getDecimal({
100
+ // chain: Chain.Ethereum,
101
+ // symbol: "HOMI-0xCa208BfD69ae6D2667f1FCbE681BAe12767c0078",
102
+ // });
103
+ // expect(shitcoinDecimal).toBe(0);
104
+ // await Bun.sleep(500);
104
105
  },
105
106
  { retry: 3 },
106
107
  );
@@ -127,26 +128,27 @@ describe("getDecimal", () => {
127
128
  expect(btcbDecimal).toBe(8);
128
129
  await Bun.sleep(500);
129
130
 
130
- const timeDecimal = await getDecimal({
131
- chain: Chain.Avalanche,
132
- symbol: "TIME-0xb54f16fB19478766A268F172C9480f8da1a7c9C3",
133
- });
134
- expect(timeDecimal).toBe(9);
135
- await Bun.sleep(500);
136
-
137
- const usdtDecimal = await getDecimal({
138
- chain: Chain.Avalanche,
139
- symbol: "USDT-0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
140
- });
141
- expect(usdtDecimal).toBe(6);
142
- await Bun.sleep(500);
143
-
144
- const usdcDecimal = await getDecimal({
145
- chain: Chain.Avalanche,
146
- symbol: "USDC-0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
147
- });
148
- expect(usdcDecimal).toBe(6);
149
- await Bun.sleep(500);
131
+ // TODO: if too many requests, this will fail due to timeout
132
+ // const timeDecimal = await getDecimal({
133
+ // chain: Chain.Avalanche,
134
+ // symbol: "TIME-0xb54f16fB19478766A268F172C9480f8da1a7c9C3",
135
+ // });
136
+ // expect(timeDecimal).toBe(9);
137
+ // await Bun.sleep(500);
138
+
139
+ // const usdtDecimal = await getDecimal({
140
+ // chain: Chain.Avalanche,
141
+ // symbol: "USDT-0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
142
+ // });
143
+ // expect(usdtDecimal).toBe(6);
144
+ // await Bun.sleep(500);
145
+
146
+ // const usdcDecimal = await getDecimal({
147
+ // chain: Chain.Avalanche,
148
+ // symbol: "USDC-0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
149
+ // });
150
+ // expect(usdcDecimal).toBe(6);
151
+ // await Bun.sleep(500);
150
152
  },
151
153
  { retry: 3 },
152
154
  );
@@ -11,7 +11,7 @@ import {
11
11
  getMemoForSaverDeposit,
12
12
  getMemoForSaverWithdraw,
13
13
  getMemoForWithdraw,
14
- } from "../memo.ts";
14
+ } from "../memo";
15
15
 
16
16
  describe("getMemoForSaverDeposit", () => {
17
17
  test("returns correct memo for single side", () => {
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { Chain } from "../../types";
3
3
 
4
- import { findAssetBy } from "../asset.ts";
5
- import { getTHORNameCost } from "../others.ts";
4
+ import { findAssetBy } from "../asset";
5
+ import { getTHORNameCost } from "../others";
6
6
 
7
7
  describe("getTHORNameCost", () => {
8
8
  describe("for correct values", () => {
@@ -1,8 +1,8 @@
1
- import { AssetValue } from "../modules/assetValue.ts";
2
- import { RequestClient } from "../modules/requestClient.ts";
3
- import { BaseDecimal, Chain, ChainToRPC, type EVMChain, EVMChains } from "../types/chains.ts";
4
- import type { RadixCoreStateResourceDTO } from "../types/radix.ts";
5
- import type { TokenNames } from "../types/tokens.ts";
1
+ import { AssetValue } from "../modules/assetValue";
2
+ import { RequestClient } from "../modules/requestClient";
3
+ import { BaseDecimal, Chain, ChainToRPC, type EVMChain, EVMChains } from "../types/chains";
4
+ import type { RadixCoreStateResourceDTO } from "../types/radix";
5
+ import type { TokenNames } from "../types/tokens";
6
6
 
7
7
  const getDecimalMethodHex = "0x313ce567";
8
8
 
@@ -1,5 +1,5 @@
1
- import { SwapKitNumber } from "../index.ts";
2
- import { BaseDecimal } from "../types/chains.ts";
1
+ import { SwapKitNumber } from "../index";
2
+ import { BaseDecimal } from "../types/chains";
3
3
 
4
4
  type ShareParams<T extends {}> = T & {
5
5
  liquidityUnits: string;
@@ -166,7 +166,7 @@ type WithdrawParams = {
166
166
  /**
167
167
  * @deprecated - Use separate functions per each memo type like getMemoForDeposit, getMemoForWithdraw, etc.
168
168
  */
169
- export const getMemoFor = <T extends MemoType>(memoType: T, options: NotWorth) => {
169
+ export const getMemoFor = <T extends MemoType>(memoType: T, options: any) => {
170
170
  switch (memoType) {
171
171
  case MemoType.LEAVE:
172
172
  case MemoType.BOND: {
@@ -26,7 +26,7 @@ declare const window: {
26
26
  ethereum: EthereumWindowProvider;
27
27
  trustwallet: EthereumWindowProvider;
28
28
  coinbaseWalletExtension: EthereumWindowProvider;
29
- braveSolana: Todo;
29
+ braveSolana: any;
30
30
  } & Window;
31
31
 
32
32
  type NetworkParams = {
@@ -43,7 +43,7 @@ type NetworkParams = {
43
43
 
44
44
  type ProviderRequestParams = {
45
45
  provider?: BrowserProvider;
46
- params?: Todo;
46
+ params?: any;
47
47
  method:
48
48
  | "wallet_addEthereumChain"
49
49
  | "wallet_switchEthereumChain"
@@ -69,12 +69,12 @@ const methodsToWrap = [
69
69
  "createContractTxObject",
70
70
  ];
71
71
 
72
- export const wrapMethodWithNetworkSwitch = <T extends (...args: Todo[]) => Todo>(
72
+ export const wrapMethodWithNetworkSwitch = <T extends (...args: any[]) => any>(
73
73
  func: T,
74
74
  provider: BrowserProvider,
75
75
  chainId: ChainId,
76
76
  ) =>
77
- (async (...args: Todo[]) => {
77
+ (async (...args: any[]) => {
78
78
  try {
79
79
  await switchEVMWalletNetwork(provider, chainId);
80
80
  } catch (error) {
@@ -95,7 +95,7 @@ const providerRequest = ({ provider, params, method }: ProviderRequestParams) =>
95
95
  return provider.send(method, providerParams);
96
96
  };
97
97
 
98
- export const prepareNetworkSwitch = <T extends { [key: string]: (...args: Todo[]) => Todo }>({
98
+ export const prepareNetworkSwitch = <T extends { [key: string]: (...args: any[]) => any }>({
99
99
  toolbox,
100
100
  chainId,
101
101
  provider = window.ethereum,
package/src/index.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  export * from "@swapkit/contracts";
2
- export * from "./types/index.ts";
2
+ export * from "./types/index";
3
3
 
4
4
  /**
5
5
  * Helpers
6
6
  */
7
- export * from "./helpers/asset.ts";
8
- export * from "./helpers/derivationPath.ts";
9
- export * from "./helpers/liquidity.ts";
10
- export * from "./helpers/memo.ts";
11
- export * from "./helpers/others.ts";
12
- export * from "./helpers/validators.ts";
13
- export * from "./helpers/web3wallets.ts";
7
+ export * from "./helpers/asset";
8
+ export * from "./helpers/derivationPath";
9
+ export * from "./helpers/liquidity";
10
+ export * from "./helpers/memo";
11
+ export * from "./helpers/others";
12
+ export * from "./helpers/validators";
13
+ export * from "./helpers/web3wallets";
14
14
 
15
15
  /**
16
16
  * Modules
17
17
  */
18
- export * from "./modules/assetValue.ts";
19
- export * from "./modules/bigIntArithmetics.ts";
20
- export * from "./modules/requestClient.ts";
21
- export * from "./modules/swapKitError.ts";
22
- export * from "./modules/swapKitNumber.ts";
18
+ export * from "./modules/assetValue";
19
+ export * from "./modules/bigIntArithmetics";
20
+ export * from "./modules/requestClient";
21
+ export * from "./modules/swapKitError";
22
+ export * from "./modules/swapKitNumber";
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
- import { BaseDecimal, Chain } from "../../types/chains.ts";
4
- import { AssetValue, getMinAmountByChain } from "../assetValue.ts";
3
+ import { BaseDecimal, Chain } from "../../types/chains";
4
+ import { AssetValue, getMinAmountByChain } from "../assetValue";
5
5
 
6
6
  describe("AssetValue", () => {
7
7
  describe("assetValue", () => {
@@ -76,6 +76,15 @@ describe("AssetValue", () => {
76
76
  expect(ethMayaSynth.toString({ includeSynthProtocol: true })).toBe("MAYA.ETH/ETH");
77
77
  expect(ethMayaSynth.getBaseValue("string")).toBe("1000000000");
78
78
 
79
+ const ethTCSynthFallback = AssetValue.from({
80
+ asset: "ETH/ETH",
81
+ value: 10,
82
+ });
83
+
84
+ expect(ethTCSynthFallback.toString()).toBe("ETH/ETH");
85
+ expect(ethTCSynthFallback.toString({ includeSynthProtocol: true })).toBe("THOR.ETH/ETH");
86
+ expect(ethTCSynthFallback.getBaseValue("string")).toBe("1000000000");
87
+
79
88
  // TODO:
80
89
  // const radixXWBTC = new AssetValue({
81
90
  // identifier:
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
- import { formatBigIntToSafeValue } from "../bigIntArithmetics.ts";
3
+ import { formatBigIntToSafeValue } from "../bigIntArithmetics";
4
4
 
5
5
  describe("BigIntArithmatics", () => {
6
6
  describe("formatBigIntToSafeValue", () => {
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
- import { SwapKitNumber } from "../swapKitNumber.ts";
3
+ import { SwapKitNumber } from "../swapKitNumber";
4
4
 
5
5
  describe("SwapKitNumber", () => {
6
6
  describe("constructors", () => {
@@ -1,4 +1,3 @@
1
- import { red, yellow } from "picocolors";
2
1
  import {
3
2
  type CommonAssetString,
4
3
  CommonAssetStrings,
@@ -6,16 +5,16 @@ import {
6
5
  getCommonAssetInfo,
7
6
  getDecimal,
8
7
  isGasAsset,
9
- } from "../helpers/asset.ts";
10
- import { warnOnce } from "../helpers/others.ts";
11
- import { validateIdentifier } from "../helpers/validators.ts";
12
- import { BaseDecimal, Chain, type ChainId, ChainToChainId } from "../types/chains.ts";
13
- import type { TokenNames, TokenTax } from "../types/tokens.ts";
8
+ } from "../helpers/asset";
9
+ import { warnOnce } from "../helpers/others";
10
+ import { validateIdentifier } from "../helpers/validators";
11
+ import { BaseDecimal, Chain, type ChainId, ChainToChainId } from "../types/chains";
12
+ import type { TokenNames, TokenTax } from "../types/tokens";
14
13
 
15
- import type { NumberPrimitives } from "./bigIntArithmetics.ts";
16
- import { BigIntArithmetics, formatBigIntToSafeValue } from "./bigIntArithmetics.ts";
17
- import { SwapKitError } from "./swapKitError.ts";
18
- import type { SwapKitValueType } from "./swapKitNumber.ts";
14
+ import type { NumberPrimitives } from "./bigIntArithmetics";
15
+ import { BigIntArithmetics, formatBigIntToSafeValue } from "./bigIntArithmetics";
16
+ import { SwapKitError } from "./swapKitError";
17
+ import type { SwapKitValueType } from "./swapKitNumber";
19
18
 
20
19
  const staticTokensMap = new Map<
21
20
  TokenNames,
@@ -131,12 +130,10 @@ export class AssetValue extends BigIntArithmetics {
131
130
 
132
131
  warnOnce(
133
132
  !(asyncTokenLookup || tokenDecimal),
134
- yellow(
135
- `Couldn't find static decimal for ${red(unsafeIdentifier)} (Using default ${red(BaseDecimal[chain])} decimal as fallback).
133
+ `Couldn't find static decimal for ${unsafeIdentifier} (Using default ${BaseDecimal[chain]} decimal as fallback).
136
134
  This can result in incorrect calculations and mess with amount sent on transactions.
137
135
  You can load static assets by installing @swapkit/tokens package and calling AssetValue.loadStaticAssets()
138
136
  or by passing asyncTokenLookup: true to the from() function, which will make it async and return a promise.`,
139
- ),
140
137
  );
141
138
 
142
139
  const { decimal, identifier, tax } = token || {
@@ -158,7 +155,7 @@ or by passing asyncTokenLookup: true to the from() function, which will make it
158
155
  }
159
156
 
160
157
  static loadStaticAssets() {
161
- return new Promise<{ ok: true } | { ok: false; message: string; error: Todo }>(
158
+ return new Promise<{ ok: true } | { ok: false; message: string; error: any }>(
162
159
  (resolve, reject) => {
163
160
  try {
164
161
  import("@swapkit/tokens").then((tokenPackages) => {
@@ -289,7 +286,9 @@ async function createAssetValue(identifier: string, value: NumberPrimitives = 0)
289
286
  }
290
287
 
291
288
  function createSyntheticAssetValue(identifier: string, value: NumberPrimitives = 0) {
292
- const chain = identifier.split(".")?.[0]?.toUpperCase() as Chain | undefined;
289
+ const chain = identifier.includes(".")
290
+ ? (identifier.split(".")?.[0]?.toUpperCase() as Chain)
291
+ : undefined;
293
292
  const isMayaOrThor = chain ? [Chain.Maya, Chain.THORChain].includes(chain) : false;
294
293
 
295
294
  const [synthChain, symbol] = isMayaOrThor
@@ -1,5 +1,5 @@
1
- import { BaseDecimal } from "../types/chains.ts";
2
- import type { SwapKitNumber } from "./swapKitNumber.ts";
1
+ import { BaseDecimal } from "../types/chains";
2
+ import type { SwapKitNumber } from "./swapKitNumber";
3
3
 
4
4
  type NumberPrimitivesType = {
5
5
  bigint: bigint;
@@ -2,8 +2,8 @@ type Options = Parameters<typeof fetch>[1] & {
2
2
  headers?: Record<string, string>;
3
3
  apiKey?: string;
4
4
  method?: "GET" | "POST";
5
- onError?: (error: NotWorth) => NotWorth;
6
- responseHandler?: (response: NotWorth) => NotWorth;
5
+ onError?: (error: any) => any;
6
+ responseHandler?: (response: any) => any;
7
7
  searchParams?: Record<string, string>;
8
8
  json?: unknown;
9
9
  };
@@ -86,6 +86,8 @@ const errorCodes = {
86
86
  wallet_talisman_not_enabled: 20601,
87
87
  wallet_talisman_not_found: 20602,
88
88
  wallet_polkadot_not_found: 20701,
89
+ wallet_radix_not_found: 20801,
90
+ wallet_radix_transaction_failed: 20802,
89
91
  /**
90
92
  * Chainflip
91
93
  */
@@ -130,6 +132,7 @@ const errorCodes = {
130
132
  toolbox_evm_provider_not_eip1193_compatible: 90210,
131
133
  toolbox_evm_error_estimating_gas_limit: 90211,
132
134
  toolbox_evm_error_sending_transaction: 90212,
135
+ toolbox_radix_signer_not_defined: 90301,
133
136
  /**
134
137
  * Helpers
135
138
  */
@@ -153,8 +156,8 @@ export class SwapKitError extends Error {
153
156
  static ErrorCode = errorCodes;
154
157
 
155
158
  constructor(
156
- errorOrErrorKey: ErrorKeys | { errorKey: ErrorKeys; info?: Record<string, NotWorth> },
157
- sourceError?: NotWorth,
159
+ errorOrErrorKey: ErrorKeys | { errorKey: ErrorKeys; info?: Record<string, any> },
160
+ sourceError?: any,
158
161
  ) {
159
162
  const isErrorString = typeof errorOrErrorKey === "string";
160
163
 
@@ -1,4 +1,4 @@
1
- import { BigIntArithmetics, formatBigIntToSafeValue } from "./bigIntArithmetics.ts";
1
+ import { BigIntArithmetics, formatBigIntToSafeValue } from "./bigIntArithmetics";
2
2
 
3
3
  export type SwapKitValueType = BigIntArithmetics | string | number;
4
4
 
@@ -1,6 +1,7 @@
1
- import type { Chain } from "./chains.ts";
2
- import type { ChainApis } from "./sdk.ts";
3
- import type { ChainWallet } from "./wallet.ts";
1
+ import type { RadixNetwork } from "@swapkit/toolbox-radix";
2
+ import type { Chain } from "./chains";
3
+ import type { ChainApis } from "./sdk";
4
+ import type { ChainWallet } from "./wallet";
4
5
 
5
6
  export type ConnectConfig = {
6
7
  stagenet?: boolean;
@@ -47,9 +48,18 @@ export type ConnectConfig = {
47
48
  * @optional for setting the chainflip broker url
48
49
  */
49
50
  chainflipBrokerUrl?: string;
51
+ /**
52
+ * @optional for setting the radix wallet
53
+ */
54
+ radixDappConfig?: {
55
+ dAppDefinitionAddress: string;
56
+ applicationName: string;
57
+ applicationVersion: string;
58
+ network: RadixNetwork;
59
+ };
50
60
  };
51
61
 
52
- export type ConnectWalletParams<M = { [key in string]: NotWorth }> = {
62
+ export type ConnectWalletParams<M = { [key in string]: any }> = {
53
63
  addChain: <T extends Chain>(params: ChainWallet<T> & M) => void;
54
64
  apis: ChainApis;
55
65
  config: ConnectConfig;
@@ -20,7 +20,7 @@ export enum RPCUrl {
20
20
  Radix = "https://radix-mainnet.rpc.grove.city/v1/326002fc/core",
21
21
  THORChain = "https://rpc.thorswap.net",
22
22
  THORChainStagenet = "https://stagenet-rpc.ninerealms.com",
23
- Solana = "https://mainnet.helius-rpc.com/?api-key=2cbe3ae6-cfc5-4141-a093-0055d0fa3d80",
23
+ Solana = "https://mainnet.helius-rpc.com",
24
24
  }
25
25
 
26
26
  export enum ExplorerUrl {
@@ -1,5 +1,5 @@
1
1
  export type RadixCoreStateResourceDTO = {
2
- at_ledger_state?: Todo; // not needed
2
+ at_ledger_state?: any; // not needed
3
3
  manager: {
4
4
  resource_type: string;
5
5
  divisibility: {
@@ -10,5 +10,5 @@ export type RadixCoreStateResourceDTO = {
10
10
  };
11
11
  };
12
12
  };
13
- owner_role?: Todo; // not needed
13
+ owner_role?: any; // not needed
14
14
  };
@@ -6,7 +6,6 @@ import type {
6
6
  PangolinList,
7
7
  SushiswapList,
8
8
  ThorchainList,
9
- TraderjoeV1List,
10
9
  TraderjoeV2List,
11
10
  UniswapV2List,
12
11
  UniswapV3List,
@@ -22,7 +21,6 @@ export type TokenNames =
22
21
  | (typeof PangolinList)["tokens"][number]["identifier"]
23
22
  | (typeof SushiswapList)["tokens"][number]["identifier"]
24
23
  | (typeof ThorchainList)["tokens"][number]["identifier"]
25
- | (typeof TraderjoeV1List)["tokens"][number]["identifier"]
26
24
  | (typeof TraderjoeV2List)["tokens"][number]["identifier"]
27
25
  | (typeof UniswapV2List)["tokens"][number]["identifier"]
28
26
  | (typeof UniswapV3List)["tokens"][number]["identifier"];
@@ -1,6 +1,7 @@
1
1
  import type { CosmosWallets, ThorchainWallets } from "@swapkit/toolbox-cosmos";
2
2
  import type { EVMWallets } from "@swapkit/toolbox-evm";
3
- import type { SolanaWallet } from "@swapkit/toolbox-solana";
3
+ import type { RadixWallets } from "@swapkit/toolbox-radix";
4
+ import type { SolanaWallets } from "@swapkit/toolbox-solana";
4
5
  import type { SubstrateWallets } from "@swapkit/toolbox-substrate";
5
6
  import type { UTXOWallets } from "@swapkit/toolbox-utxo";
6
7
  import type { Eip1193Provider } from "ethers";
@@ -62,7 +63,13 @@ export type BaseWallet<T extends EmptyWallet | Record<string, unknown>> = {
62
63
  };
63
64
 
64
65
  export type FullWallet = BaseWallet<
65
- EVMWallets & UTXOWallets & CosmosWallets & ThorchainWallets & SubstrateWallets & SolanaWallet
66
+ EVMWallets &
67
+ UTXOWallets &
68
+ CosmosWallets &
69
+ ThorchainWallets &
70
+ SubstrateWallets &
71
+ SolanaWallets &
72
+ RadixWallets
66
73
  >;
67
74
 
68
75
  /**
@@ -70,7 +77,7 @@ export type FullWallet = BaseWallet<
70
77
  */
71
78
  export type Wallet = FullWallet;
72
79
 
73
- export type SwapKitWallet<ConnectParams extends Todo[]> = (
80
+ export type SwapKitWallet<ConnectParams extends any[]> = (
74
81
  params: ConnectWalletParams,
75
82
  ) => (...connectParams: ConnectParams) => boolean | Promise<boolean>;
76
83