Socket
Socket
Sign inDemoInstall

@web3modal/core

Package Overview
Dependencies
Maintainers
10
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/core - npm Package Compare versions

Comparing version 5.0.7-cn-login-fc.0 to 5.0.7

5

dist/esm/src/controllers/AccountController.js

@@ -106,7 +106,2 @@ import { CoreHelperUtil } from '../utils/CoreHelperUtil.js';

},
setFarcasterUrl(farcasterUrl, chain) {
if (farcasterUrl) {
ChainController.setAccountProp('farcasterUrl', farcasterUrl, chain);
}
},
async fetchTokenBalance() {

@@ -113,0 +108,0 @@ const chainId = NetworkController.state.caipNetwork?.id;

5

dist/esm/src/controllers/BlockchainApiController.js

@@ -91,3 +91,3 @@ import { ConstantsUtil } from '../utils/ConstantsUtil.js';

},
fetchTransactions({ account, projectId, cursor, onramp, signal }) {
fetchTransactions({ account, projectId, cursor, onramp, signal, cache }) {
const queryParams = cursor ? { cursor } : {};

@@ -97,3 +97,4 @@ return api.get({

params: queryParams,
signal
signal,
cache
});

@@ -100,0 +101,0 @@ },

3

dist/esm/src/controllers/ChainController.js

@@ -195,4 +195,3 @@ import { proxyMap, subscribeKey as subKey } from 'valtio/utils';

socialProvider: undefined,
socialWindow: undefined,
farcasterUrl: undefined
socialWindow: undefined
});

@@ -199,0 +198,0 @@ }

@@ -32,3 +32,4 @@ import { proxy, subscribe as sub } from 'valtio/vanilla';

cursor: state.next,
onramp
onramp,
cache: onramp === 'coinbase' ? 'no-cache' : undefined
});

@@ -35,0 +36,0 @@ const nonSpamTransactions = this.filterSpamTransactions(response.data);

@@ -95,15 +95,2 @@ import { ConstantsUtil as CommonConstants } from '@web3modal/common';

},
formatFarcasterDeeplink(farcasterUrl) {
const url = new URL(farcasterUrl);
const params = new URLSearchParams(url.search);
const channelToken = params.get('channelToken');
const nonce = params.get('nonce');
const domain = params.get('domain');
const siweUri = params.get('siweUri');
if (!channelToken || !nonce || !domain || !siweUri) {
throw new Error('Missing required query parameters');
}
const deeplink = `farcaster://sign-in?channelToken=${encodeURIComponent(channelToken)}&nonce=${encodeURIComponent(nonce)}&domain=${encodeURIComponent(domain)}&siweUri=${encodeURIComponent(siweUri)}`;
return deeplink;
},
openHref(href, target, features) {

@@ -110,0 +97,0 @@ window.open(href, target, features || 'noreferrer noopener');

@@ -15,5 +15,5 @@ async function fetchData(...args) {

}
async get({ headers, signal, ...args }) {
async get({ headers, signal, cache, ...args }) {
const url = this.createUrl(args);
const response = await fetchData(url, { method: 'GET', headers, signal, cache: 'no-cache' });
const response = await fetchData(url, { method: 'GET', headers, signal, cache });
return response.json();

@@ -20,0 +20,0 @@ }

@@ -35,3 +35,4 @@ import { describe, expect, it, vi } from 'vitest';

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -63,3 +64,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -83,3 +85,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -110,3 +113,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -130,3 +134,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -157,3 +162,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -177,3 +183,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

onramp: 'coinbase',
cursor: undefined
cursor: undefined,
cache: 'no-cache'
});

@@ -205,3 +212,4 @@ expect(TransactionsController.state.transactions).toEqual([]);

cursor: undefined,
onramp: undefined
onramp: undefined,
cache: undefined
});

@@ -208,0 +216,0 @@ expect(TransactionsController.state.next).toBe('cursor');

@@ -24,3 +24,2 @@ import type { AccountType, CaipAddress, ConnectedWalletInfo, SocialProvider } from '../utils/TypeUtil.js';

socialWindow?: Window;
farcasterUrl?: string;
}

@@ -49,5 +48,4 @@ export declare const AccountController: {

setSocialWindow(socialWindow: AccountControllerState['socialWindow'], chain?: Chain): void;
setFarcasterUrl(farcasterUrl: AccountControllerState['farcasterUrl'], chain?: Chain): void;
fetchTokenBalance(): Promise<void>;
resetAccount(chain?: Chain): void;
};
import type { BlockchainApiTransactionsRequest, BlockchainApiTransactionsResponse, BlockchainApiSwapTokensRequest, BlockchainApiSwapTokensResponse, BlockchainApiGenerateSwapCalldataRequest, BlockchainApiGenerateSwapCalldataResponse, BlockchainApiGenerateApproveCalldataRequest, BlockchainApiGenerateApproveCalldataResponse, BlockchainApiSwapQuoteRequest, BlockchainApiSwapQuoteResponse, BlockchainApiSwapAllowanceRequest, BlockchainApiSwapAllowanceResponse, BlockchainApiGasPriceRequest, BlockchainApiGasPriceResponse, BlockchainApiTokenPriceRequest, BlockchainApiTokenPriceResponse, BlockchainApiIdentityRequest, BlockchainApiIdentityResponse, GenerateOnRampUrlArgs, GetQuoteArgs, OnrampQuote, BlockchainApiBalanceResponse, BlockchainApiLookupEnsName, BlockchainApiSuggestionResponse, BlockchainApiRegisterNameParams } from '../utils/TypeUtil.js';
export declare const BlockchainApiController: {
fetchIdentity({ address }: BlockchainApiIdentityRequest): Promise<BlockchainApiIdentityResponse>;
fetchTransactions({ account, projectId, cursor, onramp, signal }: BlockchainApiTransactionsRequest): Promise<BlockchainApiTransactionsResponse>;
fetchTransactions({ account, projectId, cursor, onramp, signal, cache }: BlockchainApiTransactionsRequest): Promise<BlockchainApiTransactionsResponse>;
fetchSwapQuote({ projectId, amount, userAddress, from, to, gasPrice }: BlockchainApiSwapQuoteRequest): Promise<BlockchainApiSwapQuoteResponse>;

@@ -6,0 +6,0 @@ fetchSwapTokens({ projectId, chainId }: BlockchainApiSwapTokensRequest): Promise<BlockchainApiSwapTokensResponse>;

@@ -12,3 +12,3 @@ import type { CaipNetwork, Connector, WcWallet } from '../utils/TypeUtil.js';

export interface RouterControllerState {
view: 'Account' | 'AccountSettings' | 'SelectAddresses' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'ConnectingExternal' | 'ConnectingFarcaster' | 'ConnectingWalletConnect' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'Downloads' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampActivity' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'Profile' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'SwitchAddress' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'UpgradeToSmartAccount' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview';
view: 'Account' | 'AccountSettings' | 'SelectAddresses' | 'AllWallets' | 'ApproveTransaction' | 'BuyInProgress' | 'WalletCompatibleNetworks' | 'ChooseAccountName' | 'Connect' | 'ConnectingExternal' | 'ConnectingWalletConnect' | 'ConnectingSiwe' | 'ConnectingSocial' | 'ConnectSocials' | 'ConnectWallets' | 'Downloads' | 'EmailVerifyOtp' | 'EmailVerifyDevice' | 'GetWallet' | 'Networks' | 'OnRampActivity' | 'OnRampFiatSelect' | 'OnRampProviders' | 'OnRampTokenSelect' | 'Profile' | 'RegisterAccountName' | 'RegisterAccountNameSuccess' | 'SwitchNetwork' | 'SwitchAddress' | 'Transactions' | 'UnsupportedChain' | 'UpdateEmailWallet' | 'UpdateEmailPrimaryOtp' | 'UpdateEmailSecondaryOtp' | 'UpgradeEmailWallet' | 'UpgradeToSmartAccount' | 'WalletReceive' | 'WalletSend' | 'WalletSendPreview' | 'WalletSendSelectToken' | 'WhatIsANetwork' | 'WhatIsAWallet' | 'WhatIsABuy' | 'Swap' | 'SwapSelectToken' | 'SwapPreview';
history: RouterControllerState['view'][];

@@ -15,0 +15,0 @@ data?: {

@@ -20,3 +20,2 @@ import type { Balance } from '@web3modal/common';

formatUniversalUrl(appUrl: string, wcUri: string): LinkingRecord;
formatFarcasterDeeplink(farcasterUrl: string): string;
openHref(href: string, target: '_blank' | '_self' | 'popupWindow', features?: string): void;

@@ -23,0 +22,0 @@ returnOpenHref(href: string, target: '_blank' | '_self' | 'popupWindow', features?: string): Window | null;

@@ -8,2 +8,3 @@ interface Options {

params?: Record<string, string | undefined>;
cache?: RequestCache;
signal?: AbortSignal;

@@ -17,3 +18,3 @@ }

constructor({ baseUrl }: Options);
get<T>({ headers, signal, ...args }: RequestArguments): Promise<T>;
get<T>({ headers, signal, cache, ...args }: RequestArguments): Promise<T>;
getBlob({ headers, signal, ...args }: RequestArguments): Promise<Blob>;

@@ -20,0 +21,0 @@ post<T>({ body, headers, signal, ...args }: PostArguments): Promise<T>;

@@ -29,3 +29,3 @@ import type { W3mFrameProvider, W3mFrameTypes } from '@web3modal/wallet';

export type ConnectorType = 'EXTERNAL' | 'WALLET_CONNECT' | 'INJECTED' | 'ANNOUNCED' | 'AUTH' | 'MULTI_CHAIN';
export type SocialProvider = 'google' | 'github' | 'apple' | 'facebook' | 'x' | 'discord' | 'farcaster';
export type SocialProvider = 'google' | 'github' | 'apple' | 'facebook' | 'x' | 'discord';
export type Connector = {

@@ -128,2 +128,3 @@ id: string;

signal?: AbortSignal;
cache?: RequestCache;
}

@@ -130,0 +131,0 @@ export interface BlockchainApiTransactionsResponse {

{
"name": "@web3modal/core",
"version": "5.0.7-cn-login-fc.0",
"version": "5.0.7",
"type": "module",

@@ -20,4 +20,4 @@ "main": "./dist/esm/index.js",

"dependencies": {
"@web3modal/common": "5.0.7-cn-login-fc.0",
"@web3modal/wallet": "5.0.7-cn-login-fc.0",
"@web3modal/common": "5.0.7",
"@web3modal/wallet": "5.0.7",
"valtio": "1.11.2"

@@ -24,0 +24,0 @@ },

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

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