Wallet creation through node.js

(manoj) #1


I have installed bitcore full node and created mynode on centos 7.
I am able to create wallet and address through command line of NODE but not able to create same through a java script file when trying from my web page.
Actually I have created a web page having “Create Wallet” button which calls java script to create wallet.
It throws error on line “var bitcore = require(‘bitcore’);” line.
It is not able to find “require”

Can you please help me on this.


(Braydon Fuller) #2

Sorry, looks like the browser guide docs need to be updated.

You can use bower to install the dependencies:

bower install bitcore-lib
bower install bitcore-mnemonic

And then create an html file with:

<!DOCTYPE html>
<html lang="en">

  <meta charset="utf-8">
  <script src="bower_components/bitcore-lib/bitcore-lib.min.js"></script>
  <script src="bower_components/bitcore-mnemonic/bitcore-mnemonic.min.js"></script>


  <script type="text/javascript">
    var bitcore = require('bitcore-lib');
    var Mnemonic = require('bitcore-mnemonic');
    // etc...



(Lalitpatadiya12) #3

@braydon : I am developer, trying to develop bitcoin wallet service on bitcore, please clarify whether we will be able to create unlimited wallets for our user.