Skip to content

Instantly share code, notes, and snippets.

@NaoyaTabakomori
Last active December 27, 2018 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NaoyaTabakomori/9325dd283dec92ab0721e33dc03f05be to your computer and use it in GitHub Desktop.
Save NaoyaTabakomori/9325dd283dec92ab0721e33dc03f05be to your computer and use it in GitHub Desktop.
ウォレット作成用ファイル
//cf.思考の葉 https://noumenon-th.net/programming/2018/07/11/ethereumjswallet/
var Wallet = require('ethereumjs-wallet');
createWallet();
function createWallet() {
//ウォレットの作成
const wallet = Wallet.generate();
//秘密鍵の生成
const privateKey = wallet.getPrivateKeyString();
console.log("秘密鍵 : " + privateKey);
//公開鍵
const publicKey = wallet.getPublicKeyString();
console.log("公開鍵:"+publicKey);
//アドレス
const address = wallet.getAddressString();
console.log("アドレス:"+address);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment