@wagmi/core 0.7.7 → 0.7.8
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.
- package/dist/{base-5bd9b5ed.d.ts → base-a32d0b91.d.ts} +2 -2
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-TYXJCTXO.js → chunk-HEIMP7HQ.js} +28 -23
- package/dist/connectors/coinbaseWallet.d.ts +3 -3
- package/dist/connectors/coinbaseWallet.js +1 -1
- package/dist/connectors/metaMask.d.ts +4 -6
- package/dist/connectors/metaMask.js +36 -43
- package/dist/connectors/mock/index.d.ts +5 -5
- package/dist/connectors/mock/index.js +1 -1
- package/dist/connectors/walletConnect.d.ts +4 -4
- package/dist/connectors/walletConnect.js +1 -1
- package/dist/{contracts-3c4d70a1.d.ts → contracts-3880ee54.d.ts} +24 -24
- package/dist/{index-bacc1c49.d.ts → index-58cffc47.d.ts} +23 -23
- package/dist/index.d.ts +111 -111
- package/dist/index.js +1 -1
- package/dist/{injected-6980e5c3.d.ts → injected-82510902.d.ts} +12 -4
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/providers/alchemy.d.ts +2 -2
- package/dist/providers/infura.d.ts +2 -2
- package/dist/providers/jsonRpc.d.ts +2 -2
- package/dist/providers/public.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { P as Provider, W as WebSocketProvider, C as Chain, U as Unit, S as Signer, H as Hash, a as ChainProviderFn, b as ProviderWithFallbackConfig } from './index-
|
|
2
|
-
export { C as Chain, a as ChainProviderFn, E as Ethereum, F as FallbackProviderConfig, H as Hash, P as Provider, b as ProviderWithFallbackConfig, S as Signer, U as Unit, W as WebSocketProvider, c as alchemyRpcUrls, d as allChains, e as chain, f as chainId, g as defaultChains, h as defaultL2Chains, i as etherscanBlockExplorers, j as infuraRpcUrls, p as publicRpcUrls, u as units } from './index-
|
|
1
|
+
import { P as Provider, W as WebSocketProvider, C as Chain, U as Unit, S as Signer, H as Hash, a as ChainProviderFn, b as ProviderWithFallbackConfig } from './index-58cffc47.js';
|
|
2
|
+
export { C as Chain, a as ChainProviderFn, E as Ethereum, F as FallbackProviderConfig, H as Hash, P as Provider, b as ProviderWithFallbackConfig, S as Signer, U as Unit, W as WebSocketProvider, c as alchemyRpcUrls, d as allChains, e as chain, f as chainId, g as defaultChains, h as defaultL2Chains, i as etherscanBlockExplorers, j as infuraRpcUrls, p as publicRpcUrls, u as units } from './index-58cffc47.js';
|
|
3
3
|
import { Mutate, StoreApi } from 'zustand/vanilla';
|
|
4
|
-
import { C as Connector, a as ConnectorData } from './base-
|
|
5
|
-
export { C as Connector, a as ConnectorData, b as ConnectorEvents } from './base-
|
|
4
|
+
import { C as Connector, a as ConnectorData } from './base-a32d0b91.js';
|
|
5
|
+
export { C as Connector, a as ConnectorData, b as ConnectorEvents } from './base-a32d0b91.js';
|
|
6
6
|
import * as abitype from 'abitype';
|
|
7
|
-
import { Address, ResolvedConfig, TypedDataDomain, Narrow, TypedData, TypedDataToPrimitiveTypes, Abi, ExtractAbiFunction, ExtractAbiEventNames, AbiParametersToPrimitiveTypes, ExtractAbiEvent, AbiFunction, AbiParameterToPrimitiveType, AbiEvent, ExtractAbiFunctionNames } from 'abitype';
|
|
7
|
+
import { Address, ResolvedConfig, TypedDataDomain, Narrow, TypedData, TypedDataToPrimitiveTypes, Abi, ExtractAbiFunction, ExtractAbiEventNames, AbiParametersToPrimitiveTypes, ExtractAbiEvent, AbiFunction, AbiParameter, AbiParameterToPrimitiveType, AbiEvent, ExtractAbiFunctionNames } from 'abitype';
|
|
8
8
|
export { Address } from 'abitype';
|
|
9
9
|
import { PopulatedTransaction, Signer as Signer$1, providers, Contract as Contract$1, ethers, ContractInterface } from 'ethers';
|
|
10
|
-
import { O as Options$2, D as DefaultOptions, G as GetConfig$1, a as GetOverridesForAbiStateMutability, U as UnionToIntersection, C as CountOccurrences, A as AbiItemName, I as IsUnknown, E as Event, b as ContractsConfig, c as ContractsResult, d as GetReturnType, e as Or, f as IsNever, N as NotEqual } from './contracts-
|
|
11
|
-
export { I as InjectedConnector, a as InjectedConnectorOptions } from './injected-
|
|
10
|
+
import { O as Options$2, D as DefaultOptions, G as GetConfig$1, a as GetOverridesForAbiStateMutability, U as UnionToIntersection, C as CountOccurrences, A as AbiItemName, I as IsUnknown, E as Event, b as ContractsConfig, c as ContractsResult, d as GetReturnType, e as Or, f as IsNever, N as NotEqual } from './contracts-3880ee54.js';
|
|
11
|
+
export { I as InjectedConnector, a as InjectedConnectorOptions } from './injected-82510902.js';
|
|
12
12
|
import 'eventemitter3';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -772,8 +772,8 @@ declare const erc4626ABI: readonly [{
|
|
|
772
772
|
readonly type: "function";
|
|
773
773
|
}];
|
|
774
774
|
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
type BaseStorage = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
|
776
|
+
type ClientStorage = {
|
|
777
777
|
getItem<T>(key: string, defaultState?: T | null): T | null;
|
|
778
778
|
setItem<T>(key: string, value: T | null): void;
|
|
779
779
|
removeItem(key: string): void;
|
|
@@ -786,7 +786,7 @@ declare function createStorage({ deserialize, key: prefix, serialize, storage, }
|
|
|
786
786
|
storage: BaseStorage;
|
|
787
787
|
}): ClientStorage;
|
|
788
788
|
|
|
789
|
-
|
|
789
|
+
type ClientConfig<TProvider extends Provider = Provider, TWebSocketProvider extends WebSocketProvider = WebSocketProvider> = {
|
|
790
790
|
/** Enables reconnecting to last used connector on init */
|
|
791
791
|
autoConnect?: boolean;
|
|
792
792
|
/**
|
|
@@ -812,8 +812,8 @@ declare type ClientConfig<TProvider extends Provider = Provider, TWebSocketProvi
|
|
|
812
812
|
chainId?: number;
|
|
813
813
|
}) => TWebSocketProvider | undefined) | TWebSocketProvider;
|
|
814
814
|
};
|
|
815
|
-
|
|
816
|
-
|
|
815
|
+
type Data$1<TProvider extends Provider> = ConnectorData<TProvider>;
|
|
816
|
+
type State<TProvider extends Provider = Provider, TWebSocketProvider extends WebSocketProvider = WebSocketProvider> = {
|
|
817
817
|
chains?: Connector['chains'];
|
|
818
818
|
connector?: Connector;
|
|
819
819
|
connectors: Connector[];
|
|
@@ -872,14 +872,14 @@ declare class Client<TProvider extends Provider = Provider, TWebSocketProvider e
|
|
|
872
872
|
}
|
|
873
873
|
declare function createClient<TProvider extends Provider = Provider, TWebSocketProvider extends WebSocketProvider = WebSocketProvider>(config: ClientConfig<TProvider, TWebSocketProvider>): Client<TProvider, TWebSocketProvider>;
|
|
874
874
|
|
|
875
|
-
|
|
875
|
+
type ConnectArgs = {
|
|
876
876
|
/** Chain ID to connect to */
|
|
877
877
|
chainId?: number;
|
|
878
878
|
/** Connector to connect */
|
|
879
879
|
connector: Connector;
|
|
880
880
|
};
|
|
881
|
-
|
|
882
|
-
|
|
881
|
+
type Data<TProvider extends Provider = Provider> = Required<ConnectorData<TProvider>>;
|
|
882
|
+
type ConnectResult<TProvider extends Provider = Provider> = {
|
|
883
883
|
account: Data<TProvider>['account'];
|
|
884
884
|
chain: Data<TProvider>['chain'];
|
|
885
885
|
connector: Client<TProvider>['connector'];
|
|
@@ -889,7 +889,7 @@ declare function connect<TProvider extends Provider = Provider>({ chainId, conne
|
|
|
889
889
|
|
|
890
890
|
declare function disconnect(): Promise<void>;
|
|
891
891
|
|
|
892
|
-
|
|
892
|
+
type FetchBalanceArgs = {
|
|
893
893
|
/** Address of balance to check */
|
|
894
894
|
address: Address;
|
|
895
895
|
/** Chain id to use for provider */
|
|
@@ -899,7 +899,7 @@ declare type FetchBalanceArgs = {
|
|
|
899
899
|
/** ERC-20 address */
|
|
900
900
|
token?: Address;
|
|
901
901
|
};
|
|
902
|
-
|
|
902
|
+
type FetchBalanceResult = {
|
|
903
903
|
decimals: ResolvedConfig['IntType'];
|
|
904
904
|
formatted: string;
|
|
905
905
|
symbol: string;
|
|
@@ -907,14 +907,14 @@ declare type FetchBalanceResult = {
|
|
|
907
907
|
};
|
|
908
908
|
declare function fetchBalance({ address, chainId, formatUnits: unit, token, }: FetchBalanceArgs): Promise<FetchBalanceResult>;
|
|
909
909
|
|
|
910
|
-
|
|
910
|
+
type FetchSignerArgs = {
|
|
911
911
|
/** Chain ID to use for signer */
|
|
912
912
|
chainId?: number;
|
|
913
913
|
};
|
|
914
|
-
|
|
914
|
+
type FetchSignerResult<TSigner extends Signer = Signer> = TSigner | null;
|
|
915
915
|
declare function fetchSigner<TSigner extends Signer = Signer>({ chainId, }?: FetchSignerArgs): Promise<FetchSignerResult<TSigner>>;
|
|
916
916
|
|
|
917
|
-
|
|
917
|
+
type GetAccountResult<TProvider extends Provider = Provider> = {
|
|
918
918
|
address: NonNullable<Data$1<TProvider>['account']>;
|
|
919
919
|
connector: NonNullable<Client<TProvider>['connector']>;
|
|
920
920
|
isConnected: true;
|
|
@@ -949,7 +949,7 @@ declare type GetAccountResult<TProvider extends Provider = Provider> = {
|
|
|
949
949
|
};
|
|
950
950
|
declare function getAccount<TProvider extends Provider>(): GetAccountResult<TProvider>;
|
|
951
951
|
|
|
952
|
-
|
|
952
|
+
type GetNetworkResult = {
|
|
953
953
|
chain?: Chain & {
|
|
954
954
|
unsupported?: boolean;
|
|
955
955
|
};
|
|
@@ -957,14 +957,14 @@ declare type GetNetworkResult = {
|
|
|
957
957
|
};
|
|
958
958
|
declare function getNetwork(): GetNetworkResult;
|
|
959
959
|
|
|
960
|
-
|
|
960
|
+
type SignMessageArgs = {
|
|
961
961
|
/** Message to sign with wallet */
|
|
962
962
|
message: string | Uint8Array;
|
|
963
963
|
};
|
|
964
|
-
|
|
964
|
+
type SignMessageResult = ResolvedConfig['BytesType'];
|
|
965
965
|
declare function signMessage(args: SignMessageArgs): Promise<SignMessageResult>;
|
|
966
966
|
|
|
967
|
-
|
|
967
|
+
type SignTypedDataArgs<TTypedData = unknown> = {
|
|
968
968
|
/** Domain or domain signature for origin or contract */
|
|
969
969
|
domain: TypedDataDomain;
|
|
970
970
|
/** Named list of all type definitions */
|
|
@@ -984,17 +984,17 @@ declare type SignTypedDataArgs<TTypedData = unknown> = {
|
|
|
984
984
|
/** Data to sign */
|
|
985
985
|
value: TValue;
|
|
986
986
|
} : never : never : never);
|
|
987
|
-
|
|
987
|
+
type SignTypedDataResult = string;
|
|
988
988
|
declare function signTypedData<TTypedData extends TypedData>({ domain, types, value, }: SignTypedDataArgs<TTypedData>): Promise<SignTypedDataResult>;
|
|
989
989
|
|
|
990
|
-
|
|
990
|
+
type SwitchNetworkArgs = {
|
|
991
991
|
chainId: number;
|
|
992
992
|
};
|
|
993
|
-
|
|
993
|
+
type SwitchNetworkResult = Chain;
|
|
994
994
|
declare function switchNetwork({ chainId, }: SwitchNetworkArgs): Promise<SwitchNetworkResult>;
|
|
995
995
|
|
|
996
|
-
|
|
997
|
-
|
|
996
|
+
type WatchAccountCallback<TProvider extends Provider = Provider> = (data: GetAccountResult<TProvider>) => void;
|
|
997
|
+
type WatchAccountConfig = {
|
|
998
998
|
selector?({ address, connector, status, }: {
|
|
999
999
|
address?: string;
|
|
1000
1000
|
connector?: Connector;
|
|
@@ -1003,8 +1003,8 @@ declare type WatchAccountConfig = {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
declare function watchAccount<TProvider extends Provider>(callback: WatchAccountCallback<TProvider>, { selector }?: WatchAccountConfig): () => void;
|
|
1005
1005
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
type WatchNetworkCallback = (data: GetNetworkResult) => void;
|
|
1007
|
+
type WatchNetworkConfig = {
|
|
1008
1008
|
selector?({ chainId, chains }: {
|
|
1009
1009
|
chainId?: number;
|
|
1010
1010
|
chains?: Chain[];
|
|
@@ -1012,11 +1012,11 @@ declare type WatchNetworkConfig = {
|
|
|
1012
1012
|
};
|
|
1013
1013
|
declare function watchNetwork(callback: WatchNetworkCallback, { selector }?: WatchNetworkConfig): () => void;
|
|
1014
1014
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1015
|
+
type WatchSignerArgs = FetchSignerArgs;
|
|
1016
|
+
type WatchSignerCallback<TSigner extends Signer = Signer> = (data: FetchSignerResult<TSigner>) => void;
|
|
1017
1017
|
declare function watchSigner<TSigner extends Signer = Signer>({ chainId }: WatchSignerArgs, callback: WatchSignerCallback<TSigner>): () => void;
|
|
1018
1018
|
|
|
1019
|
-
|
|
1019
|
+
type FetchTokenArgs = {
|
|
1020
1020
|
/** Address of ERC-20 token */
|
|
1021
1021
|
address: Address;
|
|
1022
1022
|
/** Chain id to use for provider */
|
|
@@ -1024,7 +1024,7 @@ declare type FetchTokenArgs = {
|
|
|
1024
1024
|
/** Units for formatting output */
|
|
1025
1025
|
formatUnits?: Unit | number;
|
|
1026
1026
|
};
|
|
1027
|
-
|
|
1027
|
+
type FetchTokenResult = {
|
|
1028
1028
|
address: Address;
|
|
1029
1029
|
decimals: ResolvedConfig['IntType'];
|
|
1030
1030
|
name: string;
|
|
@@ -1036,7 +1036,7 @@ declare type FetchTokenResult = {
|
|
|
1036
1036
|
};
|
|
1037
1037
|
declare function fetchToken({ address, chainId, formatUnits: units, }: FetchTokenArgs): Promise<FetchTokenResult>;
|
|
1038
1038
|
|
|
1039
|
-
|
|
1039
|
+
type PrepareWriteContractConfig<TAbi = Abi, TFunctionName = string, TSigner extends Signer = Signer, TOptions extends Options$2 = DefaultOptions> = GetConfig$1<{
|
|
1040
1040
|
abi: TAbi;
|
|
1041
1041
|
functionName: TFunctionName;
|
|
1042
1042
|
/** Chain id to use for provider */
|
|
@@ -1052,7 +1052,7 @@ declare type PrepareWriteContractConfig<TAbi = Abi, TFunctionName = string, TSig
|
|
|
1052
1052
|
/** Custom signer */
|
|
1053
1053
|
signer?: TSigner | null;
|
|
1054
1054
|
}, 'nonpayable' | 'payable', TOptions>;
|
|
1055
|
-
|
|
1055
|
+
type PrepareWriteContractResult<TAbi = Abi, TFunctionName extends string = string> = {
|
|
1056
1056
|
abi: TAbi extends Abi ? [ExtractAbiFunction<TAbi, TFunctionName>] : TAbi;
|
|
1057
1057
|
address: string;
|
|
1058
1058
|
chainId?: number;
|
|
@@ -1080,7 +1080,7 @@ declare type PrepareWriteContractResult<TAbi = Abi, TFunctionName extends string
|
|
|
1080
1080
|
*/
|
|
1081
1081
|
declare function prepareWriteContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TSigner extends Signer = Signer>({ abi, address, args, chainId, functionName, overrides, signer: signer_, }: PrepareWriteContractConfig<TAbi, TFunctionName, TSigner>): Promise<PrepareWriteContractResult<TAbi, TFunctionName>>;
|
|
1082
1082
|
|
|
1083
|
-
|
|
1083
|
+
type GetContractArgs<TAbi extends Abi | readonly unknown[] = Abi> = {
|
|
1084
1084
|
/** Contract address */
|
|
1085
1085
|
address: string;
|
|
1086
1086
|
/** Contract ABI */
|
|
@@ -1088,15 +1088,15 @@ declare type GetContractArgs<TAbi extends Abi | readonly unknown[] = Abi> = {
|
|
|
1088
1088
|
/** Signer or provider to attach to contract */
|
|
1089
1089
|
signerOrProvider?: Signer$1 | providers.Provider;
|
|
1090
1090
|
};
|
|
1091
|
-
|
|
1091
|
+
type GetContractResult<TAbi = unknown> = TAbi extends Abi ? Contract<TAbi> & Contract$1 : Contract$1;
|
|
1092
1092
|
declare function getContract<TAbi extends Abi | readonly unknown[]>({ address, abi, signerOrProvider, }: GetContractArgs<TAbi>): GetContractResult<TAbi>;
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1093
|
+
type PropertyKeys = 'address' | 'attach' | 'connect' | 'deployed' | 'interface' | 'resolvedAddress';
|
|
1094
|
+
type FunctionKeys = 'callStatic' | 'estimateGas' | 'functions' | 'populateTransaction';
|
|
1095
|
+
type EventKeys = 'emit' | 'filters' | 'listenerCount' | 'listeners' | 'off' | 'on' | 'once' | 'queryFilter' | 'removeAllListeners' | 'removeListener';
|
|
1096
|
+
type BaseContract<TContract extends Record<keyof Pick<Contract$1, PropertyKeys | FunctionKeys | EventKeys>, unknown>> = Omit<Contract$1, PropertyKeys | FunctionKeys | EventKeys> & TContract;
|
|
1097
|
+
type InterfaceKeys = 'events' | 'functions';
|
|
1098
|
+
type BaseInterface<Interface extends Record<keyof Pick<ethers.utils.Interface, InterfaceKeys>, unknown>> = Omit<ethers.utils.Interface, InterfaceKeys> & Interface;
|
|
1099
|
+
type Contract<TAbi extends Abi, _Functions = Functions<TAbi>> = _Functions & BaseContract<{
|
|
1100
1100
|
address: Address;
|
|
1101
1101
|
resolvedAddress: Promise<Address>;
|
|
1102
1102
|
attach(addressOrName: Address | string): Contract<TAbi>;
|
|
@@ -1133,7 +1133,7 @@ declare type Contract<TAbi extends Abi, _Functions = Functions<TAbi>> = _Functio
|
|
|
1133
1133
|
removeAllListeners(eventFilter: ethers.EventFilter): Contract<TAbi>;
|
|
1134
1134
|
removeListener: EventListener<TAbi>;
|
|
1135
1135
|
}>;
|
|
1136
|
-
|
|
1136
|
+
type Functions<TAbi extends Abi, Options extends {
|
|
1137
1137
|
ReturnType?: any;
|
|
1138
1138
|
ReturnTypeAsArray?: boolean;
|
|
1139
1139
|
} = {
|
|
@@ -1150,7 +1150,7 @@ declare type Functions<TAbi extends Abi, Options extends {
|
|
|
1150
1150
|
]) => Promise<IsUnknown<Options['ReturnType']> extends true ? AbiFunctionReturnType<TAbiFunction> extends infer TAbiFunctionReturnType ? Options['ReturnTypeAsArray'] extends true ? [TAbiFunctionReturnType] : TAbiFunctionReturnType : never : Options['ReturnType']>;
|
|
1151
1151
|
} : never;
|
|
1152
1152
|
}[number]>;
|
|
1153
|
-
|
|
1153
|
+
type AbiFunctionReturnType<TAbiFunction extends AbiFunction & {
|
|
1154
1154
|
type: 'function';
|
|
1155
1155
|
}> = ({
|
|
1156
1156
|
payable: ethers.ContractTransaction;
|
|
@@ -1162,14 +1162,14 @@ declare type AbiFunctionReturnType<TAbiFunction extends AbiFunction & {
|
|
|
1162
1162
|
} ? Output['name'] extends '' ? never : Output['name'] : never]: AbiParameterToPrimitiveType<Output>;
|
|
1163
1163
|
} & AbiParametersToPrimitiveTypes<TAbiFunction['outputs']> : never;
|
|
1164
1164
|
})[TAbiFunction['stateMutability']];
|
|
1165
|
-
|
|
1165
|
+
type InterfaceFunctions<TAbi extends Abi> = UnionToIntersection<{
|
|
1166
1166
|
[K in keyof TAbi]: TAbi[K] extends infer TAbiFunction extends AbiFunction & {
|
|
1167
1167
|
type: 'function';
|
|
1168
1168
|
} ? {
|
|
1169
1169
|
[K in AbiItemName<TAbiFunction, true>]: ethers.utils.FunctionFragment;
|
|
1170
1170
|
} : never;
|
|
1171
1171
|
}[number]>;
|
|
1172
|
-
|
|
1172
|
+
type InterfaceEvents<TAbi extends Abi> = UnionToIntersection<{
|
|
1173
1173
|
[K in keyof TAbi]: TAbi[K] extends infer TAbiEvent extends AbiEvent ? {
|
|
1174
1174
|
[K in AbiItemName<TAbiEvent, true>]: ethers.utils.EventFragment;
|
|
1175
1175
|
} : never;
|
|
@@ -1178,8 +1178,8 @@ interface EventListener<TAbi extends Abi> {
|
|
|
1178
1178
|
<TEventName extends ExtractAbiEventNames<TAbi>>(eventName: TEventName, listener: Listener<TAbi, TEventName>): Contract<TAbi>;
|
|
1179
1179
|
(eventFilter: ethers.EventFilter, listener: Listener<TAbi, ExtractAbiEventNames<TAbi>>): Contract<TAbi>;
|
|
1180
1180
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1181
|
+
type Listener<TAbi extends Abi, TEventName extends string, TAbiEvent extends AbiEvent = ExtractAbiEvent<TAbi, TEventName>> = AbiParametersToPrimitiveTypes<TAbiEvent['inputs']> extends infer TArgs extends readonly unknown[] ? (...args: [...args: TArgs, event: Event<TAbiEvent>]) => void : never;
|
|
1182
|
+
type Filters<TAbi extends Abi> = UnionToIntersection<{
|
|
1183
1183
|
[K in keyof TAbi]: TAbi[K] extends infer TAbiEvent extends AbiEvent ? {
|
|
1184
1184
|
[K in CountOccurrences<TAbi, {
|
|
1185
1185
|
name: TAbiEvent['name'];
|
|
@@ -1191,7 +1191,7 @@ declare type Filters<TAbi extends Abi> = UnionToIntersection<{
|
|
|
1191
1191
|
} : never;
|
|
1192
1192
|
}[number]>;
|
|
1193
1193
|
|
|
1194
|
-
|
|
1194
|
+
type MulticallConfig<TContracts extends unknown[]> = {
|
|
1195
1195
|
/** Failures in the multicall will fail silently */
|
|
1196
1196
|
allowFailure?: boolean;
|
|
1197
1197
|
/** Chain id to use for provider */
|
|
@@ -1201,13 +1201,13 @@ declare type MulticallConfig<TContracts extends unknown[]> = {
|
|
|
1201
1201
|
/** Call overrides */
|
|
1202
1202
|
overrides?: GetOverridesForAbiStateMutability<'pure'> | GetOverridesForAbiStateMutability<'view'>;
|
|
1203
1203
|
};
|
|
1204
|
-
|
|
1204
|
+
type MulticallResult<TContracts extends unknown[]> = ContractsResult<TContracts>;
|
|
1205
1205
|
declare function multicall<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TContracts extends {
|
|
1206
1206
|
abi: TAbi;
|
|
1207
1207
|
functionName: TFunctionName;
|
|
1208
1208
|
}[]>({ allowFailure, chainId, contracts, overrides, }: MulticallConfig<TContracts>): Promise<MulticallResult<TContracts>>;
|
|
1209
1209
|
|
|
1210
|
-
|
|
1210
|
+
type ReadContractConfig<TAbi = Abi, TFunctionName = string, TOptions extends Options$2 = DefaultOptions> = GetConfig$1<{
|
|
1211
1211
|
abi: TAbi;
|
|
1212
1212
|
functionName: TFunctionName;
|
|
1213
1213
|
/** Chain id to use for provider */
|
|
@@ -1215,16 +1215,16 @@ declare type ReadContractConfig<TAbi = Abi, TFunctionName = string, TOptions ext
|
|
|
1215
1215
|
/** Call overrides */
|
|
1216
1216
|
overrides?: GetOverridesForAbiStateMutability<'pure' | 'view'>;
|
|
1217
1217
|
}, 'pure' | 'view', TOptions>;
|
|
1218
|
-
|
|
1218
|
+
type ReadContractResult<TAbi = Abi, TFunctionName = string> = GetReturnType<{
|
|
1219
1219
|
abi: TAbi;
|
|
1220
1220
|
functionName: TFunctionName;
|
|
1221
1221
|
}>;
|
|
1222
1222
|
declare function readContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string>({ address, args, chainId, abi, functionName, overrides, }: ReadContractConfig<TAbi, TFunctionName>): Promise<ReadContractResult<TAbi, TFunctionName>>;
|
|
1223
1223
|
|
|
1224
|
-
|
|
1224
|
+
type Options$1 = Options$2 & {
|
|
1225
1225
|
isContractsOptional?: boolean;
|
|
1226
1226
|
};
|
|
1227
|
-
|
|
1227
|
+
type ReadContractsConfig<TContracts extends unknown[], TOptions extends Options$1 = DefaultOptions, _Contracts = readonly [
|
|
1228
1228
|
...ContractsConfig<TContracts, {
|
|
1229
1229
|
/** Chain id to use for provider */
|
|
1230
1230
|
chainId?: number;
|
|
@@ -1241,13 +1241,13 @@ declare type ReadContractsConfig<TContracts extends unknown[], TOptions extends
|
|
|
1241
1241
|
/** Contracts to query */
|
|
1242
1242
|
contracts: _Contracts;
|
|
1243
1243
|
});
|
|
1244
|
-
|
|
1244
|
+
type ReadContractsResult<TContracts extends unknown[]> = ContractsResult<TContracts>;
|
|
1245
1245
|
declare function readContracts<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TContracts extends {
|
|
1246
1246
|
abi: TAbi;
|
|
1247
1247
|
functionName: TFunctionName;
|
|
1248
1248
|
}[]>({ allowFailure, contracts, overrides, }: ReadContractsConfig<TContracts>): Promise<ReadContractsResult<TContracts>>;
|
|
1249
1249
|
|
|
1250
|
-
|
|
1250
|
+
type ContractEventConfig<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string> = {
|
|
1251
1251
|
/** Contract address */
|
|
1252
1252
|
address: string;
|
|
1253
1253
|
/** Contract ABI */
|
|
@@ -1259,50 +1259,50 @@ declare type ContractEventConfig<TAbi extends Abi | readonly unknown[] = Abi, TE
|
|
|
1259
1259
|
/** Receive only a single event */
|
|
1260
1260
|
once?: boolean;
|
|
1261
1261
|
};
|
|
1262
|
-
|
|
1262
|
+
type GetConfig<T> = T extends {
|
|
1263
1263
|
abi: infer TAbi extends Abi;
|
|
1264
1264
|
} ? ContractEventConfig<TAbi, ExtractAbiEventNames<TAbi>> : T extends {
|
|
1265
1265
|
abi: infer TAbi extends readonly unknown[];
|
|
1266
1266
|
eventName: infer TEventName extends string;
|
|
1267
1267
|
} ? ContractEventConfig<TAbi, TEventName> : ContractEventConfig;
|
|
1268
|
-
|
|
1268
|
+
type WatchContractEventConfig<TAbi = Abi, TEventName = string> = GetConfig<{
|
|
1269
1269
|
abi: TAbi;
|
|
1270
1270
|
eventName: TEventName;
|
|
1271
1271
|
}>;
|
|
1272
|
-
|
|
1272
|
+
type WatchContractEventCallback<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string, TAbiEvent extends AbiEvent = TAbi extends Abi ? ExtractAbiEvent<TAbi, TEventName> : never> = AbiParametersToPrimitiveTypes<TAbiEvent['inputs']> extends infer TArgs extends readonly unknown[] ? Or<IsNever<TArgs>, NotEqual<TAbi, Abi>> extends true ? (...args: any) => void : (...args: [...args: TArgs, event: Event<TAbiEvent>]) => void : never;
|
|
1273
1273
|
declare function watchContractEvent<TAbi extends Abi | readonly unknown[], TEventName extends string>({ address, abi, chainId, eventName, once, }: WatchContractEventConfig<TAbi, TEventName>, callback: WatchContractEventCallback<TAbi, TEventName>): () => void;
|
|
1274
1274
|
|
|
1275
|
-
|
|
1275
|
+
type WatchMulticallConfig<TContracts extends unknown[]> = MulticallConfig<TContracts> & {
|
|
1276
1276
|
listenToBlock?: boolean;
|
|
1277
1277
|
};
|
|
1278
|
-
|
|
1278
|
+
type WatchMulticallCallback<TContracts extends unknown[]> = (results: MulticallResult<TContracts>) => void;
|
|
1279
1279
|
declare function watchMulticall<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TContracts extends {
|
|
1280
1280
|
abi: TAbi;
|
|
1281
1281
|
functionName: TFunctionName;
|
|
1282
1282
|
}[]>(config: WatchMulticallConfig<TContracts>, callback: WatchMulticallCallback<TContracts>): () => void;
|
|
1283
1283
|
|
|
1284
|
-
|
|
1284
|
+
type WatchReadContractConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ReadContractConfig<TAbi, TFunctionName> & {
|
|
1285
1285
|
listenToBlock?: boolean;
|
|
1286
1286
|
};
|
|
1287
|
-
|
|
1287
|
+
type WatchReadContractCallback<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = (result: ReadContractResult<TAbi, TFunctionName>) => void;
|
|
1288
1288
|
declare function watchReadContract<TAbi extends Abi | readonly unknown[], TFunctionName extends TAbi extends Abi ? ExtractAbiFunctionNames<TAbi, 'view' | 'pure'> : string>(config: WatchReadContractConfig<TAbi, TFunctionName>, callback: WatchReadContractCallback<TAbi, TFunctionName>): () => void;
|
|
1289
1289
|
|
|
1290
|
-
|
|
1290
|
+
type WatchReadContractsConfig<TContracts extends unknown[]> = ReadContractsConfig<TContracts> & {
|
|
1291
1291
|
listenToBlock?: boolean;
|
|
1292
1292
|
};
|
|
1293
|
-
|
|
1293
|
+
type WatchReadContractsCallback<TContracts extends unknown[]> = (results: ReadContractsResult<TContracts>) => void;
|
|
1294
1294
|
declare function watchReadContracts<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TContracts extends {
|
|
1295
1295
|
abi: TAbi;
|
|
1296
1296
|
functionName: TFunctionName;
|
|
1297
1297
|
}[]>(config: WatchReadContractsConfig<TContracts>, callback: WatchReadContractsCallback<TContracts>): () => void;
|
|
1298
1298
|
|
|
1299
|
-
|
|
1299
|
+
type FetchTransactionArgs = {
|
|
1300
1300
|
/** Chain ID used to validate if the signer is connected to the target chain */
|
|
1301
1301
|
chainId?: number;
|
|
1302
1302
|
/** Transaction hash */
|
|
1303
1303
|
hash: Hash;
|
|
1304
1304
|
};
|
|
1305
|
-
|
|
1305
|
+
type FetchTransactionResult = providers.TransactionResponse;
|
|
1306
1306
|
/**
|
|
1307
1307
|
* @description Fetches transaction for hash
|
|
1308
1308
|
*
|
|
@@ -1316,7 +1316,7 @@ declare type FetchTransactionResult = providers.TransactionResponse;
|
|
|
1316
1316
|
*/
|
|
1317
1317
|
declare function fetchTransaction({ chainId, hash, }: FetchTransactionArgs): Promise<FetchTransactionResult>;
|
|
1318
1318
|
|
|
1319
|
-
|
|
1319
|
+
type PrepareSendTransactionArgs<TSigner extends Signer = Signer> = {
|
|
1320
1320
|
/** Chain ID used to validate if the signer is connected to the target chain */
|
|
1321
1321
|
chainId?: number;
|
|
1322
1322
|
/** Request data to prepare the transaction */
|
|
@@ -1325,7 +1325,7 @@ declare type PrepareSendTransactionArgs<TSigner extends Signer = Signer> = {
|
|
|
1325
1325
|
};
|
|
1326
1326
|
signer?: TSigner | null;
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1328
|
+
type PrepareSendTransactionResult = {
|
|
1329
1329
|
chainId?: number;
|
|
1330
1330
|
request: providers.TransactionRequest & {
|
|
1331
1331
|
to: Address;
|
|
@@ -1351,7 +1351,7 @@ declare type PrepareSendTransactionResult = {
|
|
|
1351
1351
|
*/
|
|
1352
1352
|
declare function prepareSendTransaction({ chainId, request, signer: signer_, }: PrepareSendTransactionArgs): Promise<PrepareSendTransactionResult>;
|
|
1353
1353
|
|
|
1354
|
-
|
|
1354
|
+
type SendTransactionPreparedRequest = {
|
|
1355
1355
|
/**
|
|
1356
1356
|
* `recklesslyUnprepared`: Allow to pass through an unprepared `request`. Note: This has
|
|
1357
1357
|
* [UX pitfalls](/docs/prepare-hooks/intro#ux-pitfalls-without-prepare-hooks), it is highly recommended
|
|
@@ -1367,16 +1367,16 @@ declare type SendTransactionPreparedRequest = {
|
|
|
1367
1367
|
gasLimit: NonNullable<providers.TransactionRequest['gasLimit']>;
|
|
1368
1368
|
};
|
|
1369
1369
|
};
|
|
1370
|
-
|
|
1370
|
+
type SendTransactionUnpreparedRequest = {
|
|
1371
1371
|
mode: 'recklesslyUnprepared';
|
|
1372
1372
|
/** The unprepared request for sending a transaction. */
|
|
1373
1373
|
request: providers.TransactionRequest;
|
|
1374
1374
|
};
|
|
1375
|
-
|
|
1375
|
+
type SendTransactionArgs = {
|
|
1376
1376
|
/** Chain ID used to validate if the signer is connected to the target chain */
|
|
1377
1377
|
chainId?: number;
|
|
1378
1378
|
} & (SendTransactionPreparedRequest | SendTransactionUnpreparedRequest);
|
|
1379
|
-
|
|
1379
|
+
type SendTransactionResult = {
|
|
1380
1380
|
hash: Hash;
|
|
1381
1381
|
wait: providers.TransactionResponse['wait'];
|
|
1382
1382
|
};
|
|
@@ -1384,7 +1384,7 @@ declare type SendTransactionResult = {
|
|
|
1384
1384
|
* @description Function to send a transaction.
|
|
1385
1385
|
*
|
|
1386
1386
|
* It is recommended to pair this with the `prepareSendTransaction` function to avoid
|
|
1387
|
-
* [UX pitfalls](https://wagmi.sh/
|
|
1387
|
+
* [UX pitfalls](https://wagmi.sh/react/prepare-hooks/intro#ux-pitfalls-without-prepare-hooks).
|
|
1388
1388
|
*
|
|
1389
1389
|
* @example
|
|
1390
1390
|
* import { prepareSendTransaction, sendTransaction } from '@wagmi/core'
|
|
@@ -1397,7 +1397,7 @@ declare type SendTransactionResult = {
|
|
|
1397
1397
|
*/
|
|
1398
1398
|
declare function sendTransaction({ chainId, mode, request, }: SendTransactionArgs): Promise<SendTransactionResult>;
|
|
1399
1399
|
|
|
1400
|
-
|
|
1400
|
+
type WaitForTransactionArgs = {
|
|
1401
1401
|
/** Chain id to use for provider */
|
|
1402
1402
|
chainId?: number;
|
|
1403
1403
|
/**
|
|
@@ -1411,20 +1411,20 @@ declare type WaitForTransactionArgs = {
|
|
|
1411
1411
|
/** Function resolving to transaction receipt */
|
|
1412
1412
|
wait?: providers.TransactionResponse['wait'];
|
|
1413
1413
|
};
|
|
1414
|
-
|
|
1414
|
+
type WaitForTransactionResult = providers.TransactionReceipt;
|
|
1415
1415
|
declare function waitForTransaction({ chainId, confirmations, hash, timeout, wait: wait_, }: WaitForTransactionArgs): Promise<WaitForTransactionResult>;
|
|
1416
1416
|
|
|
1417
|
-
|
|
1417
|
+
type Options = Options$2 & {
|
|
1418
1418
|
isRequestOptional?: boolean;
|
|
1419
1419
|
};
|
|
1420
|
-
|
|
1420
|
+
type Request = PopulatedTransaction & {
|
|
1421
1421
|
to: Address;
|
|
1422
1422
|
gasLimit: NonNullable<PopulatedTransaction['gasLimit']>;
|
|
1423
1423
|
};
|
|
1424
|
-
|
|
1424
|
+
type WriteContractPreparedArgs<TOptions extends Options = DefaultOptions> = {
|
|
1425
1425
|
/**
|
|
1426
1426
|
* `recklesslyUnprepared`: Allow to pass through unprepared config. Note: This has
|
|
1427
|
-
* [UX pitfalls](https://wagmi.sh/
|
|
1427
|
+
* [UX pitfalls](https://wagmi.sh/react/prepare-hooks/intro#ux-pitfalls-without-prepare-hooks),
|
|
1428
1428
|
* it is highly recommended to not use this and instead prepare the request upfront
|
|
1429
1429
|
* using the {@link prepareWriteContract} function.
|
|
1430
1430
|
*
|
|
@@ -1441,7 +1441,7 @@ declare type WriteContractPreparedArgs<TOptions extends Options = DefaultOptions
|
|
|
1441
1441
|
/** The prepared request. */
|
|
1442
1442
|
request: Request;
|
|
1443
1443
|
});
|
|
1444
|
-
|
|
1444
|
+
type WriteContractUnpreparedArgs<TAbi = Abi, TFunctionName = string, TOptions extends Options = DefaultOptions> = {
|
|
1445
1445
|
mode: 'recklesslyUnprepared';
|
|
1446
1446
|
request?: never;
|
|
1447
1447
|
} & GetConfig$1<{
|
|
@@ -1456,18 +1456,18 @@ declare type WriteContractUnpreparedArgs<TAbi = Abi, TFunctionName = string, TOp
|
|
|
1456
1456
|
infer TFunctionName_ extends string
|
|
1457
1457
|
] ? ExtractAbiFunction<TAbi_, TFunctionName_>['stateMutability'] : 'nonpayable' | 'payable'>;
|
|
1458
1458
|
}, 'nonpayable' | 'payable', TOptions>;
|
|
1459
|
-
|
|
1459
|
+
type WriteContractArgs<TAbi = Abi, TFunctionName = string, TOptions extends Options = DefaultOptions> = Omit<GetConfig$1<{
|
|
1460
1460
|
abi: TAbi;
|
|
1461
1461
|
functionName: TFunctionName;
|
|
1462
1462
|
/** Chain id to use for provider */
|
|
1463
1463
|
chainId?: number;
|
|
1464
1464
|
}, 'nonpayable' | 'payable', TOptions>, 'args'> & (WriteContractUnpreparedArgs<TAbi, TFunctionName, TOptions> | WriteContractPreparedArgs<TOptions>);
|
|
1465
|
-
|
|
1465
|
+
type WriteContractResult = SendTransactionResult;
|
|
1466
1466
|
/**
|
|
1467
1467
|
* @description Function to call a contract write method.
|
|
1468
1468
|
*
|
|
1469
1469
|
* It is recommended to pair this with the {@link prepareWriteContract} function
|
|
1470
|
-
* to avoid [UX pitfalls](https://wagmi.sh/
|
|
1470
|
+
* to avoid [UX pitfalls](https://wagmi.sh/react/prepare-hooks/intro#ux-pitfalls-without-prepare-hooks).
|
|
1471
1471
|
*
|
|
1472
1472
|
* @example
|
|
1473
1473
|
* import { prepareWriteContract, writeContract } from '@wagmi/core'
|
|
@@ -1481,55 +1481,55 @@ declare type WriteContractResult = SendTransactionResult;
|
|
|
1481
1481
|
*/
|
|
1482
1482
|
declare function writeContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TSigner extends Signer = Signer>({ address, args, chainId, abi, functionName, mode, overrides, request: request_, }: WriteContractArgs<TAbi, TFunctionName>): Promise<WriteContractResult>;
|
|
1483
1483
|
|
|
1484
|
-
|
|
1484
|
+
type FetchEnsAddressArgs = {
|
|
1485
1485
|
/** Chain id to use for provider */
|
|
1486
1486
|
chainId?: number;
|
|
1487
1487
|
/** ENS name to resolve */
|
|
1488
1488
|
name: string;
|
|
1489
1489
|
};
|
|
1490
|
-
|
|
1490
|
+
type FetchEnsAddressResult = Address | null;
|
|
1491
1491
|
declare function fetchEnsAddress({ chainId, name, }: FetchEnsAddressArgs): Promise<FetchEnsAddressResult>;
|
|
1492
1492
|
|
|
1493
|
-
|
|
1493
|
+
type FetchEnsAvatarArgs = {
|
|
1494
1494
|
/** Address or ENS name */
|
|
1495
1495
|
address: Address;
|
|
1496
1496
|
/** Chain id to use for provider */
|
|
1497
1497
|
chainId?: number;
|
|
1498
1498
|
};
|
|
1499
|
-
|
|
1499
|
+
type FetchEnsAvatarResult = string | null;
|
|
1500
1500
|
declare function fetchEnsAvatar({ address, chainId, }: FetchEnsAvatarArgs): Promise<FetchEnsAvatarResult>;
|
|
1501
1501
|
|
|
1502
|
-
|
|
1502
|
+
type FetchEnsNameArgs = {
|
|
1503
1503
|
/** Address to lookup */
|
|
1504
1504
|
address: Address;
|
|
1505
1505
|
/** Chain id to use for provider */
|
|
1506
1506
|
chainId?: number;
|
|
1507
1507
|
};
|
|
1508
|
-
|
|
1508
|
+
type FetchEnsNameResult = string | null;
|
|
1509
1509
|
declare function fetchEnsName({ address, chainId, }: FetchEnsNameArgs): Promise<FetchEnsNameResult>;
|
|
1510
1510
|
|
|
1511
|
-
|
|
1511
|
+
type FetchEnsResolverArgs = {
|
|
1512
1512
|
/** Chain id to use for provider */
|
|
1513
1513
|
chainId?: number;
|
|
1514
1514
|
/** ENS name to resolve */
|
|
1515
1515
|
name: string;
|
|
1516
1516
|
};
|
|
1517
|
-
|
|
1517
|
+
type FetchEnsResolverResult = providers.Resolver | null;
|
|
1518
1518
|
declare function fetchEnsResolver({ chainId, name, }: FetchEnsResolverArgs): Promise<FetchEnsResolverResult>;
|
|
1519
1519
|
|
|
1520
|
-
|
|
1520
|
+
type FetchBlockNumberArgs = {
|
|
1521
1521
|
chainId?: number;
|
|
1522
1522
|
};
|
|
1523
|
-
|
|
1523
|
+
type FetchBlockNumberResult = number;
|
|
1524
1524
|
declare function fetchBlockNumber({ chainId, }?: FetchBlockNumberArgs): Promise<FetchBlockNumberResult>;
|
|
1525
1525
|
|
|
1526
|
-
|
|
1526
|
+
type FetchFeeDataArgs = {
|
|
1527
1527
|
/** Units for formatting output */
|
|
1528
1528
|
formatUnits?: Unit | number;
|
|
1529
1529
|
/** Chain id to use for provider */
|
|
1530
1530
|
chainId?: number;
|
|
1531
1531
|
};
|
|
1532
|
-
|
|
1532
|
+
type FetchFeeDataResult = providers.FeeData & {
|
|
1533
1533
|
formatted: {
|
|
1534
1534
|
gasPrice: string | null;
|
|
1535
1535
|
maxFeePerGas: string | null;
|
|
@@ -1538,31 +1538,31 @@ declare type FetchFeeDataResult = providers.FeeData & {
|
|
|
1538
1538
|
};
|
|
1539
1539
|
declare function fetchFeeData({ chainId, formatUnits: units, }?: FetchFeeDataArgs): Promise<FetchFeeDataResult>;
|
|
1540
1540
|
|
|
1541
|
-
|
|
1541
|
+
type WatchBlockNumberArgs = {
|
|
1542
1542
|
chainId?: number;
|
|
1543
1543
|
listen: boolean;
|
|
1544
1544
|
};
|
|
1545
|
-
|
|
1545
|
+
type WatchBlockNumberCallback = (blockNumber: FetchBlockNumberResult) => void;
|
|
1546
1546
|
declare function watchBlockNumber(args: WatchBlockNumberArgs, callback: WatchBlockNumberCallback): () => void;
|
|
1547
1547
|
|
|
1548
|
-
|
|
1548
|
+
type GetProviderArgs = {
|
|
1549
1549
|
/** Chain id to use for provider */
|
|
1550
1550
|
chainId?: number;
|
|
1551
1551
|
};
|
|
1552
|
-
|
|
1552
|
+
type GetProviderResult<TProvider extends Provider = Provider> = TProvider;
|
|
1553
1553
|
declare function getProvider<TProvider extends Provider = Provider>({ chainId, }?: GetProviderArgs): GetProviderResult<TProvider>;
|
|
1554
1554
|
|
|
1555
|
-
|
|
1555
|
+
type GetWebSocketProviderArgs = {
|
|
1556
1556
|
/** Chain id to use for provider */
|
|
1557
1557
|
chainId?: number;
|
|
1558
1558
|
};
|
|
1559
|
-
|
|
1559
|
+
type GetWebSocketProviderResult<TWebSocketProvider extends WebSocketProvider = WebSocketProvider> = TWebSocketProvider | undefined;
|
|
1560
1560
|
declare function getWebSocketProvider<TWebSocketProvider extends WebSocketProvider = WebSocketProvider>({ chainId, }?: GetWebSocketProviderArgs): GetWebSocketProviderResult<TWebSocketProvider>;
|
|
1561
1561
|
|
|
1562
|
-
|
|
1562
|
+
type WatchProviderCallback<TProvider extends Provider = Provider> = (provider: GetProviderResult<TProvider>) => void;
|
|
1563
1563
|
declare function watchProvider<TProvider extends Provider = Provider>(args: GetProviderArgs, callback: WatchProviderCallback<TProvider>): () => void;
|
|
1564
1564
|
|
|
1565
|
-
|
|
1565
|
+
type WatchWebSocketProviderCallback<TWebSocketProvider extends WebSocketProvider = WebSocketProvider> = (webSocketProvider: GetWebSocketProviderResult<TWebSocketProvider>) => void;
|
|
1566
1566
|
declare function watchWebSocketProvider<TWebSocketProvider extends WebSocketProvider = WebSocketProvider>(args: GetWebSocketProviderArgs, callback: WatchWebSocketProviderCallback<TWebSocketProvider>): () => void;
|
|
1567
1567
|
|
|
1568
1568
|
/**
|
|
@@ -1698,7 +1698,7 @@ declare class UserRejectedRequestError extends ProviderRpcError {
|
|
|
1698
1698
|
constructor(error: unknown);
|
|
1699
1699
|
}
|
|
1700
1700
|
|
|
1701
|
-
|
|
1701
|
+
type ConfigureChainsConfig = {
|
|
1702
1702
|
pollingInterval?: number;
|
|
1703
1703
|
stallTimeout?: number;
|
|
1704
1704
|
} & ({
|
|
@@ -1741,8 +1741,8 @@ declare function parseContractResult({ abi, data, functionName, }: {
|
|
|
1741
1741
|
functionName: string;
|
|
1742
1742
|
}): any;
|
|
1743
1743
|
|
|
1744
|
-
|
|
1745
|
-
|
|
1744
|
+
type StandardReplacer = (key: string, value: any) => any;
|
|
1745
|
+
type CircularReplacer = (key: string, value: any, referenceKey: string) => any;
|
|
1746
1746
|
/**
|
|
1747
1747
|
* @function stringify
|
|
1748
1748
|
*
|