Доказательство включения согласования в дерево Меркла
GET /v1/approval/{number}/ledger-proof
https://verify.tanba-ooh.kz/v1/approval/{number}/ledger-proof
Технический текст справочника написан на английском.
Доказательство того, что лист согласования (вид issued, а для его отзыва revoked) входит в дерево его дня. Проверка: tanba-verify inclusion --proof FILE.json --approval NUMBER. 404, пока день не закрыт и не записан.
Аутентификация
Не требуется. Вызов открытый.
Параметры
| Имя | Где | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|---|
number | путь | string | да | Номер согласования. | TNB-2026-000123 |
kind | запрос | string | нет | Какой лист доказывать: issued или revoked. issued, revoked | issued |
Ответы
200 Доказательство.
application/json
LedgerProof
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
v | const | да | Version of the proof format. | 1 |
day | string (date) | да | The Asia/Almaty day of the tree. | "2026-10-05" |
leaf | oneOf | да | One entry of a ledger day. The kind says what the entry is about. | |
leaf_sha256 | string | да | Hex SHA-256 of the leaf. | "3a6e9c0cc1490e884c3b4a9c6bfd39e19d928a0838407cd48b6317ebcc2ed825" |
index | integer | да | Position of the leaf in the tree, counting from 0. | 3 |
leaf_count | integer | да | Number of leaves in the tree. | 14 |
path | array of object | да | Siblings from the leaf up to the root; a node is SHA-256(0x01, left, right). | |
path[].side | string | да | Where the sibling sits. left, right | |
path[].hash | string | да | Hex SHA-256 of the sibling node. | "e6e9ae1d34d7966232cd03927b9cf18c6d1e1c9532cde816ca929ed482e27326" |
merkle_root | string | да | Hex SHA-256 root of the tree. | "53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b" |
anchor_sha256 | string | да | Hex SHA-256 of the anchor body of the day. | "e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4" |
digest | string | да | Hex SHA-256 of the anchor body hash followed by the Merkle root. | "44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46" |
Пример
{
"v": 1,
"day": "2026-10-05",
"leaf": {
"kind": "issued",
"approval_number": "TNB-2026-000123",
"manifest_sha256": "878a9b0a8452700baaab5574e39716d67a93a07597baab30823639c69bf1e889",
"signed_at": "2026-10-05T06:20:31.482913Z",
"revoked_at": "2026-10-05T09:02:44.100200Z"
},
"leaf_sha256": "3a6e9c0cc1490e884c3b4a9c6bfd39e19d928a0838407cd48b6317ebcc2ed825",
"index": 3,
"leaf_count": 14,
"path": [
{
"side": "left",
"hash": "e6e9ae1d34d7966232cd03927b9cf18c6d1e1c9532cde816ca929ed482e27326"
}
],
"merkle_root": "53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b",
"anchor_sha256": "e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4",
"digest": "44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46"
}
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 404 | Ничего нет или вызывающему это не видно. |
| 429 | Превышен предел частоты; см. Retry-After. |
Примеры кода
curl
curl 'https://verify.tanba-ooh.kz/v1/approval/TNB-2026-000123/ledger-proof'
Python
import requests
response = requests.get(
"https://verify.tanba-ooh.kz/v1/approval/TNB-2026-000123/ledger-proof",
)
print(response.status_code, response.text)
Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://verify.tanba-ooh.kz/v1/approval/TNB-2026-000123/ledger-proof", nil)
if err != nil {
panic(err)
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}