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
const blockhash = "0x5cb3e33c31019c9e5f77f354f150e4d74eb95a029a69738d45c176bc1447e444" | |
const fs = require("fs").promises | |
const seedrandom = require("seedrandom") | |
const chooser = require("random-seed-weighted-chooser").default | |
const SparkMD5 = require("spark-md5") | |
const random = seedrandom(blockhash) | |
const uniques = [{ |
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
const bip39 = require('bip39'); | |
const bitcoin = require('bitcoinjs-lib'); | |
const ecc = require('tiny-secp256k1'); | |
const {BIP32Factory} = require('bip32'); | |
const bip32 = BIP32Factory(ecc); | |
const strength = 128; // Strength in bits, 128 bits results in a 12-word phrase | |
const mnemonic = bip39.generateMnemonic(strength); | |
console.log('Seed Phrase:', mnemonic); |
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
const { PrivateKey } = dogecore; | |
/*------------- create a new wallet -----------*/ | |
function walletCreate() { | |
// @ts-ignore | |
const privateKey = new PrivateKey(); | |
const privkey = privateKey.toWIF(); | |
const address = privateKey.toAddress().toString(); | |
const json = { privkey, address, utxos: [] }; | |
console.log({ json }); |
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
import { hostname } from 'os' | |
import { WALLET_PATH, Wallets } from './wallets.js' | |
export const create = (app) => app.command('walletcreate') | |
.description('Create one or more new wallet') | |
.option('-c, --count <count>', 'amount of wallet to create') | |
.option('-p, --prefix <prefix>', 'prefix to use whenever naming wallets', hostname()) | |
.action(async ({ count, prefix }) => { | |
if (count === undefined) { | |
console.error('You must define a number of wallet to generate: eg --count=10') |
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
/* | |
Requires to have eslint and eslint-plugin vue installed locally. | |
(npm i -g eslint eslint-plugin-vue) | |
https://vuejs.github.io/eslint-plugin-vue/rules/ | |
Put this in a ".eslintrc.json" at the root of the repository. | |
You can also put in in your $HOME. | |
*/ |