@tetherto/wdk-wallet-evm-erc-4337 1.0.0-beta.2 → 1.0.0-beta.21
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/AGENTS.md +50 -0
- package/LICENSE +176 -0
- package/README.md +93 -680
- package/hardhat.config.js +20 -0
- package/index.js +31 -1
- package/package.json +35 -13
- package/src/errors.js +35 -0
- package/src/wallet-account-evm-erc-4337.js +394 -88
- package/src/wallet-account-read-only-evm-erc-4337.js +826 -118
- package/src/wallet-manager-evm-erc-4337.js +35 -22
- package/types/index.d.ts +26 -1
- package/types/src/errors.d.ts +14 -0
- package/types/src/wallet-account-evm-erc-4337.d.ts +112 -21
- package/types/src/wallet-account-read-only-evm-erc-4337.d.ts +488 -40
- package/types/src/wallet-manager-evm-erc-4337.d.ts +11 -8
|
@@ -2,17 +2,11 @@ export default class WalletManagerEvmErc4337 extends WalletManager {
|
|
|
2
2
|
/**
|
|
3
3
|
* Creates a new wallet manager for evm blockchains that implements the [erc-4337](https://www.erc4337.io/docs) standard and its account abstraction features.
|
|
4
4
|
*
|
|
5
|
-
* @param {string | Uint8Array} seed -
|
|
5
|
+
* @param {string | Uint8Array} seed - A [BIP-39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonic seed phrase, or a raw BIP-32 master seed (16-64 bytes).
|
|
6
6
|
* @param {EvmErc4337WalletConfig} config - The configuration object.
|
|
7
|
+
* @throws {ValueError} If the `provider` option is set to an empty list.
|
|
7
8
|
*/
|
|
8
9
|
constructor(seed: string | Uint8Array, config: EvmErc4337WalletConfig);
|
|
9
|
-
/**
|
|
10
|
-
* The evm erc-4337 wallet configuration.
|
|
11
|
-
*
|
|
12
|
-
* @protected
|
|
13
|
-
* @type {EvmErc4337WalletConfig}
|
|
14
|
-
*/
|
|
15
|
-
protected _config: EvmErc4337WalletConfig;
|
|
16
10
|
/**
|
|
17
11
|
* An ethers provider to interact with a node of the blockchain.
|
|
18
12
|
*
|
|
@@ -40,10 +34,19 @@ export default class WalletManagerEvmErc4337 extends WalletManager {
|
|
|
40
34
|
* @returns {Promise<WalletAccountEvmErc4337>} The account.
|
|
41
35
|
*/
|
|
42
36
|
getAccountByPath(path: string): Promise<WalletAccountEvmErc4337>;
|
|
37
|
+
/**
|
|
38
|
+
* Builds the account config, injecting the manager's shared provider so accounts reuse the
|
|
39
|
+
* single ethers provider instance instead of opening their own.
|
|
40
|
+
*
|
|
41
|
+
* @private
|
|
42
|
+
* @returns {EvmErc4337WalletConfig} The account configuration.
|
|
43
|
+
*/
|
|
44
|
+
private _accountConfig;
|
|
43
45
|
/**
|
|
44
46
|
* Returns the current fee rates.
|
|
45
47
|
*
|
|
46
48
|
* @returns {Promise<FeeRates>} The fee rates (in weis).
|
|
49
|
+
* @throws {ProviderRequiredError} If the wallet is not connected to a provider.
|
|
47
50
|
*/
|
|
48
51
|
getFeeRates(): Promise<FeeRates>;
|
|
49
52
|
}
|