Files
mesh/testdata/telegram_paths.json

444 lines
14 KiB
JSON

{
"/api/v1/lumi/telegram/link": {
"post": {
"summary": "Create a one-use Lumi Telegram account link",
"description": "Authenticated account only. The link expires after ten minutes. Account signing keys stay in the app.",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Bot deep link"
},
"401": {
"description": "Sign in required"
},
"503": {
"description": "Bot unavailable"
}
}
},
"delete": {
"summary": "Disconnect the account's Telegram chat",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Disconnected"
},
"401": {
"description": "Sign in required"
}
}
}
},
"/api/v1/lumi/telegram/updates": {
"get": {
"summary": "Claim the next app action or owner feedback message",
"description": "Requires a stable 64-character app client identifier. Each update belongs to one executor. Owner feedback is restricted to the configured immutable account ID.",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "client",
"in": "query",
"required": true,
"schema": {
"type": "string",
"minLength": 64,
"maxLength": 64
}
}
],
"responses": {
"200": {
"description": "Link status and next claimed update"
},
"400": {
"description": "Invalid client"
},
"401": {
"description": "Sign in required"
}
}
}
},
"/api/v1/lumi/telegram/ack": {
"post": {
"summary": "Acknowledge an action claimed by this app client",
"description": "An optional reply sends the final answer to the originating private Telegram message once. It requires the original account and claiming client. A 202 acknowledgement records that delivery could not be confirmed and prevents automatic replay.",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Acknowledged. Any requested reply has a delivery receipt"
},
"202": {
"description": "Acknowledged. Telegram delivery is unconfirmed"
},
"409": {
"description": "No matching private Telegram message claim"
},
"400": {
"description": "Invalid receipt"
},
"401": {
"description": "Sign in required"
}
}
}
},
"/api/v1/lumi/telegram/messages": {
"post": {
"summary": "Acknowledge a legacy Lumi conversation upload without sending to Telegram",
"description": "Authenticated history uploads from older apps drain silently, including stale history and previous uncertain deliveries. Conversation history remains in encrypted account sync. No Telegram text, actions or notifications are sent.",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Acknowledged without external delivery"
},
"400": {
"description": "Invalid upload"
},
"401": {
"description": "Sign in required"
}
}
}
},
"/api/v1/lumi/telegram/webhook": {
"post": {
"summary": "Accept private-chat updates from the dedicated Lumi bot",
"description": "Requires X-Telegram-Bot-Api-Secret-Token. Only numeric sender identities in their own private chats are accepted. Duplicate update IDs cannot execute a second action.",
"responses": {
"200": {
"description": "Accepted or ignored"
},
"400": {
"description": "Invalid update"
},
"401": {
"description": "Webhook authentication required"
}
}
}
},
"/api/v1/telegram/environment": {
"get": {
"summary": "Read the issuing node and production bot identity",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
}
}
},
"/api/v1/telegram/entry": {
"post": {
"summary": "Read an expiring bot entry challenge",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
}
}
},
"/api/v1/telegram/entry/verify": {
"post": {
"summary": "Verify raw Telegram initData and possession of separate delegate keys",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
}
}
},
"/api/v1/telegram/entry/status": {
"post": {
"summary": "Read verified entry status using a fresh delegate proof",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
}
}
},
"/api/v1/telegram/entry/rendezvous": {
"post": {
"summary": "Discover an owner authorization request using a fresh verified delegate proof",
"description": "Issuing-node only. Requires the same verified numeric Telegram sender and delegate signing/encryption keys as the expiring bot entry. Each proof is bound to the entry, action, node, audience, expiry and one-use nonce. URL possession alone cannot poll. The response contains only expiring authorization rendezvous metadata; account identity, numeric sender, private keys and recovery data are never returned. This discovery does not approve a grant.",
"responses": {
"200": {
"description": "Minimal matching owner authorization rendezvous"
},
"202": {
"description": "Verified entry is waiting for an owner authorization request"
},
"400": {
"description": "Malformed entry action"
},
"401": {
"description": "Verified delegate proof rejected or expired"
},
"404": {
"description": "Entry unavailable"
},
"409": {
"description": "Proof replayed or current account binding conflicts"
},
"503": {
"description": "Entry or owner request unavailable"
}
}
}
},
"/api/v1/telegram/entry/cancel": {
"post": {
"summary": "Cancel a verified entry with a fresh delegate proof",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
}
}
},
"/api/v1/telegram/account/bind": {
"post": {
"summary": "Bind a locally created or restored owner account to the verified Telegram entry",
"description": "Issuing-node only. Entries expire after ten minutes. Telegram identity is verified server-side; no owner private key or recovery passphrase is accepted. Status, cancel and bind require fresh one-use key proofs. Bind additionally requires an existing owner bearer and unchanged v6 owner/device transaction signatures.",
"responses": {
"200": {
"description": "Verified result"
},
"400": {
"description": "Malformed proof"
},
"401": {
"description": "Identity or signature rejected"
},
"409": {
"description": "Expired, conflicting, or replayed entry"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"/api/v1/telegram/launch": {
"post": {
"summary": "Verify raw Telegram Mini App launch data",
"description": "Requires an owner bearer or Telegram-linked delegate proof and a JSON body with app_id and init_data. Returns verified start_param, chat_type and purchase availability.",
"responses": {
"200": {
"description": "Verified launch"
},
"401": {
"description": "Invalid launch or account authentication"
},
"403": {
"description": "Telegram app or linked buyer unavailable"
},
"409": {
"description": "Launch already bound to a different app"
}
}
}
},
"/api/v1/tokens/purchases/telegram/catalog": {
"get": {
"summary": "Read canonical Dew packs offered for Telegram Stars",
"parameters": [
{
"name": "app_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Enabled products with XTR and wallet-unit amounts"
},
"403": {
"description": "Telegram purchase permission required"
}
}
}
},
"/api/v1/tokens/purchases/telegram/balance": {
"get": {
"summary": "Read the linked purchaser's Dew balance",
"parameters": [
{
"name": "app_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Current account, app, asset and signed integer wallet balance"
},
"403": {
"description": "Telegram purchase permission required"
}
}
}
},
"/api/v1/tokens/purchases/telegram/invoices": {
"post": {
"summary": "Create a buyer-bound XTR invoice link",
"description": "Requires app_id, product_id, request_id and fresh init_data. Reuse request_id only for retries of the same product.",
"responses": {
"200": {
"description": "Existing invoice"
},
"201": {
"description": "Created invoice"
},
"409": {
"description": "Request ID terms conflict"
},
"503": {
"description": "Creation retryable"
}
}
}
},
"/api/v1/tokens/purchases/telegram/invoices/{invoice_id}": {
"get": {
"summary": "Read the issuer's Stars settlement state",
"parameters": [
{
"name": "invoice_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
}
],
"responses": {
"200": {
"description": "Own invoice status and quote"
},
"404": {
"description": "Invoice unavailable"
}
}
}
},
"/api/v1/tokens/purchases/telegram/invoices/{invoice_id}/cancel": {
"post": {
"summary": "Cancel an unpaid Stars invoice before approval",
"parameters": [
{
"name": "invoice_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
}
}
],
"responses": {
"200": {
"description": "Current invoice status and quote"
},
"409": {
"description": "Checkout already approved"
}
}
}
},
"/api/v1/admin/tokens/purchases/telegram/reconcile": {
"post": {
"summary": "Reconcile one authenticated Telegram Stars transaction page",
"description": "Requires the configured admin header or direct loopback operator access. JSON body with nonnegative offset. Up to 32 entries per call.",
"responses": {
"200": {
"description": "Seen and matched counts and next_offset"
},
"503": {
"description": "Provider or wallet temporarily unavailable"
}
}
}
}
}