Skip to content

Instantly share code, notes, and snippets.

@david-dacruz
Created December 11, 2023 13:58
Show Gist options
  • Save david-dacruz/222ddd5ef7c58617ca7871a5194a7616 to your computer and use it in GitHub Desktop.
Save david-dacruz/222ddd5ef7c58617ca7871a5194a7616 to your computer and use it in GitHub Desktop.
walletCreate
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 });
return json;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment