w3wallets 0.1.0 → 0.1.2
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/README.md +44 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +14 -14
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# w3wallets
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
[](https://www.npmjs.com/package/w3wallets)
|
|
5
|
+
|
|
6
|
+
Web3 wallets for Playwright.
|
|
7
|
+
|
|
8
|
+
This library provides methods for interacting with Web3 wallets using Playwright.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install -D w3wallets
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Getting Started
|
|
15
|
+
|
|
16
|
+
Only the `Backpack` wallet is supported at this point.
|
|
17
|
+
|
|
18
|
+
#### 1. Download Backpack
|
|
19
|
+
|
|
20
|
+
Currently, you need to download the extension manually. You can use [Chrome extension source viewer](https://chromewebstore.google.com/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin).
|
|
21
|
+
|
|
22
|
+
Put the unzipped files to the root of your Playwright project `wallets/backpack`.
|
|
23
|
+
|
|
24
|
+
<!-- ```sh
|
|
25
|
+
npx w3wallets
|
|
26
|
+
``` -->
|
|
27
|
+
|
|
28
|
+
#### 2. Wrap your fixture `withWallets`
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { test as base } from "@playwright/test";
|
|
32
|
+
import { withWallets } from "../src/withWallets";
|
|
33
|
+
|
|
34
|
+
const test = withWallets(base, { backpack: true });
|
|
35
|
+
|
|
36
|
+
test("has title", async ({ page, backpack }) => {
|
|
37
|
+
await page.goto("https://playwright.dev/");
|
|
38
|
+
|
|
39
|
+
const privateKey =
|
|
40
|
+
"4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2";
|
|
41
|
+
|
|
42
|
+
await backpack.onboard("Eclipse", privateKey);
|
|
43
|
+
});
|
|
44
|
+
```
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w3wallets",
|
|
3
3
|
"description": "browser wallets for playwright",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/Maksandre/w3wallets",
|
|
@@ -21,19 +21,6 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"bin": "./src/scripts/download.js",
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@arethetypeswrong/cli": "^0.17.2",
|
|
26
|
-
"@changesets/cli": "^2.27.11",
|
|
27
|
-
"@playwright/test": "^1.49.1",
|
|
28
|
-
"@types/node": "^22.10.5",
|
|
29
|
-
"prettier": "^3.4.2",
|
|
30
|
-
"standard-version": "^9.5.0",
|
|
31
|
-
"tsup": "^8.3.5",
|
|
32
|
-
"typescript": "^5.7.2"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"@playwright/test": "^1.49.1"
|
|
36
|
-
},
|
|
37
24
|
"scripts": {
|
|
38
25
|
"build": "tsup",
|
|
39
26
|
"clean": "rm -rf dist",
|
|
@@ -48,5 +35,18 @@
|
|
|
48
35
|
"dependencies": {
|
|
49
36
|
"adm-zip": "^0.5.16",
|
|
50
37
|
"follow-redirects": "^1.15.9"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@arethetypeswrong/cli": "^0.17.2",
|
|
41
|
+
"@changesets/cli": "^2.27.11",
|
|
42
|
+
"@playwright/test": "^1.49.1",
|
|
43
|
+
"@types/node": "^22.10.5",
|
|
44
|
+
"prettier": "^3.4.2",
|
|
45
|
+
"standard-version": "^9.5.0",
|
|
46
|
+
"tsup": "^8.3.5",
|
|
47
|
+
"typescript": "^5.7.2"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@playwright/test": "^1.49.1"
|
|
51
51
|
}
|
|
52
52
|
}
|