Skip to content

Instantly share code, notes, and snippets.

@sgeisler
Last active September 19, 2020 14:58
Show Gist options
  • Save sgeisler/ff29635037938f45a4837920401fd3c5 to your computer and use it in GitHub Desktop.
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
# 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