├── .gitignore
├── README.md
├── config
├── images
│ ├── logo.png
│ ├── logo128.png
│ ├── logo16.png
│ └── logo48.png
└── manifest.json
├── dist
├── 8c314cde6b5bf1a07cb52214af46318f.png
├── bundle.js
├── fonts
│ ├── ionicons.05acfdb.woff
│ ├── ionicons.24712f6.ttf
│ └── ionicons.2c2ae06.eot
├── images
│ ├── logo.png
│ ├── logo128.png
│ ├── logo16.png
│ └── logo48.png
├── img
│ ├── code.768840d.png
│ ├── ionicons.621bd38.svg
│ └── prev.8c314cd.png
├── index.html
├── manifest.json
├── options.html
└── style.css
├── index.html
├── options.html
├── package.json
├── screenshot
├── 1.png
├── 2.png
└── 3.png
├── src
├── api
│ ├── site.js
│ └── walletapi.js
├── css
│ └── index.css
├── data
│ └── info.json
├── img
│ ├── code.png
│ ├── icon4.png
│ └── prev.png
└── js
│ └── index.js
├── webpack.config.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log*
4 | yarn-debug.log*
5 | yarn-error.log*
6 | /test/unit/coverage/
7 | /test/e2e/reports/
8 | selenium-debug.log
9 |
10 | # Editor directories and files
11 | .idea
12 | .vscode
13 | *.suo
14 | *.ntvs*
15 | *.njsproj
16 | *.sln
17 | dist.zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 玩客/链克钱包扩展 LinkTokenPocket-ex
2 | 开源链克口袋,链克转账记录查询, 余额查询,链克交易, Chrome扩展程序
3 |
4 |
5 | ## 关于
6 |
7 | LinkTokenPocket-ex 是一款迅雷玩客币(链克)查询和账户操作的第三方 Chrome扩展程序,现在支持 查询余额,交易,转账,并不保留任何数据,欢迎下载体验,随手 Star 一个,Thanks。
8 |
9 | ## 主要功能
10 |
11 | * 余额交易记录查询
12 | * 上传钱包文件转账
13 | * 更多功能开发中...
14 |
15 | ## 转账IP限制解决
16 | 下载小飞机 shadowsocks 开全局模式 即可完成转账[ss账号分享](https://github.com/ssstk/freess)
17 |
18 | ## 截图
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ## 如何开发
28 |
29 | * 安装依赖
30 | > yarn
31 |
32 | * 开始开发
33 | > yarn dev
34 |
35 | `主要作用就是合并压缩代码,质疑代码和市场版本不一致,请先自行打包一下再对比`
36 |
37 |
38 | ## 协议
39 |
40 | LinkTokenPocket-ex 并非一个开源软件,作者保留全部的权利。
41 | 公开源代码的目的是为了让使用者能够审计代码,但是你仍然可以就以下方式合法的使用本项目的全部代码和资源:
42 |
43 | 1. 个人使用
44 | 2. 以学习目的使用全部或部分代码
45 |
46 | 但你不可以:
47 |
48 | 1. 将本项目的部分或全部代码和资源进行任何形式的再发行(尤其是上传到 Chrome 商店)
49 | 2. 利用本项目的部分或全部代码和资源进行任何商业行为
50 |
51 | ## 贡献代码
52 |
53 | LinkTokenPocket-ex 并非一个开源项目,也不是社区共同创造,其全部功能由作者独立完成。
54 |
55 | 如果你愿意放弃所有权利,并将权利无条件转让给京价保作者,欢迎您贡献代码。
56 |
57 | ## 提交反馈
58 |
59 | 欢迎提交 issue,请写清楚遇到问题的原因,浏览器和操作系统环境,重现的流程。
60 | 如果有开发能力,建议在本地调试出出错的代码。
61 |
62 | 不接受功能请求的 issue,功能请求可能会被直接关闭,请谅解。
63 |
64 | 若有功能建议或其他非技术反馈,请发送邮件或使用应用内反馈,由于不设客服人员,反馈将默认不回复。
65 |
66 | ## 联系作者
67 |
68 | 请发邮件至:`sstzma@gmail.com`
69 |
70 |
71 |
--------------------------------------------------------------------------------
/config/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/config/images/logo.png
--------------------------------------------------------------------------------
/config/images/logo128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/config/images/logo128.png
--------------------------------------------------------------------------------
/config/images/logo16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/config/images/logo16.png
--------------------------------------------------------------------------------
/config/images/logo48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/config/images/logo48.png
--------------------------------------------------------------------------------
/config/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "LinkTokenPocket",
4 | "description": "开源链克口袋,链克转账记录查询, 余额查询,链克交易,Chrome扩展程序",
5 | "icons":
6 | {
7 | "16": "images/logo16.png",
8 | "48": "images/logo48.png",
9 | "128": "images/logo128.png"
10 | },
11 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
12 |
13 |
14 | "options_page": "options.html",
15 |
16 | "version": "0.2.3",
17 | "browser_action": {
18 | "default_icon": "images/logo.png",
19 | "default_title": "链克口袋,LinkToken",
20 | "default_popup": "index.html"
21 | },
22 | "permissions": [
23 | "https://walletapi.onethingpcs.com/",
24 | "tabs",
25 | "activeTab",
26 | "webRequest",
27 | "webRequestBlocking",
28 | "notifications",
29 | "storage"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/dist/8c314cde6b5bf1a07cb52214af46318f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/8c314cde6b5bf1a07cb52214af46318f.png
--------------------------------------------------------------------------------
/dist/fonts/ionicons.05acfdb.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/fonts/ionicons.05acfdb.woff
--------------------------------------------------------------------------------
/dist/fonts/ionicons.24712f6.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/fonts/ionicons.24712f6.ttf
--------------------------------------------------------------------------------
/dist/fonts/ionicons.2c2ae06.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/fonts/ionicons.2c2ae06.eot
--------------------------------------------------------------------------------
/dist/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/images/logo.png
--------------------------------------------------------------------------------
/dist/images/logo128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/images/logo128.png
--------------------------------------------------------------------------------
/dist/images/logo16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/images/logo16.png
--------------------------------------------------------------------------------
/dist/images/logo48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/images/logo48.png
--------------------------------------------------------------------------------
/dist/img/code.768840d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/img/code.768840d.png
--------------------------------------------------------------------------------
/dist/img/prev.8c314cd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/dist/img/prev.8c314cd.png
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
链克转账
17 |
18 |
19 |
20 |
21 |
链克查询
22 |
23 |
24 |
25 |
26 |
27 |
28 |
大爷好用就打赏一下 😄
29 |
32 |
链克钱包地址:0x5baff36f8a9205d6aac876c62025bb8b2dc3c785
33 |
34 |
35 |
36 |
113 |
114 |
115 |
136 |
137 |
138 |
139 |
221 |
222 |
--------------------------------------------------------------------------------
/dist/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "manifest_version": 2,
3 | "name": "LinkTokenPocket",
4 | "description": "开源链克口袋,链克转账记录查询, 余额查询,链克交易,Chrome扩展程序",
5 | "icons":
6 | {
7 | "16": "images/logo16.png",
8 | "48": "images/logo48.png",
9 | "128": "images/logo128.png"
10 | },
11 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
12 |
13 |
14 | "options_page": "options.html",
15 |
16 | "version": "0.2.2",
17 | "browser_action": {
18 | "default_icon": "images/logo.png",
19 | "default_title": "链克口袋,LinkToken",
20 | "default_popup": "index.html"
21 | },
22 | "permissions": [
23 | "https://walletapi.onethingpcs.com/",
24 | "tabs",
25 | "activeTab",
26 | "webRequest",
27 | "webRequestBlocking",
28 | "notifications",
29 | "storage"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/dist/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | My Test Extension Options
4 |
5 |
6 | Favorite color:
7 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
56 |
57 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
链克转账
17 |
18 |
19 |
20 |
21 |
链克查询
22 |
23 |
24 |
25 |
26 |
27 |
28 |
大爷好用就打赏一下 😄
29 |
32 |
链克钱包地址:0x5baff36f8a9205d6aac876c62025bb8b2dc3c785
33 |
34 |
35 |
36 |
113 |
114 |
115 |
136 |
137 |
138 |
139 |
221 |
222 |
--------------------------------------------------------------------------------
/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | My Test Extension Options
4 |
5 |
6 | Favorite color:
7 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
56 |
57 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "trainname",
3 | "version": "1.0.0",
4 | "description": "开源链克口袋,链克转账记录查询, 余额查询,链克交易,Chrome扩展程序",
5 | "author": "sstizim@gmail.com",
6 | "main": "index.js",
7 | "scripts": {
8 | "build": "webpack -p",
9 | "dev": "webpack --watch"
10 | },
11 | "author": "",
12 | "license": "ISC",
13 | "devDependencies": {
14 | "babel": "^6.23.0",
15 | "babel-core": "^6.24.1",
16 | "babel-loader": "^7.0.0",
17 | "babel-preset-es2015": "^6.24.1",
18 | "clipboard": "^1.7.1",
19 | "css-loader": "^0.28.2",
20 | "extract-text-webpack-plugin": "^2.1.0",
21 | "file-loader": "^0.11.1",
22 | "showdown": "^1.7.1",
23 | "style-loader": "^0.18.0",
24 | "url-loader": "^0.5.8",
25 | "vue": "^2.3.3",
26 | "webpack": "^2.5.1"
27 | },
28 | "dependencies": {
29 | "axios": "^0.18.0",
30 | "copy-webpack-plugin": "^4.5.1",
31 | "ethereumjs-tx": "^1.3.4",
32 | "ethereumjs-wallet": "^0.6.0",
33 | "html-webpack-plugin": "^3.2.0",
34 | "iview": "^2.13.1",
35 | "moment": "^2.22.1",
36 | "qs": "^6.5.1",
37 | "web3": "^1.0.0-beta.34"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/screenshot/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/screenshot/1.png
--------------------------------------------------------------------------------
/screenshot/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/screenshot/2.png
--------------------------------------------------------------------------------
/screenshot/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/screenshot/3.png
--------------------------------------------------------------------------------
/src/api/site.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: MR.Wang
3 | * @Date: 2017-06-12 18:14:00
4 | * @Last Modified by: mr.wang
5 | * @Last Modified time: 2017-06-20 16:45:52
6 | */
7 |
8 | 'use strict'
9 |
10 | export const errorCode = {
11 | "-3001": {
12 | "CN": "订单错误,重新发起",
13 | "EN": "Order error, reissue"
14 | },
15 | "-3002": {
16 | "CN": "订单错误,重新发起",
17 | "EN": "Order error, reissue"
18 | },
19 | "-3003": {
20 | "CN": "密码错误,请重新输入",
21 | "EN": "Wrong password, please reenter"
22 | },
23 | "-3004": {
24 | "CN": "兑换失败",
25 | "EN": "Exchange failed"
26 | },
27 | "-3005": {
28 | "CN": "当前有一笔订单未完成,请稍后再发起",
29 | "EN": "Now an order pending, please reissue later"
30 | },
31 | "-3006": {
32 | "CN": "账户错误,请重新输入",
33 | "EN": "Account error, please reenter"
34 | },
35 | "-3007": {
36 | "CN": "账户错误,请重新输入",
37 | "EN": "Account error, please reenter"
38 | },
39 | "-3008": {
40 | "CN": "请输入有效的账户账号",
41 | "EN": "Please enter effective account number"
42 | },
43 | "-3009": {
44 | "CN": "请输入有效的账户账号",
45 | "EN": "Please enter effective account number"
46 | },
47 | "-3010": {
48 | "CN": "网络异常,请稍后再试",
49 | "EN": "Network is abnormal, please try again later"
50 | },
51 | "-3011": {
52 | "CN": "网络异常,请稍后再试",
53 | "EN": "Network is abnormal, please try again later"
54 | },
55 | "-3012": {
56 | "CN": "账户余额不足",
57 | "EN": "Insufficient account balance"
58 | },
59 | "-3013": {
60 | "CN": "该笔订单已发起,请勿重复操作",
61 | "EN": "This order has been issued, do not repeat"
62 | },
63 | "-3014": {
64 | "CN": "网络异常,请稍后再试",
65 | "EN": "Network is abnormal, please try again later"
66 | },
67 | "-3015": {
68 | "CN": "网络异常,请稍后再试",
69 | "EN": "Network is abnormal, please try again later"
70 | },
71 | "-3016": {
72 | "CN": "签名校验错误",
73 | "EN": "Signature verification error"
74 | },
75 | "-3017": {
76 | "CN": "订单异常,请检查",
77 | "EN": "Order is abnormal, please check"
78 | },
79 | "-3018": {
80 | "CN": "频繁操作,请稍后再试",
81 | "EN": "Frequent operation, please try again later"
82 | },
83 | "-3019": {
84 | "CN": "频繁操作,请稍后再试",
85 | "EN": "Frequent operation, please try again later"
86 | },
87 | "-3020": {
88 | "CN": "账户错误,请重新输入",
89 | "EN": "Account error, please reenter"
90 | },
91 | "-3021": {
92 | "CN": "网络异常,请稍后再试",
93 | "EN": "Network is abnormal, please try again later"
94 | },
95 | "-3022": {
96 | "CN": "该笔订单已发起,请勿重复操作",
97 | "EN": "This order has been issued, do not repeat"
98 | },
99 | "-3023": {
100 | "CN": "订单异常,请检查",
101 | "EN": "Order is abnormal, please check"
102 | },
103 | "-3024": {
104 | "CN": "订单异常,请检查",
105 | "EN": "Order is abnormal, please check"
106 | },
107 | "-3025": {
108 | "CN": "订单异常,请检查",
109 | "EN": "Order is abnormal, please check"
110 | },
111 | "-3026": {
112 | "CN": "订单异常,请检查",
113 | "EN": "Order is abnormal, please check"
114 | },
115 | "-3027": {
116 | "CN": "订单异常,请检查",
117 | "EN": "Order is abnormal, please check"
118 | },
119 | "-3028": {
120 | "CN": "根据国家相关规定,链克口袋账户都须实名认证",
121 | "EN": "According to the related regulations of the country, LinkToken pocket account needs real name authentication"
122 | },
123 | "-3029": {
124 | "CN": "请输入有效的账户账号",
125 | "EN": "Please enter effective account number"
126 | },
127 | "-3030": {
128 | "CN": "请输入有效的账户账号",
129 | "EN": "Please enter effective account number"
130 | },
131 | "-3031": {
132 | "CN": "请输入有效的账户账号",
133 | "EN": "Please enter effective account number"
134 | },
135 | "-3032": {
136 | "CN": "响应国家相关规定,中国内地用户无法使用该版本进行转账",
137 | "EN": "According to the relevant state regulations, mainland users can not use this version for transfer"
138 | },
139 | "-3033": {
140 | "CN": "响应国家相关规定,中国内地用户无法使用该版本进行转账",
141 | "EN": "According to the relevant state regulations, mainland users can not use this version for transfer"
142 | },
143 | "-3034": {
144 | "CN": "订单异常,请检查",
145 | "EN": "Order is abnormal, please check"
146 | },
147 | "-3035": {
148 | "CN": "网络异常,请稍后再试",
149 | "EN": "Network is abnormal, please try again later"
150 | },
151 | "-3036": {
152 | "CN": "网络异常,请稍后再试",
153 | "EN": "Network is abnormal, please try again later"
154 | },
155 | "-3037": {
156 | "CN": "网络异常,请稍后再试",
157 | "EN": "Network is abnormal, please try again later"
158 | },
159 | "-3038": {
160 | "CN": "网络异常,请稍后再试",
161 | "EN": "Network is abnormal, please try again later"
162 | },
163 | "-3039": {
164 | "CN": "订单异常,请检查",
165 | "EN": "Order is abnormal, please check"
166 | },
167 | "-3040": {
168 | "CN": "订单异常,请检查",
169 | "EN": "Order is abnormal, please check"
170 | },
171 | "-3041": {
172 | "CN": "请输入有效的账户账号",
173 | "EN": "Please enter effective account number"
174 | },
175 | "-3042": {
176 | "CN": "请输入有效的账户账号",
177 | "EN": "Please enter effective account number"
178 | },
179 | "-32000": {
180 | "CN": "网络异常,请稍后再试",
181 | "EN": "Network is abnormal, please try again later"
182 | },
183 | "-32600": {
184 | "CN": "订单异常,请检查",
185 | "EN": "Order is abnormal, please check"
186 | },
187 | "-32601": {
188 | "CN": "订单异常,请检查",
189 | "EN": "Order is abnormal, please check"
190 | },
191 | "-32602": {
192 | "CN": "订单错误,重新发起",
193 | "EN": "Order error, reissue"
194 | },
195 | "-32700": {
196 | "CN": "订单错误,重新发起",
197 | "EN": "Order error, reissue"
198 | },
199 | "-2000": {
200 | "CN": "订单异常,请检查",
201 | "EN": "Order is abnormal, please check"
202 | },
203 | "-2001": {
204 | "CN": "网络异常,请稍后再试",
205 | "EN": "Network is abnormal, please try again later"
206 | },
207 | "-2002": {
208 | "CN": "网络异常,请稍后再试",
209 | "EN": "Network is abnormal, please try again later"
210 | },
211 | "-2003": {
212 | "CN": "订单异常,请检查",
213 | "EN": "Order is abnormal, please check"
214 | },
215 | "-2004": {
216 | "CN": "订单异常,请检查",
217 | "EN": "Order is abnormal, please check"
218 | },
219 | "-2005": {
220 | "CN": "订单异常,请检查",
221 | "EN": "Order is abnormal, please check"
222 | },
223 | "-2006": {
224 | "CN": "密码错误,请重新输入",
225 | "EN": "Wrong password, please reenter"
226 | },
227 | "-2007": {
228 | "CN": "请输入有效的账户账号",
229 | "EN": "Please enter effective account number"
230 | },
231 | "-2999": {
232 | "CN": "订单异常,请检查",
233 | "EN": "Order is abnormal, please check"
234 | }
235 | }
--------------------------------------------------------------------------------
/src/api/walletapi.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: MrWang
3 | * @Date: 2018-04-28 12:11:31
4 | * @Last Modified by: mr.wang
5 | * @Last Modified time: 2018-04-28 12:11:31
6 | */
7 |
8 | 'use strict'
9 | import axios from 'axios'
10 | import EthereumTx from 'ethereumjs-tx'
11 | import Wallet from 'ethereumjs-wallet'
12 | import Qs from 'qs'
13 | import moment from 'moment'
14 | import Web3 from 'web3'
15 |
16 | const web3 = new Web3()
17 | const url = 'https://walletapi.onethingpcs.com'
18 | const type = { '0': '减少', '1': '增加' }
19 |
20 | export function getBalance(address) {
21 | return axios({
22 | method: 'POST',
23 | headers: { 'content-type': 'application/json' },
24 | data: {
25 | "jsonrpc": "2.0",
26 | "method": "eth_getBalance",
27 | "params": [address, "latest"],
28 | "id": 1
29 | },
30 | url: url + '/getBalance'
31 | }).then(res => {
32 | res.data.result = web3.utils.fromWei(res.data.result, 'ether')
33 | return Promise.resolve(res.data)
34 | })
35 | }
36 |
37 | export function getTransactionCount(address) {
38 | return axios({
39 | method: 'POST',
40 | headers: { 'content-type': 'application/json' },
41 | data: {
42 | "jsonrpc": "2.0",
43 | "method": "eth_getTransactionCount",
44 | "params": [address, "pending"],
45 | "id": 1
46 | },
47 | url: url + '/getTransactionCount'
48 | }).then(res => {
49 | res.data.result = parseInt(res.data.result, 16)
50 | return Promise.resolve(res.data)
51 | })
52 | }
53 |
54 | export function getTransactionRecords(address) {
55 | let data = [address, "0", "0", "1", "20"]
56 | const dateFormat = 'YYYY-MM-DD HH:mm:ss'
57 | return axios({
58 | method: 'POST',
59 | headers: { 'content-type': 'application/json' },
60 | data: data,
61 | url: url + '/getTransactionRecords'
62 | }).then(res => {
63 | let data = []
64 | res.data.result.map(item => {
65 | let typename = type[item.type]
66 | let amount = web3.utils.fromWei(item.amount, 'ether')
67 | let timestamp = moment(item.timestamp * 1000).format('YYYY-MM-DD HH:mm:ss')
68 | item = Object.assign({}, item, {
69 | amount: amount,
70 | timestamp: timestamp,
71 | type: typename
72 | })
73 | data.push(item)
74 | })
75 | res.data.result = data
76 | return Promise.resolve(res.data)
77 | })
78 | }
79 |
80 | export function sendRawTransaction(params) {
81 | const keystore = params.walletaddress
82 | const password = params.password
83 | const to_address = params.to_address
84 |
85 |
86 |
87 | try {
88 | const wallet_new = Wallet.fromV3(keystore, password)
89 | const address = `0x${wallet_new.getAddress().toString('hex')}`;
90 |
91 | return axios({
92 | method: 'POST',
93 | headers: { 'content-type': 'application/json' },
94 | data: {
95 | "jsonrpc": "2.0",
96 | "method": "eth_getTransactionCount",
97 | "params": [address, "pending"],
98 | "id": 1
99 | },
100 | url: url + '/getTransactionCount'
101 | }).then(res => {
102 | const txParams = {
103 | from: address,
104 | to: to_address,
105 | value: web3.utils.toHex(web3.utils.toWei(params.value)),
106 | gasLimit: '0x186a0',
107 | gasPrice: '0x174876e800',
108 | nonce: res.data.result,
109 | };
110 | const tx = new EthereumTx(txParams)
111 | tx.sign(wallet_new.getPrivateKey())
112 |
113 | const serializedTx = tx.serialize()
114 |
115 | const raw = `0x${serializedTx.toString('hex')}`
116 |
117 | return axios({
118 | method: 'POST',
119 | headers: { 'content-type': 'application/json', "Nc": "IN" },
120 | data: JSON.stringify({
121 | "jsonrpc": "2.0",
122 | "method": "eth_sendRawTransaction",
123 | "params": [raw],
124 | "id": 1
125 | }),
126 | url: url + '/sendRawTransaction'
127 | }).then(res => {
128 | return Promise.resolve(res.data)
129 | })
130 |
131 |
132 | })
133 |
134 | } catch (err) {
135 | let result = {
136 | error: {
137 | code : -3003
138 | }
139 | }
140 | return Promise.resolve(result)
141 | }
142 |
143 | }
--------------------------------------------------------------------------------
/src/css/index.css:
--------------------------------------------------------------------------------
1 | /**{
2 | margin: 0;
3 | padding: 0;
4 | }*/
5 | #app{
6 | width: 480px;
7 | overflow: hidden;
8 | position: relative;
9 | }
10 |
11 | #app .header{
12 | height: 50px;
13 | line-height: 50px;
14 | font-size: 16px;
15 | color: #fff;
16 | text-align: center;
17 | background-color: #879FA0;
18 | background: -moz-linear-gradient(left, #4FC08D 0, #086CAF 100%);
19 | background: -webkit-linear-gradient(left, #4FC08D 0, #086CAF 100%);
20 | background: -o-linear-gradient(left, #4FC08D 0, #086CAF 100%);
21 | background: -ms-linear-gradient(left, #4FC08D 0, #086CAF 100%);
22 | background: linear-gradient(to left, #4FC08D 0, #086CAF 100%);
23 | }
24 | .ub {
25 | display: -webkit-box;
26 | display: -ms-flexbox;
27 | display: flex
28 | }
29 |
30 | .ub-f1 {
31 | -webkit-box-flex: 1;
32 | -ms-flex: 1;
33 | flex: 1
34 | }
35 |
36 | .flex-end {
37 | -webkit-box-align: end;
38 | -ms-flex-align: end;
39 | align-items: flex-end
40 | }
41 |
42 | .align-items {
43 | -webkit-box-align: center;
44 | -ms-flex-align: center;
45 | align-items: center
46 | }
47 |
48 | .justify-content {
49 | -webkit-box-pack: center;
50 | -ms-flex-pack: center;
51 | justify-content: center
52 | }
53 | .flex-column {
54 | -webkit-box-orient: vertical;
55 | -webkit-box-direction: normal;
56 | -ms-flex-direction: column;
57 | flex-direction: column
58 | }
59 | .flex-wrap {
60 | -ms-flex-wrap: wrap;
61 | flex-wrap: wrap
62 | }
63 | .nowrap {
64 | white-space: nowrap
65 | }
66 | .normal {
67 | word-wrap: break-word;
68 | word-break: normal
69 | }
70 |
71 | .code-img{
72 | background-image: url(../img/code.png);
73 | width: 120px;
74 | height: 120px;
75 | background-size: contain;
76 | background-repeat: no-repeat;
77 | }
--------------------------------------------------------------------------------
/src/data/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "bounce": "@keyframes bounce { gs sp from, 20%, 53%, 80%, to {gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp2 transform: translate3d(0,0,0); gs sp } gs sp 40%, 43% { gs sp2 animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);gs sp2 transform: translate3d(0, -30px, 0);gs sp } gs sp 70% {gs sp2 animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);gs sp2 transform: translate3d(0, -15px, 0);gs sp } gs sp 90% { gs sp transform: translate3d(0,-4px,0);}gs}gs",
3 | "flash": "@keyframes flash { gs sp from, 50%, to { gs sp2 opacity: 1;gs sp }gs sp 25%, 75% { gs sp2 opacity: 0;gs sp } gs } gs",
4 | "pulse": "@keyframes pulse { gs sp from { gs sp2 transform: scale3d(1, 1, 1);gs sp } gs sp 50% { gs sp2 transform: scale3d(1.05, 1.05, 1.05); gs sp } gs sp to { gs sp2 transform: scale3d(1, 1, 1); gs sp } gs } gs",
5 | "rubberBand": "@keyframes rubberBand { gs sp from { gs sp2 transform: scale3d(1, 1, 1); gs sp } gs sp 30% { gs sp2 transform: scale3d(1.25, 0.75, 1); gs sp } gs sp 40% { gs sp2 transform: scale3d(0.75, 1.25, 1); gs sp } gs sp 50% { gs sp2 transform: scale3d(1.15, 0.85, 1); gs sp } gs sp 65% { gs sp2 transform: scale3d(.95, 1.05, 1); gs sp } gs sp 75% { gs sp2 transform: scale3d(1.05, .95, 1); gs sp } gs sp to { gs sp2 transform: scale3d(1, 1, 1); gs sp } gs } gs",
6 | "shake": "@keyframes shake { gs sp from, to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs sp 10%, 30%, 50%, 70%, 90% { gs sp2 transform: translate3d(-10px, 0, 0); gs sp } gs sp 20%, 40%, 60%, 80% { gs sp2 transform: translate3d(10px, 0, 0); gs sp } gs } gs",
7 | "headShake": "@keyframes headShake { gs sp 0% { gs sp2 transform: translateX(0); gs sp } gs sp 6.5% { gs sp2 transform: translateX(-6px) rotateY(-9deg); gs sp } gs sp 18.5% { gs sp2 transform: translateX(5px) rotateY(7deg); gs sp } gs sp 31.5% { gs sp2 transform: translateX(-3px) rotateY(-5deg); gs sp } gs sp 43.5% { gs sp2 transform: translateX(2px) rotateY(3deg); gs sp } gs sp 50% { gs sp2 transform: translateX(0); gs sp } gs } gs",
8 | "swing": "@keyframes swing { gs sp 20% { gs sp2 transform: rotate3d(0, 0, 1, 15deg); gs sp } gs sp 40% { gs sp2 transform: rotate3d(0, 0, 1, -10deg); gs sp } gs sp 60% { gs sp2 transform: rotate3d(0, 0, 1, 5deg); gs sp } gs sp 80% { gs sp2 transform: rotate3d(0, 0, 1, -5deg); gs sp } gs sp to { gs sp2 transform: rotate3d(0, 0, 1, 0deg); gs sp } gs } gs",
9 | "tada": "@keyframes tada { gs sp from { gs sp2 transform: scale3d(1, 1, 1); gs sp } gs sp 10%, 20% { gs sp2 transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); gs sp } gs sp 30%, 50%, 70%, 90% { gs sp2 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); gs sp } gs sp 40%, 60%, 80% { gs sp2 transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); gs sp } gs sp to { gs sp2 transform: scale3d(1, 1, 1); gs sp } gs } gs",
10 | "wobble": "@keyframes wobble { gs sp from { gs sp2 transform: none; gs sp } gs sp 15% { gs sp transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); gs sp } gs sp 30% { gs sp2 transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); gs sp } gs sp 45% { gs sp2 transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); gs sp } gs sp 60% { gs sp2 transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); gs sp } gs sp 75% { gs sp2 transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); gs sp } gs sp to { gs sp2 transform: none; gs sp } gs } gs",
11 | "jello": "@keyframes jello { gs sp from, 11.1%, to { gs sp2 transform: none; gs sp } gs sp 22.2% { gs sp2 transform: skewX(-12.5deg) skewY(-12.5deg); gs sp } gs sp 33.3% { gs sp2 transform: skewX(6.25deg) skewY(6.25deg); gs sp } gs sp 44.4% { gs sp2 transform: skewX(-3.125deg) skewY(-3.125deg); gs sp } gs sp 55.5% { gs sp2 transform: skewX(1.5625deg) skewY(1.5625deg); gs sp } gs sp 66.6% { gs sp2 transform: skewX(-0.78125deg) skewY(-0.78125deg); gs sp } gs sp 77.7% { gs sp2 transform: skewX(0.390625deg) skewY(0.390625deg); gs sp } gs } gs",
12 | "bounceIn":"@keyframes bounceIn { gs sp from, 20%, 40%, 60%, 80%, to { gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp } gs sp 0% { gs sp2 opacity: 0; gs sp2 transform: scale3d(.3, .3, .3); gs sp } gs sp 20% { gs sp2 transform: scale3d(1.1, 1.1, 1.1); gs sp } gs sp 40% { gs sp2 transform: scale3d(.9, .9, .9); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: scale3d(1.03, 1.03, 1.03); gs sp } gs sp 80% { gs sp2 transform: scale3d(.97, .97, .97); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: scale3d(1, 1, 1); gs sp } gs } gs",
13 | "bounceInDown": "@keyframes bounceInDown { gs sp from, 60%, 75%, 90%, to { gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp } gs sp 0% { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -3000px, 0); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: translate3d(0, 25px, 0); gs sp } gs sp 75% { gs sp2 transform: translate3d(0, -10px, 0); gs sp } gs sp 90% { gs sp2 transform: translate3d(0, 5px, 0); gs sp } gs sp to { gs sp2 transform: none; gs sp } gs } gs",
14 | "bounceInLeft": "@keyframes bounceInLeft { gs sp from, 60%, 75%, 90%, to { gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp } gs sp 0% { gs sp2 opacity: 0; gs sp2 transform: translate3d(-3000px, 0, 0); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: translate3d(25px, 0, 0); gs sp2 } gs sp 75% { gs sp2 transform: translate3d(-10px, 0, 0); gs sp2 } gs sp 90% { gs sp2 transform: translate3d(5px, 0, 0); gs sp2 } gs sp to { gs sp2 transform: none; gs sp } gs } gs",
15 | "bounceInRight": "@keyframes bounceInRight { gs sp from, 60%, 75%, 90%, to { gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp } gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(3000px, 0, 0); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: translate3d(-25px, 0, 0); gs sp } gs sp 75% { gs sp2 transform: translate3d(10px, 0, 0); gs sp } gs sp 90% { gs sp2 transform: translate3d(-5px, 0, 0); gs sp } gs sp to { gs sp2 transform: none; gs sp } gs } gs",
16 | "bounceInUp": "@keyframes bounceInUp { gs sp from, 60%, 75%, 90%, to { gs sp2 animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); gs sp } gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, 3000px, 0); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: translate3d(0, -20px, 0); gs sp } gs sp 75% { gs sp2 transform: translate3d(0, 10px, 0); gs sp } gs sp 90% { gs sp2 transform: translate3d(0, -5px, 0); gs sp} gs sp to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs } gs",
17 | "bounceOut": "@keyframes bounceOut { gs sp 20% { gs sp2 transform: scale3d(.9, .9, .9); gs sp } gs sp 50%, 55% { gs sp2 opacity: 1; gs sp2 transform: scale3d(1.1, 1.1, 1.1); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: scale3d(.3, .3, .3); gs sp } gs } gs",
18 | "bounceOutDown": "@keyframes bounceOutDown { gs sp 20% { gs sp2 transform: translate3d(0, 10px, 0); gs sp } gs sp 40%, 45% { gs sp2 opacity: 1; gs sp2 transform: translate3d(0, -20px, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, 200%, 0); gs sp } gs } gs",
19 | "bounceOutLeft": "@keyframes bounceOutLeft { gs sp 20% { gs sp2 opacity: 1; gs sp2 transform: translate3d(20px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(-2000px, 0, 0); gs sp } gs } gs",
20 | "bounceOutRight": "@keyframes bounceOutRight { gs sp 20% { gs sp2 opacity: 1; gs sp2 transform: translate3d(-20px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(2000px, 0, 0); gs sp } gs } gs",
21 | "bounceOutUp": "@keyframes bounceOutUp { gs sp 20% { gs sp2 transform: translate3d(0, -10px, 0); gs sp } gs sp 40%, 45% { gs sp2 opacity: 1; gs sp2 transform: translate3d(0, 20px, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -2000px, 0); gs sp } gs } gs",
22 | "fadeIn": "@keyframes fadeIn { gs sp from { gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 opacity: 1; gs sp } gs } gs",
23 | "fadeInDown": "@keyframes fadeInDown { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -100%, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
24 | "fadeInDownBig": "@keyframes fadeInDownBig { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -2000px, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
25 | "fadeInLeft": "@keyframes fadeInLeft { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(-100%, 0, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
26 | "fadeInLeftBig": "@keyframes fadeInLeftBig { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(-2000px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
27 | "fadeInRight": "@keyframes fadeInRight { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(100%, 0, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
28 | "fadeInRightBig": "@keyframes fadeInRightBig { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(2000px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
29 | "fadeInUp": "@keyframes fadeInUp { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, 100%, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
30 | "fadeInUpBig": "@keyframes fadeInUpBig { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, 2000px, 0); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
31 | "fadeOut": "@keyframes fadeOut { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp } gs } gs",
32 | "fadeOutDown": "@keyframes fadeOutDown { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp transform: translate3d(0, 100%, 0); gs sp } gs } gs",
33 | "fadeOutDownBig": "@keyframes fadeOutDownBig { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, 2000px, 0); gs sp } gs } gs",
34 | "fadeOutLeft": "@keyframes fadeOutLeft { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(-100%, 0, 0); gs sp } gs } gs",
35 | "fadeOutLeftBig": "@keyframes fadeOutLeftBig { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(-2000px, 0, 0); gs sp } gs } gs",
36 | "fadeOutRight": "@keyframes fadeOutRight { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(100%, 0, 0); gs sp } gs } gs",
37 | "fadeOutRightBig": "@keyframes fadeOutRightBig { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(2000px, 0, 0); gs sp } gs } gs",
38 | "fadeOutUp": "@keyframes fadeOutUp { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -100%, 0); gs sp } gs } gs",
39 | "fadeOutUpBig": "@keyframes fadeOutUpBig { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(0, -2000px, 0); gs sp } gs } gs",
40 | "flip":"@keyframes flip { gs sp from { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, -360deg); gs sp2 animation-timing-function: ease-out; gs sp } gs sp 40% { gs sp2 transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); gs sp2 animation-timing-function: ease-out; gs sp } gs sp 50% { gs sp2 transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); gs sp2 animation-timing-function: ease-in; gs sp } gs sp 80% { gs sp2 transform: perspective(400px) scale3d(.95, .95, .95); gs sp2 animation-timing-function: ease-in; gs sp } gs sp to { gs sp2 transform: perspective(400px); gs sp2 animation-timing-function: ease-in; gs sp } gs } gs",
41 | "flipInX": "@keyframes flipInX { gs sp from { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, 90deg); gs sp2 animation-timing-function: ease-in; gs sp2 opacity: 0; gs sp } gs sp 40% { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, -20deg); gs sp2 animation-timing-function: ease-in; gs sp 60% { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, 10deg); gs sp2 opacity: 1; gs sp } gs sp 80% { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, -5deg); gs sp } gs sp to { gs sp2 transform: perspective(400px); gs sp } gs } gs",
42 | "flipInY": "@keyframes flipInY { gs sp from { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, 90deg); gs sp2 animation-timing-function: ease-in; gs sp2 opacity: 0; gs sp } gs sp 40% { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, -20deg); gs sp2 animation-timing-function: ease-in; gs sp } gs sp 60% { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, 10deg); gs sp2 opacity: 1; gs sp } gs sp 80% { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, -5deg); gs sp } gs sp to { gs sp2 transform: perspective(400px); gs sp } gs } gs",
43 | "flipOutX": "@keyframes flipOutX { gs sp from { gs sp2 transform: perspective(400px); gs sp } gs sp 30% { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, -20deg); gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform: perspective(400px) rotate3d(1, 0, 0, 90deg); gs sp2 opacity: 0; gs sp } gs } gs",
44 | "flipOutY": "@keyframes flipOutY { gs sp from { gs sp2 transform: perspective(400px); gs sp } gs sp 30% { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, -15deg); gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform: perspective(400px) rotate3d(0, 1, 0, 90deg); gs sp2 opacity: 0; gs sp } gs } gs",
45 | "lightSpeedIn": "@keyframes lightSpeedIn { gs sp from { gs sp2 transform: translate3d(100%, 0, 0) skewX(-30deg); gs sp2 opacity: 0; gs sp } gs sp 60% { gs sp2 transform: skewX(20deg); gs sp2 opacity: 1; gs sp } gs sp 80% { gs sp2 transform: skewX(-5deg); gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
46 | "lightSpeedOut": "@keyframes lightSpeedOut { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform: translate3d(100%, 0, 0) skewX(30deg); gs sp2 opacity: 0; gs sp } gs } gs",
47 | "rotateIn": "@keyframes rotateIn { gs sp from { gs sp2 transform-origin: center; gs sp2 transform: rotate3d(0, 0, 1, -200deg); gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 transform-origin: center; gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
48 | "rotateInDownLeft": "@keyframes rotateInDownLeft { gs sp from { gs sp2 transform-origin: left bottom; gs sp2 transform: rotate3d(0, 0, 1, -45deg); gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 transform-origin: left bottom; gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
49 | "rotateInDownRight": "@keyframes rotateInDownRight { gs sp from { gs sp2 transform-origin: right bottom; gs sp2 transform: rotate3d(0, 0, 1, 45deg); gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 transform-origin: right bottom; gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
50 | "rotateInUpLeft": "@keyframes rotateInUpLeft { gs sp from { gs sp2 transform-origin: left bottom; gs sp2 transform: rotate3d(0, 0, 1, 45deg); gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 transform-origin: left bottom; gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
51 | "rotateInUpRight": "@keyframes rotateInUpRight { gs sp from { gs sp2 transform-origin: right bottom; gs sp2 transform: rotate3d(0, 0, 1, -90deg); gs sp2 opacity: 0; gs sp } gs sp to { gs sp2 transform-origin: right bottom; gs sp2 transform: none; gs sp2 opacity: 1; gs sp } gs } gs",
52 | "rotateOut": "@keyframes rotateOut { gs sp from { gs sp2 transform-origin: center; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform-origin: center; gs sp2 transform: rotate3d(0, 0, 1, 200deg); gs sp2 opacity: 0; gs sp } gs } gs",
53 | "rotateOutDownLeft": "@keyframes rotateOutDownLeft { gs sp from { gs sp2 transform-origin: left bottom; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform-origin: left bottom; gs sp2 transform: rotate3d(0, 0, 1, 45deg); gs sp2 opacity: 0; gs sp } gs } gs",
54 | "rotateOutDownRight": "@keyframes rotateOutDownRight { gs sp from { gs sp2 transform-origin: right bottom; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform-origin: right bottom; gs sp2 transform: rotate3d(0, 0, 1, -45deg); gs sp2 opacity: 0; gs sp } gs } gs",
55 | "rotateOutUpLeft": "@keyframes rotateOutUpLeft { gs sp from { gs sp2 transform-origin: left bottom; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform-origin: left bottom; gs sp2 transform: rotate3d(0, 0, 1, -45deg); gs sp2 opacity: 0; gs sp } gs } gs",
56 | "rotateOutUpRight": "@keyframes rotateOutUpRight { gs sp from { gs sp2 transform-origin: right bottom; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform-origin: right bottom; gs sp2 transform: rotate3d(0, 0, 1, 90deg); gs sp2 opacity: 0; gs sp } gs } gs",
57 | "hinge": "@keyframes hinge { gs sp 0% { gs sp2 transform-origin: top left; gs sp2 animation-timing-function: ease-in-out; gs sp } gs sp 20%, 60% { gs sp2 transform: rotate3d(0, 0, 1, 80deg); gs sp2 transform-origin: top left; gs sp2 animation-timing-function: ease-in-out; gs sp } gs sp 40%, 80% { gs sp2 transform: rotate3d(0, 0, 1, 60deg); gs sp2 transform-origin: top left; gs sp2 animation-timing-function: ease-in-out; gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 transform: translate3d(0, 700px, 0); gs sp2 opacity: 0; gs sp } gs } gs",
58 | "rollIn": "@keyframes rollIn { gs sp from { gs sp2 opacity: 0; gs sp2 transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); gs sp } gs sp to { gs sp2 opacity: 1; gs sp2 transform: none; gs sp } gs } gs",
59 | "rollOut": "@keyframes rollOut { gs sp from { gs sp2 opacity: 1; gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); gs sp } gs } gs",
60 | "zoomIn":" @keyframes zoomIn { gs sp from { gs sp2 opacity: 0; gs sp2 transform: scale3d(.3, .3, .3); gs sp } gs sp 50% { gs sp2 opacity: 1; gs sp } gs } gs",
61 | "zoomInDown": "@keyframes zoomInDown { gs sp from { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
62 | "zoomInLeft": "@keyframes zoomInLeft { gs sp from { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
63 | "zoomInRight": "@keyframes zoomInRight { gs sp from { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
64 | "zoomInUp": "@keyframes zoomInUp { gs sp from { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp 60% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
65 | "zoomOut": "@keyframes zoomOut { gs sp from { gs sp2 opacity: 1; gs sp } gs sp 50% { gs sp2 opacity: 0; gs sp2 transform: scale3d(.3, .3, .3); gs sp } gs sp to { gs sp2 opacity: 0; gs sp } gs } gs",
66 | "zoomOutDown": "@keyframes zoomOutDown { gs sp 40% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); gs sp2 transform-origin: center bottom; gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
67 | "zoomOutLeft": "@keyframes zoomOutLeft { gs sp 40% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: scale(.1) translate3d(-2000px, 0, 0); gs sp2 transform-origin: left center; gs sp } gs } gs",
68 | "zoomOutRight": "@keyframes zoomOutRight { gs sp 40% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: scale(.1) translate3d(2000px, 0, 0); gs sp gs sp2 transform-origin: right center; gs sp } gs } gs",
69 | "zoomOutUp": "@keyframes zoomOutUp { gs sp 40% { gs sp2 opacity: 1; gs sp2 transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); gs sp2 animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); gs sp } gs sp to { gs sp2 opacity: 0; gs sp2 transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); gs sp2 transform-origin: center bottom; gs sp2 animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); gs sp } gs } gs",
70 | "slideInDown": "@keyframes slideInDown { gs sp from { gs sp2 transform: translate3d(0, -100%, 0); gs sp2 visibility: visible; gs sp } gs sp to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs } gs",
71 | "slideInLeft": "@keyframes slideInLeft { gs sp from { gs sp2 transform: translate3d(-100%, 0, 0); gs sp2 visibility: visible; gs sp } gs sp to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs } gs",
72 | "slideInRight": "@keyframes slideInRight { gs sp from { gs sp2 transform: translate3d(100%, 0, 0); gs sp2 visibility: visible; gs sp } gs sp to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs } gs",
73 | "slideInUp": "@keyframes slideInUp { gs sp from { gs sp2 transform: translate3d(0, 100%, 0); gs sp2 visibility: visible; gs sp } gs sp to { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs } gs",
74 | "slideOutDown": "@keyframes slideOutDown { gs sp from { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs sp to { gs sp2 visibility: hidden; gs sp2 transform: translate3d(0, 100%, 0); gs sp } gs } gs",
75 | "slideOutLeft": "@keyframes slideOutLeft { gs sp from { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs sp to { gs sp2 visibility: hidden; gs sp2 transform: translate3d(-100%, 0, 0); gs sp } gs } gs",
76 | "slideOutRight": "@keyframes slideOutRight { gs sp from { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs sp to { gs sp2 visibility: hidden; gs sp2 transform: translate3d(100%, 0, 0); gs sp } gs } gs",
77 | "slideOutUp": "@keyframes slideOutUp { gs sp from { gs sp2 transform: translate3d(0, 0, 0); gs sp } gs sp to { gs sp2 visibility: hidden; gs sp2 transform: translate3d(0, -100%, 0); gs sp } gs } gs"
78 | }
79 |
--------------------------------------------------------------------------------
/src/img/code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/src/img/code.png
--------------------------------------------------------------------------------
/src/img/icon4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/src/img/icon4.png
--------------------------------------------------------------------------------
/src/img/prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssstk/LinkTokenPocket-ex/bf93e7554bf4a6d8ff260294b513d5c3ec82468f/src/img/prev.png
--------------------------------------------------------------------------------
/src/js/index.js:
--------------------------------------------------------------------------------
1 | import '../css/index.css'
2 | import Vue from 'vue'
3 |
4 | import iView from 'iview'
5 | import 'iview/dist/styles/iview.css'
6 |
7 | Vue.use(iView)
8 | import { getBalance, getTransactionCount, sendRawTransaction, getTransactionRecords } from '@/api/walletapi'
9 | import { errorCode } from '@/api/site'
10 |
11 | import { Modal } from 'iview'
12 | new Vue({
13 | el: "#app",
14 | data() {
15 | return {
16 | address: '',
17 | confirmation: false,
18 | amount: null,
19 | searchOpen: null,
20 | columns: [{
21 | title: '时间',
22 | key: 'timestamp'
23 | },
24 | {
25 | title: '类型',
26 | key: 'type'
27 | },
28 |
29 | {
30 | title: '数量',
31 | key: 'amount'
32 | },
33 | ],
34 | transfer: {},
35 | transferaddress: null,
36 | data: [],
37 | balance: 0,
38 | loading: false,
39 | transactionCount: 0
40 | }
41 | },
42 | created() {},
43 | methods: {
44 | handleClick() {
45 | this.$refs.input.click();
46 | },
47 | handleChange(e) {
48 | const files = e.target.files;
49 | if (!files) {
50 | return;
51 | }
52 | let postFiles = Array.prototype.slice.call(files);
53 | var reader = new FileReader();
54 | reader.addEventListener("loadend", (evt) => {
55 | var fileString = evt.target.result
56 | this.transferaddress = `0x${JSON.parse(fileString).address}`
57 | this.transfer['walletaddress'] = fileString
58 | })
59 | reader.readAsText(postFiles[0], "UTF-8")
60 | },
61 | confirmationfn(){
62 | if(!/^0[xX][a-fA-F0-9]{40}$/.test(this.transferaddress)){
63 | this.$Message.error('钱包地址不正确!')
64 | return
65 | }
66 | if(!this.transfer.password){
67 | this.$Message.error('钱包密码不能为空!')
68 | return
69 | }
70 | if(!/^0[xX][a-fA-F0-9]{40}$/.test(this.transfer.to_address)){
71 | this.$Message.error('收款账户不正确!')
72 | return
73 | }
74 | if(!this.transfer.value){
75 | this.$Message.error('转账链克不能为空!')
76 | return
77 | }
78 | this.amount = this.add(this.transfer.value, 0.01)
79 | this.confirmation = true
80 | },
81 | add(num1, num2) {
82 | const num1Digits = (num1.toString().split('.')[1] || '').length;
83 | const num2Digits = (num2.toString().split('.')[1] || '').length;
84 | const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits));
85 | return (num1 * baseNum + num2 * baseNum) / baseNum;
86 | },
87 | sendRawTransaction() {
88 | let params = this.transfer
89 | this.loading = true
90 | sendRawTransaction(params).then(res => {
91 | this.loading = false
92 | if (this.validationRsults(res)) {
93 | this.$Message.success('交易成功')
94 | }
95 | })
96 | },
97 |
98 | validationRsults(obj) {
99 | if (!obj.error) {
100 | return true
101 | }
102 | let code = obj.error.code
103 | let info = errorCode[code]['CN']
104 | this.$Message.error(info)
105 | },
106 |
107 | getBalance() {
108 | let address = this.address
109 | if (!address) {
110 | this.$Message.error('钱包地址不能为空')
111 | return
112 | }
113 | getBalance(address).then(res => {
114 | if (this.validationRsults(res)) {
115 | this.balance = res.result
116 | }
117 | })
118 | getTransactionCount(address).then(res => {
119 | if (this.validationRsults(res)) {
120 | this.transactionCount = res.result
121 | }
122 | })
123 | getTransactionRecords(address).then(res => {
124 | if (this.validationRsults(res)) {
125 | this.data = res.result
126 | }
127 | })
128 | },
129 | opentab(name) {
130 | this.searchOpen = name
131 | console.log(name)
132 | }
133 | },
134 |
135 | computed: {
136 |
137 | },
138 | mounted: function () {
139 | this.$nextTick(function () {
140 |
141 | })
142 | },
143 | components: {
144 | Modal
145 | }
146 |
147 | })
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var buildPath = path.resolve(__dirname,"dist");
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
4 | const HtmlWebpackPlugin = require('html-webpack-plugin')
5 | const CopyWebpackPlugin = require('copy-webpack-plugin')
6 | function resolve (dir) {
7 | return path.join(__dirname, dir)
8 | }
9 | module.exports = {
10 | entry: {
11 | index:'./src/js/index.js'
12 | },
13 | output: {
14 | path:buildPath,
15 | filename:"bundle.js"
16 | },
17 | module: {
18 | rules:[
19 | {
20 | test:/\.css$/,
21 | use: ExtractTextPlugin.extract({
22 | use: 'css-loader'
23 | })
24 | },
25 | {
26 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
27 | loader: 'url-loader',
28 | options: {
29 | limit: 10000,
30 | name: 'img/[name].[hash:7].[ext]'
31 | }
32 | },
33 | {
34 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
35 | loader: 'url-loader',
36 | options: {
37 | limit: 10000,
38 | name: 'fonts/[name].[hash:7].[ext]'
39 | }
40 | },
41 | {
42 | test: /\.js$/,
43 | exclude:/(node_modules|bower_components)/,
44 | loader:'babel-loader',
45 | query: {
46 | presets: ['es2015']
47 | }
48 | }
49 | ]
50 | },
51 | resolve: {
52 | extensions: ['.js', '.vue', '.json'],
53 | alias: {
54 | 'vue$': 'vue/dist/vue.esm.js',
55 | '@': resolve('src')
56 | }
57 | },
58 | plugins: [
59 | new ExtractTextPlugin("style.css"),
60 | new HtmlWebpackPlugin({
61 | filename: 'index.html',
62 | template: 'index.html',
63 | inject: true
64 | }),
65 | new HtmlWebpackPlugin({ // Also generate a test.html
66 | filename: 'options.html',
67 | template: 'options.html'
68 | }),
69 |
70 | new CopyWebpackPlugin([{
71 | from: resolve('config'),
72 | to: resolve('dist'),
73 | toType: 'dir'
74 | }])
75 | ]
76 | }
77 |
--------------------------------------------------------------------------------