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

Adds /v1/names/ response for pending names #8

Merged
merged 3 commits into from
Mar 23, 2018

Conversation

kantai
Copy link
Member

@kantai kantai commented Mar 23, 2018

Addresses #7 --- when a name is pending (a batch containing the name isn't issued yet) or the batch has been submitted, but not picked up by indexers yet, the registrar will respond to /v1/names/ lookups.

For pending names, the status will be "pending_subdomain" and last_txid will be an empty string. For submitted names, the status will be "submitted_subdomain" and last_txid will be the txid it was submitted in.

Examples:

$ curl -q localhost:3000/v1/names/potato.testing_test.id | jq .
{
  "blockchain": "bitcoin",
  "status": "pending_subdomain",
  "last_txid": "",
  "zonefile": "$ORIGIN potato.testing_test.id\n$TTL 3600\n_https._tcp URI 10 1 \"https://gaia.blockstack.org/hub/1PQs1WF5BPDM7bT85z2TBaLCofsnGBEatb/profile.json\"\n",
  "address": "1PQs1WF5BPDM7bT85z2TBaLCofsnGBEatb",
  "zonefile_hash": "81637262dfde7bbf774ccb60964c02a610acac18"
}

$ curl -q localhost:3000/v1/names/aaron.testing_test.id | jq .
{
  "address": "16LPutBwZQXy9BypANh1q2y5Z5fpwrmifp",
  "blockchain": "bitcoin",
  "last_txid": "ca18e86b06660db934a697ed417e650988ba4a9da4296d155d55909400dda3fb",
  "status": "submitted_subdomain",
  "zonefile": "$ORIGIN aaron.blockstack_berlin.id\n$TTL 3600\n_https._tcp URI 10 1 \"https://gaia.blockstack.org/hub/16LPutBwZQXy9BypANh1q2y5Z5fpwrmifp/profile.json\"\n",
  "zonefile_hash": "320d7c7cc5c0be10da74a9eb487e4c216982118a"
}

@kantai kantai added the feature label Mar 23, 2018
@kantai kantai merged commit 20375ed into master Mar 23, 2018
@kantai kantai deleted the feature/respond-for-pending branch March 23, 2018 15:52
@kantai kantai mentioned this pull request Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant