New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@web3modal/wagmi

Package Overview
Dependencies
Maintainers
11
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/wagmi - npm Package Compare versions

Comparing version 4.1.12-ethers-status.0 to 4.1.12-sign-2.5.0

dist/esm/src/connectors/alphaWalletConnect.js

1

dist/esm/exports/index.js

@@ -5,2 +5,3 @@ import { Web3Modal } from '../src/client.js';

export { emailConnector } from '../src/connectors/EmailConnector.js';
export { alphaWalletConnect } from '../src/connectors/alphaWalletConnect.js';
export function createWeb3Modal(options) {

@@ -7,0 +8,0 @@ return new Web3Modal({ ...options, _sdkVersion: `html-wagmi-${ConstantsUtil.VERSION}` });

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

import { EthereumProvider } from '@walletconnect/ethereum-provider';
import { EthereumProvider, OPTIONAL_METHODS } from '@walletconnect/ethereum-provider';
import { connect, disconnect, signMessage, getBalance, getEnsAvatar, getEnsName, switchChain, watchAccount, watchConnectors, waitForTransactionReceipt, estimateGas as wagmiEstimateGas, getAccount } from '@wagmi/core';

@@ -51,2 +51,41 @@ import { mainnet } from 'viem/chains';

const chainId = NetworkUtil.caipNetworkIdToNumber(this.getCaipNetwork()?.id);
if (siweConfig?.options?.enabled && typeof provider?.authenticate === 'function') {
const { SIWEController, getDidChainId, getDidAddress } = await import('@web3modal/siwe');
const siweParams = await siweConfig.getMessageParams();
await connector.setRequestedChainsIds(siweParams.chains);
const result = await provider.authenticate({
nonce: await siweConfig.getNonce(),
methods: [...OPTIONAL_METHODS],
...siweParams
});
const signedCacao = result?.auths?.[0];
if (signedCacao) {
const { p, s } = signedCacao;
const cacaoChainId = getDidChainId(p.iss) || '';
const address = getDidAddress(p.iss);
if (address && cacaoChainId) {
SIWEController.setSession({
address,
chainId: parseInt(cacaoChainId, 10)
});
}
try {
const message = provider.signer.client.formatAuthMessage({
request: p,
iss: p.iss
});
await SIWEController.verifyMessage({
message,
signature: s.s,
cacao: signedCacao
});
}
catch (error) {
console.error('Error verifying message', error);
await provider.disconnect().catch(console.error);
await SIWEController.signOut().catch(console.error);
throw error;
}
}
}
await connect(this.wagmiConfig, { connector, chainId });

@@ -53,0 +92,0 @@ },

5

dist/esm/src/utils/defaultWagmiCoreConfig.js
import '@web3modal/polyfills';
import { createConfig } from '@wagmi/core';
import { coinbaseWallet, walletConnect, injected } from '@wagmi/connectors';
import { coinbaseWallet, injected } from '@wagmi/connectors';
import { emailConnector } from '../connectors/EmailConnector.js';
import { alphaWalletConnect } from '../connectors/alphaWalletConnect.js';
import { getTransport } from './helpers.js';

@@ -14,3 +15,3 @@ export function defaultWagmiConfig({ projectId, chains, metadata, enableInjected, enableCoinbase, enableEmail, enableWalletConnect, enableEIP6963, ...wagmiConfig }) {

if (enableWalletConnect !== false) {
connectors.push(walletConnect({ projectId, metadata, showQrModal: false }));
connectors.push(alphaWalletConnect({ projectId, metadata, showQrModal: false }));
}

@@ -17,0 +18,0 @@ if (enableInjected !== false) {

import '@web3modal/polyfills';
import { createConfig } from 'wagmi';
import { coinbaseWallet, walletConnect, injected } from 'wagmi/connectors';
import { coinbaseWallet, injected } from 'wagmi/connectors';
import { emailConnector } from '../connectors/EmailConnector.js';
import { alphaWalletConnect } from '../connectors/alphaWalletConnect.js';
import { getTransport } from './helpers.js';

@@ -14,3 +15,3 @@ export function defaultWagmiConfig({ projectId, chains, metadata, enableInjected, enableCoinbase, enableEmail, enableWalletConnect, enableEIP6963, ...wagmiConfig }) {

if (enableWalletConnect !== false) {
connectors.push(walletConnect({ projectId, metadata, showQrModal: false }));
connectors.push(alphaWalletConnect({ projectId, metadata, showQrModal: false }));
}

@@ -17,0 +18,0 @@ if (enableInjected !== false) {

@@ -6,2 +6,3 @@ import type { Web3ModalOptions, CoreConfig } from '../src/client.js';

export { emailConnector } from '../src/connectors/EmailConnector.js';
export { alphaWalletConnect } from '../src/connectors/alphaWalletConnect.js';
export declare function createWeb3Modal(options: Web3ModalOptions<CoreConfig>): Web3Modal;
{
"name": "@web3modal/wagmi",
"version": "4.1.12-ethers-status.0",
"version": "4.1.12-sign-2.5.0",
"type": "module",

@@ -54,12 +54,13 @@ "main": "./dist/esm/exports/index.js",

"dependencies": {
"@web3modal/polyfills": "4.1.12-ethers-status.0",
"@web3modal/scaffold": "4.1.12-ethers-status.0",
"@web3modal/scaffold-react": "4.1.12-ethers-status.0",
"@web3modal/scaffold-utils": "4.1.12-ethers-status.0",
"@web3modal/scaffold-vue": "4.1.12-ethers-status.0",
"@web3modal/siwe": "4.1.12-ethers-status.0"
"@walletconnect/ethereum-provider": "2.12.1",
"@web3modal/polyfills": "4.1.12-sign-2.5.0",
"@web3modal/scaffold": "4.1.12-sign-2.5.0",
"@web3modal/scaffold-react": "4.1.12-sign-2.5.0",
"@web3modal/scaffold-utils": "4.1.12-sign-2.5.0",
"@web3modal/scaffold-vue": "4.1.12-sign-2.5.0",
"@web3modal/siwe": "4.1.12-sign-2.5.0"
},
"devDependencies": {
"@wagmi/connectors": "4.1.14",
"@wagmi/core": "2.6.5",
"@wagmi/connectors": "4.1.25",
"@wagmi/core": "2.6.16",
"react": "18.2.0",

@@ -71,3 +72,3 @@ "react-dom": "18.2.0",

"peerDependencies": {
"@wagmi/connectors": ">=4.0.0",
"@wagmi/connectors": ">=4",
"@wagmi/core": ">=2.0.0",

@@ -74,0 +75,0 @@ "react": ">=17",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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