-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from Adamant-im/chore/renovation
Chore/renovation
- Loading branch information
Showing
32 changed files
with
2,961 additions
and
2,028 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
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 @@ | ||
node_modules | ||
package-lock.json | ||
config.default.jsonc |
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 @@ | ||
{ | ||
"singleQuote": 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
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
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
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
const api = require('./api/index'); | ||
const log = require('../utils/log'); | ||
import * as api from './api/index.js'; | ||
import * as log from '../utils/log.js'; | ||
|
||
module.exports = (program) => { | ||
export default (program) => { | ||
const account = program.command('account'); | ||
|
||
account | ||
.command('new') | ||
.description('creates new ADAMANT account and provide account data in JSON format') | ||
.description( | ||
'creates new ADAMANT account and provide account data in JSON format', | ||
) | ||
.action(log.call(api.createAccount)); | ||
}; |
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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
const api = require('../../utils/api'); | ||
const config = require('../../utils/config'); | ||
const { requiredParam } = require('../../utils/validate'); | ||
import api from '../../utils/api.js'; | ||
import config from '../../utils/config.js'; | ||
import { requiredParam } from '../../utils/validate.js'; | ||
|
||
exports.createDelegate = async (username = requiredParam('username'), passPhrase) => { | ||
const res = await api.newDelegate( | ||
passPhrase || config.passPhrase, | ||
username, | ||
); | ||
export async function createDelegate( | ||
username = requiredParam('username'), | ||
passphrase, | ||
) { | ||
const res = await api.newDelegate(passphrase || config.passphrase, username); | ||
|
||
return res.data || res; | ||
}; | ||
} |
Oops, something went wrong.