Hi @marco.chain thanks for testing!
1.) filter names/auctions by owner - that’s not implemented at the moment
I’ll add another index keeping this information and extend the name querying to support it.
2.) btc.chain
:
$ curl -s "http://localhost:4000/name/btc.chain" | jq '.'
{
"active": false, # not active any more - expired
"info": {
"active_from": 192815,
"auction_timeout": 29760,
"claims": [
4813782,
4726470
],
"expire_height": 242815, # expired at this height
"ownership": {
"current": "ak_2u8Ut2pD7e2AEfaENDocUz2vfyu745j9dckMJp5243BSwCynbT",
"original": "ak_2u8Ut2pD7e2AEfaENDocUz2vfyu745j9dckMJp5243BSwCynbT"
},
"pointers": {},
"revoke": null,
"transfers": [],
"updates": []
},
"name": "btc.chain",
"previous": [],
"status": "name"
}
But, indeed it’s also in auction again at the moment:
$ curl -s "http://localhost:4000/names/auctions" | jq '.data [] .name'
"b.chain"
"8.chain"
"5.chain"
"btc.chain"
"ant.chain"
"jelly.chain"
"nikita.chain"
"AEStudio.chain"
"neuralink.chain"
The name
endpoint first checks active and inactive names, because in case like this, if it shows auction first, there wouldn’t be a way to get the last valid name information (ownership, txs related to the name, …)
I’ll add another endpoint auction
- that one will return last bid information only if it is in auction.
The status
field in name reply - can be either:
- name - if it is a “real” name object (which can have pointers for example)
- auction - name in “preparation” - which will only be promoted to “real” name once auction ends
If the name was revoked with revoke transaction - the status
would be “name” (because it was a real name before), active
would be “false”, and revoke
would have transaction index instead of “null”.
The integers in arrays of claims
, updates
, transfers
and single integer in revoke
- they are transaction indices - unique integer identifiers of txs.
The idea was to not return all the details for each name, as it can be a lot of data. User can take the transaction id and query it if needed, eg. - first claim for btc.chain
:
$ curl -s "http://localhost:4000/txi/4813782" | jq '.'
{
"block_hash": "mh_YgGcm1CPaTgLAzyuDspNEj5mUC7S45zcU4PciyTdbeis9r25J",
"block_height": 163055,
"hash": "th_2eopxM3qfDKJSgUn3hQfii7JHzHWgZwoRiFpJAQBTd2L5BYvsD",
"micro_index": 9,
"micro_time": 1572790967367,
"signatures": [
"sg_qFpAA7VPWHpLZrfroeBkDeeJuBWYrqdkNjFA7DHHVw6TSpVfXGPmmydA4KizgjWqA9ywqLoTAPiWQmy1EfABfeoMkkUE"
],
"tx": {
"account_id": "ak_2u8Ut2pD7e2AEfaENDocUz2vfyu745j9dckMJp5243BSwCynbT",
"fee": 16360000000000,
"name": "btc.chain",
"name_fee": 5e+20,
"name_id": "nm_REqqEHnPPD5ZGgqeHSn9HwE5K1e99kmE4pjsKJSJbjoH8ZMdA",
"name_salt": 0,
"nonce": 3,
"type": "NameClaimTx",
"version": 2
},
"tx_index": 4813782
}
But since it’s a valid use case to get everything in one go, I’ll add expand
query parameter which when present returns full jsons for txs in those arrays, to avoid roundtrips needed for pulling all info.
(README in repo should have explanations for all fields in the replies)
3.) kryptokrauts.chain
Locally, I have a fixed version of MDW, so pulling full history for a name works:
$ curl -s "http://localhost:4000/txs/forward?name=kryptokrauts.chain&limit=100" | jq '.'
{
"data": [
{
"block_hash": "mh_8KVfET8fJW7AX5exbUNu4k9448xEEzbunG8enT5vQM6Szh3r3",
"block_height": 161256,
"hash": "th_pxVHa3C9QmbfmSZQJ3m4uuzNeQLaPbwZxqetxS7zVdh1DWo35",
"micro_index": 0,
"micro_time": 1572466616063,
"signatures": [
"sg_A4YLyxnrA2tRfEgXQuGADhgdLdgp5Po6CmjWffTS1yhKEt2ehJsiNfMZSaJU9sKs4beLNsYFkYw7KvxXSSXEUz5ipq81Q"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"fee": 16700000000000,
"name": "kryptokrauts.chain",
"name_fee": 2865700000000000000,
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_salt": 13738264157424663000,
"nonce": 2,
"type": "NameClaimTx",
"version": 2
},
"tx_index": 4677602
},
{
"block_hash": "mh_2cC6yYfJbuzFtkEHY7iu9UFAWW6fKPYT1G3TX7mZCnyhie84hP",
"block_height": 161723,
"hash": "th_kNBQdCtdtYGKnUMGs6Bam7Vq93Mx6dwo6oTLhsdznXEZoFgMK",
"micro_index": 2,
"micro_time": 1572550092237,
"signatures": [
"sg_Xo71X4BF1ubwVGCEJnZhMLAbtku2Z9coC3LD6gcTfJkmDCvWhCcWEtcLQoJFqxxybTVk7QkNfvXPHoFNC4zhSLk3LzLUS"
],
"tx": {
"account_id": "ak_2ruXgsLy9jMwEqsgyQgEsxw8chYDfv2QyBfCsR6qtpQYkektWB",
"fee": 16540000000000,
"name": "kryptokrauts.chain",
"name_fee": 4e+18,
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_salt": 0,
"nonce": 133,
"type": "NameClaimTx",
"version": 2
},
"tx_index": 4712510
},
{
"block_hash": "mh_2TT4DSk8UCRMmbXaSnFukovirHC2D2KEkhsQuiNhcqPHt4e29t",
"block_height": 161730,
"hash": "th_2aKbv2DSfa42UarE4WF7yQw9NVJ9LsPA38MdiuZks73pVLGwAh",
"micro_index": 17,
"micro_time": 1572551564324,
"signatures": [
"sg_EYx8irvokXVuLEzhyAVCbQ1tpe7zGgYnrmFjxHrgSybo3bQhk8kNj3ymNeJRrYMCAGa3wJDkZukSGNgaPDkjJFnYjX8QD"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"fee": 16540000000000,
"name": "kryptokrauts.chain",
"name_fee": 4.2e+18,
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_salt": 0,
"nonce": 75,
"type": "NameClaimTx",
"version": 2
},
"tx_index": 4713104
},
{
"block_hash": "mh_2iKjfjJXyPT5Wwars2BbrzNGDsgsvoDUb2KKBaxfLnjvLoQemZ",
"block_height": 162223,
"hash": "th_259B1j2hHmg9BbcKyMbTKCB1KXqiddrHTYKBiUwJk8J5hRTSzq",
"micro_index": 34,
"micro_time": 1572638969545,
"signatures": [
"sg_JzRjEZFkUqLt3YuELMKA6BnxM9DgVCoEhnjWTLJeQkQ5XfKzTH6KKFaEL2yAHpqijZwn5jK5qZmfyeJZ6t5GMH2Kp66As"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17700000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 0,
"nonce": 105,
"pointers": [
{
"id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 4749564
},
{
"block_hash": "mh_iNeqDa2RascsrZFWCyjNdb7mWSWi1TzdmB5JW1MphpVMBy21f",
"block_height": 164329,
"hash": "th_5iDs97dCh8o3UE3XmRVyUosgUwpRUB3K2qJz1AqyfjLLtiFgt",
"micro_index": 0,
"micro_time": 1573020264503,
"signatures": [
"sg_GVw95MPapandxQkPebr8m3TN4CMLe5YUhXh7LD2zMN8tUwToKdaeL65ExnRgd9C2o7A7NyAH75zZZ9WRiRxzj2yHHrPFV"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"fee": 16700000000000,
"name": "kryptokrauts.chain",
"name_fee": 2865700000000000000,
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_salt": 12169832380676643000,
"nonce": 123,
"type": "NameClaimTx",
"version": 2
},
"tx_index": 4910093
},
{
"block_hash": "mh_9ibihHDwhLgwZTGR4ECn5iLLw4DFyK7yi2vS1C5JUvtRgugRC",
"block_height": 165115,
"hash": "th_2FmHk71wWxcx2oUfNAavX5TUnFA8vaS83aNhuwgYQt3u59NkGz",
"micro_index": 15,
"micro_time": 1573162891973,
"signatures": [
"sg_WD2C9BMBV6moUCkrKMtBsTccn98pKzrkyhK8nnTYrj7pGZ4V5Zo5Lgtao61ieRggVzG94H2VVKQzHPTAZrUJXx29QePtX"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17740000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 50000,
"nonce": 125,
"pointers": [
{
"id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 4968737
},
{
"block_hash": "mh_2ZvfuMY6Pc5rNFLunHWZQgjTdUagndt6PFoWMV3pjVan71Q3gJ",
"block_height": 165117,
"hash": "th_2TFuNFBhA69SUaoeXhKhjopcRXDBLgbxTFsmrDDH9wjnGyfueE",
"micro_index": 43,
"micro_time": 1573163102805,
"signatures": [
"sg_WmpCrRPvZCeKtWkbYFsKc6P3mSKLECnR4CgVBx5mg3c7Y2Lq1NTVA7njWZ6h96eC7yu7MHCRCRyiE7USpTsZBrv9UxuLM"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17740000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 50000,
"nonce": 126,
"pointers": [
{
"id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 4968822
},
{
"block_hash": "mh_2fJ9KEE5UnvvgA8kKnfGnAq82CUAqtgBr5CFrBJquJufWe7bUy",
"block_height": 195999,
"hash": "th_2CMshRX2jJE9im7AMsBnjSic2px8sHh989vpmQx8tPn7wHkHMM",
"micro_index": 36,
"micro_time": 1578749492928,
"signatures": [
"sg_GvYhieGPYFZYfPUfyEMq8bF5wVjUEaBNJ9LNFTPtagPDPuqJVgs6wVB7Nm2fqQACXNFxYbBvdWvH6aMxSggCi5UtfNUv6"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17760000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 50000,
"nonce": 137,
"pointers": [
{
"id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 6685739
},
{
"block_hash": "mh_85uHYvH27J38Rd8CQiJnSCGqpMS6rtcGKBYCSYk1ayPPc4MM6",
"block_height": 239966,
"hash": "th_7RVW3kUKctkqSeperGiW3WdJtmG5N8sqwFhRrcTtREGYkiUfE",
"micro_index": 23,
"micro_time": 1586707720770,
"signatures": [
"sg_SNhJWwV1yYmVL44WsKSp4pQ9DvV5vq4ZMXWKHyiz8jbRLeRTzajZtSFxVEPGw2T3RHaTBrNCpn79Z5iqkcKtyeBbjHppV"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17760000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 50000,
"nonce": 179,
"pointers": [
{
"id": "ak_2QGAAqDXK7g8zCbck7zm25TGAW1hRuVCET2SRCCFCMSMjrVCrF",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 9992918
},
{
"block_hash": "mh_2QXcrh5qjcNkx72xGwHbfKYeL5Gbf7iGr4it6XTVKvDYna6hGw",
"block_height": 287727,
"hash": "th_2QEKrD4drPfqcGAaEGHL76cLRdxDtwXuJqfJzPQDEpxUpAXBdZ",
"micro_index": 12,
"micro_time": 1595343236527,
"signatures": [
"sg_VQSP5Ehcwp9xin5zUHMJRe443L9kaS1buBUGTyh9qTFyQHs8Ab71F4RgCTUkCKsM4fxB78vv7vpJ55At4JprDphA6f7pN"
],
"tx": {
"account_id": "ak_5z1fmzTKR1GA1P7qiLDCC1s3V7AK2RRpNbXqUhfHQbUeg7mmV",
"client_ttl": 0,
"fee": 17760000000000,
"name": "kryptokrauts.chain",
"name_id": "nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr",
"name_ttl": 50000,
"nonce": 215,
"pointers": [
{
"id": "ak_2QGAAqDXK7g8zCbck7zm25TGAW1hRuVCET2SRCCFCMSMjrVCrF",
"key": "account_pubkey"
}
],
"type": "NameUpdateTx",
"version": 1
},
"tx_index": 13654101
}
],
"next": null
}
I’l push the fix upstream and we will update public hosts so it’s possible to retrieve transaction history related to name…
On deployed host without the fix, you can get the same result with:
curl -s "http://localhost:4000/txs/forward?name_id=nm_2HMHaB4d5H85b7m1PhU734Ebcfsyf7LwHwTdpUmYAyMgbYV6Lr&limit=100" | jq '.'
There doesn’t seem to be a revoke TX for that name, maybe it was during the period the node seeds were changed and there were multiple long running forks so it didn’t end up in main chain.
Thanks again for feedback!