Have anyone Implement the client command line for Libra

I trying to do this api but when i request to the server, look like the process are wait too long time.
Any idea???

‘use strict’;

import {Get, JsonController} from “routing-controllers”;
import * as Shell from ‘shelljs’;
import {Success} from “…/…/…/core/responseable/Result”;
const { promisify } = require(‘util’);
const exec = promisify(require(‘child_process’).exec)

@JsonController(’/libra’)
export default class ShellController {

@Get("/execute")
async getContext() {
   Shell.cd('/mnt/d/blockchain/libra/scripts/cli').exec('./start_cli_testnet.sh ').exec('account create');

    return Success.setMessage('success');
}

}

2 Likes

You need to communicate with the gRPC service, not running the client. It is not a correct way.

By the way, yesterday I created a utility to generate accounts. Look at the screenshot.

2 Likes

Do you have a GitHub gist or repo for this utility? Thanks!

Do you plan to put it behind a rest API ?

yourURL.com/createLibraTestNetWallet :star_struck:

cheers

No, I do not have at the moment.