-
-
Save NaoyaTabakomori/9325dd283dec92ab0721e33dc03f05be to your computer and use it in GitHub Desktop.
ウォレット作成用ファイル
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
//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