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

Document JSON-API #2484

Merged
merged 11 commits into from
Oct 2, 2023
Prev Previous commit
Next Next commit
add link to section
  • Loading branch information
raphjaph committed Sep 30, 2023
commit 9c0da035f6fcb742e7edd44c2c3a2076d37f5ea8
18 changes: 17 additions & 1 deletion docs/src/guides/explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ To specify a port add the `--http-port` flag:

`ord server --http-port 8080`

To enable the JSON-API endpoints add the `--enable-json-api` or `-e` flag:
To enable the JSON-API endpoints add the `--enable-json-api` or `-e` flag (see
[here](#JSON-API) for more info):

`ord --enable-json-api server`

Expand Down Expand Up @@ -101,3 +102,18 @@ To see information about an UTXO, which includes inscriptions inside it, do:
```
curl -s -H "Accept: application/json" 'http:https://0.0.0.0:80/output/bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7cd3a70ef61ed:0'
```

Which returns:

```
{
"value": 10000,
"script_pubkey": "OP_PUSHNUM_1 OP_PUSHBYTES_32 156cc4878306157720607cdcb4b32afa4cc6853868458d7258b907112e5a434b",
"address": "bc1pz4kvfpurqc2hwgrq0nwtfve2lfxvdpfcdpzc6ujchyr3ztj6gd9sfr6ayf",
"transaction": "bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7cd3a70ef61ed",
"sat_ranges": null,
"inscriptions": [
"6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0"
]
}
```
Loading