@dynamic-labs/ethereum 0.19.0-alpha.2 → 0.19.0-alpha.20

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +279 -0
  2. package/package.json +11 -10
  3. package/src/EthWalletConnector.cjs +189 -193
  4. package/src/EthWalletConnector.d.ts +298 -41
  5. package/src/EthWalletConnector.js +190 -194
  6. package/src/constants.d.ts +1 -1
  7. package/src/ethProviderHelper.cjs +132 -209
  8. package/src/ethProviderHelper.d.ts +28 -36
  9. package/src/ethProviderHelper.js +133 -210
  10. package/src/index.cjs +26 -26
  11. package/src/index.d.ts +9 -8
  12. package/src/index.js +21 -20
  13. package/src/injected/BloctoInjected.cjs +6 -6
  14. package/src/injected/BloctoInjected.d.ts +4 -4
  15. package/src/injected/BloctoInjected.js +6 -6
  16. package/src/injected/BraveEvm.cjs +6 -6
  17. package/src/injected/BraveEvm.d.ts +4 -4
  18. package/src/injected/BraveEvm.js +6 -6
  19. package/src/injected/Dawn.cjs +6 -6
  20. package/src/injected/Dawn.d.ts +4 -4
  21. package/src/injected/Dawn.js +6 -6
  22. package/src/injected/ExodusEvm.cjs +8 -8
  23. package/src/injected/ExodusEvm.d.ts +5 -5
  24. package/src/injected/ExodusEvm.js +7 -7
  25. package/src/injected/Frame.cjs +6 -6
  26. package/src/injected/Frame.d.ts +4 -4
  27. package/src/injected/Frame.js +6 -6
  28. package/src/injected/GameStop.cjs +6 -6
  29. package/src/injected/GameStop.d.ts +4 -4
  30. package/src/injected/GameStop.js +6 -6
  31. package/src/injected/InjectedWalletBase.cjs +79 -65
  32. package/src/injected/InjectedWalletBase.d.ts +286 -24
  33. package/src/injected/InjectedWalletBase.js +79 -65
  34. package/src/injected/LegacyInjectedWalletBase.cjs +83 -0
  35. package/src/injected/LegacyInjectedWalletBase.d.ts +24 -0
  36. package/src/injected/LegacyInjectedWalletBase.js +81 -0
  37. package/src/injected/Opera.cjs +6 -6
  38. package/src/injected/Opera.d.ts +4 -4
  39. package/src/injected/Opera.js +6 -6
  40. package/src/injected/PhantomEvm.cjs +28 -28
  41. package/src/injected/PhantomEvm.d.ts +5 -5
  42. package/src/injected/PhantomEvm.js +28 -28
  43. package/src/injected/Rabby.cjs +8 -8
  44. package/src/injected/Rabby.d.ts +5 -5
  45. package/src/injected/Rabby.js +7 -7
  46. package/src/injected/Superb.cjs +6 -6
  47. package/src/injected/Superb.d.ts +4 -4
  48. package/src/injected/Superb.js +6 -6
  49. package/src/injected/Trust.cjs +8 -8
  50. package/src/injected/Trust.d.ts +5 -5
  51. package/src/injected/Trust.js +7 -7
  52. package/src/injected/Zerion.cjs +8 -8
  53. package/src/injected/Zerion.d.ts +5 -5
  54. package/src/injected/Zerion.js +7 -7
  55. package/src/injected/fetchInjectedWalletConnectors.cjs +33 -0
  56. package/src/injected/fetchInjectedWalletConnectors.d.ts +6 -0
  57. package/src/injected/fetchInjectedWalletConnectors.js +29 -0
  58. package/src/injected/index.d.ts +13 -16
  59. package/src/injected/legacyInjectedWallets.cjs +48 -0
  60. package/src/injected/legacyInjectedWallets.d.ts +3 -0
  61. package/src/injected/legacyInjectedWallets.js +43 -0
  62. package/src/legacyEthProviderHelper.cjs +187 -0
  63. package/src/legacyEthProviderHelper.d.ts +34 -0
  64. package/src/legacyEthProviderHelper.js +183 -0
  65. package/src/polyfills.cjs +11 -11
  66. package/src/polyfills.d.ts +1 -1
  67. package/src/polyfills.js +11 -11
  68. package/src/types.d.ts +37 -24
  69. package/src/utils/eventListenerHandlers.cjs +34 -0
  70. package/src/utils/eventListenerHandlers.d.ts +8 -0
  71. package/src/utils/eventListenerHandlers.js +30 -0
  72. package/src/utils/findEvmNetwork.cjs +13 -13
  73. package/src/utils/findEvmNetwork.d.ts +6 -6
  74. package/src/utils/findEvmNetwork.js +13 -13
  75. package/src/utils/isString.d.ts +1 -1
  76. package/src/utils/isUnsupportedProviderError/index.d.ts +1 -1
  77. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.cjs +6 -6
  78. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.d.ts +6 -6
  79. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.js +6 -6
  80. package/src/utils/last.d.ts +1 -1
  81. package/src/utils/parseIntSafe.cjs +13 -13
  82. package/src/utils/parseIntSafe.d.ts +1 -1
  83. package/src/utils/parseIntSafe.js +13 -13
  84. package/src/walletConnect/client/client.cjs +179 -176
  85. package/src/walletConnect/client/client.d.ts +17 -17
  86. package/src/walletConnect/client/client.js +179 -176
  87. package/src/walletConnect/client/index.d.ts +1 -1
  88. package/src/walletConnect/client/types.d.ts +4 -4
  89. package/src/walletConnect/fetchWalletConnectWallets.cjs +37 -52
  90. package/src/walletConnect/fetchWalletConnectWallets.d.ts +9 -10
  91. package/src/walletConnect/fetchWalletConnectWallets.js +38 -52
  92. package/src/walletConnect/index.d.ts +3 -3
  93. package/src/walletConnect/walletConnect.cjs +131 -130
  94. package/src/walletConnect/walletConnect.d.ts +52 -50
  95. package/src/walletConnect/walletConnect.js +131 -130
  96. package/src/walletConnect/walletConnectV2.cjs +419 -374
  97. package/src/walletConnect/walletConnectV2.d.ts +326 -61
  98. package/src/walletConnect/walletConnectV2.js +420 -375
  99. package/src/injected/MetaMask.cjs +0 -15
  100. package/src/injected/MetaMask.d.ts +0 -5
  101. package/src/injected/MetaMask.js +0 -11
  102. package/src/injected/OKX.cjs +0 -15
  103. package/src/injected/OKX.d.ts +0 -5
  104. package/src/injected/OKX.js +0 -11
  105. package/src/injected/UnknownInjectedWallet.cjs +0 -14
  106. package/src/injected/UnknownInjectedWallet.d.ts +0 -4
  107. package/src/injected/UnknownInjectedWallet.js +0 -10
  108. package/src/injected/index.cjs +0 -53
  109. package/src/injected/index.js +0 -49
@@ -1,10 +1,10 @@
1
- import InjectedWalletBase from './InjectedWalletBase.js';
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase.js';
2
2
 
3
- class Dawn extends InjectedWalletBase {
4
- constructor() {
5
- super(...arguments);
6
- this.name = 'Dawn';
7
- }
3
+ class Dawn extends LegacyInjectedWalletBase {
4
+ constructor() {
5
+ super(...arguments);
6
+ this.name = 'Dawn';
7
+ }
8
8
  }
9
9
 
10
10
  export { Dawn };
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InjectedWalletBase = require('./InjectedWalletBase.cjs');
6
-
7
- class ExodusEvm extends InjectedWalletBase {
8
- constructor() {
9
- super(...arguments);
10
- this.name = 'ExodusEvm';
11
- this.walletConnectorFallback = true;
12
- }
5
+ var LegacyInjectedWalletBase = require('./LegacyInjectedWalletBase.cjs');
6
+
7
+ class ExodusEvm extends LegacyInjectedWalletBase {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.name = 'ExodusEvm';
11
+ this.walletConnectorFallback = true;
12
+ }
13
13
  }
14
14
 
15
15
  exports.ExodusEvm = ExodusEvm;
@@ -1,5 +1,5 @@
1
- import InjectedWalletBase from './InjectedWalletBase';
2
- export declare class ExodusEvm extends InjectedWalletBase {
3
- name: string;
4
- walletConnectorFallback: boolean;
5
- }
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase';
2
+ export declare class ExodusEvm extends LegacyInjectedWalletBase {
3
+ name: string;
4
+ walletConnectorFallback: boolean;
5
+ }
@@ -1,11 +1,11 @@
1
- import InjectedWalletBase from './InjectedWalletBase.js';
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase.js';
2
2
 
3
- class ExodusEvm extends InjectedWalletBase {
4
- constructor() {
5
- super(...arguments);
6
- this.name = 'ExodusEvm';
7
- this.walletConnectorFallback = true;
8
- }
3
+ class ExodusEvm extends LegacyInjectedWalletBase {
4
+ constructor() {
5
+ super(...arguments);
6
+ this.name = 'ExodusEvm';
7
+ this.walletConnectorFallback = true;
8
+ }
9
9
  }
10
10
 
11
11
  export { ExodusEvm };
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InjectedWalletBase = require('./InjectedWalletBase.cjs');
5
+ var LegacyInjectedWalletBase = require('./LegacyInjectedWalletBase.cjs');
6
6
 
7
- class Frame extends InjectedWalletBase {
8
- constructor() {
9
- super(...arguments);
10
- this.name = 'Frame';
11
- }
7
+ class Frame extends LegacyInjectedWalletBase {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.name = 'Frame';
11
+ }
12
12
  }
13
13
 
14
14
  exports.Frame = Frame;
@@ -1,4 +1,4 @@
1
- import InjectedWalletBase from './InjectedWalletBase';
2
- export declare class Frame extends InjectedWalletBase {
3
- name: string;
4
- }
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase';
2
+ export declare class Frame extends LegacyInjectedWalletBase {
3
+ name: string;
4
+ }
@@ -1,10 +1,10 @@
1
- import InjectedWalletBase from './InjectedWalletBase.js';
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase.js';
2
2
 
3
- class Frame extends InjectedWalletBase {
4
- constructor() {
5
- super(...arguments);
6
- this.name = 'Frame';
7
- }
3
+ class Frame extends LegacyInjectedWalletBase {
4
+ constructor() {
5
+ super(...arguments);
6
+ this.name = 'Frame';
7
+ }
8
8
  }
9
9
 
10
10
  export { Frame };
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InjectedWalletBase = require('./InjectedWalletBase.cjs');
5
+ var LegacyInjectedWalletBase = require('./LegacyInjectedWalletBase.cjs');
6
6
 
7
- class GameStop extends InjectedWalletBase {
8
- constructor() {
9
- super(...arguments);
10
- this.name = 'GameStop';
11
- }
7
+ class GameStop extends LegacyInjectedWalletBase {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.name = 'GameStop';
11
+ }
12
12
  }
13
13
 
14
14
  exports.GameStop = GameStop;
@@ -1,4 +1,4 @@
1
- import InjectedWalletBase from './InjectedWalletBase';
2
- export declare class GameStop extends InjectedWalletBase {
3
- name: string;
4
- }
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase';
2
+ export declare class GameStop extends LegacyInjectedWalletBase {
3
+ name: string;
4
+ }
@@ -1,10 +1,10 @@
1
- import InjectedWalletBase from './InjectedWalletBase.js';
1
+ import LegacyInjectedWalletBase from './LegacyInjectedWalletBase.js';
2
2
 
3
- class GameStop extends InjectedWalletBase {
4
- constructor() {
5
- super(...arguments);
6
- this.name = 'GameStop';
7
- }
3
+ class GameStop extends LegacyInjectedWalletBase {
4
+ constructor() {
5
+ super(...arguments);
6
+ this.name = 'GameStop';
7
+ }
8
8
  }
9
9
 
10
10
  export { GameStop };
@@ -1,77 +1,91 @@
1
1
  'use strict';
2
2
 
3
3
  var _tslib = require('../../_virtual/_tslib.cjs');
4
+ var viem = require('viem');
4
5
  var walletBook = require('@dynamic-labs/wallet-book');
5
6
  var ethProviderHelper = require('../ethProviderHelper.cjs');
6
7
  var EthWalletConnector = require('../EthWalletConnector.cjs');
7
8
  var walletConnectV2 = require('../walletConnect/walletConnectV2.cjs');
8
9
  var walletConnect = require('../walletConnect/walletConnect.cjs');
9
10
 
10
- class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
11
- constructor() {
12
- super(...arguments);
13
- this.supportedChains = ['ETH', 'EVM'];
14
- this.connectedChain = 'EVM';
15
- this.walletConnectorFallback = false;
16
- }
17
- getMobileOrInstalledWallet() {
18
- var _a, _b, _c;
19
- if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
20
- const wallet = walletBook.getWalletBookWallet(this.walletBook, this.name);
21
- if (((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) &&
22
- ((_c = (_b = wallet.walletConnect) === null || _b === void 0 ? void 0 : _b.sdks) === null || _c === void 0 ? void 0 : _c.includes('sign_v2'))) {
23
- return new walletConnectV2.WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
24
- }
25
- else {
26
- return new walletConnect.WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
27
- }
28
- }
29
- return this;
30
- }
31
- setupEventListeners(listeners) {
32
- const { tearDownEventListeners } = ethProviderHelper.EthProviderHelper._setupEventListeners(this.name, listeners, this.getWeb3Provider());
33
- this.teardownEventListeners = tearDownEventListeners;
34
- }
35
- getWeb3Provider() {
36
- return ethProviderHelper.EthProviderHelper.findProvider(this.name);
37
- }
38
- isInstalledOnBrowser() {
39
- return ethProviderHelper.EthProviderHelper.isInstalledHelper(this.name);
40
- }
41
- connect() {
42
- return _tslib.__awaiter(this, void 0, void 0, function* () {
43
- yield this.fetchPublicAddress();
44
- });
45
- }
46
- fetchPublicAddress() {
47
- return _tslib.__awaiter(this, void 0, void 0, function* () {
48
- return ethProviderHelper.EthProviderHelper.fetchPublicAddressWithName(this.name);
49
- });
50
- }
51
- signMessage(messageToSign) {
52
- return _tslib.__awaiter(this, void 0, void 0, function* () {
53
- return ethProviderHelper.EthProviderHelper.signMessageWithName(messageToSign, this.name);
54
- });
55
- }
56
- proveOwnership(messageToSign) {
57
- return _tslib.__awaiter(this, void 0, void 0, function* () {
58
- return this.signMessage(messageToSign);
59
- });
60
- }
61
- endSession() {
62
- return _tslib.__awaiter(this, void 0, void 0, function* () {
63
- // nothing to do on browser-based metamask
64
- return;
65
- });
66
- }
67
- providerSwitchNetwork({ network, provider, }) {
68
- const _super = Object.create(null, {
69
- providerSwitchNetwork: { get: () => super.providerSwitchNetwork }
70
- });
71
- return _tslib.__awaiter(this, void 0, void 0, function* () {
72
- return _super.providerSwitchNetwork.call(this, { network, provider });
73
- });
74
- }
11
+ class InjectedWalletBase extends EthWalletConnector.EthWalletConnector {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.supportedChains = ['ETH', 'EVM'];
15
+ this.connectedChain = 'EVM';
16
+ this.walletConnectorFallback = false;
17
+ }
18
+ getEthProviderHelper() {
19
+ if (!this.wallet) {
20
+ this.wallet = walletBook.getWalletBookWallet(this.walletBook, this.key);
21
+ }
22
+ if (!this.ethProviderHelper) {
23
+ this.ethProviderHelper = new ethProviderHelper.EthProviderHelper(this.wallet);
24
+ }
25
+ return this.ethProviderHelper;
26
+ }
27
+ getMobileOrInstalledWallet() {
28
+ var _a, _b, _c;
29
+ if (this.walletConnectorFallback && !this.isInstalledOnBrowser()) {
30
+ if (!this.wallet)
31
+ this.wallet = walletBook.getWalletBookWallet(this.walletBook, this.key);
32
+ if (((_a = this.constructorProps) === null || _a === void 0 ? void 0 : _a.isWalletConnectV2Enabled) &&
33
+ ((_c = (_b = this.wallet.walletConnect) === null || _b === void 0 ? void 0 : _b.sdks) === null || _c === void 0 ? void 0 : _c.includes('sign_v2'))) {
34
+ return new walletConnectV2.WalletConnectV2(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
35
+ }
36
+ else {
37
+ return new walletConnect.WalletConnect(Object.assign(Object.assign({}, this.constructorProps), { walletName: this.name }));
38
+ }
39
+ }
40
+ return this;
41
+ }
42
+ setupEventListeners() {
43
+ const provider = this.getWalletClient();
44
+ if (!provider)
45
+ return;
46
+ const { tearDownEventListeners } = this.getEthProviderHelper()._setupEventListeners(this, viem.createPublicClient({ transport: viem.custom(provider) }));
47
+ this.teardownEventListeners = tearDownEventListeners;
48
+ }
49
+ getWalletClient() {
50
+ return this.getEthProviderHelper().findWalletClient();
51
+ }
52
+ isInstalledOnBrowser() {
53
+ return this.getEthProviderHelper().findProvider() !== undefined;
54
+ }
55
+ fetchPublicAddress() {
56
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
57
+ return this.getEthProviderHelper().fetchPublicAddress();
58
+ });
59
+ }
60
+ connect() {
61
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
62
+ yield this.fetchPublicAddress();
63
+ });
64
+ }
65
+ signMessage(messageToSign) {
66
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
67
+ return this.getEthProviderHelper().signMessage(messageToSign);
68
+ });
69
+ }
70
+ proveOwnership(messageToSign) {
71
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
72
+ return this.signMessage(messageToSign);
73
+ });
74
+ }
75
+ endSession() {
76
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
77
+ // nothing to do on browser-based metamask
78
+ return;
79
+ });
80
+ }
81
+ providerSwitchNetwork({ network, provider, }) {
82
+ const _super = Object.create(null, {
83
+ providerSwitchNetwork: { get: () => super.providerSwitchNetwork }
84
+ });
85
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
86
+ return _super.providerSwitchNetwork.call(this, { network, provider });
87
+ });
88
+ }
75
89
  }
76
90
 
77
91
  module.exports = InjectedWalletBase;
@@ -1,24 +1,286 @@
1
- import { ethers } from 'ethers';
2
- import { Chain, WalletEventListeners } from '@dynamic-labs/wallet-connector-core';
3
- import { EvmNetwork } from '@dynamic-labs/types';
4
- import { EthWalletConnector } from '../EthWalletConnector';
5
- declare abstract class InjectedWalletBase extends EthWalletConnector {
6
- supportedChains: Chain[];
7
- connectedChain: Chain;
8
- publicAddress: string | undefined;
9
- walletConnectorFallback: boolean;
10
- getMobileOrInstalledWallet(): InjectedWalletBase;
11
- setupEventListeners(listeners: WalletEventListeners): void;
12
- getWeb3Provider(): ethers.providers.Web3Provider | undefined;
13
- isInstalledOnBrowser(): boolean;
14
- connect(): Promise<void>;
15
- fetchPublicAddress(): Promise<string | undefined>;
16
- signMessage(messageToSign: string): Promise<string | undefined>;
17
- proveOwnership(messageToSign: string): Promise<string | undefined>;
18
- endSession(): Promise<void>;
19
- providerSwitchNetwork({ network, provider, }: {
20
- network: EvmNetwork;
21
- provider: ethers.providers.Web3Provider;
22
- }): Promise<void>;
23
- }
24
- export default InjectedWalletBase;
1
+ import { WalletClient } from 'viem';
2
+ import { Chain } from '@dynamic-labs/wallet-connector-core';
3
+ import { EvmNetwork } from '@dynamic-labs/types';
4
+ import { WalletSchema } from '@dynamic-labs/wallet-book';
5
+ import { EthProviderHelper } from '../ethProviderHelper';
6
+ import { EthWalletConnector } from '../EthWalletConnector';
7
+ declare abstract class InjectedWalletBase extends EthWalletConnector {
8
+ supportedChains: Chain[];
9
+ connectedChain: Chain;
10
+ publicAddress: string | undefined;
11
+ walletConnectorFallback: boolean;
12
+ ethProviderHelper: EthProviderHelper | undefined;
13
+ wallet: WalletSchema | undefined;
14
+ getEthProviderHelper(): EthProviderHelper;
15
+ getMobileOrInstalledWallet(): InjectedWalletBase;
16
+ setupEventListeners(): void;
17
+ getWalletClient(): {
18
+ account: import("viem").Account | undefined;
19
+ batch?: {
20
+ multicall?: boolean | {
21
+ batchSize?: number | undefined;
22
+ wait?: number | undefined;
23
+ } | undefined;
24
+ } | undefined;
25
+ cacheTime: number;
26
+ chain: import("viem").Chain | undefined;
27
+ key: string;
28
+ name: string;
29
+ pollingInterval: number;
30
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
31
+ transport: import("viem").TransportConfig<string, import("viem").EIP1193RequestFn> & Record<string, any>;
32
+ type: string;
33
+ uid: string;
34
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
35
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
36
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
37
+ getChainId: () => Promise<number>;
38
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
39
+ prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
40
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
41
+ requestPermissions: (args: {
42
+ [x: string]: Record<string, any>;
43
+ eth_accounts: Record<string, any>;
44
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
45
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
46
+ sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
47
+ signMessage: (args: import("viem").SignMessageParameters<import("viem").Account | undefined>) => Promise<`0x${string}`>;
48
+ signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
49
+ signTypedData: <const TTypedData extends {
50
+ [x: string]: readonly import("viem").TypedDataParameter[];
51
+ [x: `string[${string}]`]: undefined;
52
+ [x: `function[${string}]`]: undefined;
53
+ [x: `address[${string}]`]: undefined;
54
+ [x: `bool[${string}]`]: undefined;
55
+ [x: `bytes[${string}]`]: undefined;
56
+ [x: `bytes16[${string}]`]: undefined;
57
+ [x: `bytes1[${string}]`]: undefined;
58
+ [x: `bytes2[${string}]`]: undefined;
59
+ [x: `bytes3[${string}]`]: undefined;
60
+ [x: `bytes4[${string}]`]: undefined;
61
+ [x: `bytes5[${string}]`]: undefined;
62
+ [x: `bytes6[${string}]`]: undefined;
63
+ [x: `bytes7[${string}]`]: undefined;
64
+ [x: `bytes8[${string}]`]: undefined;
65
+ [x: `bytes9[${string}]`]: undefined;
66
+ [x: `bytes10[${string}]`]: undefined;
67
+ [x: `bytes11[${string}]`]: undefined;
68
+ [x: `bytes12[${string}]`]: undefined;
69
+ [x: `bytes13[${string}]`]: undefined;
70
+ [x: `bytes14[${string}]`]: undefined;
71
+ [x: `bytes15[${string}]`]: undefined;
72
+ [x: `bytes17[${string}]`]: undefined;
73
+ [x: `bytes18[${string}]`]: undefined;
74
+ [x: `bytes19[${string}]`]: undefined;
75
+ [x: `bytes20[${string}]`]: undefined;
76
+ [x: `bytes21[${string}]`]: undefined;
77
+ [x: `bytes22[${string}]`]: undefined;
78
+ [x: `bytes23[${string}]`]: undefined;
79
+ [x: `bytes24[${string}]`]: undefined;
80
+ [x: `bytes25[${string}]`]: undefined;
81
+ [x: `bytes26[${string}]`]: undefined;
82
+ [x: `bytes27[${string}]`]: undefined;
83
+ [x: `bytes28[${string}]`]: undefined;
84
+ [x: `bytes29[${string}]`]: undefined;
85
+ [x: `bytes30[${string}]`]: undefined;
86
+ [x: `bytes31[${string}]`]: undefined;
87
+ [x: `bytes32[${string}]`]: undefined;
88
+ [x: `int[${string}]`]: undefined;
89
+ [x: `int16[${string}]`]: undefined;
90
+ [x: `int8[${string}]`]: undefined;
91
+ [x: `int24[${string}]`]: undefined;
92
+ [x: `int32[${string}]`]: undefined;
93
+ [x: `int40[${string}]`]: undefined;
94
+ [x: `int48[${string}]`]: undefined;
95
+ [x: `int56[${string}]`]: undefined;
96
+ [x: `int64[${string}]`]: undefined;
97
+ [x: `int72[${string}]`]: undefined;
98
+ [x: `int80[${string}]`]: undefined;
99
+ [x: `int88[${string}]`]: undefined;
100
+ [x: `int96[${string}]`]: undefined;
101
+ [x: `int104[${string}]`]: undefined;
102
+ [x: `int112[${string}]`]: undefined;
103
+ [x: `int120[${string}]`]: undefined;
104
+ [x: `int128[${string}]`]: undefined;
105
+ [x: `int136[${string}]`]: undefined;
106
+ [x: `int144[${string}]`]: undefined;
107
+ [x: `int152[${string}]`]: undefined;
108
+ [x: `int160[${string}]`]: undefined;
109
+ [x: `int168[${string}]`]: undefined;
110
+ [x: `int176[${string}]`]: undefined;
111
+ [x: `int184[${string}]`]: undefined;
112
+ [x: `int192[${string}]`]: undefined;
113
+ [x: `int200[${string}]`]: undefined;
114
+ [x: `int208[${string}]`]: undefined;
115
+ [x: `int216[${string}]`]: undefined;
116
+ [x: `int224[${string}]`]: undefined;
117
+ [x: `int232[${string}]`]: undefined;
118
+ [x: `int240[${string}]`]: undefined;
119
+ [x: `int248[${string}]`]: undefined;
120
+ [x: `int256[${string}]`]: undefined;
121
+ [x: `uint[${string}]`]: undefined;
122
+ [x: `uint16[${string}]`]: undefined;
123
+ [x: `uint8[${string}]`]: undefined;
124
+ [x: `uint24[${string}]`]: undefined;
125
+ [x: `uint32[${string}]`]: undefined;
126
+ [x: `uint40[${string}]`]: undefined;
127
+ [x: `uint48[${string}]`]: undefined;
128
+ [x: `uint56[${string}]`]: undefined;
129
+ [x: `uint64[${string}]`]: undefined;
130
+ [x: `uint72[${string}]`]: undefined;
131
+ [x: `uint80[${string}]`]: undefined;
132
+ [x: `uint88[${string}]`]: undefined;
133
+ [x: `uint96[${string}]`]: undefined;
134
+ [x: `uint104[${string}]`]: undefined;
135
+ [x: `uint112[${string}]`]: undefined;
136
+ [x: `uint120[${string}]`]: undefined;
137
+ [x: `uint128[${string}]`]: undefined;
138
+ [x: `uint136[${string}]`]: undefined;
139
+ [x: `uint144[${string}]`]: undefined;
140
+ [x: `uint152[${string}]`]: undefined;
141
+ [x: `uint160[${string}]`]: undefined;
142
+ [x: `uint168[${string}]`]: undefined;
143
+ [x: `uint176[${string}]`]: undefined;
144
+ [x: `uint184[${string}]`]: undefined;
145
+ [x: `uint192[${string}]`]: undefined;
146
+ [x: `uint200[${string}]`]: undefined;
147
+ [x: `uint208[${string}]`]: undefined;
148
+ [x: `uint216[${string}]`]: undefined;
149
+ [x: `uint224[${string}]`]: undefined;
150
+ [x: `uint232[${string}]`]: undefined;
151
+ [x: `uint240[${string}]`]: undefined;
152
+ [x: `uint248[${string}]`]: undefined;
153
+ [x: `uint256[${string}]`]: undefined;
154
+ string?: undefined;
155
+ address?: undefined;
156
+ bool?: undefined;
157
+ bytes?: undefined;
158
+ bytes16?: undefined;
159
+ bytes1?: undefined;
160
+ bytes2?: undefined;
161
+ bytes3?: undefined;
162
+ bytes4?: undefined;
163
+ bytes5?: undefined;
164
+ bytes6?: undefined;
165
+ bytes7?: undefined;
166
+ bytes8?: undefined;
167
+ bytes9?: undefined;
168
+ bytes10?: undefined;
169
+ bytes11?: undefined;
170
+ bytes12?: undefined;
171
+ bytes13?: undefined;
172
+ bytes14?: undefined;
173
+ bytes15?: undefined;
174
+ bytes17?: undefined;
175
+ bytes18?: undefined;
176
+ bytes19?: undefined;
177
+ bytes20?: undefined;
178
+ bytes21?: undefined;
179
+ bytes22?: undefined;
180
+ bytes23?: undefined;
181
+ bytes24?: undefined;
182
+ bytes25?: undefined;
183
+ bytes26?: undefined;
184
+ bytes27?: undefined;
185
+ bytes28?: undefined;
186
+ bytes29?: undefined;
187
+ bytes30?: undefined;
188
+ bytes31?: undefined;
189
+ bytes32?: undefined;
190
+ int16?: undefined;
191
+ int8?: undefined;
192
+ int24?: undefined;
193
+ int32?: undefined;
194
+ int40?: undefined;
195
+ int48?: undefined;
196
+ int56?: undefined;
197
+ int64?: undefined;
198
+ int72?: undefined;
199
+ int80?: undefined;
200
+ int88?: undefined;
201
+ int96?: undefined;
202
+ int104?: undefined;
203
+ int112?: undefined;
204
+ int120?: undefined;
205
+ int128?: undefined;
206
+ int136?: undefined;
207
+ int144?: undefined;
208
+ int152?: undefined;
209
+ int160?: undefined;
210
+ int168?: undefined;
211
+ int176?: undefined;
212
+ int184?: undefined;
213
+ int192?: undefined;
214
+ int200?: undefined;
215
+ int208?: undefined;
216
+ int216?: undefined;
217
+ int224?: undefined;
218
+ int232?: undefined;
219
+ int240?: undefined;
220
+ int248?: undefined;
221
+ int256?: undefined;
222
+ uint16?: undefined;
223
+ uint8?: undefined;
224
+ uint24?: undefined;
225
+ uint32?: undefined;
226
+ uint40?: undefined;
227
+ uint48?: undefined;
228
+ uint56?: undefined;
229
+ uint64?: undefined;
230
+ uint72?: undefined;
231
+ uint80?: undefined;
232
+ uint88?: undefined;
233
+ uint96?: undefined;
234
+ uint104?: undefined;
235
+ uint112?: undefined;
236
+ uint120?: undefined;
237
+ uint128?: undefined;
238
+ uint136?: undefined;
239
+ uint144?: undefined;
240
+ uint152?: undefined;
241
+ uint160?: undefined;
242
+ uint168?: undefined;
243
+ uint176?: undefined;
244
+ uint184?: undefined;
245
+ uint192?: undefined;
246
+ uint200?: undefined;
247
+ uint208?: undefined;
248
+ uint216?: undefined;
249
+ uint224?: undefined;
250
+ uint232?: undefined;
251
+ uint240?: undefined;
252
+ uint248?: undefined;
253
+ uint256?: undefined;
254
+ } | {
255
+ [key: string]: unknown;
256
+ }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, import("viem").Account | undefined>) => Promise<`0x${string}`>;
257
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
258
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
259
+ writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
260
+ extend: <const client extends {
261
+ [x: string]: unknown;
262
+ account?: undefined;
263
+ batch?: undefined;
264
+ cacheTime?: undefined;
265
+ chain?: undefined;
266
+ key?: undefined;
267
+ name?: undefined;
268
+ pollingInterval?: undefined;
269
+ request?: undefined;
270
+ transport?: undefined;
271
+ type?: undefined;
272
+ uid?: undefined;
273
+ }>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
274
+ } | undefined;
275
+ isInstalledOnBrowser(): boolean;
276
+ fetchPublicAddress(): Promise<string | undefined>;
277
+ connect(): Promise<void>;
278
+ signMessage(messageToSign: string): Promise<string | undefined>;
279
+ proveOwnership(messageToSign: string): Promise<string | undefined>;
280
+ endSession(): Promise<void>;
281
+ providerSwitchNetwork({ network, provider, }: {
282
+ network: EvmNetwork;
283
+ provider: WalletClient;
284
+ }): Promise<void>;
285
+ }
286
+ export default InjectedWalletBase;