A simple package manager for Ord with a html template engine. Provides scripts to test the packages in regtest mode.
bun iIn one terminal run Bitcoind in regtest mode with:
sh regtest.shIn another terminal initialize ord to run in regtest creating a wallet and funding it with:
sh create.sh
Inside the package.opm.json file put the package name and the mainnet inscriptionId of the package.
{
"SomePackage": "<inscriptionId>",
"SomeOtherPackage": "<inscriptionId>"
}Download the package and inscribe them to regtest with.
bun run opmThis will create a new file regtest.json with the package inscriptionIds in your local regtest blockchain.
Inside the ./templates folder create a template html file. This
uses the ./templates/template.ts to inject the recusive inscritionId into the html file. This uses handlbar.js. The packages are injected into the html with the following syntax {{packageName}}.
Run the following command to create the html file and inscribe it to regtest. The file will be created in the ./build folder.
bun run generate
run the ord server in regtest mode with:
sh server.sh
will default to 8080 unless a port is passed sh server 3000
Then open the browser to http://localhost:8080/
Getting more sats to inscribe with or to mine an inscription. It will default to 1 block unless more are specified. Mine 100 blocks with:
sh mine.sh 100
Inscribe a file to regtest with:
bun run inscribe <file>
You may need to delete the regtest index if you have issues. This is located in the following locations by default.
Linux: ~/.local/share/ord/
Windows: /roaming/ord/
Mac: /Users/<your-username>/Library/Application Support/ord/
Delete the regtest folder. When you inscribe or run the server it will reindex.
If you also want to delete the regtest blockchain that is in the regtest folder on your bitcoin data directory. This will delete your regtest wallet you will need to initialize that again.
WARNING: Don't delete your mainnet index on accident it is also located in the ord folder.