@coin-voyage/crypto 2.5.1 → 2.5.2-beta.1

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.
@@ -38,6 +38,7 @@ export interface EVMConfiguration {
38
38
  config?: HttpTransportConfig;
39
39
  };
40
40
  };
41
+ reconnectOnMount?: boolean;
41
42
  }
42
43
  export interface DefaultWagmiConfigResult {
43
44
  config: Config;
@@ -4,5 +4,5 @@ import { WagmiProvider } from "wagmi";
4
4
  import { createDefaultEVMConfig } from "../create-default-evm-config";
5
5
  export function EVMBaseProvider({ children, config, }) {
6
6
  const evmConfig = useMemo(() => createDefaultEVMConfig(config), [config]);
7
- return (_jsx(WagmiProvider, { config: evmConfig.config, reconnectOnMount: false, children: children }));
7
+ return (_jsx(WagmiProvider, { config: evmConfig.config, reconnectOnMount: Boolean(config?.reconnectOnMount), children: children }));
8
8
  }
@@ -1,6 +1,5 @@
1
1
  import { type Adapter } from "@solana/wallet-adapter-base";
2
2
  import { type PropsWithChildren } from "react";
3
- import { WalletConnectParameters } from "wagmi/connectors";
4
3
  import { SolanaConfiguration } from "../../types/wallet";
5
4
  interface BuildSolanaWalletsOptions {
6
5
  configuredWallets?: Adapter[];
@@ -8,9 +7,7 @@ interface BuildSolanaWalletsOptions {
8
7
  walletConnectWallet: Adapter;
9
8
  }
10
9
  export declare function buildSolanaWallets({ configuredWallets, defaultWallets, walletConnectWallet, }: BuildSolanaWalletsOptions): Adapter[];
11
- export declare function SolanaBaseProvider({ children, config, }: PropsWithChildren<{
12
- config?: SolanaConfiguration & {
13
- walletConnect?: WalletConnectParameters;
14
- };
10
+ export declare function SolanaBaseProvider({ children, config }: PropsWithChildren<{
11
+ config?: SolanaConfiguration;
15
12
  }>): import("react/jsx-runtime").JSX.Element;
16
13
  export {};
@@ -9,7 +9,7 @@ const DEFAULT_WALLETS = [new CoinbaseWalletAdapter()];
9
9
  export function buildSolanaWallets({ configuredWallets = [], defaultWallets = DEFAULT_WALLETS, walletConnectWallet, }) {
10
10
  return [...configuredWallets, ...defaultWallets, walletConnectWallet];
11
11
  }
12
- export function SolanaBaseProvider({ children, config, }) {
12
+ export function SolanaBaseProvider({ children, config }) {
13
13
  const walletConnectWallet = useMemo(() => getWalletConnectConnector(config?.walletConnect), [config?.walletConnect]);
14
14
  const wallets = useMemo(() => buildSolanaWallets({
15
15
  configuredWallets: config?.walletConfiguration?.wallets,
@@ -1,6 +1,8 @@
1
1
  import type { ChainId, ChainType } from "@coin-voyage/shared/types";
2
2
  import type { createDAppKit } from "@mysten/dapp-kit-react";
3
+ import { Adapter } from "@solana/wallet-adapter-base";
3
4
  import type { WalletProviderProps } from "@solana/wallet-adapter-react";
5
+ import { WalletConnectParameters } from "wagmi/connectors";
4
6
  import type { EVMConfiguration } from "../evm/create-default-evm-config";
5
7
  import type { UTXOConfiguration } from "../utxo/create-default-utxo-config";
6
8
  import type { WalletConnector } from "./wallet-connector";
@@ -24,7 +26,10 @@ export type WalletConfiguration = {
24
26
  */
25
27
  export type SolanaConfiguration = {
26
28
  rpcUrl?: string;
27
- walletConfiguration?: Omit<WalletProviderProps, "children">;
29
+ walletConfiguration?: Omit<WalletProviderProps, "children" | "wallets"> & {
30
+ wallets?: Adapter[];
31
+ };
32
+ walletConnect?: WalletConnectParameters;
28
33
  };
29
34
  type SuiDAppKitOptions = Parameters<typeof createDAppKit>[0];
30
35
  export type SuiDAppKitConfiguration = Pick<SuiDAppKitOptions, "autoConnect" | "enableBurnerWallet" | "slushWalletConfig" | "storage" | "storageKey" | "walletInitializers">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coin-voyage/crypto",
3
3
  "description": "Crypto utilities for Coin Voyage",
4
- "version": "2.5.1",
4
+ "version": "2.5.2-beta.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "author": "Lars <lars@coinvoyage.io>",
@@ -112,7 +112,7 @@
112
112
  "@solana/wallet-adapter-walletconnect": "0.1.21",
113
113
  "@solana/wallet-adapter-base": "0.9.27",
114
114
  "@solana/wallet-adapter-coinbase": "0.1.23",
115
- "@coin-voyage/shared": "2.5.0"
115
+ "@coin-voyage/shared": "2.5.1-beta.3"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@types/elliptic": "6.4.18"