The Experimental package is used for features that are not ready to be included in the base library. The API should not be considered stable and does not follow semver versioning, so applications requiring it should specify the exact version needed.

These features are not available in the core ethers package, so to use them you must install the @ethersproject/experimental package and import them from that.

BrainWallet inherits Wallet

Ethers removed support for BrainWallets in v4, since they are unsafe and many can be easily guessed, allowing attackers to steal the funds. This class is offered to ensure older systems which used brain wallets can still recover their funds and assets.

BrainWallet.generate( username , password [ , progressCallback ] ) BrainWallet

Generates a brain wallet, with a slightly improved experience, in which the generated wallet has a mnemonic.

BrainWallet.generateLegacy( username , password [ , progressCallback ] ) BrainWallet

Generate a brain wallet which is compatible with the ethers v3 and earlier.

// Node const { BrainWallet } = require("@ethersproject/experimental"); // ESM/TypeScript import { BrainWallet } from "@ethersproject/experimental";

EIP1193Bridge inherits EventEmitter

The EIP1193Bridge allows a normal Ethers Signer and Provider to be exposed in as a standard EIP-1193 Provider, which may be useful when interacting with other libraries.

// Node const { Eip1193Bridge } = require("@ethersproject/experimental"); // ESM/TypeScript import { Eip1193Bridge } from "@ethersproject/experimental";

NonceManager inherits Signer

The NonceManager is designed to manage the nonce for a Signer, automatically increasing it as it sends transactions.

Currently the NonceManager does not handle re-broadcast. If you attempt to send a lot of transactions to the network on a node that does not control that account, the transaction pool may drop your transactions.

In the future, it'd be nice if the NonceManager remembered transactions and watched for them on the network, rebroadcasting transactions that appear to have been dropped.

Another future feature will be some sort of failure mode. For example, often a transaction is dependent on another transaction being mined first.

new NonceManager( signer )

Create a new NonceManager.

nonceManager.signer Signer

The signer whose nonce is being managed.

nonceManager.provider Provider

The provider associated with the signer.

nonceManager.setTransactionCount( count ) void

Set the current transaction count (nonce) for the signer.

This may be useful in interacting with the signer outside of using this class.

nonceManager.incrementTransactionCount( [ count = 1 ] ) void

Bump the current transaction count (nonce) by count.

This may be useful in interacting with the signer outside of using this class.

// Node const { NonceManager } = require("@ethersproject/experimental"); // ESM/TypeScript import { NonceManager } from "@ethersproject/experimental";