Skip to content

DCR Wallet Address #22

@rohitsahu21

Description

@rohitsahu21

Please correct me where i'm worng to create Decred(DCR) address

var bitcore = require('bitcore');

var Network = bitcore.Networks.add({
name: 'dcrdlivenet',
alias: 'dcrmainnet',
pubkeyhash: 0x073f,
privatekey: 0x22de,
scripthash: 0x071a,
xpubkey: 0x02fda926,
xprivkey: 0x02fda4e8,
networkMagic: 0xf900b4d9,
port: 9108,

dnsSeeds: [
    'mainnet-seed.decred.mindcry.org',
    'mainnet-seed.decred.netpurgatory.com',
    'mainnet.decredseed.org',
    'mainnet-seed.decred.org'
],
defaultClientPort: 9108

})
var dcrNetwork = bitcore.Networks.get(Network)
var privateKey = bitcore.PrivateKey(dcrNetwork);
var publicKey = bitcore.PublicKey.fromPrivateKey(privateKey, dcrNetwork);
console.log(bitcore.Address.fromPublicKey(publicKey, dcrNetwork))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions