w3wallets 0.0.4 → 0.1.0
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +2 -4
- package/README.md +0 -46
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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
|
-
|
|
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(), "
|
|
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
|
-
|
|
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(), "
|
|
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
|
|
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
|
+
"version": "0.1.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/Maksandre/w3wallets",
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
|
-
"bin":
|
|
24
|
-
"w3wallets": "./src/scripts/download.js"
|
|
25
|
-
},
|
|
23
|
+
"bin": "./src/scripts/download.js",
|
|
26
24
|
"devDependencies": {
|
|
27
25
|
"@arethetypeswrong/cli": "^0.17.2",
|
|
28
26
|
"@changesets/cli": "^2.27.11",
|
package/README.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# w3wallets
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
[](https://img.shields.io/npm/v/w3wallets.svg)
|
|
5
|
-
|
|
6
|
-
Web3 wallets for Playwright.
|
|
7
|
-
|
|
8
|
-
> [!IMPORTANT]
|
|
9
|
-
> This is Alpha!
|
|
10
|
-
|
|
11
|
-
This library provides methods for interacting with Web3 wallets using Playwright.
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install -D w3wallets
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Getting Started
|
|
18
|
-
|
|
19
|
-
Only the `Backpack` wallet is supported at this point.
|
|
20
|
-
|
|
21
|
-
#### 1. Download Backpack
|
|
22
|
-
|
|
23
|
-
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
|
-
|
|
25
|
-
Put the unzipped files to the root of your Playwright project `extensions/backpack`.
|
|
26
|
-
|
|
27
|
-
<!-- ```sh
|
|
28
|
-
npx w3wallets
|
|
29
|
-
``` -->
|
|
30
|
-
|
|
31
|
-
#### 2. Wrap your fixture `withWallets`
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
import { test as base } from "@playwright/test";
|
|
35
|
-
import { withWallets } from "../src/withWallets";
|
|
36
|
-
|
|
37
|
-
const test = withWallets(base, { backpack: true });
|
|
38
|
-
|
|
39
|
-
test("has title", async ({ page, backpack }) => {
|
|
40
|
-
await page.goto("https://playwright.dev/");
|
|
41
|
-
|
|
42
|
-
await backpack.onboard(
|
|
43
|
-
"4wDJd9Ds5ueTdS95ReAZGSBVkjMcNKbgZk47xcmqzpUJjCt7VoB2Cs7hqwXWRnopzXqE4mCP6BEDHCYrFttEcBw2",
|
|
44
|
-
);
|
|
45
|
-
});
|
|
46
|
-
```
|