@web3modal/wallet
Advanced tools
Comparing version 3.5.0 to 3.6.0-33e0d8ea
@@ -65,3 +65,3 @@ import { W3mFrameConstants } from './W3mFrameConstants.js'; | ||
this.iframe.onerror = () => { | ||
this.frameLoadPromiseResolver?.reject(); | ||
this.frameLoadPromiseResolver?.reject('Unable to load email login dependency'); | ||
}; | ||
@@ -68,0 +68,0 @@ } |
@@ -8,2 +8,5 @@ export const W3mFrameConstants = { | ||
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY', | ||
EMAIL_LOGIN_USED_KEY: 'EMAIL_LOGIN_USED_KEY', | ||
LAST_EMAIL_LOGIN_TIME: 'LAST_EMAIL_LOGIN_TIME', | ||
EMAIL: 'EMAIL', | ||
APP_SWITCH_NETWORK: '@w3m-app/SWITCH_NETWORK', | ||
@@ -18,2 +21,4 @@ APP_CONNECT_EMAIL: '@w3m-app/CONNECT_EMAIL', | ||
APP_RPC_REQUEST: '@w3m-app/RPC_REQUEST', | ||
APP_UPDATE_EMAIL: '@w3m-app/UPDATE_EMAIL', | ||
APP_AWAIT_UPDATE_EMAIL: '@w3m-app/AWAIT_UPDATE_EMAIL', | ||
FRAME_SWITCH_NETWORK_ERROR: '@w3m-frame/SWITCH_NETWORK_ERROR', | ||
@@ -37,4 +42,8 @@ FRAME_SWITCH_NETWORK_SUCCESS: '@w3m-frame/SWITCH_NETWORK_SUCCESS', | ||
FRAME_RPC_REQUEST_ERROR: '@w3m-frame/RPC_REQUEST_ERROR', | ||
FRAME_SESSION_UPDATE: '@w3m-frame/SESSION_UPDATE' | ||
FRAME_SESSION_UPDATE: '@w3m-frame/SESSION_UPDATE', | ||
FRAME_UPDATE_EMAIL_SUCCESS: '@w3m-frame/UPDATE_EMAIL_SUCCESS', | ||
FRAME_UPDATE_EMAIL_ERROR: '@w3m-frame/UPDATE_EMAIL_ERROR', | ||
FRAME_AWAIT_UPDATE_EMAIL_SUCCESS: '@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS', | ||
FRAME_AWAIT_UPDATE_EMAIL_ERROR: '@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR' | ||
}; | ||
//# sourceMappingURL=W3mFrameConstants.js.map |
@@ -0,1 +1,3 @@ | ||
import { W3mFrameStorage } from './W3mFrameStorage.js'; | ||
import { W3mFrameConstants } from './W3mFrameConstants.js'; | ||
const RESTRICTED_TIMEZONES = [ | ||
@@ -25,4 +27,14 @@ 'ASIA/SHANGHAI', | ||
} | ||
}, | ||
checkIfAllowedToTriggerEmail() { | ||
const lastEmailLoginTime = W3mFrameStorage.get(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME); | ||
if (lastEmailLoginTime) { | ||
const difference = Date.now() - Number(lastEmailLoginTime); | ||
if (difference < 30000) { | ||
const cooldownSec = Math.ceil((30000 - difference) / 1000); | ||
throw new Error(`Please try again after ${cooldownSec} seconds`); | ||
} | ||
} | ||
} | ||
}; | ||
//# sourceMappingURL=W3mFrameHelpers.js.map |
import { W3mFrame } from './W3mFrame.js'; | ||
import { W3mFrameConstants } from './W3mFrameConstants.js'; | ||
import { W3mFrameStorage } from './W3mFrameStorage.js'; | ||
import { W3mFrameHelpers } from './W3mFrameHelpers.js'; | ||
export class W3mFrameProvider { | ||
@@ -15,2 +16,3 @@ constructor(projectId) { | ||
this.rpcRequestResolver = undefined; | ||
this.updateEmailResolver = undefined; | ||
this.w3mFrame = new W3mFrame(projectId, true); | ||
@@ -58,2 +60,6 @@ this.w3mFrame.events.onFrameEvent(event => { | ||
return this.onSessionUpdate(event); | ||
case W3mFrameConstants.FRAME_UPDATE_EMAIL_SUCCESS: | ||
return this.onUpdateEmailSuccess(); | ||
case W3mFrameConstants.FRAME_UPDATE_EMAIL_ERROR: | ||
return this.onUpdateEmailError(event); | ||
default: | ||
@@ -64,4 +70,11 @@ return null; | ||
} | ||
getLoginEmailUsed() { | ||
return Boolean(W3mFrameStorage.get(W3mFrameConstants.EMAIL_LOGIN_USED_KEY)); | ||
} | ||
getEmail() { | ||
return W3mFrameStorage.get(W3mFrameConstants.EMAIL); | ||
} | ||
async connectEmail(payload) { | ||
await this.w3mFrame.frameLoadPromise; | ||
W3mFrameHelpers.checkIfAllowedToTriggerEmail(); | ||
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_EMAIL, payload }); | ||
@@ -88,6 +101,5 @@ return new Promise((resolve, reject) => { | ||
await this.w3mFrame.frameLoadPromise; | ||
const token = this.getSessionToken(); | ||
this.w3mFrame.events.postAppEvent({ | ||
type: W3mFrameConstants.APP_IS_CONNECTED, | ||
payload: token ? { token } : undefined | ||
payload: undefined | ||
}); | ||
@@ -105,6 +117,14 @@ return new Promise((resolve, reject) => { | ||
} | ||
async connect() { | ||
async updateEmail(payload) { | ||
await this.w3mFrame.frameLoadPromise; | ||
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_GET_USER }); | ||
W3mFrameHelpers.checkIfAllowedToTriggerEmail(); | ||
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_UPDATE_EMAIL, payload }); | ||
return new Promise((resolve, reject) => { | ||
this.updateEmailResolver = { resolve, reject }; | ||
}); | ||
} | ||
async connect(payload) { | ||
await this.w3mFrame.frameLoadPromise; | ||
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_GET_USER, payload }); | ||
return new Promise((resolve, reject) => { | ||
this.connectResolver = { resolve, reject }; | ||
@@ -125,3 +145,2 @@ }); | ||
await this.w3mFrame.frameLoadPromise; | ||
this.deleteSessionToken(); | ||
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_SIGN_OUT }); | ||
@@ -165,2 +184,3 @@ return new Promise((resolve, reject) => { | ||
this.connectEmailResolver?.resolve(event.payload); | ||
this.setNewLastEmailLoginTime(); | ||
} | ||
@@ -183,2 +203,5 @@ onConnectEmailError(event) { | ||
onConnectSuccess(event) { | ||
W3mFrameStorage.set(W3mFrameConstants.EMAIL, event.payload.email); | ||
W3mFrameStorage.set(W3mFrameConstants.EMAIL_LOGIN_USED_KEY, 'true'); | ||
W3mFrameStorage.delete(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME); | ||
this.connectResolver?.resolve(event.payload); | ||
@@ -203,2 +226,4 @@ } | ||
this.disconnectResolver?.resolve(undefined); | ||
W3mFrameStorage.delete(W3mFrameConstants.EMAIL_LOGIN_USED_KEY); | ||
W3mFrameStorage.delete(W3mFrameConstants.EMAIL); | ||
} | ||
@@ -223,15 +248,15 @@ onSignOutError(event) { | ||
if (payload) { | ||
this.setSessionToken(payload.token); | ||
} | ||
} | ||
setSessionToken(token) { | ||
W3mFrameStorage.set(W3mFrameConstants.SESSION_TOKEN_KEY, token); | ||
onUpdateEmailSuccess() { | ||
this.updateEmailResolver?.resolve(undefined); | ||
this.setNewLastEmailLoginTime(); | ||
} | ||
getSessionToken() { | ||
return W3mFrameStorage.get(W3mFrameConstants.SESSION_TOKEN_KEY); | ||
onUpdateEmailError(event) { | ||
this.updateEmailResolver?.reject(event.payload.message); | ||
} | ||
deleteSessionToken() { | ||
W3mFrameStorage.delete(W3mFrameConstants.SESSION_TOKEN_KEY); | ||
setNewLastEmailLoginTime() { | ||
W3mFrameStorage.set(W3mFrameConstants.LAST_EMAIL_LOGIN_TIME, Date.now().toString()); | ||
} | ||
} | ||
//# sourceMappingURL=W3mFrameProvider.js.map |
@@ -10,2 +10,4 @@ import { z } from 'zod'; | ||
export const AppConnectOtpRequest = z.object({ otp: z.string() }); | ||
export const AppGetUserRequest = z.object({ chainId: z.optional(z.number()) }); | ||
export const AppUpdateEmailRequest = z.object({ email: z.string().email() }); | ||
export const FrameConnectEmailResponse = z.object({ | ||
@@ -15,2 +17,3 @@ action: z.enum(['VERIFY_DEVICE', 'VERIFY_OTP']) | ||
export const FrameGetUserResponse = z.object({ | ||
email: z.string().email(), | ||
address: z.string(), | ||
@@ -21,2 +24,3 @@ chainId: z.number() | ||
export const FrameGetChainIdResponse = z.object({ chainId: z.number() }); | ||
export const FrameAwaitUpdateEmailResponse = z.object({ email: z.string().email() }); | ||
export const RpcResponse = z.string(); | ||
@@ -58,3 +62,3 @@ export const RpcPersonalSignRequest = z.object({ | ||
.or(z.object({ type: zType('APP_CONNECT_OTP'), payload: AppConnectOtpRequest })) | ||
.or(z.object({ type: zType('APP_GET_USER') })) | ||
.or(z.object({ type: zType('APP_GET_USER'), payload: z.optional(AppGetUserRequest) })) | ||
.or(z.object({ type: zType('APP_SIGN_OUT') })) | ||
@@ -71,3 +75,5 @@ .or(z.object({ type: zType('APP_IS_CONNECTED'), payload: z.optional(FrameSession) })) | ||
.or(RpcEthSignTypedDataV4) | ||
})), | ||
})) | ||
.or(z.object({ type: zType('APP_UPDATE_EMAIL'), payload: AppUpdateEmailRequest })) | ||
.or(z.object({ type: zType('APP_AWAIT_UPDATE_EMAIL') })), | ||
frameEvent: z | ||
@@ -93,3 +99,10 @@ .object({ type: zType('FRAME_SWITCH_NETWORK_ERROR'), payload: zError }) | ||
.or(z.object({ type: zType('FRAME_SESSION_UPDATE'), payload: FrameSession })) | ||
.or(z.object({ type: zType('FRAME_UPDATE_EMAIL_ERROR'), payload: zError })) | ||
.or(z.object({ type: zType('FRAME_UPDATE_EMAIL_SUCCESS') })) | ||
.or(z.object({ type: zType('FRAME_AWAIT_UPDATE_EMAIL_ERROR'), payload: zError })) | ||
.or(z.object({ | ||
type: zType('FRAME_AWAIT_UPDATE_EMAIL_SUCCESS'), | ||
payload: FrameAwaitUpdateEmailResponse | ||
})) | ||
}; | ||
//# 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, FrameSession } from './W3mFrameSchema.js'; | ||
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse } from './W3mFrameSchema.js'; | ||
//# sourceMappingURL=W3mFrameTypes.js.map |
@@ -8,2 +8,5 @@ export declare const W3mFrameConstants: { | ||
readonly SESSION_TOKEN_KEY: "SESSION_TOKEN_KEY"; | ||
readonly EMAIL_LOGIN_USED_KEY: "EMAIL_LOGIN_USED_KEY"; | ||
readonly LAST_EMAIL_LOGIN_TIME: "LAST_EMAIL_LOGIN_TIME"; | ||
readonly EMAIL: "EMAIL"; | ||
readonly APP_SWITCH_NETWORK: "@w3m-app/SWITCH_NETWORK"; | ||
@@ -18,2 +21,4 @@ readonly APP_CONNECT_EMAIL: "@w3m-app/CONNECT_EMAIL"; | ||
readonly APP_RPC_REQUEST: "@w3m-app/RPC_REQUEST"; | ||
readonly APP_UPDATE_EMAIL: "@w3m-app/UPDATE_EMAIL"; | ||
readonly APP_AWAIT_UPDATE_EMAIL: "@w3m-app/AWAIT_UPDATE_EMAIL"; | ||
readonly FRAME_SWITCH_NETWORK_ERROR: "@w3m-frame/SWITCH_NETWORK_ERROR"; | ||
@@ -38,2 +43,6 @@ readonly FRAME_SWITCH_NETWORK_SUCCESS: "@w3m-frame/SWITCH_NETWORK_SUCCESS"; | ||
readonly FRAME_SESSION_UPDATE: "@w3m-frame/SESSION_UPDATE"; | ||
readonly FRAME_UPDATE_EMAIL_SUCCESS: "@w3m-frame/UPDATE_EMAIL_SUCCESS"; | ||
readonly FRAME_UPDATE_EMAIL_ERROR: "@w3m-frame/UPDATE_EMAIL_ERROR"; | ||
readonly FRAME_AWAIT_UPDATE_EMAIL_SUCCESS: "@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS"; | ||
readonly FRAME_AWAIT_UPDATE_EMAIL_ERROR: "@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR"; | ||
}; |
export declare const W3mFrameHelpers: { | ||
getBlockchainApiUrl(): false | "https://rpc.walletconnect.org" | "https://rpc.walletconnect.com"; | ||
checkIfAllowedToTriggerEmail(): void; | ||
}; |
@@ -13,3 +13,6 @@ import type { W3mFrameTypes } from './W3mFrameTypes.js'; | ||
private rpcRequestResolver; | ||
private updateEmailResolver; | ||
constructor(projectId: string); | ||
getLoginEmailUsed(): boolean; | ||
getEmail(): string | null; | ||
connectEmail(payload: W3mFrameTypes.Requests['AppConnectEmailRequest']): Promise<{ | ||
@@ -26,4 +29,6 @@ action: "VERIFY_DEVICE" | "VERIFY_OTP"; | ||
}>; | ||
connect(): Promise<{ | ||
updateEmail(payload: W3mFrameTypes.Requests['AppUpdateEmailRequest']): Promise<unknown>; | ||
connect(payload?: W3mFrameTypes.Requests['AppGetUserRequest']): Promise<{ | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
@@ -56,5 +61,5 @@ }>; | ||
private onSessionUpdate; | ||
private setSessionToken; | ||
private getSessionToken; | ||
private deleteSessionToken; | ||
private onUpdateEmailSuccess; | ||
private onUpdateEmailError; | ||
private setNewLastEmailLoginTime; | ||
} |
@@ -23,2 +23,16 @@ import { z } from 'zod'; | ||
}>; | ||
export declare const AppGetUserRequest: z.ZodObject<{ | ||
chainId: z.ZodOptional<z.ZodNumber>; | ||
}, "strip", z.ZodTypeAny, { | ||
chainId?: number | undefined; | ||
}, { | ||
chainId?: number | undefined; | ||
}>; | ||
export declare const AppUpdateEmailRequest: z.ZodObject<{ | ||
email: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
}, { | ||
email: string; | ||
}>; | ||
export declare const FrameConnectEmailResponse: z.ZodObject<{ | ||
@@ -32,2 +46,3 @@ action: z.ZodEnum<["VERIFY_DEVICE", "VERIFY_OTP"]>; | ||
export declare const FrameGetUserResponse: z.ZodObject<{ | ||
email: z.ZodString; | ||
address: z.ZodString; | ||
@@ -37,5 +52,7 @@ chainId: z.ZodNumber; | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
}, { | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
@@ -57,2 +74,9 @@ }>; | ||
}>; | ||
export declare const FrameAwaitUpdateEmailResponse: z.ZodObject<{ | ||
email: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
}, { | ||
email: string; | ||
}>; | ||
export declare const RpcResponse: z.ZodString; | ||
@@ -131,3 +155,3 @@ export declare const RpcPersonalSignRequest: z.ZodObject<{ | ||
export declare const W3mFrameSchema: { | ||
appEvent: 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.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-app/SWITCH_NETWORK">; | ||
@@ -197,6 +221,19 @@ payload: z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-app/GET_USER">; | ||
payload: z.ZodOptional<z.ZodObject<{ | ||
chainId: z.ZodOptional<z.ZodNumber>; | ||
}, "strip", z.ZodTypeAny, { | ||
chainId?: number | undefined; | ||
}, { | ||
chainId?: number | undefined; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-app/GET_USER"; | ||
payload?: { | ||
chainId?: number | undefined; | ||
} | undefined; | ||
}, { | ||
type: "@w3m-app/GET_USER"; | ||
payload?: { | ||
chainId?: number | undefined; | ||
} | undefined; | ||
}>]>, z.ZodObject<{ | ||
@@ -337,4 +374,29 @@ type: z.ZodLiteral<"@w3m-app/SIGN_OUT">; | ||
}; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-app/UPDATE_EMAIL">; | ||
payload: z.ZodObject<{ | ||
email: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
}, { | ||
email: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-app/UPDATE_EMAIL"; | ||
payload: { | ||
email: string; | ||
}; | ||
}, { | ||
type: "@w3m-app/UPDATE_EMAIL"; | ||
payload: { | ||
email: string; | ||
}; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-app/AWAIT_UPDATE_EMAIL">; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-app/AWAIT_UPDATE_EMAIL"; | ||
}, { | ||
type: "@w3m-app/AWAIT_UPDATE_EMAIL"; | ||
}>]>; | ||
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.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.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-frame/SWITCH_NETWORK_ERROR">; | ||
@@ -474,2 +536,3 @@ payload: z.ZodObject<{ | ||
payload: z.ZodObject<{ | ||
email: z.ZodString; | ||
address: z.ZodString; | ||
@@ -479,5 +542,7 @@ chainId: z.ZodNumber; | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
}, { | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
@@ -489,2 +554,3 @@ }>; | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
@@ -496,2 +562,3 @@ }; | ||
chainId: number; | ||
email: string; | ||
address: string; | ||
@@ -647,3 +714,66 @@ }; | ||
}; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-frame/UPDATE_EMAIL_ERROR">; | ||
payload: z.ZodObject<{ | ||
message: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
message: string; | ||
}, { | ||
message: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-frame/UPDATE_EMAIL_ERROR"; | ||
payload: { | ||
message: string; | ||
}; | ||
}, { | ||
type: "@w3m-frame/UPDATE_EMAIL_ERROR"; | ||
payload: { | ||
message: string; | ||
}; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-frame/UPDATE_EMAIL_SUCCESS">; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-frame/UPDATE_EMAIL_SUCCESS"; | ||
}, { | ||
type: "@w3m-frame/UPDATE_EMAIL_SUCCESS"; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR">; | ||
payload: z.ZodObject<{ | ||
message: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
message: string; | ||
}, { | ||
message: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR"; | ||
payload: { | ||
message: string; | ||
}; | ||
}, { | ||
type: "@w3m-frame/AWAIT_UPDATE_EMAIL_ERROR"; | ||
payload: { | ||
message: string; | ||
}; | ||
}>]>, z.ZodObject<{ | ||
type: z.ZodLiteral<"@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS">; | ||
payload: z.ZodObject<{ | ||
email: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
email: string; | ||
}, { | ||
email: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS"; | ||
payload: { | ||
email: string; | ||
}; | ||
}, { | ||
type: "@w3m-frame/AWAIT_UPDATE_EMAIL_SUCCESS"; | ||
payload: { | ||
email: string; | ||
}; | ||
}>]>; | ||
}; |
import { z } from 'zod'; | ||
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, FrameSession } from './W3mFrameSchema.js'; | ||
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcGetBalance, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameAwaitUpdateEmailResponse } from './W3mFrameSchema.js'; | ||
export declare namespace W3mFrameTypes { | ||
@@ -10,2 +10,4 @@ type AppEvent = z.infer<typeof W3mFrameSchema.appEvent>; | ||
AppSwitchNetworkRequest: z.infer<typeof AppSwitchNetworkRequest>; | ||
AppGetUserRequest: z.infer<typeof AppGetUserRequest>; | ||
AppUpdateEmailRequest: z.infer<typeof AppUpdateEmailRequest>; | ||
} | ||
@@ -17,2 +19,3 @@ interface Responses { | ||
FrameIsConnectedResponse: z.infer<typeof FrameIsConnectedResponse>; | ||
FrameAwaitUpdateEmailResponse: z.infer<typeof FrameAwaitUpdateEmailResponse>; | ||
} | ||
@@ -19,0 +22,0 @@ interface Network { |
{ | ||
"name": "@web3modal/wallet", | ||
"version": "3.5.0", | ||
"version": "3.6.0-33e0d8ea", | ||
"type": "module", | ||
@@ -13,4 +13,4 @@ "main": "./dist/esm/index.js", | ||
"build:clean": "rm -rf dist", | ||
"build": "npm run build:clean; tsc --build", | ||
"watch": "npm run build:clean; tsc --watch", | ||
"build:wallet": "tsc --build", | ||
"watch": "tsc --watch", | ||
"typecheck": "tsc --noEmit", | ||
@@ -17,0 +17,0 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx" |
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
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
78888
1476
0
1