-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 chore: Docs for testWithSynpress & plugins (#1130)
* 📝 chore: Docs for testWithSynpress & plugins * fix: lock file * fix: cache build * fix: cleanup * fix: dependencies * fix: dependencies * fix: dependencies
- Loading branch information
Showing
17 changed files
with
5,231 additions
and
5,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
# Class: EthereumWalletMock | ||
|
||
## Constructors | ||
|
||
### new EthereumWalletMock() | ||
|
||
```ts | ||
new EthereumWalletMock(page): EthereumWalletMock | ||
``` | ||
|
||
#### Parameters | ||
|
||
| Parameter | Type | | ||
| :------ | :------ | | ||
| `page` | `Page` | | ||
|
||
#### Returns | ||
|
||
[`EthereumWalletMock`](EthereumWalletMock.md) | ||
|
||
## Properties | ||
|
||
| Property | Modifier | Type | | ||
| :------ | :------ | :------ | | ||
| `page` | `readonly` | `Page` | | ||
| `seedPhrase` | `public` | `string` | | ||
| `wallet` | `public` | `WalletMock` | | ||
|
||
## Methods | ||
|
||
### addNetwork() | ||
|
||
```ts | ||
addNetwork(network): Promise<any> | ||
``` | ||
|
||
Adds a new network. | ||
|
||
#### Parameters | ||
|
||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `network` | `Network` | The network object to use for adding the new network. | | ||
|
||
#### Returns | ||
|
||
`Promise`\<`any`\> | ||
|
||
*** | ||
|
||
### addNewAccount() | ||
|
||
```ts | ||
addNewAccount(): Promise<any> | ||
``` | ||
|
||
Adds a new account. This account is based on the initially imported seed phrase. | ||
|
||
#### Returns | ||
|
||
`Promise`\<`any`\> | ||
|
||
*** | ||
|
||
### connectToDapp() | ||
|
||
```ts | ||
connectToDapp(wallet?): Promise<any> | ||
``` | ||
Connects wallet to the dapp. | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `wallet`? | `WalletMock` | The wallet to connect to the dapp. | | ||
#### Returns | ||
`Promise`\<`any`\> | ||
*** | ||
### getAccountAddress() | ||
```ts | ||
getAccountAddress(): Promise<undefined | string> | ||
``` | ||
Retrieves the current account address. | ||
#### Returns | ||
`Promise`\<`undefined` \| `string`\> | ||
*** | ||
### getAllAccounts() | ||
```ts | ||
getAllAccounts(): Promise<string[]> | ||
``` | ||
Retrieves the current account address. | ||
#### Returns | ||
`Promise`\<`string`[]\> | ||
*** | ||
### importWallet() | ||
```ts | ||
importWallet(seedPhrase): Promise<any> | ||
``` | ||
Imports a wallet using the given seed phrase. | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `seedPhrase` | `string` | The seed phrase to import. | | ||
#### Returns | ||
`Promise`\<`any`\> | ||
*** | ||
### importWalletFromPrivateKey() | ||
```ts | ||
importWalletFromPrivateKey(privateKey): Promise<any> | ||
``` | ||
Imports a wallet using the given private key. | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `privateKey` | \`0x$\{string\}\` | The private key to import. | | ||
#### Returns | ||
`Promise`\<`any`\> | ||
*** | ||
### switchAccount() | ||
```ts | ||
switchAccount(accountAddress): Promise<any> | ||
``` | ||
Switches to the account with the given name. | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `accountAddress` | `string` | The name of the account to switch to. | | ||
#### Returns | ||
`Promise`\<`any`\> | ||
*** | ||
### switchNetwork() | ||
```ts | ||
switchNetwork(networkName): Promise<void> | ||
``` | ||
Switches to the network with the given name. | ||
#### Parameters | ||
| Parameter | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `networkName` | `string` | The name of the network to switch to. | | ||
#### Returns | ||
`Promise`\<`void`\> |
Oops, something went wrong.