Socket
Socket
Sign inDemoInstall

@wagmi/core

Package Overview
Dependencies
Maintainers
2
Versions
490
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wagmi/core - npm Package Compare versions

Comparing version 2.11.6 to 2.11.7

9

dist/esm/createConfig.js

@@ -16,3 +16,3 @@ import { createStore as createMipd, } from 'mipd';

: noopStorage,
}), syncConnectedChain = true, ssr, ...rest } = parameters;
}), syncConnectedChain = true, ssr = false, ...rest } = parameters;
/////////////////////////////////////////////////////////////////////////////////////////////////

@@ -159,2 +159,3 @@ // Set up connectors, clients, etc.

current: state.current,
status: state.status,
};

@@ -304,3 +305,7 @@ },

return store.subscribe(selector, listener, options
? { ...options, fireImmediately: options.emitImmediately }
? {
...options,
fireImmediately: options.emitImmediately,
// Workaround cast since Zustand does not support `'exactOptionalPropertyTypes'`
}
: undefined);

@@ -307,0 +312,0 @@ },

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

export const version = '2.11.6';
export const version = '2.11.7';
//# sourceMappingURL=version.js.map

@@ -87,3 +87,3 @@ import { type EIP6963ProviderDetail, type Store as MipdStore } from 'mipd';

export type Transport = (params: Parameters<viem_Transport>[0] & {
connectors?: StoreApi<Connector[]>;
connectors?: StoreApi<Connector[]> | undefined;
}) => ReturnType<viem_Transport>;

@@ -90,0 +90,0 @@ type ClientConfig = LooseOmit<viem_ClientConfig, 'account' | 'chain' | 'key' | 'name' | 'transport' | 'type'>;

@@ -5,5 +5,5 @@ export { type WatchChainsParameters, type WatchChainsReturnType, watchChains, } from '../actions/watchChains.js';

export { type ChainIdParameter, type ConnectorParameter, type ScopeKeyParameter, } from '../types/properties.js';
export { type Evaluate, type ExactPartial, type Mutable, type Omit, type OneOf, type UnionEvaluate, type UnionOmit, type UnionPartial, } from '../types/utils.js';
export { type Evaluate, type ExactPartial, type Mutable, type Omit, type OneOf, type RemoveUndefined, type UnionEvaluate, type UnionOmit, type UnionPartial, } from '../types/utils.js';
export { deepEqual } from '../utils/deepEqual.js';
export { uid } from '../utils/uid.js';
//# sourceMappingURL=internal.d.ts.map

@@ -72,3 +72,3 @@ import { type GetConnectorClientParameters, type GetConnectorClientReturnType } from '../actions/getConnectorClient.js';

Method: "eth_estimateGas";
Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag];
Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag, stateOverride: import("viem").RpcStateOverride];
ReturnType: import("viem").Quantity;

@@ -123,6 +123,6 @@ }, {

toBlock?: import("viem").RpcBlockNumber | import("viem").BlockTag | undefined;
blockHash?: never | undefined;
blockHash?: undefined;
} | {
fromBlock?: never | undefined;
toBlock?: never | undefined;
fromBlock?: undefined;
toBlock?: undefined;
blockHash?: import("viem").Hash | undefined;

@@ -218,3 +218,3 @@ })];

Method: "eth_estimateGas";
Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag];
Parameters: [transaction: import("viem").RpcTransactionRequest] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag] | [transaction: import("viem").RpcTransactionRequest, block: import("viem").RpcBlockNumber | import("viem").BlockTag, stateOverride: import("viem").RpcStateOverride];
ReturnType: import("viem").Quantity;

@@ -270,2 +270,6 @@ }, {

}, {
Method: "wallet_grantPermissions";
Parameters?: [import("viem").WalletGrantPermissionsParameters];
ReturnType: import("viem/chains").Prettify<import("viem").WalletGrantPermissionsReturnType>;
}, {
Method: "wallet_requestPermissions";

@@ -277,2 +281,8 @@ Parameters: [permissions: {

}, {
Method: "wallet_revokePermissions";
Parameters: [permissions: {
eth_accounts: Record<string, any>;
}];
ReturnType: null;
}, {
Method: "wallet_sendCalls";

@@ -279,0 +289,0 @@ Parameters?: import("viem").WalletSendCallsParameters;

@@ -68,3 +68,3 @@ import { type GetWalletClientParameters, type GetWalletClientReturnType } from '../actions/getWalletClient.js';

[x: `bytes3[${string}]`]: undefined;
[x: `bytes20[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes11[${string}]`]: undefined;

@@ -86,4 +86,4 @@ [x: `bytes16[${string}]`]: undefined;

[x: `bytes19[${string}]`]: undefined;
[x: `bytes20[${string}]`]: undefined;
[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -172,3 +172,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes3?: undefined;
bytes20?: undefined;
bytes22?: undefined;
bytes11?: undefined;

@@ -190,4 +190,4 @@ bytes16?: undefined;

bytes19?: undefined;
bytes20?: undefined;
bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -194,0 +194,0 @@ bytes24?: undefined;

@@ -9,3 +9,34 @@ import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem';

readonly queryFn: ({ queryKey }: {
queryKey: readonly ["readContract", Omit<ReadContractOptions<abi, functionName, args, config>, "abi">];
queryKey: readonly ["readContract", Omit<UnionPartial<{
account?: import("viem").Account | import("viem").Address | undefined;
blockNumber?: bigint | undefined;
factory?: import("viem").Address | undefined;
factoryData?: import("viem").Hex | undefined;
stateOverride?: import("viem").StateOverride | undefined;
blockTag?: import("viem").BlockTag | undefined;
} & {
abi: abi;
functionName: ContractFunctionName<abi, "pure" | "view"> | (functionName extends ContractFunctionName<abi, "pure" | "view"> ? functionName : never);
args?: ContractFunctionArgs<abi, "pure" | "view", functionName> | (abi extends Abi ? import("viem").UnionWiden<args> : never) | undefined;
} & (readonly [] extends ContractFunctionArgs<abi, "pure" | "view", functionName> ? {} : {
args: import("viem").Widen<args>;
}) & {
address: import("viem").Address;
} & import("../types/properties.js").ChainIdParameter<config>> & ScopeKeyParameter, "abi"> | Omit<UnionPartial<{
account?: import("viem").Account | import("viem").Address | undefined;
blockNumber?: bigint | undefined;
factory?: import("viem").Address | undefined;
factoryData?: import("viem").Hex | undefined;
stateOverride?: import("viem").StateOverride | undefined;
blockTag?: import("viem").BlockTag | undefined;
} & {
abi: abi;
functionName: ContractFunctionName<abi, "pure" | "view"> | (functionName extends ContractFunctionName<abi, "pure" | "view"> ? functionName : never);
args?: ContractFunctionArgs<abi, "pure" | "view", functionName> | (abi extends Abi ? import("viem").UnionWiden<args> : never) | undefined;
} & (readonly [] extends ContractFunctionArgs<abi, "pure" | "view", functionName> ? {} : {
args: import("viem").Widen<args>;
}) & {
address?: undefined;
code: import("viem").Hex;
} & import("../types/properties.js").ChainIdParameter<config>> & ScopeKeyParameter, "abi">];
signal: AbortSignal;

@@ -20,4 +51,35 @@ meta: import("@tanstack/query-core").QueryMeta | undefined;

export type ReadContractData<abi extends Abi | readonly unknown[], functionName extends ContractFunctionName<abi, 'pure' | 'view'>, args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>> = ReadContractQueryFnData<abi, functionName, args>;
export declare function readContractQueryKey<config extends Config, const abi extends Abi | readonly unknown[], functionName extends ContractFunctionName<abi, 'pure' | 'view'>, args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>>(options?: ReadContractOptions<abi, functionName, args, config>): readonly ["readContract", Omit<ReadContractOptions<abi, functionName, args, config>, "abi">];
export declare function readContractQueryKey<config extends Config, const abi extends Abi | readonly unknown[], functionName extends ContractFunctionName<abi, 'pure' | 'view'>, args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>>(options?: ReadContractOptions<abi, functionName, args, config>): readonly ["readContract", Omit<UnionPartial<{
account?: import("viem").Account | import("viem").Address | undefined;
blockNumber?: bigint | undefined;
factory?: import("viem").Address | undefined;
factoryData?: import("viem").Hex | undefined;
stateOverride?: import("viem").StateOverride | undefined;
blockTag?: import("viem").BlockTag | undefined;
} & {
abi: abi;
functionName: ContractFunctionName<abi, "pure" | "view"> | (functionName extends ContractFunctionName<abi, "pure" | "view"> ? functionName : never);
args?: ContractFunctionArgs<abi, "pure" | "view", functionName> | (abi extends Abi ? import("viem").UnionWiden<args> : never) | undefined;
} & (readonly [] extends ContractFunctionArgs<abi, "pure" | "view", functionName> ? {} : {
args: import("viem").Widen<args>;
}) & {
address: import("viem").Address;
} & import("../types/properties.js").ChainIdParameter<config>> & ScopeKeyParameter, "abi"> | Omit<UnionPartial<{
account?: import("viem").Account | import("viem").Address | undefined;
blockNumber?: bigint | undefined;
factory?: import("viem").Address | undefined;
factoryData?: import("viem").Hex | undefined;
stateOverride?: import("viem").StateOverride | undefined;
blockTag?: import("viem").BlockTag | undefined;
} & {
abi: abi;
functionName: ContractFunctionName<abi, "pure" | "view"> | (functionName extends ContractFunctionName<abi, "pure" | "view"> ? functionName : never);
args?: ContractFunctionArgs<abi, "pure" | "view", functionName> | (abi extends Abi ? import("viem").UnionWiden<args> : never) | undefined;
} & (readonly [] extends ContractFunctionArgs<abi, "pure" | "view", functionName> ? {} : {
args: import("viem").Widen<args>;
}) & {
address?: undefined;
code: import("viem").Hex;
} & import("../types/properties.js").ChainIdParameter<config>> & ScopeKeyParameter, "abi">];
export type ReadContractQueryKey<abi extends Abi | readonly unknown[], functionName extends ContractFunctionName<abi, 'pure' | 'view'>, args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>, config extends Config> = ReturnType<typeof readContractQueryKey<config, abi, functionName, args>>;
//# sourceMappingURL=readContract.d.ts.map

@@ -16,6 +16,5 @@ import type { MulticallParameters as viem_MulticallParameters } from 'viem';

chainId: number;
address: import("viem").Address;
functionName: string;
args?: readonly unknown[] | undefined;
value?: bigint | undefined;
address: import("viem").Address;
}[];

@@ -39,6 +38,5 @@ blockNumber?: bigint | undefined;

chainId: number;
address: import("viem").Address;
functionName: string;
args?: readonly unknown[] | undefined;
value?: bigint | undefined;
address: import("viem").Address;
}[];

@@ -60,6 +58,5 @@ blockNumber?: bigint | undefined;

chainId: number;
address: import("viem").Address;
functionName: string;
args?: readonly unknown[] | undefined;
value?: bigint | undefined;
address: import("viem").Address;
}[];

@@ -66,0 +63,0 @@ blockNumber?: bigint | undefined;

@@ -18,3 +18,3 @@ import type { MutateOptions } from '@tanstack/query-core';

[x: `bytes3[${string}]`]: undefined;
[x: `bytes20[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes11[${string}]`]: undefined;

@@ -36,4 +36,4 @@ [x: `bytes16[${string}]`]: undefined;

[x: `bytes19[${string}]`]: undefined;
[x: `bytes20[${string}]`]: undefined;
[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -122,3 +122,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes3?: undefined;
bytes20?: undefined;
bytes22?: undefined;
bytes11?: undefined;

@@ -140,4 +140,4 @@ bytes16?: undefined;

bytes19?: undefined;
bytes20?: undefined;
bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -222,3 +222,3 @@ bytes24?: undefined;

name?: string | undefined;
salt?: import("viem").ResolvedRegister["BytesType"]["outputs"] | undefined;
salt?: import("viem").ResolvedRegister["bytesType"]["outputs"] | undefined;
verifyingContract?: import("viem").Address | undefined;

@@ -225,0 +225,0 @@ version?: string | undefined;

@@ -11,2 +11,4 @@ import { type VerifyMessageParameters, type VerifyMessageReturnType } from '../actions/verifyMessage.js';

blockNumber?: bigint | undefined;
factory?: `0x${string}` | undefined;
factoryData?: `0x${string}` | undefined;
blockTag?: import("viem").BlockTag | undefined;

@@ -26,2 +28,4 @@ signature?: `0x${string}` | Uint8Array | import("viem").Signature | undefined;

blockNumber?: bigint | undefined;
factory?: `0x${string}` | undefined;
factoryData?: `0x${string}` | undefined;
blockTag?: import("viem").BlockTag | undefined;

@@ -39,2 +43,4 @@ signature?: `0x${string}` | Uint8Array | import("viem").Signature | undefined;

blockNumber?: bigint | undefined;
factory?: `0x${string}` | undefined;
factoryData?: `0x${string}` | undefined;
blockTag?: import("viem").BlockTag | undefined;

@@ -41,0 +47,0 @@ signature?: `0x${string}` | Uint8Array | import("viem").Signature | undefined;

@@ -40,2 +40,5 @@ /** Combines members of an intersection into a readable type. */

export type PartialBy<type, key extends keyof type> = ExactPartial<Pick<type, key>> & Omit<type, key>;
export type RemoveUndefined<type> = {
[key in keyof type]: NonNullable<type[key]>;
};
/** Loose version of {@link Omit} */

@@ -42,0 +45,0 @@ export type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;

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

export declare const version = "2.11.6";
export declare const version = "2.11.7";
//# sourceMappingURL=version.d.ts.map
{
"name": "@wagmi/core",
"description": "VanillaJS library for Ethereum",
"version": "2.11.6",
"version": "2.11.7",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": {

@@ -25,3 +25,9 @@ import {

import { ChainNotConfiguredError } from './errors/config.js'
import type { Evaluate, ExactPartial, LooseOmit, OneOf } from './types/utils.js'
import type {
Evaluate,
ExactPartial,
LooseOmit,
OneOf,
RemoveUndefined,
} from './types/utils.js'
import { uid } from './utils/uid.js'

@@ -75,3 +81,3 @@ import { version } from './version.js'

syncConnectedChain = true,
ssr,
ssr = false,
...rest

@@ -192,3 +198,3 @@ } = parameters

function getInitialState() {
function getInitialState(): State {
return {

@@ -199,3 +205,3 @@ chainId: chains.getState()[0].id,

status: 'disconnected',
} satisfies State
}
}

@@ -244,2 +250,3 @@

current: state.current,
status: state.status,
} satisfies PartializedState

@@ -410,3 +417,7 @@ },

options
? { ...options, fireImmediately: options.emitImmediately }
? ({
...options,
fireImmediately: options.emitImmediately,
// Workaround cast since Zustand does not support `'exactOptionalPropertyTypes'`
} as RemoveUndefined<typeof options>)
: undefined,

@@ -564,3 +575,3 @@ )

params: Parameters<viem_Transport>[0] & {
connectors?: StoreApi<Connector[]>
connectors?: StoreApi<Connector[]> | undefined
},

@@ -567,0 +578,0 @@ ) => ReturnType<viem_Transport>

@@ -40,2 +40,3 @@ ////////////////////////////////////////////////////////////////////////////////

type OneOf,
type RemoveUndefined,
type UnionEvaluate,

@@ -42,0 +43,0 @@ type UnionOmit,

@@ -72,2 +72,7 @@ /** Combines members of an intersection into a readable type. */

/* Removes `undefined` from object property */
export type RemoveUndefined<type> = {
[key in keyof type]: NonNullable<type[key]>
}
///////////////////////////////////////////////////////////////////////////

@@ -74,0 +79,0 @@ // Loose types

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

export const version = '2.11.6'
export const version = '2.11.7'

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

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