Blockstream / Blockstream/asset_registry_v2
Legacy GET /{asset_id} omits issuance_txin and issuance_prevout
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 7
Description
It seems like Legacy endpoint for GET/{asset_id} is not not fully replicate behavior of legacy asset_registry. Previously, `issuance_prevout` and `issuance_txin` was always returned on GET endpoint ([source](https://github.com/Blockstream/asset_registry/blob/5ecf533caffeec23ea3887f89ccf0962bf601ebe/src/asset.rs#L33-L34)).
For example, for [this](https://github.com/Blockstream/lwk/blob/cddcd596667475f808ff11b208b814f025bb0854/lwk_wollet/tests/registry.rs#L10-L60) test in LWK, here is the resulting JSON for the old registry:
```json
{
"asset_id": "8532ed8651c04c81599836a0c069622088b9cd0b6cb156da223ac4758614a35d",
"collection": null,
"contract": {
"entity": {
"domain": "liquidtestnet.com"
},
"issuer_pubkey": "020202020202020202020202020202020202020202020202020202020202020202",
"name": "Test Asset",
"precision": 0,
"ticker": "TEST",
"version": 0
},
"entity": {
"domain": "liquidtestnet.com"
},
"issuance_prevout": {
"txid": "f925b2fe99bb2201dba10653107581ff1697221be21f172358be9e3391ad9e0c",
"vout": 0
},
"issuance_txin": {
"txid": "de05a6e93025753b79d5f7ba315c07de72878af22145218ba19a8332ea07211c",
"vin": 0
},
"issuer_pubkey": "020202020202020202020202020202020202020202020202020202020202020202",
"name": "Test Asset",
"precision": 0,
"ticker": "TEST",
"version": 0
}
```
And this is for the new registry:
```json
{
"name": "Test Asset",
"entity": {
"domain": "liquidtestnet.com"
},
"ticker": "TEST",
"version": 0,
"asset_id": "8532ed8651c04c81599836a0c069622088b9cd0b6cb156da223ac4758614a35d",
"contract": {
"name": "Test Asset",
"entity": {
"domain": "liquidtestnet.com"
},
"ticker": "TEST",
"version": 0,
"precision": 0,
"issuer_pubkey": "020202020202020202020202020202020202020202020202020202020202020202"
},
"precision": 0,
"issuer_pubkey": "020202020202020202020202020202020202020202020202020202020202020202"
}
```
Probably other missing pieces should be added as well to preserve legacy behavior.
Contributor guide
Research direction
Start at the legacy GET /{asset_id} endpoint and compare its response with the legacy JSON shown in the issue. Use the referenced LWK test in lwk_wollet/tests/registry.rs as a behavioral check, including issuance_prevout and issuance_txin and any other legacy fields. Done means the new registry preserves the legacy response behavior for this asset lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100