qtum-snap 1.0.0-beta.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 +17 -0
- package/dist/bundle.js +131225 -0
- package/images/icon.svg +14 -0
- package/package.json +100 -0
- package/snap.manifest.json +41 -0
package/images/icon.svg
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" width="500" height="500">
|
|
2
|
+
<title>Layer 1</title>
|
|
3
|
+
<style>
|
|
4
|
+
.s0 { fill: #0645f7 }
|
|
5
|
+
</style>
|
|
6
|
+
<g id="Layer 1">
|
|
7
|
+
<g id="-e-<Group>">
|
|
8
|
+
<path id="<Compound Path>" fill-rule="evenodd" class="s0"
|
|
9
|
+
d="m481.9 493c-10.2 0-18.5-8.3-18.5-18.5 0-10.3 8.3-18.6 18.5-18.6 10.2 0 18.5 8.3 18.5 18.6 0 10.2-8.3 18.5-18.5 18.5zm-103.8-314.8v135.3l107.3 107.3c5.7 5.8 7.7 14.7 4 21.9-6.3 12.2-21.7 13.9-30.5 5.1l-113-113.1c-3.7-3.7-5.6-8.6-5.6-13.4v-150.9c0-4.9 1.9-9.7 5.6-13.4l69.2-69.3c5.9-5.9 14.9-7.9 22.3-4.1 12 6.4 13.6 21.6 4.9 30.4zm94.3 58.5c-10.3 0-18.7-8.4-18.7-18.8 0-10.3 8.4-18.7 18.7-18.7 10.4 0 18.7 8.4 18.7 18.7 0 10.4-8.3 18.8-18.7 18.8zm-37.6-33.2v34.2h-37.8v-41.9c0-4.8 1.8-9.6 5.5-13.3l44.2-43.8c5.8-5.8 14.8-7.8 22.1-4 12.1 6.2 13.8 21.4 5 30.1zm34.1 156c-7.3 3.8-16.3 1.8-22.1-4l-44.2-43.8c-3.7-3.6-5.5-8.4-5.5-13.2v-42h37.7v34.2l39.1 38.7c8.8 8.7 7.1 23.9-5 30.1zm3.6-66.7c-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.7 18.7-18.7 10.3 0 18.7 8.3 18.7 18.7 0 10.3-8.4 18.7-18.7 18.7zm-137.8-148.8c-3.7 3.7-8.5 5.5-13.4 5.5h-150.6c-4.8 0-9.6-1.8-13.3-5.5l-69.3-69.4c-5.8-5.8-7.8-14.7-4-22 6.2-12.1 21.6-13.8 30.3-5l64.1 64.1h135l63.7-63.7c5.8-5.8 14.9-7.9 22.2-4 12 6.3 13.7 21.5 4.9 30.3zm-20.5-56.7c-3.7 3.7-8.5 5.5-13.4 5.5h-42.2v-37.7h34.4l38.6-38.7c5.8-5.8 14.9-7.9 22.2-4 12 6.3 13.7 21.5 4.9 30.3zm-40-49.3c-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.8 18.7-18.8 10.3 0 18.7 8.4 18.7 18.8 0 10.3-8.4 18.7-18.7 18.7zm-76.7 54.8c-4.8 0-9.7-1.8-13.4-5.5l-44.2-44.3c-5.8-5.8-7.7-14.7-4-21.9 6.3-12.2 21.6-13.9 30.4-5.1l39 39.1h34.4v37.7zm20.6-54.8c-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.8 18.7-18.8 10.4 0 18.7 8.4 18.7 18.8 0 10.3-8.3 18.7-18.7 18.7zm-66.5 132.5v150.9c0 4.9-1.8 9.7-5.5 13.4l-69.3 69.3c-5.8 5.9-14.9 7.9-22.2 4.1-12-6.4-13.7-21.6-4.9-30.4l64.2-64.2v-135.2l-63.9-64c-5.8-5.7-7.7-14.7-4-21.9 6.3-12.2 21.6-13.9 30.4-5.1l69.7 69.8c3.7 3.7 5.5 8.5 5.5 13.3zm-62.2 12c3.7 3.6 5.6 8.4 5.6 13.2v42h-37.8v-34.2l-38.6-38.3c-5.9-5.8-7.9-14.8-4.1-22.1 6.4-11.9 21.6-13.5 30.3-4.8zm-69.7 16.7c10.3 0 18.7 8.4 18.7 18.7 0 10.3-8.4 18.7-18.7 18.7-10.3 0-18.7-8.4-18.7-18.7 0-10.3 8.4-18.7 18.7-18.7zm0 56.1c10.3 0 18.7 8.4 18.7 18.8 0 10.3-8.4 18.7-18.7 18.7-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.8 18.7-18.8zm37.5 35.4v-34.2h37.8v42c0 4.7-1.9 9.5-5.6 13.2l-44.2 43.8c-5.8 5.8-14.8 7.8-22.1 4-12.1-6.2-13.8-21.4-5-30.1zm100.2 53.2c3.6-3.6 8.5-5.5 13.3-5.5h150.6c4.8 0 9.7 1.9 13.4 5.5l112.6 112.8c5.8 5.8 7.7 14.7 4 21.9-6.3 12.2-21.6 13.9-30.4 5.1l-107.4-107.5h-135l-63.6 63.7c-5.9 5.9-14.9 7.9-22.3 4.1-12-6.4-13.6-21.6-4.9-30.4zm26.9 56.7c3.7-3.7 8.5-5.5 13.3-5.5h42.3v37.8h-34.5l-38.5 38.6c-5.9 5.8-15 7.9-22.3 4-12-6.3-13.6-21.5-4.9-30.3zm34 53.4c10.3 0 18.7 8.4 18.7 18.7 0 10.4-8.4 18.8-18.7 18.8-10.4 0-18.8-8.4-18.8-18.8 0-10.3 8.4-18.7 18.8-18.7zm82.8-58.9c4.8 0 9.6 1.8 13.3 5.5l44.2 44.3c5.8 5.8 7.8 14.7 4.1 21.9-6.3 12.2-21.6 13.9-30.4 5.1l-39.1-39h-34.4v-37.8zm-26.7 58.9c10.3 0 18.7 8.4 18.7 18.7 0 10.4-8.4 18.8-18.7 18.8-10.3 0-18.7-8.4-18.7-18.8 0-10.3 8.4-18.7 18.7-18.7z"/>
|
|
10
|
+
<path id="<Compound Path>" fill-rule="evenodd" class="s0"
|
|
11
|
+
d="m434.8 203.5v34.2h-37.8v-41.9c0-4.8 1.9-9.6 5.5-13.3l44.2-43.8c5.9-5.7 14.9-7.7 22.1-4 12.2 6.3 13.9 21.4 5.1 30.1zm34 156.1c-7.3 3.7-16.2 1.7-22.1-4l-44.2-43.9c-3.7-3.6-5.5-8.4-5.5-13.2v-41.9h37.8v34.1l39 38.8c8.8 8.7 7.2 23.8-5 30.1zm-134.2-215.6c-3.7 3.7-8.5 5.5-13.3 5.5h-150.6c-4.9 0-9.7-1.8-13.4-5.5l-69.3-69.4c-5.8-5.8-7.7-14.7-4-21.9 6.3-12.2 21.6-13.9 30.4-5.1l64.1 64.2h135l63.6-63.8c5.8-5.8 14.9-7.9 22.2-4 12.1 6.3 13.7 21.5 4.9 30.3zm-20.5-56.7c-3.7 3.7-8.5 5.6-13.4 5.6h-42.2v-37.8h34.4l38.6-38.6c5.9-5.9 14.9-8 22.2-4.1 12.1 6.3 13.7 21.6 5 30.3zm-40.1-49.3c-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.7 18.7-18.7 10.3 0 18.7 8.3 18.7 18.7 0 10.3-8.4 18.7-18.7 18.7zm-76.7 54.9c-4.8 0-9.7-1.9-13.3-5.6l-44.3-44.3c-5.7-5.7-7.7-14.7-4-21.9 6.3-12.2 21.6-13.9 30.4-5.1l39 39.1h34.5v37.8zm20.6-54.9c-10.4 0-18.8-8.4-18.8-18.7 0-10.4 8.4-18.7 18.8-18.7 10.3 0 18.7 8.3 18.7 18.7 0 10.3-8.4 18.7-18.7 18.7zm-66.5 132.6v150.9c0 4.8-1.9 9.6-5.6 13.3l-69.2 69.4c-5.9 5.8-14.9 7.9-22.3 4-12-6.3-13.6-21.6-4.9-30.3l64.2-64.3v-135.2l-63.9-63.9c-5.7-5.8-7.7-14.7-4-22 6.3-12.2 21.6-13.9 30.4-5.1l69.7 69.8c3.7 3.7 5.6 8.5 5.6 13.4zm-62.2 11.9c3.6 3.7 5.5 8.5 5.5 13.3v41.9h-37.8v-34.2l-38.6-38.3c-5.9-5.8-7.9-14.8-4-22 6.3-12 21.5-13.6 30.3-4.9zm-69.8 16.7c10.4 0 18.7 8.4 18.7 18.7 0 10.4-8.3 18.7-18.7 18.7-10.3 0-18.7-8.3-18.7-18.7 0-10.3 8.4-18.7 18.7-18.7zm0 56.2c10.4 0 18.7 8.3 18.7 18.7 0 10.3-8.3 18.7-18.7 18.7-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.7 18.7-18.7zm37.5 35.3v-34.1h37.8v41.9c0 4.8-1.9 9.6-5.5 13.2l-44.3 43.8c-5.8 5.8-14.8 7.8-22.1 4.1-12.1-6.3-13.8-21.4-5-30.2zm100.2 53.3c3.7-3.7 8.5-5.6 13.3-5.6h150.6c4.9 0 9.7 1.9 13.4 5.6l112.6 112.7c5.8 5.8 7.8 14.7 4 22-6.3 12.2-21.6 13.8-30.4 5l-107.4-107.5h-135l-63.6 63.7c-5.8 5.9-14.9 7.9-22.2 4.1-12.1-6.4-13.7-21.6-4.9-30.3zm26.8 56.6c3.7-3.7 8.5-5.5 13.4-5.5h42.2v37.8h-34.4l-38.6 38.6c-5.9 5.9-14.9 7.9-22.2 4.1-12.1-6.4-13.7-21.6-5-30.4zm34 53.4c10.3 0 18.7 8.4 18.7 18.8 0 10.3-8.4 18.7-18.7 18.7-10.4 0-18.7-8.4-18.7-18.7 0-10.4 8.3-18.8 18.7-18.8zm82.8-58.9c4.8 0 9.7 1.9 13.3 5.5l44.3 44.3c5.7 5.8 7.7 14.7 4 22-6.3 12.2-21.6 13.9-30.4 5.1l-39-39.1h-34.5v-37.8zm-26.7 58.9c10.4 0 18.7 8.4 18.7 18.8 0 10.3-8.3 18.7-18.7 18.7-10.3 0-18.7-8.4-18.7-18.7 0-10.4 8.4-18.8 18.7-18.8z"/>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "qtum-snap",
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"description": "Qtum Wallet is a MetaMask Snap that plays the role of the RPC proxy that accepts requests to the MetaMask and forwards them to the Qtum network with the Qtum ethers adapter.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/qtumproject/qtum-extension-wallet.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "(MIT-0 OR Apache-2.0)",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/**/*",
|
|
12
|
+
"images/**/*",
|
|
13
|
+
"snap.manifest.json",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "yarn clean && node build.js && yarn build:post && yarn bundle:eval && yarn bundle:manifest",
|
|
18
|
+
"build:clean": "yarn clean && yarn build",
|
|
19
|
+
"build:post": "node post-process.js",
|
|
20
|
+
"bundle:eval": "mm-snap eval",
|
|
21
|
+
"bundle:manifest": "mm-snap manifest --fix",
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"generate-ether-types": "typechain --target=ethers-v5 'abis/**/*.json' --out-dir src/types/contracts",
|
|
24
|
+
"lint": "yarn lint:eslint && yarn lint:misc --check",
|
|
25
|
+
"lint:eslint": "eslint . --cache --ext js,ts",
|
|
26
|
+
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
|
|
27
|
+
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path .gitignore",
|
|
28
|
+
"prepublishOnly": "yarn && yarn build",
|
|
29
|
+
"serve": "mm-snap serve",
|
|
30
|
+
"start": "nodemon --watch src/ --ext ts,tsx --exec 'yarn build && yarn serve'",
|
|
31
|
+
"test": "yarn test:wallet --passWithNoTests",
|
|
32
|
+
"test:wallet": "jest --findRelatedTests ./src/tests/wallet.test.ts",
|
|
33
|
+
"typia:generate": "typia generate --input src/typia-templates --output src/typia-generated --project tsconfig.json",
|
|
34
|
+
"preversion": "yarn && yarn build && git add snap.manifest.json"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@distributedlab/tools": "^1.0.0-rc.17",
|
|
38
|
+
"@ethersproject/abstract-provider": "^5.7.0",
|
|
39
|
+
"@ethersproject/abstract-signer": "^5.7.0",
|
|
40
|
+
"@ethersproject/properties": "^5.7.0",
|
|
41
|
+
"@metamask/gas-fee-controller": "^25.0.0",
|
|
42
|
+
"@metamask/key-tree": "^10.1.1",
|
|
43
|
+
"@metamask/metamask-eth-abis": "^3.1.1",
|
|
44
|
+
"@metamask/network-controller": "^25.0.0",
|
|
45
|
+
"@metamask/snaps-jest": "^9.5.1",
|
|
46
|
+
"@metamask/snaps-sdk": "^10.1.0",
|
|
47
|
+
"@metamask/snaps-utils": "^11.6.1",
|
|
48
|
+
"@metamask/transaction-controller": "^61.1.0",
|
|
49
|
+
"@types/react": "^19.2.6",
|
|
50
|
+
"@types/react-dom": "^19.2.3",
|
|
51
|
+
"buffer": "6.0.3",
|
|
52
|
+
"eth-block-tracker": "^8.1.0",
|
|
53
|
+
"ethers": "5.8.0",
|
|
54
|
+
"intl": "1.2.5",
|
|
55
|
+
"key-did-provider-ed25519": "3.0.2",
|
|
56
|
+
"key-did-resolver": "3.0.0",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
58
|
+
"qrcode": "^1.5.4",
|
|
59
|
+
"qtum-ethers-wrapper": "^2.1.2",
|
|
60
|
+
"qtum-snap-connector": "^1.0.0-beta.2",
|
|
61
|
+
"qtumjs-lib": "^0.0.8",
|
|
62
|
+
"setimmediate": "^1.0.5",
|
|
63
|
+
"typia": "4.1.3",
|
|
64
|
+
"uuid": "9.0.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@jest/globals": "29.5.0",
|
|
68
|
+
"@lavamoat/allow-scripts": "2.0.3",
|
|
69
|
+
"@metamask/auto-changelog": "^5.1.0",
|
|
70
|
+
"@metamask/snaps-cli": "^8.3.0",
|
|
71
|
+
"@types/intl": "1.2.0",
|
|
72
|
+
"@types/lodash": "^4.14.202",
|
|
73
|
+
"@types/qrcode": "^1",
|
|
74
|
+
"@types/uuid": "9.0.2",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "5.33.0",
|
|
76
|
+
"@typescript-eslint/parser": "5.33.0",
|
|
77
|
+
"esbuild": "0.17.19",
|
|
78
|
+
"eslint": "^8.27.0",
|
|
79
|
+
"eslint-config-prettier": "^8.5.0",
|
|
80
|
+
"eslint-plugin-import": "^2.27.5",
|
|
81
|
+
"eslint-plugin-jest": "26.8.2",
|
|
82
|
+
"eslint-plugin-jsdoc": "^41.1.2",
|
|
83
|
+
"eslint-plugin-n": "^15.7.0",
|
|
84
|
+
"eslint-plugin-node": "11.1.0",
|
|
85
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
86
|
+
"node-stdlib-browser": "1.2.0",
|
|
87
|
+
"nodemon": "2.0.20",
|
|
88
|
+
"npm-commands": "^1.2.1",
|
|
89
|
+
"prettier": "^2.7.1",
|
|
90
|
+
"rimraf": "3.0.2",
|
|
91
|
+
"typescript": "4.7.4"
|
|
92
|
+
},
|
|
93
|
+
"packageManager": "yarn@3.2.1",
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">=16.0.0"
|
|
96
|
+
},
|
|
97
|
+
"publishConfig": {
|
|
98
|
+
"access": "public"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0-beta.2",
|
|
3
|
+
"description": "Qtum Wallet is a MetaMask Snap that plays the role of the RPC proxy that accepts requests to the MetaMask and forwards them to the Qtum network with the Qtum ethers adapter.",
|
|
4
|
+
"proposedName": "Qtum Wallet",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/qtumproject/qtum-extension-wallet.git"
|
|
8
|
+
},
|
|
9
|
+
"source": {
|
|
10
|
+
"shasum": "m1w6w98Ri3Ijr+AgTkQkBfZkFzcME8w/xlK8slrSUjs=",
|
|
11
|
+
"location": {
|
|
12
|
+
"npm": {
|
|
13
|
+
"filePath": "dist/bundle.js",
|
|
14
|
+
"iconPath": "images/icon.svg",
|
|
15
|
+
"packageName": "qtum-snap",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"initialPermissions": {
|
|
21
|
+
"snap_dialog": {},
|
|
22
|
+
"endowment:rpc": {
|
|
23
|
+
"dapps": true,
|
|
24
|
+
"snaps": true
|
|
25
|
+
},
|
|
26
|
+
"snap_getBip32Entropy": [
|
|
27
|
+
{
|
|
28
|
+
"path": ["m", "44'", "88'"],
|
|
29
|
+
"curve": "secp256k1"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"snap_manageState": {},
|
|
33
|
+
"endowment:network-access": {},
|
|
34
|
+
"endowment:webassembly": {},
|
|
35
|
+
"endowment:ethereum-provider": {},
|
|
36
|
+
"endowment:page-home": {},
|
|
37
|
+
"snap_getEntropy": {}
|
|
38
|
+
},
|
|
39
|
+
"platformVersion": "10.1.0",
|
|
40
|
+
"manifestVersion": "0.1"
|
|
41
|
+
}
|