Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utxos by asset add policy id filtering #170

Merged
merged 3 commits into from
Dec 28, 2023

Conversation

ecioppettini
Copy link
Contributor

With these changes any of the following are valid:

curl -X "POST" "http://localhost:3000/asset/utxos" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "fingerprints": ["asset1c43p68zwjezc7f6w4w9qkhkwv9ppwz0f7c3amw"],
  "range": { "minSlot": 22505578, "maxSlot": 22515578 }
}'

curl -X "POST" "http://localhost:3000/asset/utxos" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "policyIds": ["919d4c2c9455016289341b1a14dedf697687af31751170d56a31466e"],
  "range": { "minSlot": 22505578, "maxSlot": 22515578 }
}'

curl -X "POST" "http://localhost:3000/asset/utxos" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "policyIds": ["919d4c2c9455016289341b1a14dedf697687af31751170d56a31466e"],
  "fingerprints": ["asset1dgp85pz2m6pcs43jmkdy0fctngm56s9xd9kleg"],
  "range": { "minSlot": 35939453, "maxSlot": 35939853 }
}'

Also the policy id and asset name are added to the output, so that it's possible to index by policy id, for example. The fingerprint could be computed from those, but it's kept anyway to avoid that extra step.

@ecioppettini ecioppettini self-assigned this Dec 28, 2023
@SebastienGllmt SebastienGllmt merged commit cc61660 into main Dec 28, 2023
2 checks passed
@SebastienGllmt SebastienGllmt deleted the enzo/utxos-by-asset-add-policyid-filtering branch December 28, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants