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 4.1.2-05d9e29.0 to 4.1.2-142149x.1

8

dist/esm/src/W3mFrameConstants.js
export const W3mFrameConstants = {
SECURE_SITE_SDK: 'https://secure.walletconnect.com/sdk',
SECURE_SITE_SDK: 'http://localhost:3010/sdk',
APP_EVENT_KEY: '@w3m-app/',

@@ -17,3 +17,3 @@ FRAME_EVENT_KEY: '@w3m-frame/',

APP_CONNECT_OTP: '@w3m-app/CONNECT_OTP',
APP_CONNECT_SOCIAL: '@w3m-app/CONNECT_SOCIAL',
APP_GET_SOCIAL_REDIRECT_URI: '@w3m-app/GET_SOCIAL_REDIRECT_URI',
APP_GET_USER: '@w3m-app/GET_USER',

@@ -41,4 +41,4 @@ APP_SIGN_OUT: '@w3m-app/SIGN_OUT',

FRAME_CONNECT_OTP_ERROR: '@w3m-frame/CONNECT_OTP_ERROR',
FRAME_CONNECT_SOCIAL_SUCCESS: '@w3m-frame/CONNECT_SOCIAL_SUCCESS',
FRAME_CONNECT_SOCIAL_ERROR: '@w3m-frame/CONNECT_SOCIAL_ERROR',
FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS: '@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS',
FRAME_GET_SOCIAL_REDIRECT_URI_ERROR: '@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR',
FRAME_GET_USER_SUCCESS: '@w3m-frame/GET_USER_SUCCESS',

@@ -45,0 +45,0 @@ FRAME_GET_USER_ERROR: '@w3m-frame/GET_USER_ERROR',

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

this.connectOtpResolver = undefined;
this.connectSocialResolver = undefined;
this.getSocialRedirectUriResolver = undefined;
this.connectResolver = undefined;

@@ -42,6 +42,6 @@ this.disconnectResolver = undefined;

return this.onConnectOtpError(event);
case W3mFrameConstants.FRAME_CONNECT_SOCIAL_SUCCESS:
return this.onConnectSocialSuccess();
case W3mFrameConstants.FRAME_CONNECT_SOCIAL_ERROR:
return this.onConnectSocialError(event);
case W3mFrameConstants.FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:
return this.onGetSocialRedirectUriSuccess(event);
case W3mFrameConstants.FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:
return this.onGetSocialRedirectUriError(event);
case W3mFrameConstants.FRAME_GET_USER_SUCCESS:

@@ -141,7 +141,10 @@ return this.onConnectSuccess(event);

}
async connectSocial(payload) {
async getSocialRedirectUri(payload) {
await this.w3mFrame.frameLoadPromise;
this.w3mFrame.events.postAppEvent({ type: W3mFrameConstants.APP_CONNECT_SOCIAL, payload });
this.w3mFrame.events.postAppEvent({
type: W3mFrameConstants.APP_GET_SOCIAL_REDIRECT_URI,
payload
});
return new Promise((resolve, reject) => {
this.connectSocialResolver = { resolve, reject };
this.getSocialRedirectUriResolver = { resolve, reject };
});

@@ -336,7 +339,7 @@ }

}
onConnectSocialSuccess() {
this.connectSocialResolver?.resolve(undefined);
onGetSocialRedirectUriSuccess(event) {
this.getSocialRedirectUriResolver?.resolve(event.payload);
}
onConnectSocialError(event) {
this.connectSocialResolver?.reject(event.payload.message);
onGetSocialRedirectUriError(event) {
this.getSocialRedirectUriResolver?.reject(event.payload.message);
}

@@ -343,0 +346,0 @@ onConnectSuccess(event) {

@@ -30,3 +30,3 @@ import { z } from 'zod';

export const AppConnectOtpRequest = z.object({ otp: z.string() });
export const AppConnectSocialRequest = z.object({
export const AppGetSocialRedirectUriRequest = z.object({
provider: z.enum(['google', 'apple', 'facebook', 'x', 'github', 'discord', 'twitch', 'telegram'])

@@ -75,2 +75,3 @@ });

export const FrameSetPreferredAccountResponse = z.object({ type: z.string() });
export const FrameGetSocialRedirectUriResponse = z.object({ uri: z.string() });
export const RpcResponse = z.any();

@@ -227,3 +228,6 @@ export const RpcEthAccountsRequest = z.object({

.or(z.object({ type: zType('APP_CONNECT_OTP'), payload: AppConnectOtpRequest }))
.or(z.object({ type: zType('APP_CONNECT_SOCIAL'), payload: AppConnectSocialRequest }))
.or(z.object({
type: zType('APP_GET_SOCIAL_REDIRECT_URI'),
payload: AppGetSocialRedirectUriRequest
}))
.or(z.object({ type: zType('APP_GET_USER'), payload: z.optional(AppGetUserRequest) }))

@@ -297,4 +301,7 @@ .or(z.object({ type: zType('APP_SIGN_OUT') }))

.or(z.object({ type: zType('FRAME_CONNECT_DEVICE_SUCCESS') }))
.or(z.object({ type: zType('FRAME_CONNECT_SOCIAL_ERROR'), payload: zError }))
.or(z.object({ type: zType('FRAME_CONNECT_SOCIAL_SUCCESS') }))
.or(z.object({ type: zType('FRAME_GET_SOCIAL_REDIRECT_URI_ERROR'), payload: zError }))
.or(z.object({
type: zType('FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS'),
payload: FrameGetSocialRedirectUriResponse
}))
.or(z.object({ type: zType('FRAME_GET_USER_ERROR'), payload: zError }))

@@ -301,0 +308,0 @@ .or(z.object({ type: zType('FRAME_GET_USER_SUCCESS'), payload: FrameGetUserResponse }))

import { z } from 'zod';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcEthBlockNumber, RpcEthGetTransactionByHash, RpcEthGetBlockByNumber, RpcEthCall, RpcEthFeeHistory, RpcEthGetAccount, RpcEthGetBalance, RpcEthGetBlockyByHash, RpcUnistallFilter, RpcEthSyncing, RpcEthSendRawTransaction, RpcEthNewPendingTransactionFilter, RpcEthNewFilter, RpcEthNewBlockFilter, RpcEthMaxPriorityFeePerGas, RpcEthGetUncleCountByBlockNumber, RpcEthGetUncleCountByBlockHash, RpcEthGetTransactionReceipt, RpcEthGetTransactionCount, RpcEthGetTransactionByBlockNumberAndIndex, RpcEthGetTransactionByBlockHashAndIndex, RpcEthGetStorageAt, RpcEthGetProof, RpcEthGetLogs, RpcEthGetFilterLogs, RpcEthGetFilter, RpcEthGetCode, RcpEthGetBlockTransactionCountByNumber, RcpEthGetBlockTransactionCountByHash, RpcEthGetBlockReceipts, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameUpdateEmailSecondaryOtpResolver, AppUpdateEmailPrimaryOtpRequest, AppUpdateEmailSecondaryOtpRequest, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, FrameGetSmartAccountEnabledNetworksResponse, FrameInitSmartAccountResponse, AppConnectSocialRequest } from './W3mFrameSchema.js';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcEthBlockNumber, RpcEthGetTransactionByHash, RpcEthGetBlockByNumber, RpcEthCall, RpcEthFeeHistory, RpcEthGetAccount, RpcEthGetBalance, RpcEthGetBlockyByHash, RpcUnistallFilter, RpcEthSyncing, RpcEthSendRawTransaction, RpcEthNewPendingTransactionFilter, RpcEthNewFilter, RpcEthNewBlockFilter, RpcEthMaxPriorityFeePerGas, RpcEthGetUncleCountByBlockNumber, RpcEthGetUncleCountByBlockHash, RpcEthGetTransactionReceipt, RpcEthGetTransactionCount, RpcEthGetTransactionByBlockNumberAndIndex, RpcEthGetTransactionByBlockHashAndIndex, RpcEthGetStorageAt, RpcEthGetProof, RpcEthGetLogs, RpcEthGetFilterLogs, RpcEthGetFilter, RpcEthGetCode, RcpEthGetBlockTransactionCountByNumber, RcpEthGetBlockTransactionCountByHash, RpcEthGetBlockReceipts, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameUpdateEmailSecondaryOtpResolver, AppUpdateEmailPrimaryOtpRequest, AppUpdateEmailSecondaryOtpRequest, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, FrameGetSmartAccountEnabledNetworksResponse, FrameInitSmartAccountResponse, AppGetSocialRedirectUriRequest, FrameGetSocialRedirectUriResponse } from './W3mFrameSchema.js';
//# sourceMappingURL=W3mFrameTypes.js.map
export declare const W3mFrameConstants: {
readonly SECURE_SITE_SDK: "https://secure.walletconnect.com/sdk";
readonly SECURE_SITE_SDK: "http://localhost:3010/sdk";
readonly APP_EVENT_KEY: "@w3m-app/";

@@ -17,3 +17,3 @@ readonly FRAME_EVENT_KEY: "@w3m-frame/";

readonly APP_CONNECT_OTP: "@w3m-app/CONNECT_OTP";
readonly APP_CONNECT_SOCIAL: "@w3m-app/CONNECT_SOCIAL";
readonly APP_GET_SOCIAL_REDIRECT_URI: "@w3m-app/GET_SOCIAL_REDIRECT_URI";
readonly APP_GET_USER: "@w3m-app/GET_USER";

@@ -41,4 +41,4 @@ readonly APP_SIGN_OUT: "@w3m-app/SIGN_OUT";

readonly FRAME_CONNECT_OTP_ERROR: "@w3m-frame/CONNECT_OTP_ERROR";
readonly FRAME_CONNECT_SOCIAL_SUCCESS: "@w3m-frame/CONNECT_SOCIAL_SUCCESS";
readonly FRAME_CONNECT_SOCIAL_ERROR: "@w3m-frame/CONNECT_SOCIAL_ERROR";
readonly FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS: "@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS";
readonly FRAME_GET_SOCIAL_REDIRECT_URI_ERROR: "@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR";
readonly FRAME_GET_USER_SUCCESS: "@w3m-frame/GET_USER_SUCCESS";

@@ -45,0 +45,0 @@ readonly FRAME_GET_USER_ERROR: "@w3m-frame/GET_USER_ERROR";

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

private connectOtpResolver;
private connectSocialResolver;
private getSocialRedirectUriResolver;
private connectResolver;

@@ -32,3 +32,5 @@ private disconnectResolver;

connectOtp(payload: W3mFrameTypes.Requests['AppConnectOtpRequest']): Promise<unknown>;
connectSocial(payload: W3mFrameTypes.Requests['AppConnectSocialRequest']): Promise<unknown>;
getSocialRedirectUri(payload: W3mFrameTypes.Requests['AppGetSocialRedirectUriRequest']): Promise<{
uri: string;
}>;
isConnected(): Promise<{

@@ -76,4 +78,4 @@ isConnected: boolean;

private onConnectOtpError;
private onConnectSocialSuccess;
private onConnectSocialError;
private onGetSocialRedirectUriSuccess;
private onGetSocialRedirectUriError;
private onConnectSuccess;

@@ -80,0 +82,0 @@ private onConnectError;

import { z } from 'zod';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcEthBlockNumber, RpcEthGetTransactionByHash, RpcEthGetBlockByNumber, RpcEthCall, RpcEthFeeHistory, RpcEthGetAccount, RpcEthGetBalance, RpcEthGetBlockyByHash, RpcUnistallFilter, RpcEthSyncing, RpcEthSendRawTransaction, RpcEthNewPendingTransactionFilter, RpcEthNewFilter, RpcEthNewBlockFilter, RpcEthMaxPriorityFeePerGas, RpcEthGetUncleCountByBlockNumber, RpcEthGetUncleCountByBlockHash, RpcEthGetTransactionReceipt, RpcEthGetTransactionCount, RpcEthGetTransactionByBlockNumberAndIndex, RpcEthGetTransactionByBlockHashAndIndex, RpcEthGetStorageAt, RpcEthGetProof, RpcEthGetLogs, RpcEthGetFilterLogs, RpcEthGetFilter, RpcEthGetCode, RcpEthGetBlockTransactionCountByNumber, RcpEthGetBlockTransactionCountByHash, RpcEthGetBlockReceipts, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameUpdateEmailSecondaryOtpResolver, AppUpdateEmailPrimaryOtpRequest, AppUpdateEmailSecondaryOtpRequest, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, FrameGetSmartAccountEnabledNetworksResponse, FrameInitSmartAccountResponse, AppConnectSocialRequest } from './W3mFrameSchema.js';
import { W3mFrameSchema, AppConnectEmailRequest, AppConnectOtpRequest, AppSwitchNetworkRequest, FrameConnectEmailResponse, FrameGetChainIdResponse, FrameGetUserResponse, FrameIsConnectedResponse, RpcPersonalSignRequest, RpcResponse, RpcEthSendTransactionRequest, RpcEthSignTypedDataV4, RpcEthAccountsRequest, RpcEthEstimateGas, RpcEthGasPrice, RpcEthBlockNumber, RpcEthGetTransactionByHash, RpcEthGetBlockByNumber, RpcEthCall, RpcEthFeeHistory, RpcEthGetAccount, RpcEthGetBalance, RpcEthGetBlockyByHash, RpcUnistallFilter, RpcEthSyncing, RpcEthSendRawTransaction, RpcEthNewPendingTransactionFilter, RpcEthNewFilter, RpcEthNewBlockFilter, RpcEthMaxPriorityFeePerGas, RpcEthGetUncleCountByBlockNumber, RpcEthGetUncleCountByBlockHash, RpcEthGetTransactionReceipt, RpcEthGetTransactionCount, RpcEthGetTransactionByBlockNumberAndIndex, RpcEthGetTransactionByBlockHashAndIndex, RpcEthGetStorageAt, RpcEthGetProof, RpcEthGetLogs, RpcEthGetFilterLogs, RpcEthGetFilter, RpcEthGetCode, RcpEthGetBlockTransactionCountByNumber, RcpEthGetBlockTransactionCountByHash, RpcEthGetBlockReceipts, FrameSession, AppGetUserRequest, AppUpdateEmailRequest, FrameUpdateEmailSecondaryOtpResolver, AppUpdateEmailPrimaryOtpRequest, AppUpdateEmailSecondaryOtpRequest, AppSyncThemeRequest, RpcEthChainId, FrameSwitchNetworkResponse, AppSyncDappDataRequest, FrameGetSmartAccountEnabledNetworksResponse, FrameInitSmartAccountResponse, AppGetSocialRedirectUriRequest, FrameGetSocialRedirectUriResponse } from './W3mFrameSchema.js';
export declare namespace W3mFrameTypes {

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

AppConnectOtpRequest: z.infer<typeof AppConnectOtpRequest>;
AppConnectSocialRequest: z.infer<typeof AppConnectSocialRequest>;
AppGetSocialRedirectUriRequest: z.infer<typeof AppGetSocialRedirectUriRequest>;
AppSwitchNetworkRequest: z.infer<typeof AppSwitchNetworkRequest>;

@@ -28,2 +28,3 @@ AppGetUserRequest: z.infer<typeof AppGetUserRequest>;

FrameInitSmartAccountResponse: z.infer<typeof FrameInitSmartAccountResponse>;
FrameGetSocialRedirectUriResponse: z.infer<typeof FrameGetSocialRedirectUriResponse>;
}

@@ -30,0 +31,0 @@ interface Network {

{
"name": "@web3modal/wallet",
"version": "4.1.2-05d9e29.0",
"version": "4.1.2-142149x.1",
"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 too big to display

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