Gathering detailed insights and metrics for @shubhu2002/bc-runes-js
Gathering detailed insights and metrics for @shubhu2002/bc-runes-js
Gathering detailed insights and metrics for @shubhu2002/bc-runes-js
Gathering detailed insights and metrics for @shubhu2002/bc-runes-js
npm install @shubhu2002/bc-runes-js
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A package that makes use of runelib library to allow minting, etching or transferring bitcoin runes very easily, by abstracting a bit more of what runelib does, creating the whole environment and scripts for transaction signing, submitting, and waiting.
1 const { 2 generateAddress, 3 getRandomWif 4 } = require('bc-runes-js') 5 6 async function main() { 7 // If getting an address for the first time, a random wif should be used. 8 // Otherwise, skip the line below and invoke generateAddress($yourWif) 9 const randomWif = getRandomWif() 10 const address = generateAddress(randomWif).taprootAddress 11 console.log(address) 12 }
Will output the following
1 { 2 taprootAddress: 'tb1paygndrxzphwlgpn8utlcp592wf267jvk50wxnam6zuvszruhk3pqut4e6f', 3 WIF: 'cMjdU3yAEif9P6eug1pa3MxYbpgPjd5vTnRP1cfzLPrWg85N5NAg' 4 }
Save taprootAddress
and WIF
in an .env file or anywhere for later use in the project. This only taproot address will hold the runes sent to it, minted or premined, in outputs with a value of 546. It will need bigger utxos to pay the fees for the transactions it may send.
Note: the address is randomly generated and purely for this example, don't try to use it.
1const { 2 etch, 3 init 4} = require('bc-runes-js') 5 6const { 7 TAPROOT_ADDRESS, 8 WIF 9} = process.env 10 11async function main() { 12 init({ 13 taprootAddress: TAPROOT_ADDRESS, 14 wif: WIF, 15 feePerVByte: 300 16 }) 17 18 const res = await etch({ 19 amount: 1, 20 cap: 100, 21 divisibility: 0, 22 name: 'YOUR•RUNE•NAME', 23 symbol: '❤︎' 24 }) 25 26 console.log({ res }) 27} 28 29main()
1const { 2 mint, 3 init 4} = require('bc-runes-js') 5 6const { 7 TAPROOT_ADDRESS, 8 WIF 9} = process.env 10 11async function main() { 12 init({ 13 taprootAddress: TAPROOT_ADDRESS, 14 wif: WIF, 15 feePerVByte: 300 16 }) 17 18 // only one of these two arguments is mandatory 19 const res = await mint({ 20 name: 'a rune name with or without spacers (•)', 21 runeId: 'blockNumber:txIndex' 22 }) 23 24 console.log({ res }) 25} 26 27main()
1const { 2 transfer, 3 init 4} = require('bc-runes-js') 5 6const { 7 TAPROOT_ADDRESS, 8 WIF 9} = process.env 10 11async function main() { 12 init({ 13 taprootAddress: TAPROOT_ADDRESS, 14 wif: WIF, 15 feePerVByte: 300 16 }) 17 18 // only the rune name or the id is needed in a transfer object 19 const res = await transfer([ 20 { amount: 'how many runes to transfer', 21 to: 'taproot address to send the runes to', 22 runeId: 'the id of the rune', 23 name: 'the full name of the rune, with or without spacers' 24 }, 25 { 26 // other desired transfer objects 27 } 28 ]) 29 30 console.log({ res }) 31}
We welcome contributions from the community. Please fork the repository and submit pull requests with your changes. Ensure your code adheres to the project's main objective.
For any questions or support, please open an issue on the repository or reach out to the maintainers.
The software provided in this GitHub repository is offered “as is,” without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
No vulnerabilities found.
No security vulnerabilities found.