├── .github └── ISSUE_TEMPLATE │ └── bug_report.yaml ├── .gitignore ├── README.md └── api ├── tonapi.yaml └── tonpusher.yaml /.github/ISSUE_TEMPLATE/bug_report.yaml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report of critical bug such as UX inconsistencies, logical contradictions and functional shortcomings. 3 | labels: 'Bug Report' 4 | body: 5 | - type: dropdown 6 | id: bug_type 7 | attributes: 8 | label: Bug Type 9 | description: Select the bug type 10 | options: 11 | - Functional 12 | - UX 13 | - UI 14 | - Performance 15 | - Security 16 | - Localization 17 | - Other 18 | validations: 19 | required: true 20 | - type: textarea 21 | id: reproduction-steps 22 | attributes: 23 | label: Reproduction steps 24 | description: Steps to reproduce a bug (you are welcome to attach screenshots here) 25 | placeholder: 1. Click diamond 2. HODL 26 | validations: 27 | required: true 28 | - type: textarea 29 | id: actual-result 30 | attributes: 31 | label: Actual result 32 | description: What was seen 33 | placeholder: When action is done, something happens 34 | validations: 35 | required: true 36 | - type: textarea 37 | id: expected-result 38 | attributes: 39 | label: Expected result 40 | description: What was expected 41 | placeholder: When action is done, nothing happens 42 | validations: 43 | required: true 44 | - type: dropdown 45 | id: suggested-severity 46 | attributes: 47 | label: Suggested Severity 48 | description: Severity of the bug 49 | options: 50 | - Vulnerability 51 | - Critical 52 | - High 53 | - Medium 54 | - Low 55 | validations: 56 | required: true 57 | # - type: dropdown 58 | # id: browsers 59 | # attributes: 60 | # label: "Browsers" 61 | # description: What browsers are you seeing the problem on ? 62 | # multiple: true 63 | # options: 64 | # - Chrome 65 | # - Safari 66 | # - Firefox 67 | # - Microsoft Edge 68 | # - Brave 69 | # validations: 70 | # required: false 71 | # - type: dropdown 72 | # id: os 73 | # attributes: 74 | # label: "OS" 75 | # description: What is the impacted environment ? 76 | # multiple: true 77 | # options: 78 | # - Windows 79 | # - Linux 80 | # - Mac 81 | # validations: 82 | # required: false 83 | - type: textarea 84 | id: device 85 | attributes: 86 | label: Device 87 | description: Information about device 88 | value: | 89 | Desktop (please complete the following information): 90 | - OS: [e.g. iOS] 91 | - Browser [e.g. chrome, safari] 92 | - Version [e.g. 22] 93 | 94 | Smartphone (please complete the following information): 95 | - Device: [e.g. iPhone6] 96 | - OS: [e.g. iOS8.1] 97 | - Browser [e.g. stock browser, safari] 98 | - Version [e.g. 22] 99 | validations: 100 | required: true 101 | - type: textarea 102 | id: additional-context 103 | attributes: 104 | label: Additional Context 105 | description: Add any other context about the problem here. You can also attach any extra screenshots or screencasts here. 106 | placeholder: e.g. device was rooted 107 | validations: 108 | required: false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TonAPI Auth 2 | 3 | ## Registering your API key 4 | At the moment you need special key to be able to use TonAPI, otherwise you requests will be limited. 5 | 6 | To obtain special key which we call **serverSideKey** or **clientSideKey** in this doc - you need to use telegram bot https://t.me/tonapi_bot 7 | 8 | Bot support two commands: **/get_server_key** and **/get_client_key**. 9 | 10 | Tonapi can be used both from client side as well as from server side. From code perspective there is not much of a difference, but it's important to not use **serverSideKey** anywhere on the client side, and at the same time to use **clientSideKey** only on client side. The reason for this is because client side key has additional limitations per IP, while serverside key can be banned in case of large amount of flood requests to the api, so its usage should be limited by the developer. 11 | 12 | ## Performing API requests 13 | Once you have API key you can perform simple requests to the api. 14 | 15 | One of the basic methods is **/v1/blockchain/getAccount** 16 | 17 | So you can make an **GET** http request to the url 18 | ``` 19 | https://tonapi.io/v1/blockchain/getAccount?account=EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N 20 | ``` 21 | But as mentioned above there an **Authorization** header should be passed to access the method: 22 | ``` 23 | Bearer eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9... 24 | ``` 25 | Here is an **javascript** code example to perform such request: 26 | ```javascript 27 | fetch("https://tonapi.io/v1/blockchain/getAccount?" + new URLSearchParams({ 28 | account: 'EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N', 29 | }), { 30 | method: 'GET', 31 | headers: new Headers({ 32 | 'Authorization': 'Bearer '+serverSideKey, 33 | }), 34 | }) 35 | ``` 36 | Also take a look at the same example but using **Go**: 37 | ```go 38 | req, err := http.NewRequest("GET", "https://tonapi.io/v1/blockchain/getAccount", nil) 39 | if err != nil { 40 | log.Println(err) 41 | os.Exit(1) 42 | } 43 | 44 | q := req.URL.Query() 45 | q.Add("account", "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N") 46 | req.URL.RawQuery = q.Encode() 47 | 48 | req.Header.Add("Authorization", "Bearer "+serverSideKey) 49 | 50 | // Send req using http Client 51 | client := &http.Client{} 52 | resp, err := client.Do(req) 53 | if err != nil { 54 | log.Println("Error on response.\n[ERROR] -", err) 55 | } 56 | defer resp.Body.Close() 57 | ``` 58 | 59 | ## Using an SDK 60 | To make things simpler for developers we introduced an SDK: https://github.com/startfellows/tonapi-sdk-js 61 | 62 | Also since tonapi is built with **swagger** you can generate SDK for any language you prefer. Please use swaggerfile available on this URL: https://tonapi.io/swagger/swagger.json 63 | 64 | ## TON authorization overview 65 | ### 1) Redirect user to the auth page 66 | To perform auth user must be redirected to special page where auth can be checked 67 | tonapi.io/login?{params} 68 | 69 | **Params supported:** 70 | * **redirect_url** – *[optional]* *string*, url where user will be redirected after successful auth 71 | * **callback_url** – *[optional]* *string*, url which will be called from backend in after successful auth 72 | * **app_id** – *string*, identifier of the app. Name and icon of the app will be used on the authorization page. (not supported yet) 73 | 74 | 75 | One of the params **redirect_url** or **callback_url** must be passed. Please note that **authToken** which you will get after authorization flow is **ONE TIME USE**, **SHORT LIVING** token which should be exchanged to persistent token serverside via tonapi.io/v1/oauth/getToken. Just receiving authToken is not a proof of successful user authorization and can be possibly swapped or be stolen by attacker. 76 | 77 | In case of success the **callback_url** or **redirect_url** will be triggered with following GET params added: 78 | * **success** – boolean, true in case if auth was successfully performed (not supported yet) 79 | * **auth_token** – *[optional]* *string*, one-time-use token 80 | * **error_code** – *[optional]* *string*, in case of success=false short text code of error (not supported yet) 81 | * **error_text** – *[optional]* *string*, in case of success=false text human readable description of error (not supported yet) 82 | 83 | **Examples:** 84 | ```javascript 85 | { 86 | "success": true, 87 | "auth_token": "abcd..." 88 | } 89 | ``` 90 | ```javascript 91 | { 92 | "success": false, 93 | "error_code": "auth_rejected", 94 | "error_text": "User canceled authorization" 95 | } 96 | ``` 97 | 98 | ### 2) Fetching persistent token via tonapi.io/v1/oauth/getToken method. 99 | After successfully obtaining **auth_token** via process described below /auth method should be called from server side to check that the **auth_token** is valid. 100 | 101 | Authorization header must be passed to this method the same way as any other methods in tonapi.io API. Token can be obtained with t.me/tonapi_bot telegram bot. [Learn more about serverside and clientside flows.](#serverside-and-clientside-flows) 102 | 103 | Example header: 104 | ``` 105 | Authorisation: Bearer AppKeyHere 106 | ``` 107 | **Serverside auth header:** 108 | ```javascript 109 | var options = { 110 | host: 'tonapi.io', 111 | path: '/v1/nft/getCollections', 112 | headers: { 113 | 'Authorization': 'Bearer ' + serverSideKey, 114 | } 115 | }; 116 | http.request(options, () => {}).end(); 117 | ``` 118 | 119 | **Clientside auth header:** 120 | ```javascript 121 | var options = { 122 | method: 'get', 123 | headers: new Headers({ 124 | 'Authorization': 'Bearer '+clientSideKey, 125 | }), 126 | } 127 | fetch("https://tonapi.io/v1/nft/getCollections", options) 128 | ``` 129 | 130 | There are two types of AppKeys that can be generated by t.me/tonapi_bot, serverside key and clientside key. 131 | 132 | 133 | Following POST params needed by this method: 134 | * **auth_token**, *string*, the token which was returned by the method below 135 | * **rate_limit**, *number*, request per seconds 136 | * **token_type**, *string [client, server]*, type of token which will be used to indicate the app 137 | 138 | **Examples:** 139 | ```javascript 140 | { 141 | "success": true, 142 | "user_token": "abcd...", 143 | "address": "EQrt...s7Ui", 144 | "pubkey": "Pub6...2k3y", // base64-encoded Ed25519 public key 145 | "signature": "Gt562...g5s8D=", // base64-encoded ed25519 signature 146 | "wallet_version": "v4R2", // supported values: "v3R1", "v3R2", "v4R1", "v4R2" 147 | "client_id": "abc" 148 | } 149 | ``` 150 | ```javascript 151 | { 152 | "success": false, 153 | "error_code": "auth_rejected", 154 | "error_text": "User canceled authorization" 155 | } 156 | ``` 157 | 158 | ## Decentralised proof of ownership 159 | It is possible to check proof of ownership, without fully relying on TONAPI. Here is the example of code needed to check signature and be sure that user have access to provided wallet. 160 | https://github.com/tonkeeper/ton-connect/blob/main/tonconnect-server/src/TonConnectServerV1.ts#L36 161 | 162 | 163 | 164 | ## OAuth demo 165 | Check out simple demo of Authorization flow: 166 | 167 | [View Demo](https://auth.tonapi.io/) 168 | 169 | *** 170 | ```javascript 171 | Quick start guide: 172 | 173 | 1) git clone git@github.com:startfellows/tonapi-oauth-demo.git 174 | 2) cd tonapi-oauth-demo 175 | 3) yarn 176 | 4) yarn start 177 | ``` 178 | 179 | Look at the source code for more [details](https://github.com/startfellows/tonapi-oauth-demo/blob/master/src/App.tsx) 180 | -------------------------------------------------------------------------------- /api/tonapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: REST api to TON blockchain explorer 4 | version: 0.0.1 5 | description: Provide access to indexed TON blockchain 6 | contact: 7 | name: Support 8 | email: contact@fslabs.org 9 | servers: 10 | - url: "https://tonapi.io" 11 | - url: "https://testnet.tonapi.io" 12 | - url: "http://localhost:8081" 13 | paths: 14 | /v1/system/time: 15 | get: 16 | security: 17 | - JWTAuth: [ "common" ] 18 | description: Get current time 19 | operationId: currentTime 20 | tags: 21 | - System 22 | responses: 23 | '200': 24 | description: Current time 25 | content: 26 | application/json: 27 | schema: 28 | type: object 29 | required: 30 | - time 31 | properties: 32 | time: 33 | type: integer 34 | example: 1234567890 35 | /v1/blockchain/getBlock: 36 | get: 37 | security: 38 | - JWTAuth: [ "common" ] 39 | description: Get block by id 40 | operationId: getBlockById 41 | tags: 42 | - RawBlockchain 43 | parameters: 44 | - name: block_id 45 | in: query 46 | required: true 47 | description: block id 48 | schema: 49 | type: string 50 | example: (-1,4234234,-23423523535345353454) 51 | responses: 52 | '200': 53 | description: "block" 54 | content: 55 | application/json: 56 | schema: 57 | $ref: '#/components/schemas/Block' 58 | '401': 59 | $ref: '#/components/responses/UnauthorizedError' 60 | '400': 61 | $ref: '#/components/responses/BadRequest' 62 | '404': 63 | $ref: '#/components/responses/NotFound' 64 | '500': 65 | $ref: '#/components/responses/InternalError' 66 | /v1/blockchain/getAccount: 67 | get: 68 | security: 69 | - JWTAuth: [ "common" ] 70 | description: Get raw account data 71 | operationId: getAccount 72 | tags: 73 | - RawBlockchain 74 | parameters: 75 | - $ref: '#/components/parameters/accountAddressParameter' 76 | responses: 77 | '200': 78 | description: "raw account data from blockchain" 79 | content: 80 | application/json: 81 | schema: 82 | $ref: '#/components/schemas/Account' 83 | '401': 84 | $ref: '#/components/responses/UnauthorizedError' 85 | '400': 86 | $ref: '#/components/responses/BadRequest' 87 | '404': 88 | $ref: '#/components/responses/NotFound' 89 | '500': 90 | $ref: '#/components/responses/InternalError' 91 | /v1/blockchain/validators: 92 | get: 93 | security: 94 | - JWTAuth: [ "common" ] 95 | description: Get validators info list 96 | operationId: getValidators 97 | tags: 98 | - RawBlockchain 99 | responses: 100 | '200': 101 | description: "validators info list from blockchain" 102 | content: 103 | application/json: 104 | schema: 105 | $ref: '#/components/schemas/Validators' 106 | '401': 107 | $ref: '#/components/responses/UnauthorizedError' 108 | '400': 109 | $ref: '#/components/responses/BadRequest' 110 | '404': 111 | $ref: '#/components/responses/NotFound' 112 | '500': 113 | $ref: '#/components/responses/InternalError' 114 | /v1/blockchain/getTransaction: 115 | get: 116 | security: 117 | - JWTAuth: [ "common" ] 118 | description: Get transaction by hash 119 | operationId: getTransaction 120 | tags: 121 | - RawBlockchain 122 | parameters: 123 | - name: hash 124 | in: query 125 | required: true 126 | description: "transaction hash in hex (without 0x) or base64url format" 127 | schema: 128 | type: string 129 | example: 97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621 130 | responses: 131 | '200': 132 | description: "transaction" 133 | content: 134 | application/json: 135 | schema: 136 | $ref: '#/components/schemas/Transaction' 137 | '401': 138 | $ref: '#/components/responses/UnauthorizedError' 139 | '400': 140 | $ref: '#/components/responses/BadRequest' 141 | '404': 142 | $ref: '#/components/responses/NotFound' 143 | '500': 144 | $ref: '#/components/responses/InternalError' 145 | /v1/blockchain/getTransactions: 146 | get: 147 | security: 148 | - JWTAuth: [ "common" ] 149 | description: Get transactions 150 | operationId: getTransactions 151 | tags: 152 | - RawBlockchain 153 | parameters: 154 | - name: account 155 | in: query 156 | required: false 157 | description: "address in raw (hex without 0x) or base64url format" 158 | schema: 159 | type: string 160 | example: 0:BA60BFBD527C0CD2D70C6396630C50A498AF015B987ADAAD1D4A9E287F604536 161 | - name: maxLt # not snake_case 162 | in: query 163 | description: "omit this parameter to get last transactions" 164 | schema: 165 | type: integer 166 | format: int64 167 | example: 25758317000002 168 | - name: minLt # not snake_case 169 | in: query 170 | description: "omit this parameter to get last transactions" 171 | schema: 172 | type: integer 173 | format: int64 174 | example: 0 175 | - name: limit 176 | in: query 177 | schema: 178 | type: integer 179 | format: int32 180 | maximum: 1000 181 | default: 100 182 | example: 100 183 | responses: 184 | '200': 185 | description: "transactions" 186 | content: 187 | application/json: 188 | schema: 189 | $ref: '#/components/schemas/Transactions' 190 | '400': 191 | $ref: '#/components/responses/BadRequest' 192 | '401': 193 | $ref: '#/components/responses/UnauthorizedError' 194 | '500': 195 | $ref: '#/components/responses/InternalError' 196 | /v1/wallet/findByPubkey: 197 | get: 198 | security: 199 | - JWTAuth: [ "common" ] 200 | description: Find all wallets by public key 201 | operationId: findWalletsByPubKey 202 | tags: 203 | - Wallet 204 | parameters: 205 | - $ref: '#/components/parameters/publicKeyParameter' 206 | responses: 207 | '200': 208 | description: "wallets" 209 | content: 210 | application/json: 211 | schema: 212 | $ref: '#/components/schemas/Wallets' 213 | '400': 214 | $ref: '#/components/responses/BadRequest' 215 | '401': 216 | $ref: '#/components/responses/UnauthorizedError' 217 | '404': 218 | $ref: '#/components/responses/NotFound' 219 | '500': 220 | $ref: '#/components/responses/InternalError' 221 | /v1/wallet/getWalletPublicKey: 222 | get: 223 | security: 224 | - JWTAuth: [ "common" ] 225 | description: Get public key by wallet address 226 | operationId: getWalletPublicKey 227 | tags: 228 | - Wallet 229 | parameters: 230 | - $ref: '#/components/parameters/accountAddressParameter' 231 | responses: 232 | '200': 233 | description: "publicKey" 234 | content: 235 | application/json: 236 | schema: 237 | $ref: '#/components/schemas/PublicKey' 238 | '400': 239 | $ref: '#/components/responses/BadRequest' 240 | '401': 241 | $ref: '#/components/responses/UnauthorizedError' 242 | '500': 243 | $ref: '#/components/responses/InternalError' 244 | /v1/subscription/getByWallet: 245 | get: 246 | security: 247 | - JWTAuth: [ "common" ] 248 | description: Get all subscriptions by wallet address 249 | operationId: getSubscriptionsByWallet 250 | tags: 251 | - Subscription 252 | parameters: 253 | - $ref: '#/components/parameters/accountAddressParameter' 254 | responses: 255 | '200': 256 | description: "subscriptions" 257 | content: 258 | application/json: 259 | schema: 260 | $ref: '#/components/schemas/Subscriptions' 261 | '400': 262 | $ref: '#/components/responses/BadRequest' 263 | '401': 264 | $ref: '#/components/responses/UnauthorizedError' 265 | '500': 266 | $ref: '#/components/responses/InternalError' 267 | /v1/trace/getAccountHistory: 268 | get: 269 | deprecated: true 270 | security: 271 | - JWTAuth: [ "common" ] 272 | description: Get traces for account 273 | operationId: getTracesByAccount 274 | tags: 275 | - Trace 276 | parameters: 277 | - $ref: '#/components/parameters/accountAddressParameter' 278 | - name: limit 279 | in: query 280 | schema: 281 | type: integer 282 | format: int32 283 | maximum: 1000 284 | default: 100 285 | example: 100 286 | responses: 287 | 200: 288 | description: "history" 289 | content: 290 | application/json: 291 | schema: 292 | $ref: '#/components/schemas/Traces' 293 | '400': 294 | $ref: '#/components/responses/BadRequest' 295 | '401': 296 | $ref: '#/components/responses/UnauthorizedError' 297 | '500': 298 | $ref: '#/components/responses/InternalError' 299 | /v1/trace/getTrace: 300 | get: 301 | security: 302 | - JWTAuth: [ "common" ] 303 | description: Get the trace by trace ID or hash of any transaction in trace 304 | operationId: getTrace 305 | tags: 306 | - Trace 307 | parameters: 308 | - name: hash 309 | in: query 310 | required: true 311 | description: "trace ID or transaction hash in hex (without 0x) or base64url format" 312 | schema: 313 | type: string 314 | example: 97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621 315 | responses: 316 | '200': 317 | description: "trace" 318 | content: 319 | application/json: 320 | schema: 321 | $ref: '#/components/schemas/TraceMsg' 322 | '400': 323 | $ref: '#/components/responses/BadRequest' 324 | '401': 325 | $ref: '#/components/responses/UnauthorizedError' 326 | '404': 327 | $ref: '#/components/responses/NotFound' 328 | '500': 329 | $ref: '#/components/responses/InternalError' 330 | /v1/trace/getAnnotatedTrace: 331 | get: 332 | security: 333 | - JWTAuth: [ "common" ] 334 | description: Get the annotated trace by trace ID or hash of any transaction in trace 335 | operationId: getAnnotatedTrace 336 | tags: 337 | - Trace 338 | parameters: 339 | - name: hash 340 | in: query 341 | required: true 342 | description: "trace ID or transaction hash in hex (without 0x) or base64url format" 343 | schema: 344 | type: string 345 | example: 97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621 346 | responses: 347 | '200': 348 | description: "annotated trace" 349 | content: 350 | application/json: 351 | schema: 352 | type: object 353 | '400': 354 | $ref: '#/components/responses/BadRequest' 355 | '401': 356 | $ref: '#/components/responses/UnauthorizedError' 357 | '404': 358 | $ref: '#/components/responses/NotFound' 359 | '500': 360 | $ref: '#/components/responses/InternalError' 361 | /v1/nft/getCollections: 362 | get: 363 | security: 364 | - JWTAuth: [ "common" ] 365 | description: Get all NFT collections 366 | operationId: getNftCollections 367 | tags: 368 | - NFT 369 | parameters: 370 | - name: limit 371 | in: query 372 | schema: 373 | type: integer 374 | format: int32 375 | maximum: 25 376 | default: 15 377 | example: 15 378 | - name: offset 379 | in: query 380 | schema: 381 | type: integer 382 | format: int32 383 | default: 0 384 | example: 10 385 | responses: 386 | '200': 387 | description: "nft collections" 388 | content: 389 | application/json: 390 | schema: 391 | $ref: '#/components/schemas/NftCollections' 392 | '401': 393 | $ref: '#/components/responses/UnauthorizedError' 394 | '500': 395 | $ref: '#/components/responses/InternalError' 396 | /v1/nft/getCollection: 397 | get: 398 | security: 399 | - JWTAuth: [ "common" ] 400 | description: Get NFT collection by collection address 401 | operationId: getNftCollection 402 | tags: 403 | - NFT 404 | parameters: 405 | - $ref: '#/components/parameters/accountAddressParameter' 406 | responses: 407 | '200': 408 | description: "nft collection" 409 | content: 410 | application/json: 411 | schema: 412 | $ref: '#/components/schemas/NftCollection' 413 | '400': 414 | $ref: '#/components/responses/BadRequest' 415 | '401': 416 | $ref: '#/components/responses/UnauthorizedError' 417 | '404': 418 | $ref: '#/components/responses/NotFound' 419 | '500': 420 | $ref: '#/components/responses/InternalError' 421 | /v1/nft/getItemsByCollectionAddress: 422 | get: 423 | deprecated: true 424 | security: 425 | - JWTAuth: [ "common" ] 426 | description: Get all NFT items from collection by collection address 427 | operationId: getNftItemsByCollectionAddress 428 | tags: 429 | - NFT 430 | parameters: 431 | - $ref: '#/components/parameters/accountAddressParameter' 432 | responses: 433 | '200': 434 | description: "nft items" 435 | content: 436 | application/json: 437 | schema: 438 | $ref: '#/components/schemas/NftItems' 439 | '400': 440 | $ref: '#/components/responses/BadRequest' 441 | '401': 442 | $ref: '#/components/responses/UnauthorizedError' 443 | '404': 444 | $ref: '#/components/responses/NotFound' 445 | '500': 446 | $ref: '#/components/responses/InternalError' 447 | /v1/nft/searchItems: 448 | get: 449 | security: 450 | - JWTAuth: [ "common" ] 451 | description: Search NFT items using filters 452 | operationId: searchNFTItems 453 | tags: 454 | - NFT 455 | parameters: 456 | - in: query 457 | name: owner 458 | required: false 459 | description: "address in raw (hex without 0x) or base64url format or word 'no' for items without owner" 460 | schema: 461 | type: string 462 | example: 0:BA60BFBD527C0CD2D70C6396630C50A498AF015B987ADAAD1D4A9E287F604536 463 | - in: query 464 | name: collection 465 | required: false 466 | description: "address in raw (hex without 0x) or base64url format or word 'no' for items without collection" 467 | schema: 468 | type: string 469 | example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf 470 | - in: query 471 | name: include_on_sale 472 | required: false 473 | description: "include nft items which are currently are on market" 474 | schema: 475 | type: boolean 476 | example: true 477 | default: false 478 | - in: query 479 | name: limit 480 | required: true 481 | description: "maximum qty of items" 482 | schema: 483 | type: integer 484 | example: 1000 485 | maximum: 1000 486 | - in: query 487 | name: offset 488 | required: true 489 | description: "offset for pagination" 490 | schema: 491 | type: integer 492 | example: 0 493 | responses: 494 | '200': 495 | description: "nft items" 496 | content: 497 | application/json: 498 | schema: 499 | $ref: '#/components/schemas/NftItemsRepr' 500 | '400': 501 | $ref: '#/components/responses/BadRequest' 502 | '401': 503 | $ref: '#/components/responses/UnauthorizedError' 504 | '404': 505 | $ref: '#/components/responses/NotFound' 506 | '500': 507 | $ref: '#/components/responses/InternalError' 508 | /v1/nft/getItems: 509 | get: 510 | security: 511 | - JWTAuth: [ "common" ] 512 | description: Get NFT items by addresses 513 | operationId: getNFTItems 514 | tags: 515 | - NFT 516 | parameters: 517 | - in: query 518 | name: addresses 519 | required: true 520 | explode: false 521 | description: "NFT items addresses in raw (hex without 0x) or base64url format" 522 | schema: 523 | type: array 524 | items: 525 | type: string 526 | example: "0:a0a659a32079f449edcd05fcdef8cc4d98f45557f25d66555fe2da1f47cb7d9a,0:702b27d8635f0a169c9a1abb341d95a2a5aad71e90d50271589e59290b6c7179" 527 | responses: 528 | '200': 529 | description: "nft items" 530 | content: 531 | application/json: 532 | schema: 533 | $ref: '#/components/schemas/NftItemsRepr' 534 | '400': 535 | $ref: '#/components/responses/BadRequest' 536 | '401': 537 | $ref: '#/components/responses/UnauthorizedError' 538 | '404': 539 | $ref: '#/components/responses/NotFound' 540 | '500': 541 | $ref: '#/components/responses/InternalError' 542 | /v1/nft/getItemsByOwnerAddress: 543 | get: 544 | deprecated: true 545 | security: 546 | - JWTAuth: [ "common" ] 547 | description: Get all NFT items by owner address 548 | operationId: getNftItemsByOwnerAddress 549 | tags: 550 | - NFT 551 | parameters: 552 | - $ref: '#/components/parameters/accountAddressParameter' 553 | responses: 554 | '200': 555 | description: "nft items" 556 | content: 557 | application/json: 558 | schema: 559 | $ref: '#/components/schemas/NftItems' 560 | '400': 561 | $ref: '#/components/responses/BadRequest' 562 | '401': 563 | $ref: '#/components/responses/UnauthorizedError' 564 | '500': 565 | $ref: '#/components/responses/InternalError' 566 | /v1/nft/getNftForSale: 567 | get: 568 | deprecated: true 569 | security: 570 | - JWTAuth: [ "common" ] 571 | description: Get NFT items for sale 572 | operationId: getNftForSale 573 | tags: 574 | - NFT 575 | parameters: 576 | - $ref: '#/components/parameters/accountAddressParameter' 577 | responses: 578 | '200': 579 | description: "nft sales" 580 | content: 581 | application/json: 582 | schema: 583 | $ref: '#/components/schemas/NftSalesResponse' 584 | '400': 585 | $ref: '#/components/responses/BadRequest' 586 | '401': 587 | $ref: '#/components/responses/UnauthorizedError' 588 | '500': 589 | $ref: '#/components/responses/InternalError' 590 | /v1/nft/getItem: 591 | get: 592 | deprecated: true 593 | security: 594 | - JWTAuth: [ "common" ] 595 | description: Get NFT item by its address 596 | operationId: getNftItemByAddress 597 | tags: 598 | - NFT 599 | parameters: 600 | - $ref: '#/components/parameters/accountAddressParameter' 601 | responses: 602 | '200': 603 | description: "nft item" 604 | content: 605 | application/json: 606 | schema: 607 | $ref: '#/components/schemas/NftItem' 608 | '400': 609 | $ref: '#/components/responses/BadRequest' 610 | '401': 611 | $ref: '#/components/responses/UnauthorizedError' 612 | '404': 613 | $ref: '#/components/responses/NotFound' 614 | '500': 615 | $ref: '#/components/responses/InternalError' 616 | /v1/jetton/getBalances: 617 | get: 618 | security: 619 | - JWTAuth: [ "common" ] 620 | description: Get all Jettons balances by owner address 621 | operationId: getJettonsBalances 622 | tags: 623 | - Jetton 624 | parameters: 625 | - $ref: '#/components/parameters/accountAddressParameter' 626 | responses: 627 | '200': 628 | description: "jettons balances" 629 | content: 630 | application/json: 631 | schema: 632 | $ref: '#/components/schemas/JettonsBalances' 633 | '400': 634 | $ref: '#/components/responses/BadRequest' 635 | '401': 636 | $ref: '#/components/responses/UnauthorizedError' 637 | '500': 638 | $ref: '#/components/responses/InternalError' 639 | /v1/jetton/getInfo: 640 | get: 641 | security: 642 | - JWTAuth: [ "common" ] 643 | description: Get jetton metadata by jetton master address 644 | operationId: getJettonInfo 645 | tags: 646 | - Jetton 647 | parameters: 648 | - $ref: '#/components/parameters/accountAddressParameter' 649 | responses: 650 | '200': 651 | description: "jetton info" 652 | content: 653 | application/json: 654 | schema: 655 | $ref: '#/components/schemas/JettonInfo' 656 | '400': 657 | $ref: '#/components/responses/BadRequest' 658 | '401': 659 | $ref: '#/components/responses/UnauthorizedError' 660 | '404': 661 | $ref: '#/components/responses/NotFound' 662 | '500': 663 | $ref: '#/components/responses/InternalError' 664 | /v1/jetton/getHistory: 665 | get: 666 | security: 667 | - JWTAuth: [ "common" ] 668 | description: Get all Jetton transfers for account 669 | operationId: getJettonHistory 670 | tags: 671 | - Jetton 672 | parameters: 673 | - $ref: '#/components/parameters/accountAddressParameter' 674 | - in: query 675 | name: jetton_master 676 | required: false 677 | description: "address in raw (hex without 0x) or base64url format" 678 | schema: 679 | type: string 680 | example: 0:BA60BFBD527C0CD2D70C6396630C50A498AF015B987ADAAD1D4A9E287F604536 681 | - name: limit 682 | in: query 683 | required: true 684 | schema: 685 | type: integer 686 | example: 1000 687 | maximum: 1000 688 | responses: 689 | '200': 690 | description: "history" 691 | content: 692 | application/json: 693 | schema: 694 | $ref: '#/components/schemas/AccountEvents' 695 | '400': 696 | $ref: '#/components/responses/BadRequest' 697 | '401': 698 | $ref: '#/components/responses/UnauthorizedError' 699 | '500': 700 | $ref: '#/components/responses/InternalError' 701 | /v1/event/getAccountEvents: 702 | get: 703 | security: 704 | - JWTAuth: [ "common" ] 705 | description: Get events for account 706 | operationId: accountEvents 707 | tags: 708 | - Event 709 | parameters: 710 | - $ref: '#/components/parameters/accountAddressParameter' 711 | - name: beforeLt # not snake_case 712 | in: query 713 | description: "omit this parameter to get last events" 714 | required: false 715 | schema: 716 | type: integer 717 | format: int64 718 | example: 25758317000002 719 | - name: limit 720 | in: query 721 | required: true 722 | schema: 723 | type: integer 724 | example: 1000 725 | maximum: 1000 726 | - name: startDate 727 | in: query 728 | required: false 729 | schema: 730 | type: integer 731 | format: int64 732 | example: 1668436763 733 | - name: endDate 734 | in: query 735 | required: false 736 | schema: 737 | type: integer 738 | format: int64 739 | example: 1668436763 740 | responses: 741 | '200': 742 | description: "events" 743 | content: 744 | application/json: 745 | schema: 746 | type: object 747 | required: 748 | - events 749 | properties: 750 | events: 751 | type: array 752 | items: 753 | $ref: '#/components/schemas/AccountEvent' 754 | next_from: 755 | type: integer 756 | format: int64 757 | example: 23814011000000 758 | '400': 759 | $ref: '#/components/responses/BadRequest' 760 | '401': 761 | $ref: '#/components/responses/UnauthorizedError' 762 | '404': 763 | $ref: '#/components/responses/NotFound' 764 | '500': 765 | $ref: '#/components/responses/InternalError' 766 | /v1/event/getEvent: 767 | get: 768 | security: 769 | - JWTAuth: [ "common" ] 770 | description: Get the event by event ID or hash of any transaction in trace 771 | operationId: getEvent 772 | tags: 773 | - Event 774 | parameters: 775 | - name: event_id 776 | in: query 777 | required: true 778 | description: "event ID or transaction hash in hex (without 0x) or base64url format" 779 | schema: 780 | type: string 781 | example: 97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621 782 | responses: 783 | '200': 784 | description: "event" 785 | content: 786 | application/json: 787 | schema: 788 | $ref: '#/components/schemas/Event' 789 | '400': 790 | $ref: '#/components/responses/BadRequest' 791 | '401': 792 | $ref: '#/components/responses/UnauthorizedError' 793 | '404': 794 | $ref: '#/components/responses/NotFound' 795 | '500': 796 | $ref: '#/components/responses/InternalError' 797 | /v1/send/boc: 798 | post: 799 | security: 800 | - JWTAuth: [ "common" ] 801 | description: Send message to blockchain 802 | operationId: sendBoc 803 | tags: 804 | - Send 805 | requestBody: 806 | $ref: "#/components/requestBodies/Boc" 807 | responses: 808 | '200': 809 | description: "success" 810 | '400': 811 | $ref: '#/components/responses/BadRequest' 812 | '401': 813 | $ref: '#/components/responses/UnauthorizedError' 814 | '500': 815 | $ref: '#/components/responses/InternalError' 816 | /v1/account/getInfo: 817 | get: 818 | security: 819 | - JWTAuth: [ "common" ] 820 | description: Get info about account 821 | operationId: getAccountInfo 822 | tags: 823 | - Account 824 | parameters: 825 | - $ref: '#/components/parameters/accountAddressParameter' 826 | responses: 827 | '200': 828 | description: "account info" 829 | content: 830 | application/json: 831 | schema: 832 | $ref: '#/components/schemas/AccountRepr' 833 | '401': 834 | $ref: '#/components/responses/UnauthorizedError' 835 | '400': 836 | $ref: '#/components/responses/BadRequest' 837 | '404': 838 | $ref: '#/components/responses/NotFound' 839 | '500': 840 | $ref: '#/components/responses/InternalError' 841 | /v1/account/getBulkInfo: 842 | get: 843 | security: 844 | - JWTAuth: [ "common" ] 845 | description: Get info about few accounts account by one request 846 | operationId: getBulkAccountInfo 847 | tags: 848 | - Account 849 | parameters: 850 | - in: query 851 | name: addresses 852 | required: true 853 | explode: false 854 | description: "accounts addresses in raw (hex without 0x) or base64url format" 855 | schema: 856 | type: array 857 | items: 858 | type: string 859 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf,0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 860 | responses: 861 | '200': 862 | description: "account info" 863 | content: 864 | application/json: 865 | schema: 866 | $ref: '#/components/schemas/AccountReprs' 867 | '401': 868 | $ref: '#/components/responses/UnauthorizedError' 869 | '400': 870 | $ref: '#/components/responses/BadRequest' 871 | '404': 872 | $ref: '#/components/responses/NotFound' 873 | '500': 874 | $ref: '#/components/responses/InternalError' 875 | /v1/send/estimateTx: 876 | post: 877 | security: 878 | - JWTAuth: [ "common" ] 879 | description: Estimate fees for message 880 | operationId: estimateTx 881 | tags: 882 | - Send 883 | requestBody: 884 | $ref: "#/components/requestBodies/Boc" 885 | responses: 886 | '200': 887 | description: "event" 888 | content: 889 | application/json: 890 | schema: 891 | $ref: '#/components/schemas/AccountEvent' 892 | '400': 893 | $ref: '#/components/responses/BadRequest' 894 | '401': 895 | $ref: '#/components/responses/UnauthorizedError' 896 | '500': 897 | $ref: '#/components/responses/InternalError' 898 | /v1/dns/resolve: 899 | get: 900 | security: 901 | - JWTAuth: [ "common" ] 902 | description: DNS resolve for domain name 903 | operationId: dnsResolve 904 | tags: 905 | - DNS 906 | parameters: 907 | - $ref: '#/components/parameters/domainNameParameter' 908 | responses: 909 | '200': 910 | description: "dns record" 911 | content: 912 | application/json: 913 | schema: 914 | $ref: '#/components/schemas/DnsRecord' 915 | '401': 916 | $ref: '#/components/responses/UnauthorizedError' 917 | '400': 918 | $ref: '#/components/responses/BadRequest' 919 | '404': 920 | $ref: '#/components/responses/NotFound' 921 | '500': 922 | $ref: '#/components/responses/InternalError' 923 | /v1/dns/backresolve: 924 | get: 925 | security: 926 | - JWTAuth: [ "common" ] 927 | description: DNS back resolve for wallet address 928 | operationId: dnsBackResolve 929 | tags: 930 | - DNS 931 | parameters: 932 | - $ref: '#/components/parameters/accountAddressParameter' 933 | responses: 934 | '200': 935 | description: "domains for wallet" 936 | content: 937 | application/json: 938 | schema: 939 | $ref: '#/components/schemas/DomainNames' 940 | '401': 941 | $ref: '#/components/responses/UnauthorizedError' 942 | '400': 943 | $ref: '#/components/responses/BadRequest' 944 | '404': 945 | $ref: '#/components/responses/NotFound' 946 | '500': 947 | $ref: '#/components/responses/InternalError' 948 | /v1/dns/getInfo: 949 | get: 950 | security: 951 | - JWTAuth: [ "common" ] 952 | description: domain info 953 | operationId: getDomainInfo 954 | tags: 955 | - DNS 956 | parameters: 957 | - $ref: '#/components/parameters/domainNameParameter' 958 | responses: 959 | '200': 960 | description: "domain info" 961 | content: 962 | application/json: 963 | schema: 964 | $ref: '#/components/schemas/DomainInfo' 965 | '401': 966 | $ref: '#/components/responses/UnauthorizedError' 967 | '400': 968 | $ref: '#/components/responses/BadRequest' 969 | '404': 970 | $ref: '#/components/responses/NotFound' 971 | '500': 972 | $ref: '#/components/responses/InternalError' 973 | /v1/offchain/putWalletConfig: 974 | post: 975 | security: 976 | - JWTAuth: [ "common" ] 977 | description: Send backup file to storage 978 | operationId: putWalletConfig 979 | tags: 980 | - Backup 981 | requestBody: 982 | required: true 983 | content: 984 | application/octet-stream: 985 | schema: 986 | type: string 987 | format: binary 988 | description: | 989 | "TL-scheme: backup.send sign:int512 primaryPublicKey:int256 voucher:backup.Voucher request_expire:int64 payload:bytes = backup.Send" \ 990 | "TL-scheme: backup.voucher sign:int512 expire_at:int64 publicKey:int256 = backup.Voucher" 991 | responses: 992 | '200': 993 | description: "success" 994 | '400': 995 | $ref: '#/components/responses/BadRequest' 996 | '401': 997 | $ref: '#/components/responses/UnauthorizedError' 998 | '500': 999 | $ref: '#/components/responses/InternalError' 1000 | /v1/offchain/deleteWalletConfig: 1001 | post: 1002 | security: 1003 | - JWTAuth: [ "common" ] 1004 | description: Delete backup from storage 1005 | operationId: deleteWalletConfig 1006 | tags: 1007 | - Backup 1008 | requestBody: 1009 | required: true 1010 | content: 1011 | application/octet-stream: 1012 | schema: 1013 | type: string 1014 | format: binary 1015 | description: | 1016 | "TL-scheme: backup.delete sign:int512 primaryPublicKey:int256 voucher:backup.Voucher request_expire:int64 = backup.Delete" \ 1017 | "TL-scheme: backup.voucher sign:int512 expire_at:int64 publicKey:int256 = backup.Voucher" 1018 | responses: 1019 | '200': 1020 | description: "success" 1021 | '400': 1022 | $ref: '#/components/responses/BadRequest' 1023 | '401': 1024 | $ref: '#/components/responses/UnauthorizedError' 1025 | '404': 1026 | $ref: '#/components/responses/NotFound' 1027 | '500': 1028 | $ref: '#/components/responses/InternalError' 1029 | /v1/offchain/getWalletConfig: 1030 | post: 1031 | security: 1032 | - JWTAuth: [ "common" ] 1033 | description: Get backup from storage 1034 | operationId: getWalletConfig 1035 | tags: 1036 | - Backup 1037 | requestBody: 1038 | required: true 1039 | content: 1040 | application/octet-stream: 1041 | schema: 1042 | type: string 1043 | format: binary 1044 | description: | 1045 | "TL-scheme: backup.get sign:int512 primaryPublicKey:int256 voucher:backup.Voucher request_expire:int64 = backup.Get" \ 1046 | "TL-scheme: backup.voucher sign:int512 expire_at:int64 publicKey:int256 = backup.Voucher" 1047 | responses: 1048 | '200': 1049 | description: "backup file" 1050 | content: 1051 | application/octet-stream: 1052 | schema: 1053 | type: string 1054 | format: binary 1055 | description: "TL-scheme: backup.getResponse payload:bytes = backup.GetResponse" 1056 | '401': 1057 | $ref: '#/components/responses/UnauthorizedError' 1058 | '400': 1059 | $ref: '#/components/responses/BadRequest' 1060 | '404': 1061 | $ref: '#/components/responses/NotFound' 1062 | '500': 1063 | $ref: '#/components/responses/InternalError' 1064 | /v1/auction/getCurrent: 1065 | get: 1066 | security: 1067 | - JWTAuth: [ "common" ] 1068 | description: Get all auctions 1069 | operationId: getAllAuctions 1070 | tags: 1071 | - Domain Auctions 1072 | parameters: 1073 | - $ref: '#/components/parameters/domainFilterParameters' 1074 | responses: 1075 | '200': 1076 | description: "auctions" 1077 | content: 1078 | application/json: 1079 | schema: 1080 | $ref: '#/components/schemas/Auctions' 1081 | '400': 1082 | $ref: '#/components/responses/BadRequest' 1083 | '401': 1084 | $ref: '#/components/responses/UnauthorizedError' 1085 | '500': 1086 | $ref: '#/components/responses/InternalError' 1087 | /v1/auction/getBids: 1088 | get: 1089 | security: 1090 | - JWTAuth: [ "common" ] 1091 | description: Get domain bids 1092 | operationId: getDomainBids 1093 | tags: 1094 | - Domain Auctions 1095 | parameters: 1096 | - $ref: '#/components/parameters/domainBidsParameters' 1097 | responses: 1098 | '200': 1099 | description: "domain bids" 1100 | content: 1101 | application/json: 1102 | schema: 1103 | $ref: '#/components/schemas/DomainBids' 1104 | '400': 1105 | $ref: '#/components/responses/BadRequest' 1106 | '401': 1107 | $ref: '#/components/responses/UnauthorizedError' 1108 | '500': 1109 | $ref: '#/components/responses/InternalError' 1110 | /v1/wallet/getSeqno: 1111 | get: 1112 | security: 1113 | - JWTAuth: [ "common" ] 1114 | description: Get last seqno for wallet 1115 | operationId: getWalletSeqno 1116 | tags: 1117 | - Wallet 1118 | parameters: 1119 | - $ref: '#/components/parameters/accountAddressParameter' 1120 | responses: 1121 | '200': 1122 | description: "nft items" 1123 | content: 1124 | application/json: 1125 | schema: 1126 | $ref: '#/components/schemas/Seqno' 1127 | '400': 1128 | $ref: '#/components/responses/BadRequest' 1129 | '401': 1130 | $ref: '#/components/responses/UnauthorizedError' 1131 | '404': 1132 | $ref: '#/components/responses/NotFound' 1133 | '500': 1134 | $ref: '#/components/responses/InternalError' 1135 | /v1/dns/domains/search: 1136 | get: 1137 | security: 1138 | - JWTAuth: [ "common" ] 1139 | description: Search domains by the first letters 1140 | operationId: searchDomains 1141 | tags: 1142 | - DNS 1143 | parameters: 1144 | - name: domain 1145 | in: query 1146 | required: true 1147 | schema: 1148 | type: string 1149 | example: wallet.ton 1150 | responses: 1151 | '200': 1152 | description: "domains" 1153 | content: 1154 | application/json: 1155 | schema: 1156 | $ref: '#/components/schemas/DomainNames' 1157 | '400': 1158 | $ref: '#/components/responses/BadRequest' 1159 | '401': 1160 | $ref: '#/components/responses/UnauthorizedError' 1161 | '404': 1162 | $ref: '#/components/responses/NotFound' 1163 | '500': 1164 | $ref: '#/components/responses/InternalError' 1165 | /v1/stream/sse/test/event: 1166 | get: 1167 | description: Test new_transaction event 1168 | operationId: getNewTransactionTestEvent 1169 | tags: 1170 | - SSE 1171 | responses: 1172 | '200': 1173 | description: "New transaction" 1174 | content: 1175 | text/event-stream: 1176 | schema: 1177 | $ref: '#/components/schemas/NewTransactionEvent' 1178 | '400': 1179 | $ref: '#/components/responses/BadRequest' 1180 | '404': 1181 | $ref: '#/components/responses/NotFound' 1182 | '500': 1183 | $ref: '#/components/responses/InternalError' 1184 | /v1/stream/sse/account: 1185 | get: 1186 | security: 1187 | - JWTAuth: [ "common" ] 1188 | description: Get new transactions from accounts 1189 | operationId: getNewTransactionEvent 1190 | parameters: 1191 | - $ref: '#/components/parameters/accountsParameter' 1192 | tags: 1193 | - SSE 1194 | responses: 1195 | '200': 1196 | description: "Account has new transaction" 1197 | content: 1198 | text/event-stream: 1199 | schema: 1200 | $ref: '#/components/schemas/NewTransactionEvent' 1201 | '400': 1202 | $ref: '#/components/responses/BadRequest' 1203 | '401': 1204 | $ref: '#/components/responses/UnauthorizedError' 1205 | '404': 1206 | $ref: '#/components/responses/NotFound' 1207 | '500': 1208 | $ref: '#/components/responses/InternalError' 1209 | /v1/stream/sse/jetton_transfer: 1210 | get: 1211 | security: 1212 | - JWTAuth: [ "common" ] 1213 | description: Get check jetton transfer 1214 | operationId: getJettonTransferEvent 1215 | parameters: 1216 | - $ref: '#/components/parameters/jettonsParameter' 1217 | tags: 1218 | - SSE 1219 | responses: 1220 | '200': 1221 | description: "Jetton has been transfer" 1222 | content: 1223 | text/event-stream: 1224 | schema: 1225 | $ref: '#/components/schemas/JettonTransferEvent' 1226 | '400': 1227 | $ref: '#/components/responses/BadRequest' 1228 | '401': 1229 | $ref: '#/components/responses/UnauthorizedError' 1230 | '404': 1231 | $ref: '#/components/responses/NotFound' 1232 | '500': 1233 | $ref: '#/components/responses/InternalError' 1234 | /v1/stream/sse/nft_transfer: 1235 | get: 1236 | security: 1237 | - JWTAuth: [ "common" ] 1238 | description: Get check nft transfer 1239 | operationId: getNFTTransferEvent 1240 | parameters: 1241 | - $ref: '#/components/parameters/nftsParameter' 1242 | tags: 1243 | - SSE 1244 | responses: 1245 | '200': 1246 | description: "NFT has been transfer" 1247 | content: 1248 | text/event-stream: 1249 | schema: 1250 | $ref: '#/components/schemas/NFTTransferEvent' 1251 | '400': 1252 | $ref: '#/components/responses/BadRequest' 1253 | '401': 1254 | $ref: '#/components/responses/UnauthorizedError' 1255 | '404': 1256 | $ref: '#/components/responses/NotFound' 1257 | '500': 1258 | $ref: '#/components/responses/InternalError' 1259 | /v1/func/compile: 1260 | post: 1261 | security: 1262 | - JWTAuth: [ "common" ] 1263 | description: Analyze func code 1264 | operationId: putFuncFiles 1265 | requestBody: 1266 | required: true 1267 | content: 1268 | multipart/form-data: 1269 | schema: 1270 | type: string 1271 | format: binary 1272 | tags: 1273 | - Func analyzer 1274 | responses: 1275 | '201': 1276 | description: "Func analyze has been completed" 1277 | content: 1278 | application/json: 1279 | schema: 1280 | $ref: '#/components/schemas/FuncAnalyzeOK' 1281 | '400': 1282 | $ref: '#/components/responses/BadRequest' 1283 | '401': 1284 | $ref: '#/components/responses/UnauthorizedError' 1285 | '404': 1286 | $ref: '#/components/responses/NotFound' 1287 | '500': 1288 | $ref: '#/components/responses/InternalError' 1289 | /v1/compile/info/{id}: 1290 | get: 1291 | security: 1292 | - JWTAuth: [ "common" ] 1293 | description: Get info from analyzer 1294 | operationId: getFuncAnalyzeInfo 1295 | parameters: 1296 | - description: Code ID 1297 | in: path 1298 | name: id 1299 | required: true 1300 | schema: 1301 | type: string 1302 | tags: 1303 | - Func analyzer 1304 | responses: 1305 | '200': 1306 | description: "Code info" 1307 | content: 1308 | application/json: 1309 | schema: 1310 | $ref: '#/components/schemas/FuncAnalyzeOK' 1311 | '400': 1312 | $ref: '#/components/responses/BadRequest' 1313 | '401': 1314 | $ref: '#/components/responses/UnauthorizedError' 1315 | '404': 1316 | $ref: '#/components/responses/NotFound' 1317 | '500': 1318 | $ref: '#/components/responses/InternalError' 1319 | /v1/boc/disassemble: 1320 | post: 1321 | security: 1322 | - JWTAuth: [ "common" ] 1323 | description: Disassemble code 1324 | operationId: disassembleCode 1325 | requestBody: 1326 | $ref: "#/components/requestBodies/Disassemble" 1327 | tags: 1328 | - Func analyzer 1329 | responses: 1330 | '200': 1331 | description: "Disassemble has been completed" 1332 | content: 1333 | application/json: 1334 | schema: 1335 | $ref: '#/components/schemas/DisassembleOK' 1336 | '400': 1337 | $ref: '#/components/responses/BadRequest' 1338 | '401': 1339 | $ref: '#/components/responses/UnauthorizedError' 1340 | '404': 1341 | $ref: '#/components/responses/NotFound' 1342 | '500': 1343 | $ref: '#/components/responses/InternalError' 1344 | components: 1345 | parameters: 1346 | domainNameParameter: 1347 | in: query 1348 | name: name 1349 | required: true 1350 | description: "domain name with .ton or .t.me" 1351 | schema: 1352 | type: string 1353 | example: wallet.ton 1354 | accountAddressParameter: 1355 | in: query 1356 | name: account 1357 | required: true 1358 | description: "address in raw (hex without 0x) or base64url format" 1359 | schema: 1360 | type: string 1361 | example: 0:BA60BFBD527C0CD2D70C6396630C50A498AF015B987ADAAD1D4A9E287F604536 1362 | domainBidsParameters: 1363 | in: query 1364 | name: domain 1365 | required: true 1366 | description: "domain names with .ton" 1367 | schema: 1368 | type: string 1369 | example: wallet.ton 1370 | domainFilterParameters: 1371 | in: query 1372 | name: tld 1373 | required: false 1374 | description: "domain filter for current auctions \"ton\" or \"t.me\"" 1375 | schema: 1376 | type: string 1377 | example: ton 1378 | publicKeyParameter: 1379 | in: query 1380 | name: public_key 1381 | required: true 1382 | description: "public key in hex (without 0x) format" 1383 | schema: 1384 | type: string 1385 | example: 6DDD647FD1D4A79C83E0149DFF9EB26A3EBF2DB6517A4F79E43098912E6A6802 1386 | accountsParameter: 1387 | in: query 1388 | name: accounts 1389 | required: true 1390 | description: "accounts for check new transactions (separate by comma) or use 'all' for subscribe to all accounts" 1391 | schema: 1392 | type: string 1393 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 1394 | enum: 1395 | - all 1396 | nftsParameter: 1397 | in: query 1398 | name: nfts 1399 | required: true 1400 | description: "nfts for check transfer (separate by comma)" 1401 | schema: 1402 | type: string 1403 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 1404 | jettonsParameter: 1405 | in: query 1406 | name: jettons 1407 | required: true 1408 | description: "jettons for check transfer (separate by comma)" 1409 | schema: 1410 | type: string 1411 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 1412 | requestBodies: 1413 | Boc: 1414 | description: "bag-of-cells serialized to base64" 1415 | content: 1416 | application/json: 1417 | schema: 1418 | type: object 1419 | required: 1420 | - boc 1421 | properties: 1422 | boc: 1423 | type: string 1424 | example: "a2Fza2RqZ2xrZHNqZ2xrZ2RzamFnbGtoc2Fka2poZ2pzaGQsamduc2pnbi5qYmZz" 1425 | Disassemble: 1426 | content: 1427 | application/json: 1428 | schema: 1429 | type: object 1430 | properties: 1431 | base64: 1432 | type: string 1433 | hmac: 1434 | type: string 1435 | schemas: 1436 | Ok: 1437 | type: object 1438 | required: 1439 | - ok 1440 | properties: 1441 | ok: 1442 | type: boolean 1443 | example: true 1444 | Error: 1445 | type: object 1446 | required: 1447 | - error 1448 | properties: 1449 | error: 1450 | type: string 1451 | example: error description 1452 | AccountAddress: 1453 | type: object 1454 | required: 1455 | - address 1456 | - is_scam 1457 | properties: 1458 | address: 1459 | type: string 1460 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 1461 | name: 1462 | type: string 1463 | example: "Ton foundation" 1464 | is_scam: 1465 | type: boolean 1466 | example: true 1467 | icon: 1468 | type: string 1469 | example: "https://ton.org/logo.png" 1470 | Block: 1471 | type: object 1472 | required: 1473 | - seqno 1474 | - workchain_id 1475 | - root_hash 1476 | - file_hash 1477 | - shard 1478 | - start_lt 1479 | - end_lt 1480 | properties: 1481 | seqno: 1482 | type: integer 1483 | example: 21734019 1484 | format: int32 1485 | workchain_id: 1486 | type: integer 1487 | example: 0 1488 | format: int32 1489 | root_hash: 1490 | type: string 1491 | example: 131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85 1492 | file_hash: 1493 | type: string 1494 | example: A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB 1495 | shard: 1496 | type: string 1497 | example: 8000000000000000 1498 | start_lt: 1499 | type: integer 1500 | format: int64 1501 | example: 23814011000000 1502 | end_lt: 1503 | type: integer 1504 | format: int64 1505 | example: 23814011000001 1506 | Account: 1507 | type: object 1508 | required: 1509 | - status 1510 | - balance 1511 | properties: 1512 | balance: 1513 | type: integer 1514 | format: int64 1515 | example: 123456789 1516 | code: 1517 | type: string 1518 | example: b5ee9c72410104010087000114ff00f4a413f4a0f2c80b0102012002030002d200dfa5ffff76a268698fe9ffe8e42c5267858f90e785ffe4f6aa6467c444ffb365ffc10802faf0807d014035e7a064b87d804077e7857fc10803dfd2407d014035e7a064b86467cd8903a32b9ba4410803ade68afd014035e7a045ea432b6363796103bb7b9363210c678b64b87d807d8040c249b3e4 1519 | code_hash: 1520 | type: string 1521 | example: 6f15bab4d8f45f6c3fb33e7a1eb206ecd36192c587602dc070ee7f134f263fe3 1522 | data: 1523 | type: string 1524 | example: b5ee9c7241010101002600004811fd096c0000000000000000000000000000000000000000000000000000000000000000cb78264d 1525 | status: 1526 | type: string 1527 | example: active 1528 | AccountReprs: 1529 | type: object 1530 | required: 1531 | - accounts 1532 | properties: 1533 | accounts: 1534 | type: array 1535 | items: 1536 | $ref: '#/components/schemas/AccountRepr' 1537 | AccountRepr: 1538 | type: object 1539 | required: 1540 | - status 1541 | - interfaces 1542 | - balance 1543 | - address 1544 | - is_scam 1545 | - last_update 1546 | - memo_required 1547 | properties: 1548 | balance: 1549 | type: integer 1550 | format: int64 1551 | example: 123456789 1552 | status: 1553 | type: string 1554 | example: active 1555 | interfaces: 1556 | type: array 1557 | items: 1558 | type: string 1559 | example: nft_sale 1560 | address: 1561 | type: object 1562 | required: 1563 | - raw 1564 | - bounceable 1565 | - non_bounceable 1566 | properties: 1567 | raw: 1568 | type: string 1569 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 1570 | bounceable: 1571 | type: string 1572 | example: "EQDaaxtmY6Dk0YzIV0zNnbUpbjZ92TJHBvO72esc0srwv8K2" 1573 | non_bounceable: 1574 | type: string 1575 | example: "UQDaaxtmY6Dk0YzIV0zNnbUpbjZ92TJHBvO72esc0srwv59z" 1576 | name: 1577 | type: string 1578 | example: "Ton foundation" 1579 | is_scam: 1580 | type: boolean 1581 | example: true 1582 | icon: 1583 | type: string 1584 | example: "https://ton.org/logo.png" 1585 | memo_required: 1586 | type: boolean 1587 | example: true 1588 | last_update: 1589 | type: integer 1590 | format: int64 1591 | example: 123456789 1592 | Wallet: 1593 | type: object 1594 | required: 1595 | - address 1596 | - status 1597 | - balance 1598 | - interfaces 1599 | properties: 1600 | address: 1601 | type: string 1602 | example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365 1603 | status: 1604 | type: string 1605 | example: active 1606 | balance: 1607 | type: integer 1608 | format: int64 1609 | example: 123456789 1610 | interfaces: 1611 | type: array 1612 | items: 1613 | type: string 1614 | example: wallet_v4R2 1615 | Wallets: 1616 | type: object 1617 | required: 1618 | - wallets 1619 | properties: 1620 | wallets: 1621 | type: array 1622 | items: 1623 | $ref: '#/components/schemas/Wallet' 1624 | Validator: 1625 | type: object 1626 | required: 1627 | - address 1628 | - adnlAddress 1629 | - stake 1630 | - maxFactor 1631 | properties: 1632 | address: 1633 | type: string 1634 | example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365 1635 | adnlAddress: 1636 | type: string 1637 | example: 10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365 1638 | stake: 1639 | type: integer 1640 | format: int64 1641 | example: 123456789 1642 | maxFactor: 1643 | type: integer 1644 | format: int64 1645 | example: 123456789 1646 | 1647 | Validators: 1648 | type: object 1649 | required: 1650 | - electAt 1651 | - electClose 1652 | - minStake 1653 | - totalStake 1654 | - validators 1655 | properties: 1656 | electAt: 1657 | type: integer 1658 | format: int64 1659 | example: 123456789 1660 | electClose: 1661 | type: integer 1662 | format: int64 1663 | example: 123456789 1664 | minStake: 1665 | type: integer 1666 | format: int64 1667 | example: 123456789 1668 | totalStake: 1669 | type: integer 1670 | format: int64 1671 | example: 123456789 1672 | validators: 1673 | type: array 1674 | items: 1675 | $ref: '#/components/schemas/Validator' 1676 | Subscription: 1677 | type: object 1678 | required: 1679 | - address 1680 | - wallet_address 1681 | - beneficiary_address 1682 | - amount 1683 | - period 1684 | - start_time 1685 | - timeout 1686 | - last_payment_time 1687 | - last_request_time 1688 | - subscription_id 1689 | - failed_attempts 1690 | properties: 1691 | address: 1692 | type: string 1693 | example: 0:dea8f638b789172ce36d10a20318125e52c649aa84893cd77858224fe2b9b0ee 1694 | wallet_address: 1695 | type: string 1696 | example: 0:567DE86AF2B6A557D7085807CF7C26338124987A5179344F0D0FA2657EB710F1 1697 | beneficiary_address: 1698 | type: string 1699 | example: 0:c704dadfabac88eab58e340de03080df81ff76636431f48624ad6e26fb2da0a4 1700 | amount: 1701 | type: integer 1702 | format: int64 1703 | example: 1000000000 1704 | period: 1705 | type: integer 1706 | format: int64 1707 | example: 2592000 1708 | start_time: 1709 | type: integer 1710 | format: int64 1711 | example: 1653996832 1712 | timeout: 1713 | type: integer 1714 | format: int64 1715 | example: 10800 1716 | last_payment_time: 1717 | type: integer 1718 | format: int64 1719 | example: 1653996834 1720 | last_request_time: 1721 | type: integer 1722 | format: int64 1723 | example: 0 1724 | subscription_id: 1725 | type: integer 1726 | format: int64 1727 | example: 217477 1728 | failed_attempts: 1729 | type: integer 1730 | format: int32 1731 | example: 0 1732 | Subscriptions: 1733 | type: object 1734 | required: 1735 | - subscriptions 1736 | properties: 1737 | subscriptions: 1738 | type: array 1739 | items: 1740 | $ref: '#/components/schemas/Subscription' 1741 | Transaction: 1742 | type: object 1743 | required: 1744 | - hash 1745 | - fee 1746 | - storage_fee 1747 | - other_fee 1748 | - lt 1749 | - utime 1750 | - account 1751 | - data 1752 | - out_msgs 1753 | properties: 1754 | hash: 1755 | type: string 1756 | example: "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" 1757 | fee: 1758 | type: integer 1759 | format: int64 1760 | example: 5681002 1761 | storage_fee: 1762 | type: integer 1763 | format: int64 1764 | example: 2 1765 | other_fee: 1766 | type: integer 1767 | format: int64 1768 | example: 5681000 1769 | lt: 1770 | type: integer 1771 | format: int64 1772 | example: 25713146000001 1773 | utime: 1774 | type: integer 1775 | format: int64 1776 | example: 1645544908 1777 | account: 1778 | $ref: '#/components/schemas/AccountAddress' 1779 | data: 1780 | type: string 1781 | example: B5EE9C7241020A010002850003B5710C1073837B93FDAAD594284CE8B8EFF7B9CF25427440 1782 | in_msg: 1783 | $ref: '#/components/schemas/Message' 1784 | out_msgs: 1785 | type: array 1786 | items: 1787 | $ref: '#/components/schemas/Message' 1788 | Transactions: 1789 | type: object 1790 | required: 1791 | - transactions 1792 | properties: 1793 | transactions: 1794 | type: array 1795 | items: 1796 | $ref: '#/components/schemas/Transaction' 1797 | Message: 1798 | type: object 1799 | required: 1800 | - fwd_fee 1801 | - ihr_fee 1802 | - created_lt 1803 | - value 1804 | - msg_data 1805 | properties: 1806 | fwd_fee: 1807 | type: integer 1808 | format: int64 1809 | example: 5681002 1810 | ihr_fee: 1811 | type: integer 1812 | format: int64 1813 | example: 5681002 1814 | created_lt: 1815 | type: integer 1816 | format: int64 1817 | example: 25713146000001 1818 | value: 1819 | type: integer 1820 | format: int64 1821 | example: 60000000 1822 | destination: 1823 | $ref: '#/components/schemas/AccountAddress' 1824 | source: 1825 | $ref: '#/components/schemas/AccountAddress' 1826 | msg_data: 1827 | example: { } 1828 | Trace: 1829 | type: object 1830 | required: 1831 | - id 1832 | - utime 1833 | properties: 1834 | id: 1835 | type: string 1836 | example: 55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122 1837 | utime: 1838 | type: integer 1839 | format: int64 1840 | example: 1645544908 1841 | Traces: 1842 | type: object 1843 | required: 1844 | - traces 1845 | properties: 1846 | traces: 1847 | type: array 1848 | items: 1849 | $ref: '#/components/schemas/Trace' 1850 | TxAnnotation: 1851 | type: object 1852 | required: 1853 | - name 1854 | - data 1855 | properties: 1856 | name: 1857 | type: string 1858 | example: nft_transfer 1859 | data: 1860 | description: annotation data struct 1861 | example: { } 1862 | TraceMsg: 1863 | type: object 1864 | required: 1865 | - fwd_fee 1866 | - ihr_fee 1867 | - created_lt 1868 | - value 1869 | - destination 1870 | - source 1871 | properties: 1872 | fwd_fee: 1873 | type: integer 1874 | format: int64 1875 | example: 5681002 1876 | ihr_fee: 1877 | type: integer 1878 | format: int64 1879 | example: 5681002 1880 | created_lt: 1881 | type: integer 1882 | format: int64 1883 | example: 25713146000001 1884 | value: 1885 | type: integer 1886 | format: int64 1887 | example: 60000000 1888 | destination: 1889 | $ref: '#/components/schemas/AccountAddress' 1890 | source: 1891 | $ref: '#/components/schemas/AccountAddress' 1892 | comment: 1893 | type: string 1894 | example: "Hi! This is your salary. \nFrom accounting with love." 1895 | tx: 1896 | $ref: '#/components/schemas/TraceTX' 1897 | TraceTX: 1898 | type: object 1899 | required: 1900 | - out_msgs 1901 | - hash 1902 | - fee 1903 | - storage_fee 1904 | - other_fee 1905 | - lt 1906 | - utime 1907 | - block_id 1908 | - annotations 1909 | properties: 1910 | out_msgs: 1911 | type: array 1912 | items: 1913 | $ref: '#/components/schemas/TraceMsg' 1914 | hash: 1915 | type: string 1916 | example: "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" 1917 | fee: 1918 | type: integer 1919 | format: int64 1920 | example: 5681002 1921 | storage_fee: 1922 | type: integer 1923 | format: int64 1924 | example: 2 1925 | other_fee: 1926 | type: integer 1927 | format: int64 1928 | example: 5681000 1929 | lt: 1930 | type: integer 1931 | format: int64 1932 | example: 25713146000001 1933 | utime: 1934 | type: integer 1935 | format: int64 1936 | example: 1645544908 1937 | block_id: 1938 | type: string 1939 | example: (-1,4234234,-23423523535345353454) 1940 | annotations: 1941 | type: array 1942 | items: 1943 | $ref: '#/components/schemas/TxAnnotation' 1944 | NftCollection: 1945 | type: object 1946 | required: 1947 | - address 1948 | - next_item_index 1949 | - raw_collection_content 1950 | properties: 1951 | address: 1952 | type: string 1953 | example: 0:FD595F36B4C1535BEC8461490D38EBB9AE3C38DD6ACE17CA63ABE2C6608BE159 1954 | next_item_index: 1955 | type: integer 1956 | format: int64 1957 | example: 1 1958 | owner: 1959 | $ref: '#/components/schemas/AccountAddress' 1960 | raw_collection_content: 1961 | type: string 1962 | example: 697066733a2f2f516d596e437861746f5178433571584b79773971656768415853626f3544644e6a32387631487669437a47355359 1963 | metadata: 1964 | example: { } 1965 | NftCollections: 1966 | type: object 1967 | required: 1968 | - nft_collections 1969 | properties: 1970 | nft_collections: 1971 | type: array 1972 | items: 1973 | $ref: '#/components/schemas/NftCollection' 1974 | NftItem: 1975 | type: object 1976 | required: 1977 | - address 1978 | - index 1979 | - init 1980 | - raw_individual_content 1981 | - verified 1982 | properties: 1983 | address: 1984 | type: string 1985 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 1986 | index: 1987 | type: integer 1988 | format: int64 1989 | example: 58 1990 | owner: 1991 | $ref: '#/components/schemas/AccountAddress' 1992 | collection_address: 1993 | type: string 1994 | example: 0:4EE035F09C23A15F2AA3ACC58D13FD27B9A0ED265238B654DEF38F851F0A291F 1995 | init: 1996 | type: boolean 1997 | example: true 1998 | raw_individual_content: 1999 | type: string 2000 | example: 35382E6A736F6E 2001 | verified: 2002 | type: boolean 2003 | example: true 2004 | metadata: 2005 | example: { } 2006 | NftItemRepr: 2007 | type: object 2008 | required: 2009 | - address 2010 | - index 2011 | - verified 2012 | - metadata 2013 | - approved_by 2014 | properties: 2015 | address: 2016 | type: string 2017 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 2018 | index: 2019 | type: integer 2020 | format: int64 2021 | example: 58 2022 | owner: 2023 | $ref: '#/components/schemas/AccountAddress' 2024 | collection_address: 2025 | deprecated: true 2026 | type: string 2027 | description: deprecated 2028 | collection: 2029 | type: object 2030 | required: 2031 | - address 2032 | - name 2033 | properties: 2034 | address: 2035 | type: string 2036 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 2037 | name: 2038 | type: string 2039 | example: TON Diamonds 2040 | verified: 2041 | type: boolean 2042 | example: true 2043 | metadata: 2044 | example: { } 2045 | sale: 2046 | $ref: '#/components/schemas/Sale' 2047 | previews: 2048 | type: array 2049 | items: 2050 | $ref: '#/components/schemas/ImagePreview' 2051 | dns: 2052 | type: string 2053 | example: crypto.ton 2054 | approved_by: 2055 | type: array 2056 | items: 2057 | type: string 2058 | example: GetGems 2059 | NftItems: 2060 | type: object 2061 | required: 2062 | - nft_items 2063 | properties: 2064 | nft_items: 2065 | type: array 2066 | items: 2067 | $ref: '#/components/schemas/NftItem' 2068 | NftItemsRepr: 2069 | type: object 2070 | required: 2071 | - nft_items 2072 | properties: 2073 | nft_items: 2074 | type: array 2075 | items: 2076 | $ref: '#/components/schemas/NftItemRepr' 2077 | ImagePreview: 2078 | type: object 2079 | required: 2080 | - resolution 2081 | - url 2082 | properties: 2083 | resolution: 2084 | type: string 2085 | example: "100x100" 2086 | url: 2087 | type: string 2088 | example: "https://site.com/pic1.jpg" 2089 | Sale: 2090 | type: object 2091 | required: 2092 | - address 2093 | - market 2094 | - price 2095 | properties: 2096 | address: 2097 | type: string 2098 | example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365 2099 | market: 2100 | $ref: '#/components/schemas/AccountAddress' 2101 | owner: 2102 | $ref: '#/components/schemas/AccountAddress' 2103 | price: 2104 | $ref: '#/components/schemas/Price' 2105 | Price: 2106 | type: object 2107 | required: 2108 | - value 2109 | - token_name 2110 | properties: 2111 | value: 2112 | type: string 2113 | example: "123000000000" 2114 | token_name: 2115 | type: string 2116 | example: "TON" 2117 | NftForSale: 2118 | type: object 2119 | required: 2120 | - sale 2121 | - sale_contract 2122 | - nft 2123 | properties: 2124 | sale: 2125 | $ref: '#/components/schemas/Sale' 2126 | sale_contract: 2127 | type: string 2128 | description: deprecated 2129 | example: deprecated 2130 | nft: 2131 | $ref: '#/components/schemas/NftItem' 2132 | NftSalesResponse: 2133 | type: object 2134 | properties: 2135 | getgems: 2136 | type: array 2137 | items: 2138 | $ref: '#/components/schemas/NftForSale' 2139 | disintar: 2140 | type: array 2141 | items: 2142 | $ref: '#/components/schemas/NftForSale' 2143 | other: 2144 | type: array 2145 | items: 2146 | $ref: '#/components/schemas/NftForSale' 2147 | JettonVerificationType: 2148 | type: string 2149 | enum: 2150 | - whitelist 2151 | - blacklist 2152 | - none 2153 | JettonBalance: 2154 | type: object 2155 | required: 2156 | - balance 2157 | - jetton_address 2158 | - wallet_address 2159 | - verification 2160 | properties: 2161 | verification: 2162 | $ref: '#/components/schemas/JettonVerificationType' 2163 | balance: 2164 | type: string 2165 | example: 597968399 2166 | jetton_address: 2167 | type: string 2168 | example: 0:6553FB4A2128297A978C153F6DDF14C37A2566A36E5D5BFE2F50E97A8C877F04 2169 | wallet_address: 2170 | $ref: '#/components/schemas/AccountAddress' 2171 | metadata: 2172 | $ref: '#/components/schemas/Jetton' 2173 | JettonsBalances: 2174 | type: object 2175 | required: 2176 | - balances 2177 | properties: 2178 | balances: 2179 | type: array 2180 | items: 2181 | $ref: '#/components/schemas/JettonBalance' 2182 | JettonInfo: 2183 | type: object 2184 | required: 2185 | - mintable 2186 | - total_supply 2187 | - metadata 2188 | - verification 2189 | properties: 2190 | mintable: 2191 | type: boolean 2192 | example: true 2193 | total_supply: 2194 | type: string 2195 | example: 311500000000000 2196 | metadata: 2197 | $ref: '#/components/schemas/JettonMetadata' 2198 | verification: 2199 | $ref: '#/components/schemas/JettonVerificationType' 2200 | Jetton: 2201 | type: object 2202 | required: 2203 | - address 2204 | - name 2205 | - symbol 2206 | - decimals 2207 | properties: 2208 | address: 2209 | type: string 2210 | example: 0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0 2211 | name: 2212 | type: string 2213 | example: Wrapped TON 2214 | symbol: 2215 | type: string 2216 | example: WTON 2217 | decimals: 2218 | type: integer 2219 | example: 9 2220 | image: 2221 | type: string 2222 | example: "https://cache.tonapi.io/images/jetton.jpg" 2223 | verification: 2224 | $ref: '#/components/schemas/JettonVerificationType' 2225 | JettonMetadata: 2226 | type: object 2227 | required: 2228 | - address 2229 | - name 2230 | - symbol 2231 | - decimals 2232 | properties: 2233 | address: 2234 | type: string 2235 | example: 0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0 2236 | name: 2237 | type: string 2238 | example: Wrapped TON 2239 | symbol: 2240 | type: string 2241 | example: WTON 2242 | decimals: 2243 | type: integer 2244 | example: 9 2245 | image: 2246 | type: string 2247 | example: "https://cache.tonapi.io/images/jetton.jpg" 2248 | description: 2249 | type: string 2250 | example: Wrapped Toncoin 2251 | social: 2252 | type: array 2253 | items: 2254 | type: string 2255 | example: [ "https://t.me/durov_coin", "https://twitter.com/durov_coin" ] 2256 | websites: 2257 | type: array 2258 | items: 2259 | type: string 2260 | example: [ "https://durov.coin", "ton://durov-coin.ton" ] 2261 | catalogs: 2262 | type: array 2263 | items: 2264 | type: string 2265 | example: [ "https://coinmarketcap.com/currencies/drv/", "https://www.coingecko.com/en/coins/durov" ] 2266 | JettonSimpleTransfer: 2267 | type: object 2268 | required: 2269 | - type 2270 | - amount 2271 | - jetton 2272 | properties: 2273 | type: 2274 | type: string 2275 | example: income 2276 | enum: 2277 | - income 2278 | - outcome 2279 | amount: 2280 | type: string 2281 | example: 100500 2282 | jetton: 2283 | $ref: '#/components/schemas/Jetton' 2284 | AccountEvents: 2285 | type: object 2286 | required: 2287 | - events 2288 | properties: 2289 | events: 2290 | type: array 2291 | items: 2292 | $ref: '#/components/schemas/AccountEvent' 2293 | next_from: 2294 | type: integer 2295 | format: int64 2296 | example: 25713146000001 2297 | AccountEvent: 2298 | type: object 2299 | required: 2300 | - event_id 2301 | - timestamp 2302 | - actions 2303 | - fee 2304 | - account 2305 | - is_scam 2306 | - lt 2307 | - in_progress 2308 | properties: 2309 | event_id: 2310 | type: string 2311 | example: e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e 2312 | account: 2313 | $ref: '#/components/schemas/AccountAddress' 2314 | timestamp: 2315 | type: integer 2316 | format: int64 2317 | example: 1234567890 2318 | actions: 2319 | type: array 2320 | items: 2321 | $ref: '#/components/schemas/Action' 2322 | fee: 2323 | $ref: '#/components/schemas/Fee' 2324 | is_scam: 2325 | type: boolean 2326 | description: scam 2327 | example: false 2328 | lt: 2329 | type: integer 2330 | format: int64 2331 | example: 25713146000001 2332 | in_progress: 2333 | type: boolean 2334 | example: false 2335 | description: Event is not finished yet. Transactions still happening 2336 | Event: 2337 | type: object 2338 | required: 2339 | - event_id 2340 | - timestamp 2341 | - actions 2342 | - fees 2343 | - is_scam 2344 | - lt 2345 | - in_progress 2346 | properties: 2347 | event_id: 2348 | type: string 2349 | example: e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e 2350 | timestamp: 2351 | type: integer 2352 | format: int64 2353 | example: 1234567890 2354 | actions: 2355 | type: array 2356 | items: 2357 | $ref: '#/components/schemas/Action' 2358 | fees: 2359 | type: array 2360 | items: 2361 | $ref: '#/components/schemas/Fee' 2362 | is_scam: 2363 | type: boolean 2364 | description: scam 2365 | example: false 2366 | lt: 2367 | type: integer 2368 | format: int64 2369 | example: 25713146000001 2370 | in_progress: 2371 | type: boolean 2372 | example: false 2373 | description: Event is not finished yet. Transactions still happening 2374 | Action: 2375 | type: object 2376 | required: 2377 | - type 2378 | - status 2379 | - simple_preview 2380 | properties: 2381 | type: 2382 | type: string 2383 | example: "TonTransfer" 2384 | enum: 2385 | - TonTransfer 2386 | - JettonTransfer 2387 | - NftItemTransfer 2388 | - ContractDeploy 2389 | - Subscribe 2390 | - UnSubscribe 2391 | - AuctionBid 2392 | - NftPurchase 2393 | - Unknown 2394 | status: 2395 | type: string 2396 | example: "ok" 2397 | enum: 2398 | - ok 2399 | - failed 2400 | - pending 2401 | TonTransfer: 2402 | $ref: '#/components/schemas/TonTransferAction' 2403 | ContractDeploy: 2404 | $ref: '#/components/schemas/ContractDeployAction' 2405 | JettonTransfer: 2406 | $ref: '#/components/schemas/JettonTransferAction' 2407 | NftItemTransfer: 2408 | $ref: '#/components/schemas/NftItemTransferAction' 2409 | Subscribe: 2410 | $ref: '#/components/schemas/SubscriptionAction' 2411 | UnSubscribe: 2412 | $ref: '#/components/schemas/UnSubscriptionAction' 2413 | AuctionBid: 2414 | $ref: '#/components/schemas/AuctionBidAction' 2415 | NftPurchase: 2416 | $ref: '#/components/schemas/NftPurchase' 2417 | simple_preview: 2418 | $ref: '#/components/schemas/ActionSimplePreview' 2419 | TonTransferAction: 2420 | type: object 2421 | required: 2422 | - sender 2423 | - recipient 2424 | - amount 2425 | properties: 2426 | sender: 2427 | $ref: '#/components/schemas/AccountAddress' 2428 | recipient: 2429 | $ref: '#/components/schemas/AccountAddress' 2430 | amount: 2431 | type: integer 2432 | description: amount in nanotons 2433 | format: int64 2434 | example: 123456789 2435 | comment: 2436 | type: string 2437 | example: "Hi! This is your salary. \nFrom accounting with love." 2438 | payload: 2439 | type: string 2440 | description: raw hex encoded payload 2441 | example: '0234de3e21d21b3ee21f3' 2442 | refund: 2443 | $ref: '#/components/schemas/Refund' 2444 | NftItemTransferAction: 2445 | type: object 2446 | required: 2447 | - nft 2448 | properties: 2449 | sender: 2450 | $ref: '#/components/schemas/AccountAddress' 2451 | recipient: 2452 | $ref: '#/components/schemas/AccountAddress' 2453 | nft: 2454 | type: string 2455 | example: "" 2456 | comment: 2457 | type: string 2458 | example: "Hi! This is your salary. \nFrom accounting with love." 2459 | payload: 2460 | type: string 2461 | description: raw hex encoded payload 2462 | example: '0234de3e21d21b3ee21f3' 2463 | refund: 2464 | $ref: '#/components/schemas/Refund' 2465 | JettonTransferAction: 2466 | type: object 2467 | required: 2468 | - amount 2469 | - jetton 2470 | - senders_wallet 2471 | - recipients_wallet 2472 | properties: 2473 | sender: 2474 | $ref: '#/components/schemas/AccountAddress' 2475 | recipient: 2476 | $ref: '#/components/schemas/AccountAddress' 2477 | senders_wallet: 2478 | type: string 2479 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 2480 | recipients_wallet: 2481 | type: string 2482 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 2483 | amount: 2484 | type: string 2485 | description: amount in quanta of tokens 2486 | example: 1000000000 2487 | comment: 2488 | type: string 2489 | example: "Hi! This is your salary. \nFrom accounting with love." 2490 | refund: 2491 | $ref: '#/components/schemas/Refund' 2492 | jetton: 2493 | $ref: '#/components/schemas/Jetton' 2494 | ContractDeployAction: 2495 | type: object 2496 | required: 2497 | - address 2498 | - deployer 2499 | - interfaces 2500 | properties: 2501 | address: 2502 | type: string 2503 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2504 | deployer: 2505 | $ref: '#/components/schemas/AccountAddress' 2506 | interfaces: 2507 | type: array 2508 | items: 2509 | type: string 2510 | example: [ "nft_item", "nft_royalty" ] 2511 | SubscriptionAction: 2512 | type: object 2513 | required: 2514 | - subscriber 2515 | - subscription 2516 | - beneficiary 2517 | - amount 2518 | - initial 2519 | properties: 2520 | subscriber: 2521 | $ref: '#/components/schemas/AccountAddress' 2522 | subscription: 2523 | type: string 2524 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2525 | beneficiary: 2526 | $ref: '#/components/schemas/AccountAddress' 2527 | amount: 2528 | type: integer 2529 | format: int64 2530 | example: 1000000000 2531 | initial: 2532 | type: boolean 2533 | example: false 2534 | UnSubscriptionAction: 2535 | type: object 2536 | required: 2537 | - subscriber 2538 | - subscription 2539 | - beneficiary 2540 | properties: 2541 | subscriber: 2542 | $ref: '#/components/schemas/AccountAddress' 2543 | subscription: 2544 | type: string 2545 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2546 | beneficiary: 2547 | $ref: '#/components/schemas/AccountAddress' 2548 | AuctionBidAction: 2549 | type: object 2550 | required: 2551 | - amount 2552 | - beneficiary 2553 | - bidder 2554 | - auction_type 2555 | properties: 2556 | auction_type: 2557 | type: string 2558 | enum: 2559 | - DNS.ton 2560 | - DNS.tg 2561 | - NUMBER.tg 2562 | - getgems 2563 | amount: 2564 | $ref: '#/components/schemas/Price' 2565 | nft: 2566 | $ref: '#/components/schemas/NftItemRepr' 2567 | beneficiary: 2568 | $ref: '#/components/schemas/AccountAddress' 2569 | bidder: 2570 | $ref: '#/components/schemas/AccountAddress' 2571 | NftPurchase: 2572 | type: object 2573 | required: 2574 | - amount 2575 | - seller 2576 | - buyer 2577 | - auction_type 2578 | - nft 2579 | properties: 2580 | purchase_type: 2581 | type: string 2582 | enum: 2583 | - DNS.tg 2584 | - getgems 2585 | amount: 2586 | $ref: '#/components/schemas/Price' 2587 | nft: 2588 | $ref: '#/components/schemas/NftItemRepr' 2589 | seller: 2590 | $ref: '#/components/schemas/AccountAddress' 2591 | buyer: 2592 | $ref: '#/components/schemas/AccountAddress' 2593 | ActionSimplePreview: 2594 | type: object 2595 | required: 2596 | - name 2597 | - short_description 2598 | - full_description 2599 | properties: 2600 | name: 2601 | type: string 2602 | example: "contract deploy" 2603 | short_description: 2604 | type: string 2605 | example: "" 2606 | full_description: 2607 | type: string 2608 | example: "" 2609 | image: 2610 | type: string 2611 | example: "https://site.com/pic1.jpg" 2612 | Fee: 2613 | type: object 2614 | required: 2615 | - account 2616 | - total 2617 | - gas 2618 | - rent 2619 | - deposit 2620 | - refund 2621 | properties: 2622 | account: 2623 | $ref: '#/components/schemas/AccountAddress' 2624 | total: 2625 | type: integer 2626 | format: int64 2627 | example: 100 2628 | description: "gas + rent + deposit - refund" 2629 | gas: 2630 | type: integer 2631 | format: int64 2632 | example: 80 2633 | rent: 2634 | type: integer 2635 | format: int64 2636 | example: 10 2637 | deposit: 2638 | type: integer 2639 | format: int64 2640 | example: 110 2641 | refund: 2642 | type: integer 2643 | format: int64 2644 | example: 100 2645 | AnnotatedTrace: 2646 | type: object 2647 | required: 2648 | - hash 2649 | - lt 2650 | - account 2651 | - success 2652 | - fee 2653 | - other_fee 2654 | - storage_fee 2655 | - input_value 2656 | - interfaces 2657 | - annotations 2658 | - children 2659 | properties: 2660 | hash: 2661 | type: string 2662 | example: "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" 2663 | lt: 2664 | type: integer 2665 | format: int64 2666 | example: 25713146000001 2667 | account: 2668 | $ref: '#/components/schemas/AccountAddress' 2669 | success: 2670 | type: boolean 2671 | example: true 2672 | fee: 2673 | type: integer 2674 | format: int64 2675 | example: 5681002 2676 | other_fee: 2677 | type: integer 2678 | format: int64 2679 | example: 5681000 2680 | storage_fee: 2681 | type: integer 2682 | format: int64 2683 | example: 200 2684 | input_value: 2685 | type: integer 2686 | format: int64 2687 | example: 2000000 2688 | interfaces: 2689 | type: array 2690 | items: 2691 | type: string 2692 | example: nft_sale 2693 | annotations: 2694 | type: array 2695 | items: 2696 | $ref: '#/components/schemas/TxAnnotation' 2697 | children: 2698 | type: array 2699 | items: 2700 | $ref: '#/components/schemas/AnnotatedTrace' 2701 | DnsRecord: 2702 | type: object 2703 | required: 2704 | - site 2705 | properties: 2706 | wallet: 2707 | $ref: '#/components/schemas/WalletDNS' 2708 | next_resolver: 2709 | type: string 2710 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2711 | site: 2712 | type: array 2713 | items: 2714 | type: string 2715 | example: "http://12234.ton" 2716 | WalletDNS: 2717 | type: object 2718 | required: 2719 | - address 2720 | - is_wallet 2721 | - has_method_pubkey 2722 | - has_method_seqno 2723 | - names 2724 | properties: 2725 | address: 2726 | type: string 2727 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2728 | is_wallet: 2729 | type: boolean 2730 | example: true 2731 | has_method_pubkey: 2732 | type: boolean 2733 | example: true 2734 | has_method_seqno: 2735 | type: boolean 2736 | example: true 2737 | names: 2738 | type: array 2739 | items: 2740 | type: string 2741 | example: "name" 2742 | DomainInfo: 2743 | type: object 2744 | required: 2745 | - expiration 2746 | properties: 2747 | nft_item: 2748 | type: object 2749 | required: 2750 | - address 2751 | properties: 2752 | address: 2753 | type: string 2754 | example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B 2755 | owner: 2756 | $ref: '#/components/schemas/AccountAddress' 2757 | expiration: 2758 | type: integer 2759 | format: int64 2760 | example: 1660050553 2761 | Auctions: 2762 | type: object 2763 | required: 2764 | - data 2765 | - total 2766 | properties: 2767 | data: 2768 | type: array 2769 | items: 2770 | $ref: '#/components/schemas/Auction' 2771 | total: 2772 | type: integer 2773 | format: int64 2774 | example: 1660050553 2775 | Auction: 2776 | type: object 2777 | required: 2778 | - domain 2779 | - owner 2780 | - price 2781 | - bids 2782 | - date 2783 | properties: 2784 | domain: 2785 | type: string 2786 | example: wallet.ton 2787 | owner: 2788 | type: string 2789 | example: owner 2790 | price: 2791 | type: integer 2792 | format: int64 2793 | example: 1660050553 2794 | bids: 2795 | type: integer 2796 | format: int64 2797 | example: 1660050553 2798 | date: 2799 | type: integer 2800 | format: int64 2801 | example: 1660050553 2802 | DomainBids: 2803 | type: object 2804 | required: 2805 | - data 2806 | properties: 2807 | data: 2808 | type: array 2809 | items: 2810 | $ref: '#/components/schemas/DomainBid' 2811 | DomainBid: 2812 | type: object 2813 | required: 2814 | - success 2815 | - value 2816 | - txTime 2817 | - bidder 2818 | - txHash 2819 | properties: 2820 | success: 2821 | type: boolean 2822 | example: true 2823 | default: false 2824 | value: 2825 | type: integer 2826 | format: uint64 2827 | example: 1660050553 2828 | txTime: 2829 | type: integer 2830 | format: int64 2831 | example: 1660050553 2832 | txHash: 2833 | type: string 2834 | example: "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" 2835 | bidder: 2836 | $ref: '#/components/schemas/AccountAddress' 2837 | DomainNames: 2838 | type: object 2839 | required: 2840 | - domains 2841 | properties: 2842 | domains: 2843 | type: array 2844 | items: 2845 | type: string 2846 | example: "http://12234.ton" 2847 | Seqno: 2848 | type: object 2849 | required: 2850 | - seqno 2851 | properties: 2852 | seqno: 2853 | type: integer 2854 | format: int64 2855 | example: 123 2856 | PublicKey: 2857 | type: object 2858 | required: 2859 | - publicKey 2860 | properties: 2861 | publicKey: 2862 | type: string 2863 | format: binary 2864 | example: 6DDD647FD1D4A79C83E0149DFF9EB26A3EBF2DB6517A4F79E43098912E6A6802 2865 | Refund: 2866 | type: object 2867 | required: 2868 | - type 2869 | - origin 2870 | properties: 2871 | type: 2872 | type: string 2873 | example: DNS.ton 2874 | enum: 2875 | - DNS.ton 2876 | - DNS.tg 2877 | - GetGems 2878 | origin: 2879 | type: string 2880 | example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" 2881 | NewTransactionEvent: 2882 | type: object 2883 | required: 2884 | - event_id 2885 | - event_name 2886 | - hash_transaction 2887 | - account 2888 | properties: 2889 | event_id: 2890 | type: integer 2891 | format: int64 2892 | example: 1 2893 | event_name: 2894 | type: string 2895 | example: "new_transaction" 2896 | enum: 2897 | - new_transaction 2898 | hash_transaction: 2899 | type: string 2900 | example: "cf3b91ec333f50e1629b0d6eb448c50bf7539ee9a3bf9cce33fb2c2c6ef22370" 2901 | account: 2902 | type: string 2903 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 2904 | JettonTransferEvent: 2905 | type: object 2906 | required: 2907 | - event_id 2908 | - event_name 2909 | - recipient_address 2910 | - amount 2911 | - jetton_address 2912 | properties: 2913 | event_id: 2914 | type: integer 2915 | format: int64 2916 | example: 1 2917 | event_name: 2918 | type: string 2919 | example: "jetton_transfer" 2920 | enum: 2921 | - jetton_transfer 2922 | recipient_address: 2923 | type: string 2924 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 2925 | amount: 2926 | type: string 2927 | example: "20" 2928 | jetton_address: 2929 | type: string 2930 | example: "0:6553FB4A2128297A978C153F6DDF14C37A2566A36E5D5BFE2F50E97A8C877F04" 2931 | NFTTransferEvent: 2932 | type: object 2933 | required: 2934 | - event_id 2935 | - event_name 2936 | - new_owner 2937 | - nft_address 2938 | properties: 2939 | event_id: 2940 | type: integer 2941 | format: int64 2942 | example: 1 2943 | event_name: 2944 | type: string 2945 | example: "new_transaction" 2946 | enum: 2947 | - new_transaction 2948 | new_owner: 2949 | type: string 2950 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 2951 | nft_address: 2952 | type: string 2953 | example: "0:FD595F36B4C1535BEC8461490D38EBB9AE3C38DD6ACE17CA63ABE2C6608BE159" 2954 | FuncAnalyzeOK: 2955 | type: object 2956 | required: 2957 | - id 2958 | - boc 2959 | - fift 2960 | - date_create 2961 | properties: 2962 | id: 2963 | type: string 2964 | example: "648d1a29-ec5c-43e2-acdc-26174eead951" 2965 | boc: 2966 | type: string 2967 | example: "te6ccgEBBgEARAABFP8A9KQT9LzyyAsBAgEgAgMCAUgEBQAE8jAAONBsIdMfMO1E0NM/MAHAAZekyMs/ye1UkzDyBuIAEaE0MdqJoaZ+YQ==" 2968 | fift: 2969 | type: string 2970 | example: "// automatically generated from ...." 2971 | date_create: 2972 | type: integer 2973 | format: int64 2974 | example: 1671689239 2975 | DisassembleOK: 2976 | type: object 2977 | required: 2978 | - fift 2979 | properties: 2980 | fift: 2981 | type: string 2982 | responses: 2983 | NotFound: 2984 | description: The specified resource was not found 2985 | content: 2986 | application/json: 2987 | schema: 2988 | $ref: '#/components/schemas/Error' 2989 | InternalError: 2990 | description: Something went wrong on server side 2991 | content: 2992 | application/json: 2993 | schema: 2994 | $ref: '#/components/schemas/Error' 2995 | BadRequest: 2996 | description: Something went wrong on client side 2997 | content: 2998 | application/json: 2999 | schema: 3000 | $ref: '#/components/schemas/Error' 3001 | UnauthorizedError: 3002 | description: Access token is missing or invalid 3003 | securitySchemes: 3004 | JWTAuth: 3005 | description: "JWT token authorization" 3006 | type: http 3007 | scheme: bearer 3008 | bearerFormat: JWT 3009 | -------------------------------------------------------------------------------- /api/tonpusher.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | 3 | info: 4 | title: REST api to pusher 5 | version: 0.0.1 6 | contact: 7 | name: Support 8 | email: contact@fslabs.org 9 | 10 | servers: 11 | - url: "https://tonapi.io" 12 | - url: "http://localhost:8081" 13 | 14 | paths: 15 | /v1/stream/sse/test/event: 16 | get: 17 | description: Test new_transaction event 18 | operationId: getNewTransactionTestEvent 19 | tags: 20 | - SSE 21 | responses: 22 | '200': 23 | description: "New transaction" 24 | content: 25 | text/event-stream: 26 | schema: 27 | $ref: '#/components/schemas/NewTransactionEvent' 28 | '400': 29 | $ref: '#/components/responses/BadRequest' 30 | '404': 31 | $ref: '#/components/responses/NotFound' 32 | '500': 33 | $ref: '#/components/responses/InternalError' 34 | /v1/stream/sse/account: 35 | get: 36 | security: 37 | - JWTAuth: [ "common" ] 38 | description: Get new transactions from accounts 39 | operationId: getNewTransactionEvent 40 | parameters: 41 | - $ref: '#/components/parameters/accountsParameter' 42 | tags: 43 | - SSE 44 | responses: 45 | '200': 46 | description: "Account has new transaction" 47 | content: 48 | text/event-stream: 49 | schema: 50 | $ref: '#/components/schemas/NewTransactionEvent' 51 | '400': 52 | $ref: '#/components/responses/BadRequest' 53 | '401': 54 | $ref: '#/components/responses/UnauthorizedError' 55 | '404': 56 | $ref: '#/components/responses/NotFound' 57 | '500': 58 | $ref: '#/components/responses/InternalError' 59 | /v1/stream/sse/jetton_transfer: 60 | get: 61 | security: 62 | - JWTAuth: [ "common" ] 63 | description: Get check jetton transfer 64 | operationId: getJettonTransferEvent 65 | parameters: 66 | - $ref: '#/components/parameters/jettonsParameter' 67 | tags: 68 | - SSE 69 | responses: 70 | '200': 71 | description: "Jetton has been transfer" 72 | content: 73 | text/event-stream: 74 | schema: 75 | $ref: '#/components/schemas/JettonTransferEvent' 76 | '400': 77 | $ref: '#/components/responses/BadRequest' 78 | '401': 79 | $ref: '#/components/responses/UnauthorizedError' 80 | '404': 81 | $ref: '#/components/responses/NotFound' 82 | '500': 83 | $ref: '#/components/responses/InternalError' 84 | /v1/stream/sse/nft_transfer: 85 | get: 86 | security: 87 | - JWTAuth: [ "common" ] 88 | description: Get check nft transfer 89 | operationId: getNFTTransferEvent 90 | parameters: 91 | - $ref: '#/components/parameters/nftsParameter' 92 | tags: 93 | - SSE 94 | responses: 95 | '200': 96 | description: "NFT has been transfer" 97 | content: 98 | text/event-stream: 99 | schema: 100 | $ref: '#/components/schemas/NFTTransferEvent' 101 | '400': 102 | $ref: '#/components/responses/BadRequest' 103 | '401': 104 | $ref: '#/components/responses/UnauthorizedError' 105 | '404': 106 | $ref: '#/components/responses/NotFound' 107 | '500': 108 | $ref: '#/components/responses/InternalError' 109 | 110 | /v1/push/subscribe: 111 | post: 112 | security: 113 | - JWTAuth: [ "common" ] 114 | description: Subscribe to the push 115 | operationId: subscribePush 116 | requestBody: 117 | $ref: "#/components/requestBodies/subscribe" 118 | tags: 119 | - Push 120 | responses: 121 | '200': 122 | description: "Ok" 123 | content: 124 | application/json: 125 | schema: 126 | $ref: '#/components/schemas/Ok' 127 | '400': 128 | $ref: '#/components/responses/BadRequest' 129 | '401': 130 | $ref: '#/components/responses/UnauthorizedError' 131 | '404': 132 | $ref: '#/components/responses/NotFound' 133 | '500': 134 | $ref: '#/components/responses/InternalError' 135 | /v1/push/unsubscribe: 136 | post: 137 | security: 138 | - JWTAuth: [ "common" ] 139 | description: Unsubscribe to the push 140 | operationId: unsubscribePush 141 | requestBody: 142 | $ref: "#/components/requestBodies/unsubscribe" 143 | tags: 144 | - Push 145 | responses: 146 | '200': 147 | description: "Ok" 148 | content: 149 | application/json: 150 | schema: 151 | $ref: '#/components/schemas/Ok' 152 | '400': 153 | $ref: '#/components/responses/BadRequest' 154 | '401': 155 | $ref: '#/components/responses/UnauthorizedError' 156 | '404': 157 | $ref: '#/components/responses/NotFound' 158 | '500': 159 | $ref: '#/components/responses/InternalError' 160 | /v1/stream/ws/account: 161 | get: 162 | security: 163 | - JWTAuth: [ "common" ] 164 | description: ws to check new transactions from account 165 | operationId: wsAccount 166 | tags: 167 | - WS 168 | responses: 169 | 200: 170 | description: "" 171 | 172 | components: 173 | parameters: 174 | accountsParameter: 175 | in: query 176 | name: accounts 177 | required: true 178 | description: "accounts for check new transactions (separate by comma) or use 'all' for subscribe to all accounts" 179 | schema: 180 | type: string 181 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 182 | enum: 183 | - all 184 | nftsParameter: 185 | in: query 186 | name: nfts 187 | required: true 188 | description: "nfts for check transfer (separate by comma)" 189 | schema: 190 | type: string 191 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 192 | jettonsParameter: 193 | in: query 194 | name: jettons 195 | required: true 196 | description: "jettons for check transfer (separate by comma)" 197 | schema: 198 | type: string 199 | example: 0:a6830e9a3453771efeb588cfb33216a6b102438fa25d1349d5976d4514b5d693, 200 | 201 | requestBodies: 202 | unsubscribe: 203 | content: 204 | application/json: 205 | schema: 206 | type: object 207 | required: 208 | - device 209 | properties: 210 | device: 211 | type: string 212 | subscribe: 213 | content: 214 | application/json: 215 | schema: 216 | type: object 217 | required: 218 | - device 219 | properties: 220 | device: 221 | type: string 222 | token: 223 | type: string 224 | locale: 225 | type: string 226 | accounts: 227 | type: array 228 | items: 229 | type: object 230 | required: 231 | - address 232 | properties: 233 | address: 234 | type: string 235 | rpc: 236 | content: 237 | application/json: 238 | schema: 239 | type: object 240 | properties: 241 | id: 242 | type: integer 243 | format: int64 244 | example: 1 245 | jsonrpc: 246 | type: string 247 | example: "2.0" 248 | method: 249 | type: string 250 | enum: 251 | - subscribe_account 252 | - unsubscribe_account 253 | params: 254 | type: array 255 | items: 256 | type: string 257 | example: "EQAs87W4yJHlF8mt29ocA4agnMrLsOP69jC1HPyBUjJay-7l" 258 | 259 | schemas: 260 | NewTransactionEvent: 261 | type: object 262 | required: 263 | - event_id 264 | - event_name 265 | - hash_transaction 266 | - account 267 | properties: 268 | event_id: 269 | type: integer 270 | format: int64 271 | example: 1 272 | event_name: 273 | type: string 274 | example: "new_transaction" 275 | enum: 276 | - new_transaction 277 | hash_transaction: 278 | type: string 279 | example: "cf3b91ec333f50e1629b0d6eb448c50bf7539ee9a3bf9cce33fb2c2c6ef22370" 280 | account: 281 | type: string 282 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 283 | JettonTransferEvent: 284 | type: object 285 | required: 286 | - event_id 287 | - event_name 288 | - recipient_address 289 | - amount 290 | - jetton_address 291 | properties: 292 | event_id: 293 | type: integer 294 | format: int64 295 | example: 1 296 | event_name: 297 | type: string 298 | example: "jetton_transfer" 299 | enum: 300 | - jetton_transfer 301 | recipient_address: 302 | type: string 303 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 304 | amount: 305 | type: string 306 | example: "20" 307 | jetton_address: 308 | type: string 309 | example: "0:6553FB4A2128297A978C153F6DDF14C37A2566A36E5D5BFE2F50E97A8C877F04" 310 | NFTTransferEvent: 311 | type: object 312 | required: 313 | - event_id 314 | - event_name 315 | - new_owner 316 | - nft_address 317 | properties: 318 | event_id: 319 | type: integer 320 | format: int64 321 | example: 1 322 | event_name: 323 | type: string 324 | example: "new_transaction" 325 | enum: 326 | - new_transaction 327 | new_owner: 328 | type: string 329 | example: "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" 330 | nft_address: 331 | type: string 332 | example: "0:FD595F36B4C1535BEC8461490D38EBB9AE3C38DD6ACE17CA63ABE2C6608BE159" 333 | Error: 334 | type: object 335 | required: 336 | - error 337 | properties: 338 | error: 339 | type: string 340 | example: error description 341 | Ok: 342 | type: object 343 | required: 344 | - ok 345 | properties: 346 | ok: 347 | type: boolean 348 | example: true 349 | 350 | responses: 351 | NotFound: 352 | description: The specified resource was not found 353 | content: 354 | application/json: 355 | schema: 356 | $ref: '#/components/schemas/Error' 357 | InternalError: 358 | description: Something went wrong on server side 359 | content: 360 | application/json: 361 | schema: 362 | $ref: '#/components/schemas/Error' 363 | BadRequest: 364 | description: Something went wrong on client side 365 | content: 366 | application/json: 367 | schema: 368 | $ref: '#/components/schemas/Error' 369 | UnauthorizedError: 370 | description: Access token is missing or invalid 371 | 372 | securitySchemes: 373 | JWTAuth: 374 | description: "JWT token authorization" 375 | type: http 376 | scheme: bearer 377 | bearerFormat: JWT 378 | --------------------------------------------------------------------------------