{"id":25619266,"url":"https://github.com/justshiftjk/runestone-package-typescript","last_synced_at":"2026-01-30T06:10:58.280Z","repository":{"id":249002321,"uuid":"830416253","full_name":"justshiftjk/Runestone-Package-Typescript","owner":"justshiftjk","description":"Runestone Etch | Mint | Transfer | Recursive Rune | Airdrop | Encipher | Decipher (Runestone) - This script allows you to create a recursive rune, Etching, Minting, Transfer, Airdrop on the Bitcoin testnet using Runestone transaction | Batch inscription.","archived":false,"fork":false,"pushed_at":"2024-07-18T09:11:16.000Z","size":74,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T21:56:22.886Z","etag":null,"topics":["axios","bitcoin","bitcoin-library","cbor","ecpair","ordinals","runelib","runestone","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/justshiftjk.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T08:27:24.000Z","updated_at":"2025-01-22T00:04:15.000Z","dependencies_parsed_at":"2024-07-18T11:25:08.197Z","dependency_job_id":"dfbd3a61-27a1-4a9b-a157-a951b20bd27e","html_url":"https://github.com/justshiftjk/Runestone-Package-Typescript","commit_stats":null,"previous_names":["infinite0731/runestone-toolbox-typescript","justshiftjk/runestone-package-typescript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justshiftjk/Runestone-Package-Typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justshiftjk%2FRunestone-Package-Typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justshiftjk%2FRunestone-Package-Typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justshiftjk%2FRunestone-Package-Typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justshiftjk%2FRunestone-Package-Typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justshiftjk","download_url":"https://codeload.github.com/justshiftjk/Runestone-Package-Typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justshiftjk%2FRunestone-Package-Typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28906269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T04:02:34.702Z","status":"ssl_error","status_checked_at":"2026-01-30T04:02:33.562Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["axios","bitcoin","bitcoin-library","cbor","ecpair","ordinals","runelib","runestone","typescript"],"created_at":"2025-02-22T06:16:42.403Z","updated_at":"2026-01-30T06:10:58.265Z","avatar_url":"https://github.com/justshiftjk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Runestone toolbox Typescript\n\nRunestone Etch, Mint, Transfer, Recursive Rune, Airdrop, Encipher, Decipher\n\n\n## Prerequisites\n\nBefore running the script, ensure you have the following dependencies installed:\n\n- `bitcoinjs-lib`\n- `ecpair`\n- `@bitcoinerlab/secp256k1`\n- `axios`\n- `runelib`\n-  `cbor`\n\nYou can install them using npm:\n\n```sh\nnpm install bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 axios runelib\n```\n\n## Configuration\n\nEnsure you have a `.env` file in your project root with the following variables:\n\n```plaintext\nPRIVATE_KEY=\u003cyour_private_key\u003e\nMNEMONIC=\u003cyour_seed_mnemonic\u003e (optional, if using SeedWallet)\n```\n\n## Recursive Rune Etching Script\n\nThis script allows you to create a recursive ordinal inscription on the Bitcoin testnet using Taproot addresses. It involves creating an HTML content, enciphering it as a Taproot script, and broadcasting the transaction to the testnet network.\n\n### Usage\n\n1. **Initialize ECC Library**:\n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**:\n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Create Etching**:\n   The `etching` function is the main function that creates the recursive ordinal. It involves the following steps:\n   - Define the HTML content to be inscribed.\n   - Create an inscription object using `EtchInscription`.\n   - Define a Taproot script with the inscription and the wallet's public key.\n   - Generate a Taproot address and wait for UTXOs to be funded to this address.\n   - Create a Partially Signed Bitcoin Transaction (PSBT).\n   - Add inputs and outputs to the PSBT.\n   - Sign and broadcast the transaction.\n\n4. **Broadcast Transaction**:\n   The `signAndSend` function handles the signing and broadcasting of the transaction. It supports both node environment and browser environment.\n\n## Functions\n\n- **etching()**: Main function to create the recursive ordinal inscription.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt, address: string)**: Signs and broadcasts the PSBT.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n\n# Taproot Rune Minting Script\n\nThis script enables the minting of Runes using Taproot addresses on the Bitcoin testnet. It leverages `bitcoinjs-lib`, `ecpair`, and `runelib` to create, sign, and broadcast a Bitcoin transaction containing Runes.\n\n## Usage\n\n1. **Initialize ECC Library**:\n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**:\n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Minting with Taproot**:\n   The `mintWithTaproot` function is the main function that mints Runes. It involves the following steps:\n   - Define Runes to be minted.\n   - Create a Runestone with the specified Runes.\n   - Tweak the signer for Taproot key tweaking.\n   - Generate a Taproot address.\n   - Wait for UTXOs to be funded to this address.\n   - Create a Partially Signed Bitcoin Transaction (PSBT).\n   - Add inputs and outputs to the PSBT.\n   - Sign and broadcast the transaction.\n\n4. **Broadcast Transaction**:\n   The `signAndSend` function handles the signing and broadcasting of the transaction. It supports both node environment and browser environment.\n\n## Functions\n\n- **mintWithTaproot()**: Main function to mint Runes using Taproot.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt, address: string)**: Signs and broadcasts the PSBT.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n\n# Recursive Rune Minting Script with Taproot Inscription\n\nThis script allows you to mint recursive Runes on the Bitcoin testnet using Taproot addresses. The script uses `bitcoinjs-lib`, `ecpair`, and `runelib` libraries to create, sign, and broadcast Bitcoin transactions containing Runes.\n\n## Prerequisites\n\nMake sure you have the following dependencies installed:\n\n- `bitcoinjs-lib`\n- `ecpair`\n- `@bitcoinerlab/secp256k1`\n- `axios`\n- `cbor`\n- `runelib`\n\nYou can install them using npm:\n\n```sh\nnpm install bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 axios cbor runelib\n```\n\n## Usage\n\n### Steps Overview\n\n1. **Initialize ECC Library**: \n   The script initializes the ECC library using `initEccLib` from `bitcoinjs-lib`.\n\n2. **Wallet Setup**: \n   The script supports two types of wallets: `SeedWallet` and `WIFWallet`. Currently, the `WIFWallet` is used.\n\n3. **Create Taproot Inscription**: \n   The `createChildInscriptionTapScript` function creates the Taproot script for the inscription, using the provided content and metadata.\n\n4. **Mint Runes and Create PSBT**: \n   The `childInscribe` function mints Runes and creates a Partially Signed Bitcoin Transaction (PSBT). It includes:\n   - Funding the Taproot address.\n   - Adding inputs and outputs to the PSBT.\n   - Signing and broadcasting the transaction.\n\n5. **Broadcast Transaction**: \n   The `signAndSend` function handles the signing and broadcasting of the transaction.\n\n## Functions\n\n- **contentBuffer(content: string)**: Converts content string to a buffer.\n- **createChildInscriptionTapScript()**: Creates the Taproot script for child inscriptions.\n- **childInscribe()**: Main function to mint Runes using Taproot.\n- **signAndSend(keyPair: BTCSigner, psbt: Psbt)**: Signs and broadcasts the PSBT.\n- **waitUntilUTXO(address: string)**: Polls the address for UTXOs until found.\n- **getTx(id: string)**: Fetches transaction hex by ID.\n- **broadcast(txHex: string)**: Broadcasts the raw transaction to the network.\n- **tapTweakHash(pubKey: Buffer, h: Buffer | undefined)**: Computes the Taproot tweak hash.\n- **toXOnly(pubkey: Buffer)**: Converts a public key to X-only format.\n- **tweakSigner(signer: BTCSigner, opts: any)**: Tweaks the signer for Taproot key tweaking.\n\n## Important Variables\n\n- **network**: Configured to use Bitcoin testnet.\n- **txhash**: Transaction hash of the parent inscription.\n- **memeType**: MIME type for the content.\n- **metaProtocol**: Meta protocol buffer.\n- **receiveAddress**: Address to receive the Runes.\n- **metadata**: Metadata for the inscription.\n- **fee**: Transaction fee.\n- **parentInscriptionTXID**: Transaction ID of the parent inscription.\n- **contentBufferData**: Buffer containing the content for the inscription.\n- **revealtxIDBuffer**: Buffer of the parent inscription transaction ID.\n- **pointerBuffer**: Array of buffers for pointers in the Taproot script.\n- **metadataBuffer**: CBOR encoded metadata buffer.\n- **contentBufferArray**: Array of content buffers split into chunks.\n## Example Output\n\nThe script will output logs at various stages:\n- The Taproot address where funds should be sent.\n- The UTXO being used.\n- The raw transaction hex to be broadcasted.\n- The transaction ID after broadcasting.\n\n## Notes\n\n- The script is configured to work with the Bitcoin testnet.\n- Ensure that you have testnet coins available in the provided private key.\n- Adjust the fee and other parameters as needed.\n\n---\n\n# Contact\nIf you have any questions or want more customized app for specific use cases, please feel free to contact me to below contacts.\n\n- E-Mail: adamglab0731.pl@gmail.com\n- Telegram: [@bettyjk_0915](https://t.me/bettyjk_0915)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustshiftjk%2Frunestone-package-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustshiftjk%2Frunestone-package-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustshiftjk%2Frunestone-package-typescript/lists"}