The command-line tool to fetch, deploy, mint, transfer, and manipulate Atomicals Digital Assets.
Visit the Atomicals Guidebook to get to know about Atomicals!
Multiple templates are covered for setting up Fungible-tokens, NFT collections, Realm & Sub-realm, and Social-FI! Check them out at https://github.com/atomicals/atomicals-js/tree/main/templates.
Table Of Contents
- Atomicals ElectrumX Indexer Server (https://github.com/atomicals/atomicals-electrumx)
Use yarn
(or pnpm
) package manager instead of npm
.
# Download the GitHub repo:
git clone https://github.com/atomicals/atomicals-js.git
cd atomicals-js
# Build: If you don't have yarn & node installed
# npm install -g node
# npm install -g yarn
yarn install
yarn run build
# See all commands at:
yarn run cli --help
First, install packages and build, then follow the steps here to create your first Atomical and query the status.
Use yarn cli
to get a list of all commands available.
The environment file comes with defaults (.env.example
), but it is highly recommended to install and operate your own
ElectrumX server. Web browser communication is possible through the wss
(secure websockets) interface of ElectrumX.
ELECTRUMX_PROXY_BASE_URL=https://ep.your-atomicals-electrumx-host/proxy
# Optional
WALLET_PATH=./wallets
WALLET_FILE=wallet.json
# The number of concurrent processes to be used. This should not exceed the number of CPU cores available.
# If not set, the default behavior is to use all available CPU cores minus one.
CONCURRENCY=4
The purpose of the wallet is to create p2tr (pay-to-taproot) spend scripts and to receive change from the transactions made for the various operations. Do not put more funds than you can afford to lose, as this is still beta!
To initialize a new wallet.json
file that will store your address for receiving change use the wallet-init
command.
Alternatively, you may populate the wallet.json
manually, ensuring that the address at m/86'/0'/0'/0/0
equals the address and the derivePath
is set correctly.
Configure the path in the environment .env
file to point to your wallet file. defaults to ./wallet.json
Default:
WALLET_PATH=.
WALLET_FILE=wallet.json
Update to wallets/
directory:
WALLET_PATH=./wallets
WALLET_FILE=wallet.json
Create the wallet:
yarn cli wallet-init
>>>
Wallet created at wallet.json
phrase: maple maple maple maple maple maple maple maple maple maple maple maple
Legacy address (for change): 1FXL2CJ9nAC...u3e9Evdsa2pKrPhkag
Derive Path: m/86'/0'/0'/0/0
WIF: L5Sa65gNR6QsBjqK.....r6o4YzcqNRnJ1p4a6GPxqQQ
------------------------------------------------------
Get all the commands available:
yarn cli --help