{"openapi":"3.1.0","info":{"title":"CryptoWrap","description":"","license":{"name":""},"version":"0.1.3"},"paths":{"/api/v1/auth/token":{"get":{"tags":["Authentication"],"summary":"Generate a secure bearer token","description":"Returns a newly generated cryptographically secure random bearer token.","operationId":"generate_token","responses":{"200":{"description":"Token generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/api/v1/deposit/check":{"get":{"tags":["Payments"],"summary":"Check deposit status","description":"Returns deposit status.","operationId":"check","parameters":[{"name":"deposit_uuid","in":"query","description":"UUID of the deposit to check","required":true,"schema":{"type":"string"}},{"name":"price_to","in":"query","description":"Optional fiat currency for conversion (usd, eur, rub)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deposit request information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckDepositResponse"}}}},"404":{"description":"Deposit request not found"},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/deposit/create":{"post":{"tags":["Payments"],"summary":"Create a deposit address for selected coin and (optionally) network","description":"Returns assigned wallet address with UUID for internal tracking.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepositRequest"}}},"required":true},"responses":{"200":{"description":"Deposit address generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepositResponse"}}}},"401":{"description":"Token is missing or invalid"},"500":{"description":"Internal server error","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"api_key":[]}]}}},"components":{"schemas":{"CheckDepositResponse":{"type":"object","required":["deposit_uuid","wallet_address","amount_received","payment_status","is_finalized"],"properties":{"amount_received":{"type":"string"},"confirmations":{"type":["integer","null"],"format":"int32","minimum":0},"deposit_uuid":{"type":"string"},"fiat_amount":{"type":["string","null"]},"fiat_currency":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FiatCurrency"}]},"is_finalized":{"type":"boolean"},"payment_status":{"$ref":"#/components/schemas/DepositStatus"},"txids":{"type":["array","null"],"items":{"type":"string"}},"wallet_address":{"type":"string"}},"example":{"amount_received":"0","confirmations":null,"deposit_uuid":"3f270a5a-50be-4ad7-9f01-fffc2c5144b3","is_finalized":false,"payment_status":"waiting","txids":"[]","wallet_address":"46QYvqx4Z8JKk26DVyNbFjMgFqXyrXgAb3W8kEHBiSN78XrcoPRHk4ATjoCJ9eia5MVQMxDdQ6nAaa2D9MgLgZV31V2bCRS"}},"CreateDepositRequest":{"type":"object","required":["currency"],"properties":{"currency":{"$ref":"#/components/schemas/Currency"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Network"}]},"notify_url":{"type":["string","null"]}},"example":{"currency":"XMR"}},"CreateDepositResponse":{"type":"object","required":["deposit_uuid","wallet_address","currency","checkout_page"],"properties":{"checkout_page":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"deposit_uuid":{"type":"string"},"wallet_address":{"type":"string"}},"example":{"currency":"XMR","deposit_uuid":"3f270a5a-50be-4ad7-9f01-fffc2c5144b3","wallet_address":"46QYvqx4Z8JKk26DVyNbFjMgFqXyrXgAb3W8kEHBiSN78XrcoPRHk4ATjoCJ9eia5MVQMxDdQ6nAaa2D9MgLgZV31V2bCRS"}},"Currency":{"type":"string","enum":["XMR","LTC"]},"DepositStatus":{"type":"string","enum":["waiting","detected","confirmed","expired","error"]},"FiatCurrency":{"type":"string","enum":["usd","eur","rub"]},"Network":{"type":"string","enum":["MONERO","LITECOIN"]},"TokenResponse":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}},"example":{"token":"cwrp_live_*"}}},"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"tags":[{"name":"Authentication"},{"name":"Payments"}]}