Socket
Socket
Sign inDemoInstall

@web3modal/wallet

Package Overview
Dependencies
Maintainers
11
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/wallet - npm Package Compare versions

Comparing version 3.6.0-2aeae674 to 3.6.0-32bf236a

2

dist/esm/index.js

@@ -5,4 +5,4 @@ export { W3mFrame } from './src/W3mFrame.js';

export { W3mFrameSchema } from './src/W3mFrameSchema.js';
export { W3mFrameConstants } from './src/W3mFrameConstants.js';
export { W3mFrameConstants, W3mFrameRpcConstants } from './src/W3mFrameConstants.js';
export { W3mFrameStorage } from './src/W3mFrameStorage.js';
//# sourceMappingURL=index.js.map

@@ -9,2 +9,3 @@ export const W3mFrameConstants = {

EMAIL_LOGIN_USED_KEY: 'EMAIL_LOGIN_USED_KEY',
LAST_USED_CHAIN_KEY: 'LAST_USED_CHAIN_KEY',
LAST_EMAIL_LOGIN_TIME: 'LAST_EMAIL_LOGIN_TIME',

@@ -24,2 +25,3 @@ EMAIL: 'EMAIL',

APP_SYNC_THEME: '@w3m-app/SYNC_THEME',
APP_SYNC_DAPP_DATA: '@w3m-app/SYNC_DAPP_DATA',
FRAME_SWITCH_NETWORK_ERROR: '@w3m-frame/SWITCH_NETWORK_ERROR',

@@ -49,4 +51,10 @@ FRAME_SWITCH_NETWORK_SUCCESS: '@w3m-frame/SWITCH_NETWORK_SUCCESS',

FRAME_SYNC_THEME_SUCCESS: '@w3m-frame/SYNC_THEME_SUCCESS',
FRAME_SYNC_THEME_ERROR: '@w3m-frame/SYNC_THEME_ERROR'
FRAME_SYNC_THEME_ERROR: '@w3m-frame/SYNC_THEME_ERROR',
FRAME_SYNC_DAPP_DATA_SUCCESS: '@w3m-frame/SYNC_DAPP_DATA_SUCCESS',
FRAME_SYNC_DAPP_DATA_ERROR: '@w3m-frame/SYNC_DAPP_DATA_ERROR'
};
export const W3mFrameRpcConstants = {
SAFE_RPC_METHODS: ['eth_blockNumber', 'eth_estimateGas', 'eth_getTransactionByHash'],
IGNORED_RPC_METHODS: ['eth_chainId']
};
//# sourceMappingURL=W3mFrameConstants.js.map

@@ -19,2 +19,3 @@ import { W3mFrame } from './W3mFrame.js';

this.syncThemeResolver = undefined;
this.syncDappDataResolver = undefined;
this.w3mFrame = new W3mFrame(projectId, true);

@@ -53,3 +54,3 @@ this.w3mFrame.events.onFrameEvent(event => {

case W3mFrameConstants.FRAME_SWITCH_NETWORK_SUCCESS:
return this.onSwitchChainSuccess();
return this.onSwitchChainSuccess(event);
case W3mFrameConstants.FRAME_SWITCH_NETWORK_ERROR:

@@ -75,2 +76,6 @@ return this.onSwitchChainError(event);

return this.onSyncThemeError(event);
case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_SUCCESS:
return this.onSyncDappDataSuccess();
case W3mFrameConstants.FRAME_SYNC_DAPP_DATA_ERROR:
return this.onSyncDappDataError(event);
default:

@@ -148,5 +153,16 @@ return null;

}
async syncDappData(payload) {
await this.w3mFrame.frameLoadPromise;
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SYNC_DAPP_DATA, payload });
return new Promise((resolve, reject) => {
this.syncDappDataResolver = { resolve, reject };
});
}
async connect(payload) {
const chainId = payload?.chainId ?? this.getLastUsedChainId() ?? 1;
await this.w3mFrame.frameLoadPromise;
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_GET_USER, payload });
this.w3mFrame.events.postAppEvent({
type: W3mFrameConstants.APP_GET_USER,
payload: { chainId }
});
return new Promise((resolve, reject) => {

@@ -199,3 +215,3 @@ this.connectResolver = { resolve, reject };

this.w3mFrame.events.onFrameEvent(event => {
if (event.type === W3mFrameConstants.FRAME_IS_CONNECTED_SUCCESS) {
if (event.type === W3mFrameConstants.FRAME_GET_USER_SUCCESS) {
callback();

@@ -226,2 +242,3 @@ }

this.setEmailLoginSuccess(event.payload.email);
this.setLastUsedChainId(event.payload.chainId);
this.connectResolver?.resolve(event.payload);

@@ -233,2 +250,5 @@ }

onIsConnectedSuccess(event) {
if (!event.payload.isConnected) {
this.deleteEmailLoginCache();
}
this.isConnectedResolver?.resolve(event.payload);

@@ -240,2 +260,3 @@ }

onGetChainIdSuccess(event) {
this.setLastUsedChainId(event.payload.chainId);
this.getChainIdResolver?.resolve(event.payload);

@@ -248,4 +269,3 @@ }

this.disconnectResolver?.resolve(undefined);
W3mFrameStorage.delete(W3mFrameConstants.EMAIL_LOGIN_USED_KEY);
W3mFrameStorage.delete(W3mFrameConstants.EMAIL);
this.deleteEmailLoginCache();
}

@@ -255,4 +275,5 @@ onSignOutError(event) {

}
onSwitchChainSuccess() {
this.switchChainResolver?.resolve(undefined);
onSwitchChainSuccess(event) {
this.setLastUsedChainId(event.payload.chainId);
this.switchChainResolver?.resolve(event.payload);
}

@@ -293,2 +314,8 @@ onSwitchChainError(event) {

}
onSyncDappDataSuccess() {
this.syncDappDataResolver?.resolve(undefined);
}
onSyncDappDataError(event) {
this.syncDappDataResolver?.reject(event.payload.message);
}
setNewLastEmailLoginTime() {

@@ -302,3 +329,14 @@ W3mFrameStorage.set(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME, Date.now().toString());

}
deleteEmailLoginCache() {
W3mFrameStorage.delete(W3mFrameConstants.EMAIL_LOGIN_USED_KEY);
W3mFrameStorage.delete(W3mFrameConstants.EMAIL);
W3mFrameStorage.delete(W3mFrameConstants.LAST_USED_CHAIN_KEY);
}
setLastUsedChainId(chainId) {
W3mFrameStorage.set(W3mFrameConstants.LAST_USED_CHAIN_KEY, `${chainId}`);
}
getLastUsedChainId() {
return Number(W3mFrameStorage.get(W3mFrameConstants.LAST_USED_CHAIN_KEY));
}
}
//# sourceMappingURL=W3mFrameProvider.js.map

@@ -7,2 +7,22 @@ import { z } from 'zod';

}
export const GetTransactionByHashResponse = z.object({
accessList: z.array(z.string()),
blockHash: z.string().nullable(),
blockNumber: z.string().nullable(),
chainId: z.string(),
from: z.string(),
gas: z.string(),
hash: z.string(),
input: z.string().nullable(),
maxFeePerGas: z.string(),
maxPriorityFeePerGas: z.string(),
nonce: z.string(),
r: z.string(),
s: z.string(),
to: z.string(),
transactionIndex: z.string().nullable(),
type: z.string(),
v: z.string(),
value: z.string()
});
export const AppSwitchNetworkRequest = z.object({ chainId: z.number() });

@@ -17,2 +37,14 @@ export const AppConnectEmailRequest = z.object({ email: z.string().email() });

});
export const AppSyncDappDataRequest = z.object({
metadata: z
.object({
name: z.string(),
description: z.string(),
url: z.string(),
icons: z.array(z.string())
})
.optional(),
sdkVersion: z.string(),
projectId: z.string()
});
export const FrameConnectEmailResponse = z.object({

@@ -28,4 +60,5 @@ action: z.enum(['VERIFY_DEVICE', 'VERIFY_OTP'])

export const FrameGetChainIdResponse = z.object({ chainId: z.number() });
export const FrameSwitchNetworkResponse = z.object({ chainId: z.number() });
export const FrameAwaitUpdateEmailResponse = z.object({ email: z.string().email() });
export const RpcResponse = z.string();
export const RpcResponse = z.any();
export const RpcPersonalSignRequest = z.object({

@@ -94,6 +127,7 @@ method: z.literal('personal_sign'),

.or(z.object({ type: zType('APP_AWAIT_UPDATE_EMAIL') }))
.or(z.object({ type: zType('APP_SYNC_THEME'), payload: AppSyncThemeRequest })),
.or(z.object({ type: zType('APP_SYNC_THEME'), payload: AppSyncThemeRequest }))
.or(z.object({ type: zType('APP_SYNC_DAPP_DATA'), payload: AppSyncDappDataRequest })),
frameEvent: z
.object({ type: zType('FRAME_SWITCH_NETWORK_ERROR'), payload: zError })
.or(z.object({ type: zType('FRAME_SWITCH_NETWORK_SUCCESS') }))
.or(z.object({ type: zType('FRAME_SWITCH_NETWORK_SUCCESS'), payload: FrameSwitchNetworkResponse }))
.or(z.object({ type: zType('FRAME_CONNECT_EMAIL_ERROR'), payload: zError }))

@@ -125,3 +159,5 @@ .or(z.object({ type: zType('FRAME_CONNECT_EMAIL_SUCCESS'), payload: FrameConnectEmailResponse }))

.or(z.object({ type: zType('FRAME_SYNC_THEME_SUCCESS') }))
.or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_ERROR'), payload: zError }))
.or(z.object({ type: zType('FRAME_SYNC_DAPP_DATA_SUCCESS') }))
};
//# sourceMappingURL=W3mFrameSchema.js.map
import { z } from 'zod';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, RpcEthBlockNumber, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse, AppSyncThemeRequest, RpcEthChainId } from './W3mFrameSchema.js';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, RpcEthBlockNumber, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, RpcEthGetTransactionByHash } from './W3mFrameSchema.js';
//# sourceMappingURL=W3mFrameTypes.js.map

@@ -5,4 +5,4 @@ export { W3mFrame } from './src/W3mFrame.js';

export { W3mFrameSchema } from './src/W3mFrameSchema.js';
export { W3mFrameConstants } from './src/W3mFrameConstants.js';
export { W3mFrameConstants, W3mFrameRpcConstants } from './src/W3mFrameConstants.js';
export { W3mFrameStorage } from './src/W3mFrameStorage.js';
export type { W3mFrameTypes } from './src/W3mFrameTypes.js';

@@ -9,2 +9,3 @@ export declare const W3mFrameConstants: {

readonly EMAIL_LOGIN_USED_KEY: "EMAIL_LOGIN_USED_KEY";
readonly LAST_USED_CHAIN_KEY: "LAST_USED_CHAIN_KEY";
readonly LAST_EMAIL_LOGIN_TIME: "LAST_EMAIL_LOGIN_TIME";

@@ -24,2 +25,3 @@ readonly EMAIL: "EMAIL";

readonly APP_SYNC_THEME: "@w3m-app/SYNC_THEME";
readonly APP_SYNC_DAPP_DATA: "@w3m-app/SYNC_DAPP_DATA";
readonly FRAME_SWITCH_NETWORK_ERROR: "@w3m-frame/SWITCH_NETWORK_ERROR";

@@ -50,2 +52,8 @@ readonly FRAME_SWITCH_NETWORK_SUCCESS: "@w3m-frame/SWITCH_NETWORK_SUCCESS";

readonly FRAME_SYNC_THEME_ERROR: "@w3m-frame/SYNC_THEME_ERROR";
readonly FRAME_SYNC_DAPP_DATA_SUCCESS: "@w3m-frame/SYNC_DAPP_DATA_SUCCESS";
readonly FRAME_SYNC_DAPP_DATA_ERROR: "@w3m-frame/SYNC_DAPP_DATA_ERROR";
};
export declare const W3mFrameRpcConstants: {
SAFE_RPC_METHODS: string[];
IGNORED_RPC_METHODS: string[];
};

@@ -16,2 +16,3 @@ import type { W3mFrameTypes } from './W3mFrameTypes.js';

private syncThemeResolver;
private syncDappDataResolver;
constructor(projectId: string);

@@ -36,2 +37,3 @@ getLoginEmailUsed(): boolean;

syncTheme(payload: W3mFrameTypes.Requests['AppSyncThemeRequest']): Promise<unknown>;
syncDappData(payload: W3mFrameTypes.Requests['AppSyncDappDataRequest']): Promise<unknown>;
connect(payload?: W3mFrameTypes.Requests['AppGetUserRequest']): Promise<{

@@ -42,5 +44,7 @@ chainId: number;

}>;
switchNetwork(chainId: number): Promise<unknown>;
switchNetwork(chainId: number): Promise<{
chainId: number;
}>;
disconnect(): Promise<unknown>;
request(req: W3mFrameTypes.RPCRequest): Promise<string>;
request(req: W3mFrameTypes.RPCRequest): Promise<any>;
onRpcRequest(callback: (request: unknown) => void): void;

@@ -74,4 +78,9 @@ onRpcResponse(callback: (request: unknown) => void): void;

private onSyncThemeError;
private onSyncDappDataSuccess;
private onSyncDappDataError;
private setNewLastEmailLoginTime;
private setEmailLoginSuccess;
private deleteEmailLoginCache;
private setLastUsedChainId;
private getLastUsedChainId;
}
import { z } from 'zod';
export declare const GetTransactionByHashResponse: z.ZodObject<{
accessList: z.ZodArray<z.ZodString, "many">;
blockHash: z.ZodNullable<z.ZodString>;
blockNumber: z.ZodNullable<z.ZodString>;
chainId: z.ZodString;
from: z.ZodString;
gas: z.ZodString;
hash: z.ZodString;
input: z.ZodNullable<z.ZodString>;
maxFeePerGas: z.ZodString;
maxPriorityFeePerGas: z.ZodString;
nonce: z.ZodString;
r: z.ZodString;
s: z.ZodString;
to: z.ZodString;
transactionIndex: z.ZodNullable<z.ZodString>;
type: z.ZodString;
v: z.ZodString;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: string;
value: string;
accessList: string[];
blockHash: string | null;
blockNumber: string | null;
chainId: string;
from: string;
gas: string;
hash: string;
input: string | null;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
nonce: string;
r: string;
s: string;
to: string;
transactionIndex: string | null;
v: string;
}, {
type: string;
value: string;
accessList: string[];
blockHash: string | null;
blockNumber: string | null;
chainId: string;
from: string;
gas: string;
hash: string;
input: string | null;
maxFeePerGas: string;
maxPriorityFeePerGas: string;
nonce: string;
r: string;
s: string;
to: string;
transactionIndex: string | null;
v: string;
}>;
export declare const AppSwitchNetworkRequest: z.ZodObject<{

@@ -47,2 +105,40 @@ chainId: z.ZodNumber;

}>;
export declare const AppSyncDappDataRequest: z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
url: z.ZodString;
icons: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
url: string;
icons: string[];
}, {
name: string;
description: string;
url: string;
icons: string[];
}>>;
sdkVersion: z.ZodType<`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`, z.ZodTypeDef, `html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`>;
projectId: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
}, {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
}>;
export declare const FrameConnectEmailResponse: z.ZodObject<{

@@ -82,2 +178,9 @@ action: z.ZodEnum<["VERIFY_DEVICE", "VERIFY_OTP"]>;

}>;
export declare const FrameSwitchNetworkResponse: z.ZodObject<{
chainId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
chainId: number;
}, {
chainId: number;
}>;
export declare const FrameAwaitUpdateEmailResponse: z.ZodObject<{

@@ -90,3 +193,3 @@ email: z.ZodString;

}>;
export declare const RpcResponse: z.ZodString;
export declare const RpcResponse: z.ZodAny;
export declare const RpcPersonalSignRequest: z.ZodObject<{

@@ -188,3 +291,3 @@ method: z.ZodLiteral<"personal_sign">;

export declare const W3mFrameSchema: {
appEvent: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
appEvent: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"@w3m-app/SWITCH_NETWORK">;

@@ -490,4 +593,68 @@ payload: z.ZodObject<{

};
}>]>, z.ZodObject<{
type: z.ZodLiteral<"@w3m-app/SYNC_DAPP_DATA">;
payload: z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
url: z.ZodString;
icons: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
url: string;
icons: string[];
}, {
name: string;
description: string;
url: string;
icons: string[];
}>>;
sdkVersion: z.ZodType<`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`, z.ZodTypeDef, `html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`>;
projectId: z.ZodString;
}, "strip", z.ZodTypeAny, {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
}, {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
}>;
}, "strip", z.ZodTypeAny, {
type: "@w3m-app/SYNC_DAPP_DATA";
payload: {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
};
}, {
type: "@w3m-app/SYNC_DAPP_DATA";
payload: {
projectId: string;
sdkVersion: (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}`) & (`html-wagmi-${string}` | `react-wagmi-${string}` | `vue-wagmi-${string}` | `html-ethers5-${string}` | `react-ethers5-${string}` | `vue-ethers5-${string}` | `html-ethers-${string}` | `react-ethers-${string}` | `vue-ethers-${string}` | undefined);
metadata?: {
name: string;
description: string;
url: string;
icons: string[];
} | undefined;
};
}>]>;
frameEvent: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
frameEvent: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"@w3m-frame/SWITCH_NETWORK_ERROR">;

@@ -513,6 +680,19 @@ payload: z.ZodObject<{

type: z.ZodLiteral<"@w3m-frame/SWITCH_NETWORK_SUCCESS">;
payload: z.ZodObject<{
chainId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
chainId: number;
}, {
chainId: number;
}>;
}, "strip", z.ZodTypeAny, {
type: "@w3m-frame/SWITCH_NETWORK_SUCCESS";
payload: {
chainId: number;
};
}, {
type: "@w3m-frame/SWITCH_NETWORK_SUCCESS";
payload: {
chainId: number;
};
}>]>, z.ZodObject<{

@@ -776,9 +956,9 @@ type: z.ZodLiteral<"@w3m-frame/CONNECT_EMAIL_ERROR">;

type: z.ZodLiteral<"@w3m-frame/RPC_REQUEST_SUCCESS">;
payload: z.ZodString;
payload: z.ZodAny;
}, "strip", z.ZodTypeAny, {
type: "@w3m-frame/RPC_REQUEST_SUCCESS";
payload: string;
payload?: any;
}, {
type: "@w3m-frame/RPC_REQUEST_SUCCESS";
payload: string;
payload?: any;
}>]>, z.ZodObject<{

@@ -891,3 +1071,28 @@ type: z.ZodLiteral<"@w3m-frame/SESSION_UPDATE">;

type: "@w3m-frame/SYNC_THEME_SUCCESS";
}>]>, z.ZodObject<{
type: z.ZodLiteral<"@w3m-frame/SYNC_DAPP_DATA_ERROR">;
payload: z.ZodObject<{
message: z.ZodString;
}, "strip", z.ZodTypeAny, {
message: string;
}, {
message: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "@w3m-frame/SYNC_DAPP_DATA_ERROR";
payload: {
message: string;
};
}, {
type: "@w3m-frame/SYNC_DAPP_DATA_ERROR";
payload: {
message: string;
};
}>]>, z.ZodObject<{
type: z.ZodLiteral<"@w3m-frame/SYNC_DAPP_DATA_SUCCESS">;
}, "strip", z.ZodTypeAny, {
type: "@w3m-frame/SYNC_DAPP_DATA_SUCCESS";
}, {
type: "@w3m-frame/SYNC_DAPP_DATA_SUCCESS";
}>]>;
};
import { z } from 'zod';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, RpcEthBlockNumber, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse, AppSyncThemeRequest, RpcEthChainId } from './W3mFrameSchema.js';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, RpcEthBlockNumber, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, RpcEthGetTransactionByHash } from './W3mFrameSchema.js';
export declare namespace W3mFrameTypes {

@@ -13,2 +13,3 @@ type AppEvent = z.infer<typeof W3mFrameSchema.appEvent>;

AppSyncThemeRequest: z.infer<typeof AppSyncThemeRequest>;
AppSyncDappDataRequest: z.infer<typeof AppSyncDappDataRequest>;
}

@@ -21,2 +22,3 @@ interface Responses {

FrameAwaitUpdateEmailResponse: z.infer<typeof FrameAwaitUpdateEmailResponse>;
FrameSwitchNetworkResponse: z.infer<typeof FrameSwitchNetworkResponse>;
}

@@ -27,5 +29,5 @@ interface Network {

}
type RPCRequest = z.infer<typeof RpcPersonalSignRequest> | z.infer<typeof RpcEthSendTransactionRequest> | z.infer<typeof RpcEthSignTypedDataV4> | z.infer<typeof RpcEthAccountsRequest> | z.infer<typeof RpcEthEstimateGas> | z.infer<typeof RpcEthGasPrice> | z.infer<typeof RpcGetBalance> | z.infer<typeof RpcEthBlockNumber> | z.infer<typeof RpcEthChainId>;
type RPCRequest = z.infer<typeof RpcPersonalSignRequest> | z.infer<typeof RpcEthSendTransactionRequest> | z.infer<typeof RpcEthSignTypedDataV4> | z.infer<typeof RpcEthAccountsRequest> | z.infer<typeof RpcEthEstimateGas> | z.infer<typeof RpcEthGasPrice> | z.infer<typeof RpcGetBalance> | z.infer<typeof RpcEthBlockNumber> | z.infer<typeof RpcEthChainId> | z.infer<typeof RpcEthGetTransactionByHash>;
type RPCResponse = z.infer<typeof RpcResponse>;
type FrameSessionType = z.infer<typeof FrameSession>;
}
{
"name": "@web3modal/wallet",
"version": "3.6.0-2aeae674",
"version": "3.6.0-32bf236a",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./dist/esm/index.js",

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

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