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

@dynamic-labs/client

Package Overview
Dependencies
Maintainers
1
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynamic-labs/client - npm Package Compare versions

Comparing version 2.1.0-alpha.18 to 2.1.0-alpha.19

src/modules/authModule/emailAuthModule/emailAuthModule.cjs

2

package.js
'use client'
var version = "2.1.0-alpha.18";
var version = "2.1.0-alpha.19";
export { version };
{
"name": "@dynamic-labs/client",
"version": "2.1.0-alpha.18",
"version": "2.1.0-alpha.19",
"repository": {

@@ -29,10 +29,10 @@ "type": "git",

"dependencies": {
"@dynamic-labs/message-transport": "2.1.0-alpha.18",
"@dynamic-labs/message-transport": "2.1.0-alpha.19",
"@vue/reactivity": "3.4.21"
},
"peerDependencies": {
"@dynamic-labs/logger": "2.1.0-alpha.18",
"@dynamic-labs/types": "2.1.0-alpha.18",
"@dynamic-labs/logger": "2.1.0-alpha.19",
"@dynamic-labs/types": "2.1.0-alpha.19",
"eventemitter3": "5.0.1"
}
}

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

import { BaseWallet } from '@dynamic-labs/types';
export { type Core } from './client/core';

@@ -7,1 +8,2 @@ export { Extendable, type Extension } from './utils/Extendable';

export type { WalletsModule } from './modules/walletsModule';
export type Wallet = BaseWallet;
import { AuthModuleMessages, AuthModuleState, StoreEventListeners } from '@dynamic-labs/message-transport';
import { Core } from '../../client/core';
import { SmsAuthModule } from '../smsAuthModule';
import { EmailAuthModule } from '../emailAuthModule';
export type AuthModule = AuthModuleState & StoreEventListeners<AuthModuleState> & Pick<AuthModuleMessages, 'logout'> & {
import { SmsAuthModule } from './smsAuthModule';
import { EmailAuthModule } from './emailAuthModule';
type PublicAuthModuleMessages = Pick<AuthModuleMessages, 'logout'>;
export type AuthModule = AuthModuleState & StoreEventListeners<AuthModuleState> & PublicAuthModuleMessages & {
sms: SmsAuthModule;

@@ -10,1 +11,2 @@ email: EmailAuthModule;

export declare const createAuthModule: (core: Core) => AuthModule;
export {};
'use client'
import { createStore, createEventEmitterForMessages, createRequestChannel } from '@dynamic-labs/message-transport';
import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
import { createSmsAuthModule } from '../smsAuthModule/smsAuthModule.js';
import { createEmailAuthModule } from '../emailAuthModule/emailAuthModule.js';
import { createSmsAuthModule } from './smsAuthModule/smsAuthModule.js';
import { createEmailAuthModule } from './emailAuthModule/emailAuthModule.js';
const createAuthModule = (core) => {
const email = createEmailAuthModule(core);
const sms = createSmsAuthModule(core);
const store = createStore({

@@ -25,5 +23,5 @@ initialState: {

return Object.assign(store.getters, pickListenerActions(messageEvents), {
email,
email: createEmailAuthModule(core),
logout: () => requestChannel.request('logout'),
sms,
sms: createSmsAuthModule(core),
});

@@ -30,0 +28,0 @@ };

@@ -1,4 +0,11 @@

import { StoreEventListeners, WalletsModuleState } from '@dynamic-labs/message-transport';
import { StoreEventListeners, WalletsModuleMessages, WalletsModuleState } from '@dynamic-labs/message-transport';
import { Core } from '../../client/core';
export type WalletsModule = WalletsModuleState & StoreEventListeners<WalletsModuleState>;
import { EmbeddedWalletsModule } from './embeddedWalletsModule';
export type WalletsModule = WalletsModuleState & {
embedded: EmbeddedWalletsModule;
signMessage: WalletsModuleMessages['signMessage'];
switchNetwork: WalletsModuleMessages['switchNetwork'];
getBalance: WalletsModuleMessages['getBalance'];
getNetwork: WalletsModuleMessages['getNetwork'];
} & StoreEventListeners<WalletsModuleState>;
export declare const createWalletsModule: (core: Core) => WalletsModule;
'use client'
import { createStore } from '@dynamic-labs/message-transport';
import { createRequestChannel, createStore } from '@dynamic-labs/message-transport';
import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
import { createEmbeddedWalletsModule } from './embeddedWalletsModule/embeddedWalletsModule.js';
const createWalletsModule = (core) => {
const requestChannel = createRequestChannel(core.messageTransport);
const store = createStore({

@@ -11,5 +13,15 @@ initialState: { primary: undefined, userWallets: [] },

});
return Object.assign(store.getters, pickListenerActions(store.eventEmitter));
const signMessage = (params) => requestChannel.request('signMessage', params);
const getBalance = (params) => requestChannel.request('getBalance', params);
const switchNetwork = (params) => requestChannel.request('switchNetwork', params);
const getNetwork = (params) => requestChannel.request('getNetwork', params);
return Object.assign(store.getters, pickListenerActions(store.eventEmitter), {
embedded: createEmbeddedWalletsModule(core),
getBalance,
getNetwork,
signMessage,
switchNetwork,
});
};
export { createWalletsModule };

Sorry, the diff of this file is too big to display

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