Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3modal/react

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/react - npm Package Compare versions

Comparing version 2.0.0-787e037 to 2.0.0-85630cf

dist/_types/src/components/Web3NetworkSwitch.d.ts

4

dist/_types/index.d.ts

@@ -1,6 +0,6 @@

export { AccountButton } from './src/components/AccountButton';
export { ConnectButton } from './src/components/ConnectButton';
export { Web3Button } from './src/components/Web3Button';
export { Web3Modal } from './src/components/Web3Modal';
export { Web3NetworkSwitch } from './src/components/Web3NetworkSwitch';
export { useWeb3Modal } from './src/hooks/useWeb3Modal';
export { useWeb3ModalNetwork } from './src/hooks/useWeb3ModalNetwork';
export { useWeb3ModalTheme } from './src/hooks/useWeb3ModalTheme';

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { W3mModal } from '@web3modal/ui';

@@ -2,0 +3,0 @@ /**

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { W3mCoreButton } from '@web3modal/ui';

@@ -5,3 +6,3 @@ /**

*/
export declare function Web3Button(props: JSX.IntrinsicElements['w3m-connect-button']): JSX.Element;
export declare function Web3Button(props: JSX.IntrinsicElements['w3m-core-button']): JSX.Element;
/**

@@ -13,5 +14,5 @@ * Types

interface IntrinsicElements {
'w3m-core-button': Pick<W3mCoreButton, 'icon' | 'label'>;
'w3m-core-button': Pick<W3mCoreButton, 'balance' | 'icon' | 'label'>;
}
}
}

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { ConfigCtrlState } from '@web3modal/core';

@@ -2,0 +3,0 @@ import type { EthereumClient } from '@web3modal/ethereum';

export declare function useWeb3Modal(): {
isOpen: boolean;
open: (options?: {
uri: string;
standaloneChains?: string[] | undefined;
} | undefined) => void;
open: (options?: import("@web3modal/core/dist/_types/src/controllers/ModalCtrl").OpenOptions | undefined) => Promise<void>;
close: () => void;
};

@@ -1,2 +0,2 @@

import n,{useCallback as w,useEffect as c,useState as $}from"react";import{ConfigCtrl as a,ClientCtrl as d,ModalCtrl as l}from"@web3modal/core";var g=Object.defineProperty,b=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&p(t,r,e[r]);if(b)for(var r of b(e))C.call(e,r)&&p(t,r,e[r]);return t};function V(t){return n.createElement("w3m-account-button",E({},t))}var M=Object.defineProperty,i=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I=(t,e)=>{for(var r in e||(e={}))B.call(e,r)&&f(t,r,e[r]);if(i)for(var r of i(e))S.call(e,r)&&f(t,r,e[r]);return t};function X(t){return n.createElement("w3m-connect-button",I({},t))}var k=Object.defineProperty,m=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e)=>{for(var r in e||(e={}))W.call(e,r)&&s(t,r,e[r]);if(m)for(var r of m(e))x.call(e,r)&&s(t,r,e[r]);return t};function Y(t){return n.createElement("w3m-core-button",T({},t))}var A=Object.defineProperty,v=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))q.call(e,r)&&y(t,r,e[r]);if(v)for(var r of v(e))z.call(e,r)&&y(t,r,e[r]);return t};function F(t){return n.createElement("w3m-modal",D({},t))}var O=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,J=(t,e)=>{var r={};for(var o in t)G.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&O)for(var o of O(t))e.indexOf(o)<0&&H.call(t,o)&&(r[o]=t[o]);return r};function Z(t){var e=t,{ethereumClient:r}=e,o=J(e,["ethereumClient"]);const u=w(async()=>{a.setConfig(o),r&&d.setEthereumClient(r),await import("@web3modal/ui")},[r,o]);return c(()=>{u()},[u]),n.createElement(F,null)}var K=Object.defineProperty,h=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,j=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q=(t,e)=>{for(var r in e||(e={}))L.call(e,r)&&j(t,r,e[r]);if(h)for(var r of h(e))N.call(e,r)&&j(t,r,e[r]);return t};function _(){const[t,e]=$(l.state);return c(()=>{const r=l.subscribe(o=>e(Q({},o)));return()=>{r()}},[]),{isOpen:t.open,open:l.open,close:l.close}}function ee(){const[t,e]=$({themeMode:a.state.themeMode,themeColor:a.state.themeColor,themeBackground:a.state.themeBackground});return c(()=>{const r=a.subscribe(o=>e({themeMode:o.themeMode,themeColor:o.themeColor,themeBackground:o.themeBackground}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{V as AccountButton,X as ConnectButton,Y as Web3Button,Z as Web3Modal,_ as useWeb3Modal,ee as useWeb3ModalTheme};
import c,{useCallback as $,useEffect as i,useState as u}from"react";import{ClientCtrl as C,ConfigCtrl as n,OptionsCtrl as l,ModalCtrl as a}from"@web3modal/core";var g=Object.defineProperty,p=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,M=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&s(t,r,e[r]);if(p)for(var r of p(e))E.call(e,r)&&s(t,r,e[r]);return t};function X(t){return c.createElement("w3m-core-button",M({},t))}var S=Object.defineProperty,f=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,W=(t,e)=>{for(var r in e||(e={}))k.call(e,r)&&m(t,r,e[r]);if(f)for(var r of f(e))I.call(e,r)&&m(t,r,e[r]);return t};function B(t){return c.createElement("w3m-modal",W({},t))}var v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,N=(t,e)=>{var r={};for(var o in t)x.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&v)for(var o of v(t))e.indexOf(o)<0&&T.call(t,o)&&(r[o]=t[o]);return r};function Y(t){var e=t,{ethereumClient:r}=e,o=N(e,["ethereumClient"]);const b=$(async()=>{r&&C.setEthereumClient(r),n.setConfig(o),await import("@web3modal/ui"),l.setIsUiLoaded(!0)},[r,o]);return i(()=>{b()},[b]),c.createElement(B,null)}var L=Object.defineProperty,y=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,O=(t,e,r)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,z=(t,e)=>{for(var r in e||(e={}))U.call(e,r)&&O(t,r,e[r]);if(y)for(var r of y(e))q.call(e,r)&&O(t,r,e[r]);return t};function Z(t){return c.createElement("w3m-network-switch",z({},t))}var A=Object.defineProperty,h=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,d=(t,e,r)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e)=>{for(var r in e||(e={}))D.call(e,r)&&d(t,r,e[r]);if(h)for(var r of h(e))F.call(e,r)&&d(t,r,e[r]);return t};function _(){const[t,e]=u(a.state);return i(()=>{const r=a.subscribe(o=>e(G({},o)));return()=>{r()}},[]),{isOpen:t.open,open:a.open,close:a.close}}var H=Object.defineProperty,w=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,j=(t,e,r)=>e in t?H(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q=(t,e)=>{for(var r in e||(e={}))J.call(e,r)&&j(t,r,e[r]);if(w)for(var r of w(e))K.call(e,r)&&j(t,r,e[r]);return t};function ee(){const[t,e]=u(l.state);return i(()=>{const r=l.subscribe(o=>e(Q({},o)));return()=>{r()}},[]),{selectedChain:t.selectedChain,setSelectedChain:l.setSelectedChain}}function re(){const[t,e]=u({themeMode:n.state.themeMode,themeColor:n.state.themeColor,themeBackground:n.state.themeBackground});return i(()=>{const r=n.subscribe(o=>e({themeMode:o.themeMode,themeColor:o.themeColor,themeBackground:o.themeBackground}));return()=>{r()}},[]),{theme:t,setTheme:n.setThemeConfig}}export{X as Web3Button,Y as Web3Modal,Z as Web3NetworkSwitch,_ as useWeb3Modal,ee as useWeb3ModalNetwork,re as useWeb3ModalTheme};
//# sourceMappingURL=index.js.map
{
"name": "@web3modal/react",
"version": "2.0.0-787e037",
"version": "2.0.0-85630cf",
"main": "dist/index.js",

@@ -19,10 +19,10 @@ "type": "module",

"dependencies": {
"@web3modal/core": "2.0.0-787e037",
"@web3modal/ui": "2.0.0-787e037"
"@web3modal/core": "2.0.0-85630cf",
"@web3modal/ui": "2.0.0-85630cf"
},
"devDependencies": {
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"@web3modal/ethereum": "2.0.0-787e037",
"eslint-plugin-react": "7.31.11",
"@types/react-dom": "18.0.10",
"@web3modal/ethereum": "2.0.0-85630cf",
"eslint-plugin-react": "7.32.1",
"eslint-plugin-react-hooks": "4.6.0",

@@ -29,0 +29,0 @@ "react": "18.2.0",

@@ -12,3 +12,3 @@ ### 📚 [Documentation](https://docs.walletconnect.com/2.0/introduction/web3modal/about)

<p align="center">
<img src="./.github/assets/header.png" alt="" border="0">
<img src="./.github/assets/header.jpg" alt="" border="0">
</p>

@@ -15,0 +15,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc