Last active
September 19, 2020 14:58
-
-
Save sgeisler/ff29635037938f45a4837920401fd3c5 to your computer and use it in GitHub Desktop.
Fetch the Liquid asset list and add the ticker labels to elements.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. fetches asset registry JSON | |
# 2. extract ticker symbol and asset id | |
# 3. format it in the elements.conf format | |
# 4. deduplicate ticker symbols (apparently no uniqueness is enforced, beware that this operation is lossy) | |
# 5. append the labels to ~/.elements/elements.conf | |
curl https://assets.blockstream.info/ | jq -r '.[] | values | (.contract.ticker, .asset_id)' | xargs -n2 bash -c 'echo "assetdir=$1:$0"' | sort -t ':' -k '2' -u >> ~/.elements/elements.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment