Skip to content
This repository was archived by the owner on Oct 8, 2019. It is now read-only.

Commit e84d086

Browse files
author
Brian Faust
committed
chore: setup develop branch
1 parent 4a7cba0 commit e84d086

33 files changed

+5200
-1518
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true

.eslintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"jest": true
6+
},
7+
"extends": [
8+
"standard"
9+
],
10+
"parserOptions": {
11+
"sourceType": "module"
12+
},
13+
"rules": {
14+
"no-console": "off",
15+
"indent": ["off", 2],
16+
"linebreak-style": 0,
17+
"quotes": ["error", "single"],
18+
"semi": ["off", "always"]
19+
}
20+
}

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.travis.yml export-ignore
9+
/__tests__ export-ignore
10+
/docs export-ignore
11+
/README.md export-ignore

.gitignore

+52-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
.tags
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
lerna-debug.log
6+
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
.coverage
17+
18+
# nyc test coverage
19+
.nyc_output
20+
21+
# vscode
22+
.vscode
23+
24+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
25+
.grunt
26+
27+
# node-waf configuration
28+
.lock-wscript
29+
30+
# Build results
31+
app.js
32+
33+
# Compiled binary addons (http://nodejs.org/api/addons.html)
34+
build/Release
35+
36+
# Dependency directories
237
node_modules
38+
jspm_packages
39+
40+
# Generated doc directory
41+
doc
42+
docs
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Mac OS X local settings
48+
.DS_Store
49+
.tags
50+
bundle.min.js
51+
52+
# Build
53+
dist

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
3+
node_js:
4+
- node
5+
- 9
6+
7+
script:
8+
- yarn test
9+
10+
cache: yarn

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## Unreleased

LICENSE

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2017 Ark Ecosystem
3+
Copyright (c) Ark Ecosystem <[email protected]>
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
1111

1212
The above copyright notice and this permission notice shall be included in all
1313
copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+18-95
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,30 @@
1-
![ARK Client](https://i.imgur.com/Sj3s29m.jpg)
1+
# ARK PHP
22

3-
# ark-client
4-
CLI client for ARK blockchain.
5-
You can connect to devnet, mainnet or your custom private/public ARK-derived blockchain.
3+
<p align="center">
4+
<img src="https://github.com/ArkEcosystem/ARK-Client/blob/develop/banner.png" />
5+
</p>
66

7-
Features:
8-
- connection to network or a node,
9-
- get stats of a network,
10-
- create or get status of an account,
11-
- create vanity accounts (multi-cpu supported),
12-
- send amount in USD, EUR or other FIAT currency at the market price (ARK only),
13-
- register a delegate,
14-
- vote for a delegate,
15-
- sign and verify message using your address.
7+
> A [CLI](https://en.wikipedia.org/wiki/Command-line_interface) for the ARK Blockchain.
168
17-
# Installation
18-
You need to have node (version 7.6.0 or newer) installed. Then:
19-
```
20-
$> npm install -g arkecosystem/ark-client#master
21-
$> ark-client
22-
___ __ _________ __
23-
/ | _____/ /__ / ____/ (_)__ ____ / /_
24-
/ /| | / ___/ //_/ / / / / / _ \/ __ \/ __/
25-
/ ___ |/ / / ,< / /___/ / / __/ / / / /_
26-
/_/ |_/_/ /_/|_| \____/_/_/\___/_/ /_/\__/
27-
28-
ark>
29-
```
30-
31-
# Usage
32-
```
33-
ark> help
34-
35-
Commands:
36-
37-
help [command...] Provides help for a given command.
38-
exit Exits application.
39-
connect <network> Connect to network. Network is devnet or mainnet
40-
connect node <url> Connect to a server. For example "connect node 5.39.9.251:4000"
41-
disconnect Disconnect from server or network
42-
network stats Get stats from network
43-
account status <address> Get account status
44-
account vote <name> Vote for delegate <name>. Remove previous vote if needed. Leave empty to clear vote
45-
account send <amount> <recipient> Send <amount> ark to <recipient>. <amount> format examples: 10, USD10.4, EUR100
46-
account delegate <username> Register new delegate with <username>
47-
account create Generate a new random cold account
48-
account vanity <string> Generate an address containing lowercased <string> (WARNING you could wait for long)
49-
message sign <message> Sign a message
50-
message verify <message> <publickey> Verify the <message> signed by the owner of <publickey> (you will be prompted to provide the signature)
51-
shARK No you don't want to use this command
52-
```
53-
54-
55-
56-
```
57-
ark> connect devnet
58-
Node: 5.39.9.246:4002, height: 21078
59-
ark devnet>
60-
```
9+
[![Build Status](https://img.shields.io/travis/ArkEcosystem/ARK-Client/master.svg?style=flat-square)](https://travis-ci.org/ArkEcosystem/ARK-Client)
10+
[![Latest Version](https://img.shields.io/github/release/ArkEcosystem/ARK-Client.svg?style=flat-square)](https://github.com/ArkEcosystem/ARK-Client/releases)
11+
[![License](https://img.shields.io/packagist/l/ArkEcosystem/ARK-Client.svg?style=flat-square)](https://packagist.org/packages/ArkEcosystem/ARK-Client)
6112

62-
```
63-
ark devnet> account create
64-
Seed - private: rely cup brand sentence wolf amateur clog knock execute avocado they ready
65-
WIF - private: SBHAcXWeCEBDaLVUm4B3idHoLde2qrmi2gkxz8KXtNYfjVMK16pH
66-
Address - public : DMUeELFkFtN5obvStkV9Zt44GEjEaYgKhH
67-
```
13+
## Installation
6814

69-
```
70-
ark devnet> account send 100 AMUeELFkFtN5obvStkV9Zt44GEjEaYgKhH
71-
passphrase: ************************************************************************
72-
Transaction sent successfully with id 7adbf890c88dd345eacbac63e94610fa5f3905528cdc1c36740c3ba3fa3db302
73-
```
74-
75-
```
76-
ark devnet> account delegate rockingark
77-
passphrase: **************************************************************************
78-
Transaction sent successfully with id b857f302611e4f36a33ea886f7bcb951633406ba1f5e40393893234a46ce54eb
79-
```
80-
81-
```
82-
ark devnet> account status DMUeELFkFtN5obvStkV9Zt44GEjEaYgKhH
83-
{ address: 'DMUeELFkFtN5obvStkV9Zt44GEjEaYgKhH',
84-
unconfirmedBalance: '7500000000',
85-
balance: '7500000000',
86-
publicKey: '020cfc61215f2682bd70cce14aaa6cfa6fa3b0507771cb1943aee071a7dd57bcf6',
87-
username: 'rockingark',
88-
vote: '0',
89-
producedblocks: 0,
90-
missedblocks: 0,
91-
rate: 52,
92-
approval: 0,
93-
productivity: 0 }
15+
```bash
16+
yarn add @arkecosystem/cli
9417
```
9518

96-
# License
19+
## Security
9720

98-
**MIT License**
21+
If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
9922

100-
- Copyright © 2017 ARK.io
101-
- Copyright © 2017 FX Thoorens
23+
## Credits
10224

103-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
25+
- [Brian Faust](https://github.com/faustbrian)
26+
- [All Contributors](../../../../contributors)
10427

105-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
28+
## License
10629

107-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30+
[MIT](LICENSE) © [ArkEcosystem](https://ark.io)

__tests__/.gitkeep

Whitespace-only changes.

banner.png

712 KB
Loading

bin/cli

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env node
2+
3+
const commander = require('commander')
4+
5+
const { message, network, wallet } = require('../lib/commands')
6+
7+
commander
8+
.version('1.0.0')
9+
.description('CLI for the ARK Blockchain')
10+
.command('wallet create').action(() => wallet.create())
11+
.command('wallet delegate <username>').action(() => wallet.delegate())
12+
.command('wallet send <amount> <recipient>').action(() => wallet.send())
13+
.command('wallet stats').action(() => wallet.stats())
14+
.command('wallet status <address>').action(() => wallet.status())
15+
.command('wallet vanity <string>').action(() => wallet.vanity())
16+
.command('wallet vote <username>').action(() => wallet.vote())
17+
.command('message sign <message>').action(() => message.sign())
18+
.command('message verify <message> <publickey>').action(() => message.verify())
19+
.command('connect <network>').action(() => network.connect())
20+
.command('connect node <node>').action(() => network.connectNode())
21+
.command('disconnect').action(() => network.disconnect())
22+
23+
if (!process.argv.slice(2).length) {
24+
commander.outputHelp()
25+
26+
process.exit()
27+
}
28+
29+
commander.parse(process.argv)

0 commit comments

Comments
 (0)