mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-06-04 01:06:42 +00:00
14 lines
312 B
JavaScript
14 lines
312 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
function generateWallet(callback) {
|
|
const wallet = common.core.Wallet.generate();
|
|
if (wallet) {
|
|
callback(null, {wallet: wallet});
|
|
} else {
|
|
callback(new common.errors.ApiError('Could not generate wallet'));
|
|
}
|
|
}
|
|
|
|
module.exports = generateWallet;
|