@reown/appkit-adapter-wagmi 1.3.2 → 1.4.0
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/esm/src/client.js +291 -691
- package/dist/esm/src/client.js.map +1 -1
- package/dist/esm/src/connectors/AuthConnector.js +1 -1
- package/dist/esm/src/connectors/AuthConnector.js.map +1 -1
- package/dist/esm/src/connectors/AuthConnectorExport.js +12 -1
- package/dist/esm/src/connectors/AuthConnectorExport.js.map +1 -1
- package/dist/esm/src/connectors/UniversalConnector.js +1 -4
- package/dist/esm/src/connectors/UniversalConnector.js.map +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/client.d.ts +32 -44
- package/dist/types/src/connectors/AuthConnector.d.ts +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/package.json +10 -10
|
@@ -1,49 +1,37 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
import type
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
defaultNetwork?: Chain;
|
|
11
|
-
}
|
|
12
|
-
interface AppKitState extends PublicStateControllerState {
|
|
13
|
-
selectedNetworkId: number | undefined;
|
|
14
|
-
}
|
|
15
|
-
export declare class WagmiAdapter implements ChainAdapter {
|
|
16
|
-
private appKit;
|
|
17
|
-
options: AppKitOptions | undefined;
|
|
18
|
-
chainNamespace: ChainNamespace;
|
|
19
|
-
caipNetworks: [CaipNetwork, ...CaipNetwork[]];
|
|
20
|
-
wagmiChains: [BaseNetwork, ...BaseNetwork[]];
|
|
21
|
-
wagmiConfig: AdapterOptions<Config>['wagmiConfig'];
|
|
22
|
-
networkControllerClient?: NetworkControllerClient;
|
|
23
|
-
connectionControllerClient?: ConnectionControllerClient;
|
|
24
|
-
defaultCaipNetwork: CaipNetwork | undefined;
|
|
25
|
-
tokens: import("@reown/appkit-core").Tokens | undefined;
|
|
26
|
-
siweControllerClient: import("@reown/appkit-siwe").AppKitSIWEClient | undefined;
|
|
27
|
-
adapterType: AdapterType;
|
|
1
|
+
import type { AppKitNetwork } from '@reown/appkit-common';
|
|
2
|
+
import { AdapterBlueprint } from '@reown/appkit/adapters';
|
|
3
|
+
import { type Config, type CreateConfigParameters } from '@wagmi/core';
|
|
4
|
+
import { type Chain } from '@wagmi/core/chains';
|
|
5
|
+
import { AppKit, type AppKitOptions } from '@reown/appkit';
|
|
6
|
+
export declare class WagmiAdapter extends AdapterBlueprint {
|
|
7
|
+
wagmiChains: readonly [Chain, ...Chain[]] | undefined;
|
|
8
|
+
wagmiConfig: Config;
|
|
9
|
+
adapterType: string;
|
|
28
10
|
constructor(configParams: Partial<CreateConfigParameters> & {
|
|
29
11
|
networks: AppKitNetwork[];
|
|
30
12
|
projectId: string;
|
|
31
13
|
});
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
private createConfig;
|
|
15
|
+
private setupWatchers;
|
|
16
|
+
private addWagmiConnectors;
|
|
17
|
+
signMessage(params: AdapterBlueprint.SignMessageParams): Promise<AdapterBlueprint.SignMessageResult>;
|
|
18
|
+
sendTransaction(params: AdapterBlueprint.SendTransactionParams): Promise<AdapterBlueprint.SendTransactionResult>;
|
|
19
|
+
writeContract(params: AdapterBlueprint.WriteContractParams): Promise<AdapterBlueprint.WriteContractResult>;
|
|
20
|
+
getEnsAddress(params: AdapterBlueprint.GetEnsAddressParams): Promise<AdapterBlueprint.GetEnsAddressResult>;
|
|
21
|
+
estimateGas(params: AdapterBlueprint.EstimateGasTransactionArgs): Promise<AdapterBlueprint.EstimateGasTransactionResult>;
|
|
22
|
+
parseUnits(params: AdapterBlueprint.ParseUnitsParams): AdapterBlueprint.ParseUnitsResult;
|
|
23
|
+
formatUnits(params: AdapterBlueprint.FormatUnitsParams): AdapterBlueprint.FormatUnitsResult;
|
|
24
|
+
syncConnectors(options: AppKitOptions, appKit: AppKit): void;
|
|
25
|
+
syncConnection(params: AdapterBlueprint.SyncConnectionParams): Promise<AdapterBlueprint.ConnectResult>;
|
|
26
|
+
connectWalletConnect(onUri: (uri: string) => void, chainId?: number | string): Promise<void>;
|
|
27
|
+
connect(params: AdapterBlueprint.ConnectParams): Promise<AdapterBlueprint.ConnectResult>;
|
|
28
|
+
reconnect(params: AdapterBlueprint.ConnectParams): Promise<void>;
|
|
29
|
+
getBalance(params: AdapterBlueprint.GetBalanceParams): Promise<AdapterBlueprint.GetBalanceResult>;
|
|
30
|
+
getProfile(params: AdapterBlueprint.GetProfileParams): Promise<AdapterBlueprint.GetProfileResult>;
|
|
31
|
+
getWalletConnectProvider(): AdapterBlueprint.GetWalletConnectProviderResult;
|
|
32
|
+
disconnect(): Promise<void>;
|
|
33
|
+
switchNetwork(params: AdapterBlueprint.SwitchNetworkParams): Promise<void>;
|
|
34
|
+
getCapabilities(params: string): Promise<any>;
|
|
35
|
+
grantPermissions(params: AdapterBlueprint.GrantPermissionsParams): Promise<unknown>;
|
|
36
|
+
revokePermissions(params: AdapterBlueprint.RevokePermissionsParams): Promise<`0x${string}`>;
|
|
48
37
|
}
|
|
49
|
-
export {};
|
|
@@ -6,6 +6,7 @@ interface W3mFrameProviderOptions {
|
|
|
6
6
|
export type AuthParameters = {
|
|
7
7
|
chains?: CreateConfigParameters['chains'];
|
|
8
8
|
options: W3mFrameProviderOptions;
|
|
9
|
+
provider: W3mFrameProvider;
|
|
9
10
|
};
|
|
10
11
|
export declare function authConnector(parameters: AuthParameters): import("@wagmi/core").CreateConnectorFn<W3mFrameProvider, {
|
|
11
12
|
provider?: W3mFrameProvider | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-adapter-wagmi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/esm/src/index.js",
|
|
6
6
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"@walletconnect/utils": "2.17.0",
|
|
13
13
|
"@walletconnect/universal-provider": "2.17.0",
|
|
14
14
|
"valtio": "1.11.2",
|
|
15
|
-
"@reown/appkit": "1.
|
|
16
|
-
"@reown/appkit-common": "1.
|
|
17
|
-
"@reown/appkit-core": "1.
|
|
18
|
-
"@reown/appkit-polyfills": "1.
|
|
19
|
-
"@reown/appkit-scaffold-ui": "1.
|
|
20
|
-
"@reown/appkit-utils": "1.
|
|
21
|
-
"@reown/appkit-siwe": "1.
|
|
22
|
-
"@reown/appkit-ui": "1.
|
|
23
|
-
"@reown/appkit-wallet": "1.
|
|
15
|
+
"@reown/appkit": "1.4.0",
|
|
16
|
+
"@reown/appkit-common": "1.4.0",
|
|
17
|
+
"@reown/appkit-core": "1.4.0",
|
|
18
|
+
"@reown/appkit-polyfills": "1.4.0",
|
|
19
|
+
"@reown/appkit-scaffold-ui": "1.4.0",
|
|
20
|
+
"@reown/appkit-utils": "1.4.0",
|
|
21
|
+
"@reown/appkit-siwe": "1.4.0",
|
|
22
|
+
"@reown/appkit-ui": "1.4.0",
|
|
23
|
+
"@reown/appkit-wallet": "1.4.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@coinbase/wallet-sdk": "4.0.3",
|