This is a command-line interface (CLI) application for creating and managing Simple Ledger Protocol (SLP) tokens.
This is a fork of psf-bch-wallet. This CLI has all the same commands as that one, plus additional commands for managing SLP tokens.
This software requires node.js v20 or higher. Instructions for installation:
git clone https://github.com/Permissionless-Software-Foundation/psf-slp-wallet
cd psf-slp-wallet
npm install
node psf-slp-wallet.js help
Get information about an SLP token. Outputs a JSON object with token metadata.
node psf-slp-wallet.js token-info -t 1d542ac6b26a2c85a892b79b7ec39dfba5c731b95c644cf5aef75e580f5c7660
- Use the
-t
flag to specify the token ID of the token to get information about (required).
Get the transaction history for an SLP token. Outputs a JSON object with the transaction history.
node psf-slp-wallet.js token-tx-history -t 1d542ac6b26a2c85a892b79b7ec39dfba5c731b95c644cf5aef75e580f5c7660
- Use the
-t
flag to specify the token ID of the token to get the transaction history for (required).
Create a new SLP Type1 fungible token.
node psf-slp-wallet.js token-create-fungible -n wallet1 -m "My Token" -t MYTOK -d 8 -q 100000000
- Use the
-n
flag to specify the name of the wallet (required). - Use the
-m
flag to specify the name of the token (required). - Use the
-t
flag to specify the ticker of the token (required). - Use the
-d
flag to specify the number of decimals of the token (required). - Use the
-q
flag to specify the quantity of tokens to create (required).
Create a new SLP Group token.
node psf-slp-wallet.js token-create-group -n wallet1 -m "My Group Token" -t MYGT
- Use the
-n
flag to specify the name of the wallet (required). - Use the
-m
flag to specify the name of the token (required). - Use the
-t
flag to specify the ticker of the token (required). - Use the
-q
flag to specify the quantity of tokens to create (optional). - Use the
-u
flag to specify the url of tokens to create (optional). - Use the
-h
flag to specify the hash of tokens to create (optional).
Create a new NFT.
node psf-slp-wallet.js token-create-nft -n wallet1 -m "My NFT" -t MNFT -i 9921cd7d19ca536e595f69a89fbc73e10cc446a7fe80acb3d78bd2b036997fe2
- Use the
-n
flag to specify the name of the wallet (required). - Use the
-m
flag to specify the name of the token (required). - Use the
-t
flag to specify the ticker of the token (required). - Use the
-i
flag to specify the Group token to burn, to generate the NFT (required). - Use the
-u
flag to specify the url of tokens to create (optional). - Use the
-h
flag to specify the hash of tokens to create (optional).
Mint new Fungible (Type 1) or Group tokens.
node psf-slp-wallet.js token-mint -n wallet1 -q 1 -t 1d542ac6b26a2c85a892b79b7ec39dfba5c731b95c644cf5aef75e580f5c7660
- Use the
-n
flag to specify the name of the wallet (required). - Use the
-q
flag to specify the quantity of tokens to create (required). - Use the
-t
flag to specify the token ID of the token to mint (required). - Use the
-r
flag to specify the receiver of the new baton (optional).
Create a new Mutable Data Address (MDA) for a token.
node psf-slp-wallet.js token-mda-tx -n wallet1 -a bitcoincash:qr2u4f2dmva6yvf3npkd5lquryp09qk7gs5vxl423h
- Use the
-n
flag to specify the name of the wallet to pay for transaction (required). - Use the
-a
flag to specify the Mutable Data Address (MDA) (required).
Update the token to point to a new version of the mutable data.
node psf-slp-wallet.js token-update -n wallet1 -c ipfs://bafkreifhtcnmf577q2s5lfr46ax5qf2jnk7oy3azu5x7ceab6xajcccl3u
- Use the
-n
flag to specify the name of the wallet controlling the MDA. - Use the
-c
flag to specify the IPFS hash of the new mutable data file.