-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multisig-server initial commit
- Loading branch information
0 parents
commit 6bd7e3e
Showing
54 changed files
with
9,406 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
version: 2 | ||
jobs: | ||
node-10: | ||
docker: | ||
- image: circleci/node:10 | ||
working_directory: ~/multisig-server | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "yarn.lock" }} | ||
- v1-dependencies- | ||
- run: yarn install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "yarn.lock" }} | ||
- run: yarn test | ||
- run: ./node_modules/.bin/codecov | ||
node-11: | ||
docker: | ||
- image: circleci/node:11 | ||
working_directory: ~/multisig-server | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "yarn.lock" }} | ||
- v1-dependencies- | ||
- run: yarn install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "yarn.lock" }} | ||
- run: yarn test | ||
- run: ./node_modules/.bin/codecov | ||
node-12: | ||
docker: | ||
- image: circleci/node:12 | ||
working_directory: ~/multisig-server | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "yarn.lock" }} | ||
- v1-dependencies- | ||
- run: yarn install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "yarn.lock" }} | ||
- run: yarn test | ||
- run: ./node_modules/.bin/codecov | ||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- node-10 | ||
- node-11 | ||
- node-12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/README.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_extends: .github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
lerna-debug.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
.coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# vscode | ||
.vscode | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Build results | ||
app.js | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Generated doc directory | ||
doc | ||
docs | ||
|
||
# Optional npm cache directory | ||
.npm | ||
package-lock.json | ||
|
||
# Mac OS X local settings | ||
.DS_Store | ||
.tags | ||
bundle.min.js | ||
|
||
# Build | ||
dist | ||
packages/**/dist/ | ||
|
||
# Microsoft Visual Studio settings | ||
.vs | ||
|
||
# Databases | ||
*.sqlite | ||
|
||
# Random | ||
docker/development | ||
|
||
#Webstorm/Intellij | ||
.idea | ||
|
||
# Vagrant | ||
.vagrant | ||
|
||
# oclif | ||
tmp | ||
oclif.manifest.json | ||
npm-shrinkwrap.json | ||
|
||
# Transaction Pool | ||
transaction-pool.sqlite | ||
transaction-pool.sqlite-shm | ||
transaction-pool.sqlite-wal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"*.ts": ["yarn lint", "prettier --write", "git add"], | ||
"*.{json,md}": ["prettier --write", "git add"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.coverage | ||
dist | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleQuote": false, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
child-concurrency 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @faustbrian @supaiku0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) ARK Ecosystem <[email protected]> | ||
|
||
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: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# @arkecosystem/multisig-server | ||
|
||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/ARKEcosystem/multisig-server/master/banner.png" /> | ||
</p> | ||
|
||
[](https://www.npmjs.com/package/@arkecosystem/multisig-server) | ||
[](https://www.npmjs.com/package/@arkecosystem/multisig-server) | ||
[](https://circleci.com/gh/ArkEcosystem/multisig-server) | ||
[](https://codecov.io/gh/ArkEcosystem/multisig-server) | ||
[](https://opensource.org/licenses/MIT) | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn global add @arkecosystem/multisig-server-cli | ||
``` | ||
|
||
## Usage | ||
|
||
> All commands support a `-h` flag to show help for the specified command. | ||
```sh | ||
$ multisig-server | ||
A server for helping building multi-signatures transactions. | ||
|
||
VERSION | ||
@arkecosystem/multisig-server-cli/1.0.0 linux-x64 node-v11.15.0 | ||
|
||
USAGE | ||
$ multisig-server [COMMAND] | ||
|
||
COMMANDS | ||
autocomplete display autocomplete installation instructions | ||
command | ||
commands list all the commands | ||
help display help for multisig-server | ||
log Show the log | ||
restart Restart the MultiSignature server | ||
run Run the MultiSignature server (without pm2) | ||
start Start the MultiSignature server | ||
status Show the MultiSignature server status | ||
stop Stop the MultiSignature server | ||
update Update the MultiSignature server installation | ||
``` | ||
|
||
### `start` | ||
|
||
> Start the MultiSignature server | ||
```sh | ||
multisig-server start | ||
``` | ||
|
||
| Flag | Description | Default | Required | | ||
| ------------------ | ---------------------------------------------------------------------------- | -------------------------- | -------- | | ||
| --host= | the host that should be used to expose the RPC | 0.0.0.0 | No | | ||
| --port= | the port that should be used to expose the RPC | 8008 | No | | ||
|
||
### `restart` | ||
|
||
> Restart the MultiSignature server | ||
```sh | ||
multisig-server restart | ||
``` | ||
|
||
### `stop` | ||
|
||
> Stop the MultiSignature server | ||
```sh | ||
multisig-server stop | ||
``` | ||
|
||
| Flag | Description | Default | Required | | ||
| ------ | -------------------------- | ------- | -------- | | ||
| --kill | kill the process or daemon | n/a | No | | ||
|
||
### `run` | ||
|
||
> Run the MultiSignature server without pm2 **(exits on CTRL+C)** | ||
```sh | ||
multisig-server run | ||
``` | ||
|
||
| Flag | Description | Default | Required | | ||
| ------------------ | ---------------------------------------------------------------------------- | -------------------------- | -------- | | | ||
| --host= | the host that should be used to expose the RPC | 0.0.0.0 | No | | ||
| --port= | the port that should be used to expose the RPC | 8008 | No | | ||
|
||
### `status` | ||
|
||
> Show the MultiSignature server status | ||
```sh | ||
multisig-server status | ||
``` | ||
|
||
### `update` | ||
|
||
> Update the MultiSignature server installation | ||
```sh | ||
multisig-server update | ||
``` | ||
|
||
### `log` | ||
|
||
> Show the log | ||
```sh | ||
multisig-server log | ||
``` | ||
|
||
| Flag | Description | Default | Required | | ||
| -------- | ----------------------- | ------- | -------- | | ||
| --error= | only show error output | n/a | No | | ||
| --lines= | number of lines to tail | 15 | No | | ||
|
||
## Security | ||
|
||
If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed. | ||
|
||
## Credits | ||
|
||
This project exists thanks to all the people who [contribute](../../contributors). | ||
|
||
## License | ||
|
||
[MIT](LICENSE) © [ARK Ecosystem](https://ark.io) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Server } from "@hapi/hapi"; | ||
import { startServer } from "../../packages/server/src/server"; | ||
|
||
jest.setTimeout(10000); | ||
|
||
export const launchServer = async (): Promise<Server> => { | ||
return startServer({ | ||
host: "0.0.0.0", | ||
port: 8080, | ||
allowRemote: false, | ||
whitelist: ["127.0.0.1", "::ffff:127.0.0.1"] as any, | ||
network: "devnet", | ||
}); | ||
}; |
Oops, something went wrong.