@reown/appkit-adapter-ethers 1.8.15-viem-upgrade.0 → 1.8.15-wc-linking-reset-headless.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 +612 -0
- package/dist/esm/src/client.js.map +1 -0
- package/dist/esm/src/index.js +4 -0
- package/dist/esm/src/index.js.map +1 -0
- package/dist/esm/src/utils/EthersMethods.js +88 -0
- package/dist/esm/src/utils/EthersMethods.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/src/client.d.ts +44 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/utils/EthersMethods.d.ts +11 -0
- package/package.json +8 -8
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import UniversalProvider from '@walletconnect/universal-provider';
|
|
2
|
+
import { type Connector, type Provider } from '@reown/appkit-controllers';
|
|
3
|
+
import { AdapterBlueprint } from '@reown/appkit-controllers';
|
|
4
|
+
import { type Address } from '@reown/appkit-utils/ethers';
|
|
5
|
+
export interface EIP6963ProviderDetail {
|
|
6
|
+
info: Connector['info'];
|
|
7
|
+
provider: Provider;
|
|
8
|
+
}
|
|
9
|
+
export declare class EthersAdapter extends AdapterBlueprint {
|
|
10
|
+
private ethersConfig?;
|
|
11
|
+
private balancePromises;
|
|
12
|
+
private universalProvider?;
|
|
13
|
+
private ethersProviders;
|
|
14
|
+
constructor();
|
|
15
|
+
private createEthersConfig;
|
|
16
|
+
signMessage(params: AdapterBlueprint.SignMessageParams): Promise<AdapterBlueprint.SignMessageResult>;
|
|
17
|
+
sendTransaction(params: AdapterBlueprint.SendTransactionParams): Promise<AdapterBlueprint.SendTransactionResult>;
|
|
18
|
+
writeContract(params: AdapterBlueprint.WriteContractParams): Promise<AdapterBlueprint.WriteContractResult>;
|
|
19
|
+
estimateGas(params: AdapterBlueprint.EstimateGasTransactionArgs): Promise<AdapterBlueprint.EstimateGasTransactionResult>;
|
|
20
|
+
parseUnits(params: AdapterBlueprint.ParseUnitsParams): AdapterBlueprint.ParseUnitsResult;
|
|
21
|
+
formatUnits(params: AdapterBlueprint.FormatUnitsParams): AdapterBlueprint.FormatUnitsResult;
|
|
22
|
+
syncConnection(params: Pick<AdapterBlueprint.SyncConnectionParams, 'id' | 'chainId'>): Promise<AdapterBlueprint.ConnectResult>;
|
|
23
|
+
syncConnectors(): Promise<void>;
|
|
24
|
+
private disconnectAll;
|
|
25
|
+
syncConnections({ connectToFirstConnector }: AdapterBlueprint.SyncConnectionsParams): Promise<void>;
|
|
26
|
+
setUniversalProvider(universalProvider: UniversalProvider): Promise<void>;
|
|
27
|
+
private eip6963EventHandler;
|
|
28
|
+
private listenInjectedConnector;
|
|
29
|
+
connect({ id, address, type, chainId, socialUri }: AdapterBlueprint.ConnectParams): Promise<AdapterBlueprint.ConnectResult>;
|
|
30
|
+
reconnect(params: AdapterBlueprint.ConnectParams): Promise<void>;
|
|
31
|
+
getAccounts(params: AdapterBlueprint.GetAccountsParams): Promise<AdapterBlueprint.GetAccountsResult>;
|
|
32
|
+
disconnect(params: AdapterBlueprint.DisconnectParams): Promise<{
|
|
33
|
+
connections: import("@reown/appkit-common").Connection[];
|
|
34
|
+
}>;
|
|
35
|
+
getBalance(params: AdapterBlueprint.GetBalanceParams): Promise<AdapterBlueprint.GetBalanceResult>;
|
|
36
|
+
switchNetwork(params: AdapterBlueprint.SwitchNetworkParams): Promise<void>;
|
|
37
|
+
getWalletConnectProvider(): AdapterBlueprint.GetWalletConnectProviderResult;
|
|
38
|
+
private revokeProviderPermissions;
|
|
39
|
+
getCapabilities(params: AdapterBlueprint.GetCapabilitiesParams): Promise<unknown>;
|
|
40
|
+
grantPermissions(params: AdapterBlueprint.GrantPermissionsParams): Promise<unknown>;
|
|
41
|
+
revokePermissions(params: AdapterBlueprint.RevokePermissionsParams): Promise<Address>;
|
|
42
|
+
walletGetAssets(params: AdapterBlueprint.WalletGetAssetsParams): Promise<AdapterBlueprint.WalletGetAssetsResponse>;
|
|
43
|
+
private toChecksummedAddress;
|
|
44
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { formatUnits, parseUnits } from 'ethers';
|
|
2
|
+
import type { EstimateGasTransactionArgs, Provider, SendTransactionArgs, WriteContractArgs } from '@reown/appkit-controllers';
|
|
3
|
+
export declare const EthersMethods: {
|
|
4
|
+
signMessage: (message: string, provider: Provider, address: string) => Promise<`0x${string}`>;
|
|
5
|
+
estimateGas: (data: EstimateGasTransactionArgs, provider: Provider, address: string, networkId: number) => Promise<bigint>;
|
|
6
|
+
sendTransaction: (data: SendTransactionArgs, provider: Provider, address: string, networkId: number) => Promise<`0x${string}`>;
|
|
7
|
+
writeContract: (data: WriteContractArgs, provider: Provider, address: string, chainId: number) => Promise<any>;
|
|
8
|
+
parseWalletCapabilities: (str: string) => any;
|
|
9
|
+
parseUnits: typeof parseUnits;
|
|
10
|
+
formatUnits: typeof formatUnits;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-adapter-ethers",
|
|
3
|
-
"version": "1.8.15-
|
|
3
|
+
"version": "1.8.15-wc-linking-reset-headless.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/src/index.js",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@walletconnect/universal-provider": "2.23.1",
|
|
15
15
|
"valtio": "2.1.7",
|
|
16
|
-
"@reown/appkit": "1.8.15-
|
|
17
|
-
"@reown/appkit-common": "1.8.15-
|
|
18
|
-
"@reown/appkit-controllers": "1.8.15-
|
|
19
|
-
"@reown/appkit-polyfills": "1.8.15-
|
|
20
|
-
"@reown/appkit-scaffold-ui": "1.8.15-
|
|
21
|
-
"@reown/appkit-utils": "1.8.15-
|
|
22
|
-
"@reown/appkit-wallet": "1.8.15-
|
|
16
|
+
"@reown/appkit": "1.8.15-wc-linking-reset-headless.0",
|
|
17
|
+
"@reown/appkit-common": "1.8.15-wc-linking-reset-headless.0",
|
|
18
|
+
"@reown/appkit-controllers": "1.8.15-wc-linking-reset-headless.0",
|
|
19
|
+
"@reown/appkit-polyfills": "1.8.15-wc-linking-reset-headless.0",
|
|
20
|
+
"@reown/appkit-scaffold-ui": "1.8.15-wc-linking-reset-headless.0",
|
|
21
|
+
"@reown/appkit-utils": "1.8.15-wc-linking-reset-headless.0",
|
|
22
|
+
"@reown/appkit-wallet": "1.8.15-wc-linking-reset-headless.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@ethersproject/sha2": "5.8.0",
|