{"id":19881497,"url":"https://github.com/anderson-juhasc/bip86","last_synced_at":"2025-05-02T14:30:47.428Z","repository":{"id":62354742,"uuid":"434264413","full_name":"Anderson-Juhasc/bip86","owner":"Anderson-Juhasc","description":"BIP86 - Derives taproot addresses from seed, xprv/xpub and tprv/tpub in javascript","archived":false,"fork":false,"pushed_at":"2024-05-22T17:46:54.000Z","size":8,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-22T18:02:33.034Z","etag":null,"topics":["bech32m","bip86","javascript","mnemonic","seed","taproot","tprv","xprv","xpub"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anderson-Juhasc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-02T14:59:51.000Z","updated_at":"2024-05-22T17:46:57.000Z","dependencies_parsed_at":"2023-01-25T17:16:11.976Z","dependency_job_id":null,"html_url":"https://github.com/Anderson-Juhasc/bip86","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anderson-Juhasc%2Fbip86","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anderson-Juhasc%2Fbip86/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anderson-Juhasc%2Fbip86/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anderson-Juhasc%2Fbip86/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anderson-Juhasc","download_url":"https://codeload.github.com/Anderson-Juhasc/bip86/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315202,"owners_count":17290992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bech32m","bip86","javascript","mnemonic","seed","taproot","tprv","xprv","xpub"],"created_at":"2024-11-12T17:14:27.913Z","updated_at":"2024-11-12T17:14:28.773Z","avatar_url":"https://github.com/Anderson-Juhasc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BIP86\n\nDerives taproot addresses from seed, xprv/xpub and tprv/tpub in javascript\n\n## Installing\n\nRun - `npm install bip86 --save`\n\n## Using\n\n```javascript\nconst BIP86 = require('bip86')\n\nvar mnemonic = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'\nvar root = new BIP86.fromMnemonic(mnemonic)\nvar child0 = root.deriveAccount(0)\n\nconsole.log('mnemonic:', mnemonic)\nconsole.log('rootpriv:', root.getRootPrivateKey())\nconsole.log('rootpub:', root.getRootPublicKey())\nconsole.log('\\n');\n\nvar account0 = new BIP86.fromXPrv(child0)\n\nconsole.log(\"Account 0, root = m/86'/0'/0'\");\nconsole.log('Account 0 xprv:', account0.getAccountPrivateKey())\nconsole.log('Account 0 xpub:', account0.getAccountPublicKey())\nconsole.log('\\n');\n\nconsole.log(\"Account 0, first receiving address = m/86'/0'/0'/0/0\");\nconsole.log('Prvkey:', account0.getPrivateKey(0))\nconsole.log('Pubkey:', account0.getPublicKey(0))\nconsole.log('Address:', account0.getAddress(0))\nconsole.log('\\n');\n\nconsole.log(\"Account 0, second receiving address = m/86'/0'/0'/0/1\");\nconsole.log('Prvkey:', account0.getPrivateKey(1))\nconsole.log('Pubkey:', account0.getPublicKey(1))\nconsole.log('Address:', account0.getAddress(1))\nconsole.log('\\n');\n\nconsole.log(\"Account 0, first change address = m/86'/0'/0'/1/0\");\nconsole.log('Prvkey:', account0.getPrivateKey(0, true))\nconsole.log('Pubkey:', account0.getPublicKey(0, true))\nconsole.log('Address:', account0.getAddress(0, true))\nconsole.log('\\n');\n\nvar xpub = 'tpubDE9d2eQdaQrwREoNYVm63BH1TQz5XYizB3rMxeJpFsfxxzXzNGCrguxaip9shs9TLahkfvgQPNWdKXvWqCqWgKk5SxT9wuFtLQg7RQvRsTV'\nvar account1 = new BIP86.fromXPub(xpub)\n\nconsole.log(\"Account 1, root = m/86'/1'/0'\");\nconsole.log('Account 1 xpub:', account1.getAccountPublicKey());\nconsole.log('\\n');\n\nconsole.log(\"Account 1, first receiving address = m/86'/1'/0'/0/0\");\nconsole.log('Pubkey:', account1.getPublicKey(0))\nconsole.log('Address:', account1.getAddress(0))\nconsole.log('\\n');\n\nconsole.log(\"Account 1, second receiving address = m/86'/1'/0'/0/1\");\nconsole.log('Pubkey:', account1.getPublicKey(1))\nconsole.log('Address:', account1.getAddress(1))\nconsole.log('\\n');\n\nconsole.log(\"Account 1, first change address = m/86'/1'/0'/1/0\");\nconsole.log('Pubkey:', account1.getPublicKey(0, true))\nconsole.log('Address:', account1.getAddress(0, true))\nconsole.log('\\n');\n\nconsole.log(\"Account 1, second change address = m/86'/1'/0'/1/1\");\nconsole.log('Pubkey:', account1.getPublicKey(1, true))\nconsole.log('Address:', account1.getAddress(1, true))\nconsole.log('\\n');\n```\n\n## Reference\n\n[BIP 86](https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki)\n[SLIP 44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)\n\n## License terms\n\nCopyright 2021 Anderson Juhasc\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderson-juhasc%2Fbip86","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanderson-juhasc%2Fbip86","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderson-juhasc%2Fbip86/lists"}