Created
January 9, 2022 19:33
-
-
Save dashameter/e755c3bfa9dc0cb8b112e6a77db97b2b 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
const Dash = require("dash"); | |
const { NodeForage } = require("nodeforage"); | |
const nodeforage = new NodeForage({ name: "walletnodeforage2" }); | |
const clientOpts = { | |
network: "testnet", | |
apps: { | |
}, | |
wallet: { | |
adapter: nodeforage, | |
mnemonic: | |
"tool monkey earn bless clump dinner appear define allow fish ensure grass", // yX29oNG591LbqWWtDW2JTmL9pmAERmnswr | |
}, | |
}; | |
const client = new Dash.Client(clientOpts); | |
const createIdentity = async () => client.platform.identities.register(); | |
createIdentity() | |
.then((d) => console.log("Identity:\n", d.toJSON())) | |
.catch((e) => console.error("Something went wrong:\n", e)) | |
.finally(() => client.disconnect()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment