thxs to https://github.com/blackluv https://github.com/hieujson and https://github.com/senasgr-eth !
Junkscriptions is a minter and protocol for creating inscriptions on the Junkcoin blockchain, allowing for data inscriptions directly onto the blockchain.
Ensure that you have Node.js and npm installed.
Run the following command to install required dependencies:
npm installCreate a .env file with your Junkcoin node information:
NODE_RPC_URL=http://<ip>:9771
NODE_RPC_USER=13456
NODE_RPC_PASS=13456
TESTNET=false
FEE_PER_KB=100000000
Set up your Junkcoin node configuration file (junkcoin.conf) with the following settings:
rpcuser=13456
rpcpassword=13456
rpcport=9771
rpcallowip=127.0.0.1
dns=1
irc=1
listen=1
dnsseed=1
daemon=1
server=1
debug=1
# Nodes to connect with
addnode=159.89.85.93:9771
addnode=157.173.198.7:9771
addnode=72.5.43.135:9771
Save junkcoin.conf in your Junkcoin data directory (usually located at ~/.junkcoin on Linux or %APPDATA%\Junkcoin on Windows).
Generate a new .wallet.json file by running:
node . wallet newThis command generates a new wallet file. Send Junkcoin to the displayed address. After sending funds, sync your wallet as described below.
Once your wallet has received funds, synchronize it with the network:
node . wallet syncIf you plan to mint multiple inscriptions, you can split your UTXOs to have smaller, manageable amounts:
node . wallet split <count>After minting, you can send the remaining funds back to another address:
node . wallet send <address> <optional amount>You can mint inscriptions directly from a file using:
node . mint <address> <path>To mint multiple copies of the same file:
node . mint <address> <path> <repeat>Mint an inscription from a file:
node . mint 7VWyhBsDr81bCT8ofMyCMePP8nwAHjiZLK dog.jpegMint multiple inscriptions from a JSON file:
node . mint 7VWyhBsDr81bCT8ofMyCMePP8nwAHjiZLK mint.json 100To start the Junkscriptions server, use:
node . serverThen, open your browser and navigate to the following URL to view transaction details:
http://localhost:3000/tx/<transaction_id>
Replace <transaction_id> with the actual transaction ID.
The Junkscriptions protocol allows any size data to be inscribed onto subwoofers within Junkcoin.
An inscription is defined as a series of push datas in the following format:
"ord"
OP_1
"text/plain; charset=utf8"
OP_0
"Hello Junkcoin!"
For larger inscriptions, content can be spread across multiple parts:
"ord"
OP_2
"text/plain; charset=utf8"
OP_1
"Hello "
OP_0
"Junkcoin World!"
This example would be concatenated as "Hello Junkcoin World!", allowing up to approximately 1500 bytes per transaction.
Junkscriptions use P2SH to encode inscriptions. Any P2SH script may be used, as long as the redeem script starts with inscription push data.
Inscriptions are allowed to chain across transactions:
Transaction 1:
"ord"
OP_2
"text/plain; charset=utf8"
OP_1
"Hello "
Transaction 2:
OP_0
"Junkcoin!"
Each inscription part after the first should start with a countdown separator. Indexers can use this to track remaining data.
This error indicates an issue with your node connection. Ensure your junkcoin.conf file is set up as follows:
rpcuser=13456
rpcpassword=13456
rpcport=9771
server=1
Make sure rpcallowip is set to allow local connections, and check that the rpcport matches the port specified in .env.
This error typically means the miner fee is too low. Increase the fee by updating your .env file:
FEE_PER_KB=300000000
The default is 100000000, but you may need to increase it during times of high demand.
This project is licensed under the MIT License. See the LICENSE file for details.