w3wallets 0.0.4 → 0.1.1

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 CHANGED
@@ -1,13 +1,10 @@
1
1
  # w3wallets
2
2
 
3
3
  ![License](https://img.shields.io/badge/License-MIT-yellow.svg)
4
- [![npm version](https://img.shields.io/npm/v/w3wallets.svg)](https://img.shields.io/npm/v/w3wallets.svg)
4
+ [![npm version](https://img.shields.io/npm/v/w3wallets.svg)](https://www.npmjs.com/package/w3wallets)
5
5
 
6
6
  Web3 wallets for Playwright.
7
7
 
8
- > [!IMPORTANT]
9
- > This is Alpha!
10
-
11
8
  This library provides methods for interacting with Web3 wallets using Playwright.
12
9
 
13
10
  ```sh
@@ -22,7 +19,7 @@ Only the `Backpack` wallet is supported at this point.
22
19
 
23
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).
24
21
 
25
- Put the unzipped files to the root of your Playwright project `extensions/backpack`.
22
+ Put the unzipped files to the root of your Playwright project `wallets/backpack`.
26
23
 
27
24
  <!-- ```sh
28
25
  npx w3wallets
@@ -39,8 +36,9 @@ const test = withWallets(base, { backpack: true });
39
36
  test("has title", async ({ page, backpack }) => {
40
37
  await page.goto("https://playwright.dev/");
41
38
 
42
- await backpack.onboard(
43
- "4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2",
44
- );
39
+ const privateKey =
40
+ "4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2";
41
+
42
+ await backpack.onboard("Eclipse", privateKey);
45
43
  });
46
44
  ```
package/dist/index.d.mts CHANGED
@@ -26,4 +26,4 @@ declare function withWallets(test: typeof test, config: Config): playwright_test
26
26
  extensionId: string;
27
27
  }, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions>;
28
28
 
29
- export { withWallets as withExtensions };
29
+ export { withWallets };
package/dist/index.d.ts CHANGED
@@ -26,4 +26,4 @@ declare function withWallets(test: typeof test, config: Config): playwright_test
26
26
  extensionId: string;
27
27
  }, playwright_test.PlaywrightWorkerArgs & playwright_test.PlaywrightWorkerOptions>;
28
28
 
29
- export { withWallets as withExtensions };
29
+ export { withWallets };
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
- withExtensions: () => withWallets
33
+ withWallets: () => withWallets
34
34
  });
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
@@ -91,7 +91,7 @@ var Backpack = class {
91
91
 
92
92
  // src/withWallets.ts
93
93
  function withWallets(test, config) {
94
- const backpack = import_path.default.join(process.cwd(), "extensions", "backpack");
94
+ const backpack = import_path.default.join(process.cwd(), "wallets", "backpack");
95
95
  return test.extend({
96
96
  backpack: async ({ context, extensionId }, use) => {
97
97
  const page = context.pages()[0];
@@ -136,5 +136,5 @@ function withWallets(test, config) {
136
136
  }
137
137
  // Annotate the CommonJS export names for ESM import in node:
138
138
  0 && (module.exports = {
139
- withExtensions
139
+ withWallets
140
140
  });
package/dist/index.mjs CHANGED
@@ -55,7 +55,7 @@ var Backpack = class {
55
55
 
56
56
  // src/withWallets.ts
57
57
  function withWallets(test, config) {
58
- const backpack = path.join(process.cwd(), "extensions", "backpack");
58
+ const backpack = path.join(process.cwd(), "wallets", "backpack");
59
59
  return test.extend({
60
60
  backpack: async ({ context, extensionId }, use) => {
61
61
  const page = context.pages()[0];
@@ -99,5 +99,5 @@ function withWallets(test, config) {
99
99
  });
100
100
  }
101
101
  export {
102
- withWallets as withExtensions
102
+ withWallets
103
103
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "w3wallets",
3
3
  "description": "browser wallets for playwright",
4
- "version": "0.0.4",
4
+ "version": "0.1.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "homepage": "https://github.com/Maksandre/w3wallets",
@@ -20,22 +20,7 @@
20
20
  "files": [
21
21
  "dist"
22
22
  ],
23
- "bin": {
24
- "w3wallets": "./src/scripts/download.js"
25
- },
26
- "devDependencies": {
27
- "@arethetypeswrong/cli": "^0.17.2",
28
- "@changesets/cli": "^2.27.11",
29
- "@playwright/test": "^1.49.1",
30
- "@types/node": "^22.10.5",
31
- "prettier": "^3.4.2",
32
- "standard-version": "^9.5.0",
33
- "tsup": "^8.3.5",
34
- "typescript": "^5.7.2"
35
- },
36
- "peerDependencies": {
37
- "@playwright/test": "^1.49.1"
38
- },
23
+ "bin": "./src/scripts/download.js",
39
24
  "scripts": {
40
25
  "build": "tsup",
41
26
  "clean": "rm -rf dist",
@@ -50,5 +35,18 @@
50
35
  "dependencies": {
51
36
  "adm-zip": "^0.5.16",
52
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"
53
51
  }
54
- }
52
+ }