@latticexyz/entrykit 2.2.23-c9a7e15b89f6e4486abcb46c3a75c213741816a4 → 2.2.23-cd0fa57c590233c5f099d6e469c46c6b51e2c46d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,12 @@
1
1
  import { Address } from 'viem/accounts';
2
- import { Chain, Client, Transport, Account, Address as Address$1, LocalAccount } from 'viem';
3
- import { SmartAccount } from 'viem/account-abstraction';
2
+ import * as viem from 'viem';
3
+ import { Chain, Client, Transport, Account, Address as Address$1, LocalAccount, RpcSchema, Abi, ContractFunctionParameters } from 'viem';
4
+ import { SmartAccount, BundlerClientConfig, BundlerClient } from 'viem/account-abstraction';
4
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
6
  import { ReactNode } from 'react';
6
7
  import * as _tanstack_react_query from '@tanstack/react-query';
7
8
  import { UseQueryResult, QueryClient } from '@tanstack/react-query';
8
- import { CreateConfigParameters, Config } from 'wagmi';
9
+ import { CreateConnectorFn, CreateConfigParameters, Config } from 'wagmi';
9
10
 
10
11
  type EntryKitConfigInput = {
11
12
  /**
@@ -99,7 +100,7 @@ declare function useAccountModal(): UseAccountModalResult;
99
100
 
100
101
  declare function useSessionClientReady(): UseQueryResult<SessionClient | undefined>;
101
102
 
102
- type CreateWagmiConfigOptions<chains extends readonly [Chain, ...Chain[]] = readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport> = Record<chains[number]["id"], Transport>> = {
103
+ type CreateWagmiConfigOptions<chains extends readonly [Chain, ...Chain[]] = readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport> = Record<chains[number]["id"], Transport>, connectorFns extends readonly CreateConnectorFn[] = readonly CreateConnectorFn[]> = {
103
104
  readonly chainId: number;
104
105
  readonly chains: chains;
105
106
  readonly transports: transports;
@@ -108,8 +109,22 @@ type CreateWagmiConfigOptions<chains extends readonly [Chain, ...Chain[]] = read
108
109
  */
109
110
  readonly walletConnectProjectId: string;
110
111
  readonly appName: string;
111
- } & Pick<CreateConfigParameters<chains, transports>, "pollingInterval">;
112
- declare function createWagmiConfig<const chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport>>(config: CreateWagmiConfigOptions<chains, transports>): Config<chains, transports>;
112
+ } & Pick<CreateConfigParameters<chains, transports, connectorFns>, "pollingInterval" | "connectors">;
113
+ declare function createWagmiConfig<const chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport>, const connectorFns extends readonly CreateConnectorFn[] = readonly CreateConnectorFn[]>(config: CreateWagmiConfigOptions<chains, transports, connectorFns>): Config<chains, transports, connectorFns>;
114
+
115
+ type GetDefaultConnectorsOptions = {
116
+ /**
117
+ * WalletConnect project ID, obtained from your WalletConnect dashboard.
118
+ */
119
+ readonly walletConnectProjectId: string;
120
+ readonly appName: string;
121
+ };
122
+ declare function getDefaultConnectors(config: GetDefaultConnectorsOptions): readonly CreateConnectorFn[];
123
+
124
+ type WithFeeCacheOptions = {
125
+ refreshInterval?: number;
126
+ };
127
+ declare function withFeeCache<chain extends Chain>(chain: chain, options?: WithFeeCacheOptions): chain;
113
128
 
114
129
  /**
115
130
  * @internal
@@ -154,4 +169,16 @@ declare function useFunds(userAddress: Address$1 | undefined): _tanstack_react_q
154
169
  paymasterBalance: bigint | null;
155
170
  }, Error>;
156
171
 
157
- export { AccountButton, type ConnectedClient, type CreateWagmiConfigOptions, type EntryKitConfig, type EntryKitConfigInput, EntryKitProvider, type SessionClient, createWagmiConfig, defineConfig, getFundsQueryOptions, internal_validateSigner, useAccountModal, useEntryKitConfig, useFunds, useSessionClientReady as useSessionClient };
172
+ declare function createBundlerClient<transport extends Transport, chain extends Chain = Chain, account extends SmartAccount = SmartAccount, client extends Client = Client, rpcSchema extends RpcSchema | undefined = undefined>(config: BundlerClientConfig<transport, chain, account, client, rpcSchema>): BundlerClient<transport, chain, account, client, rpcSchema>;
173
+
174
+ declare function getBundlerTransport(chain: Chain): viem.Transport | viem.HttpTransport<undefined, false>;
175
+
176
+ declare function defineCall<abi extends Abi | readonly unknown[]>(call: Omit<ContractFunctionParameters<abi>, "address"> & {
177
+ to: Address$1;
178
+ value?: bigint | undefined;
179
+ }): Omit<ContractFunctionParameters<abi>, "address"> & {
180
+ to: Address$1;
181
+ value?: bigint | undefined;
182
+ };
183
+
184
+ export { AccountButton, type ConnectedClient, type CreateWagmiConfigOptions, type EntryKitConfig, type EntryKitConfigInput, EntryKitProvider, type GetDefaultConnectorsOptions, type SessionClient, createBundlerClient, createWagmiConfig, defineCall, defineConfig, getBundlerTransport, getDefaultConnectors, getFundsQueryOptions, internal_validateSigner, useAccountModal, useEntryKitConfig, useFunds, useSessionClientReady as useSessionClient, withFeeCache };