> ## Documentation Index
> Fetch the complete documentation index at: https://tonapi.ness.su/llms.txt
> Use this file to discover all available pages before exploring further.

# Emulate Message To Wallet

> Emulates a wallet message on the current blockchain state and derives its consequences for the signing wallet



## OpenAPI

````yaml POST /v2/wallet/emulate
openapi: 3.0.0
info:
  title: REST api to TON blockchain explorer
  version: 2.0.0
  description: Provide access to indexed TON blockchain
  contact:
    name: Support
    email: support@tonkeeper.com
servers:
  - url: https://tonapi.io
  - url: https://testnet.tonapi.io
  - url: http://localhost:8081
security: []
tags:
  - name: Accounts
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/accounts
  - name: NFT
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/nft
  - name: Jettons
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/jettons
  - name: DNS
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/dns
  - name: Wallet
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/wallet
  - name: Rates
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/rates
  - name: Staking
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/staking
  - name: Traces
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/traces
  - name: Events
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/events
  - name: Storage
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/storage
  - name: Connect
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/connect
  - name: Gasless
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/gasless
  - name: Multisig
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/multisig
  - name: Blockchain
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/blockchain
  - name: Lite Server
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/lite-server
  - name: Emulation
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/emulation
  - name: Utilities
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/utilities
  - name: ExtraCurrency
    externalDocs:
      description: Additional documentation
      url: https://docs.tonconsole.com/tonapi/rest-api/extra-currency
  - name: Purchases
paths:
  /v2/wallet/emulate:
    post:
      tags:
        - Emulation
        - Wallet
      description: >-
        Emulates a wallet message on the current blockchain state and derives
        its consequences for the signing wallet
      operationId: emulateMessageToWallet
      parameters:
        - $ref: '#/components/parameters/i18n'
        - $ref: '#/components/parameters/currencyQuery'
      requestBody:
        $ref: '#/components/requestBodies/EmulationBoc'
      responses:
        '200':
          description: Emulated wallet message consequences
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageConsequences'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    i18n:
      in: header
      name: Accept-Language
      required: false
      schema:
        type: string
        example: ru-RU,ru;q=0.5
        default: en
    currencyQuery:
      in: query
      name: currency
      required: false
      schema:
        type: string
        example: usd
  requestBodies:
    EmulationBoc:
      description: >-
        bag-of-cells serialized to base64/hex and additional parameters to
        configure emulation
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - boc
            properties:
              boc:
                type: string
                format: cell
              params:
                type: array
                description: additional per account configuration
                items:
                  type: object
                  required:
                    - address
                  properties:
                    address:
                      type: string
                      format: address
                      example: >-
                        0:97146a46acc2654y27947f14c4a4b14273e954f78bc017790b41208b0043200b
                    balance:
                      type: integer
                      format: int64
                      example: 10000000000
                      x-js-format: bigint
  schemas:
    MessageConsequences:
      type: object
      description: >
        Result of emulating a wallet message on the current blockchain state:
        describes the expected on-chain consequences (trace, high-level
        AccountEvent, risk) for the signing wallet. For UI display only.
      required:
        - trace
        - risk
        - event
      properties:
        trace:
          $ref: '#/components/schemas/Trace'
        risk:
          $ref: '#/components/schemas/Risk'
        event:
          $ref: '#/components/schemas/AccountEvent'
    Trace:
      type: object
      required:
        - transaction
        - interfaces
      properties:
        transaction:
          $ref: '#/components/schemas/Transaction'
        interfaces:
          type: array
          items:
            type: string
          example:
            - wallet
            - tep62_item
        children:
          type: array
          items:
            $ref: '#/components/schemas/Trace'
        emulated:
          type: boolean
          example: false
    Risk:
      type: object
      description: >
        Conservative upper bound on assets this wallet may lose if the emulated
        message is sent and the counterparty behaves maliciously. Values may
        exceed current balances (e.g. already-authorized future receipts). For
        UI display only.
      required:
        - transfer_all_remaining_balance
        - ton
        - jettons
        - nfts
      properties:
        transfer_all_remaining_balance:
          type: boolean
          description: >
            True if the message semantics allow sweeping all current and future
            remaining TON balance of the wallet (e.g. “send all” / drain
            patterns).
          example: true
        ton:
          type: integer
          format: int64
          x-js-format: bigint
          example: 500
          description: >-
            Maximum TON amount that may leave the wallet in the worst case, in
            nanotons.
        jettons:
          type: array
          description: >-
            Jetton positions that may be debited from the wallet in the worst
            case.
          items:
            $ref: '#/components/schemas/JettonQuantity'
        nfts:
          type: array
          description: >-
            NFT items that may be transferred out of the wallet in the worst
            case.
          items:
            $ref: '#/components/schemas/NftItem'
        total_equivalent:
          type: number
          format: float
          description: >
            Estimated equivalent of all assets at risk (TON, jettons, NFTs) in
            the selected currency from currencyQuery (e.g. USD). Approximate,
            best-effort UI value.
    AccountEvent:
      type: object
      description: >
        High-level view over a transaction trace caused by a single inbound
        message. TonAPI analyses the trace, detects known patterns and groups
        low-level transactions into user-facing actions (Jetton transfer, NFT
        purchase, etc.). Actions are a best-effort UI abstraction and may
        change; do not rely on them for protocol-critical logic.
      required:
        - event_id
        - timestamp
        - actions
        - account
        - is_scam
        - lt
        - in_progress
        - extra
        - progress
      properties:
        event_id:
          type: string
          example: e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e
        account:
          $ref: '#/components/schemas/AccountAddress'
        timestamp:
          type: integer
          format: int64
          example: 1234567890
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
        is_scam:
          type: boolean
          description: scam
          example: false
        lt:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        in_progress:
          type: boolean
          example: false
          description: Event trace is not finished yet. Transactions still happening.
        extra:
          type: integer
          format: int64
          x-js-format: bigint
          example: 3
          description: >
            Net TON change for this account not explained by actions, in
            nanotons: extra = final_balance - initial_balance - sum(explicit TON
            changes from actions). extra < 0 - implicit fee, extra > 0 - refund.
            For UI display only
        progress:
          type: number
          format: float
          minimum: 0
          maximum: 1
          example: 0.5
          description: Event completion ratio in [0,1]
        ext_msg_hash:
          type: string
          description: Normalized hash of the root external inbound message (hex).
          example: a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456
    Transaction:
      type: object
      required:
        - hash
        - lt
        - account
        - end_balance
        - success
        - utime
        - orig_status
        - end_status
        - total_fees
        - transaction_type
        - state_update_old
        - state_update_new
        - out_msgs
        - block
        - aborted
        - destroyed
        - raw
      properties:
        hash:
          type: string
          example: 55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122
        lt:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        account:
          $ref: '#/components/schemas/AccountAddress'
        success:
          type: boolean
          example: true
        utime:
          type: integer
          format: int64
          example: 1645544908
        orig_status:
          $ref: '#/components/schemas/AccountStatus'
        end_status:
          $ref: '#/components/schemas/AccountStatus'
        total_fees:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        end_balance:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        transaction_type:
          $ref: '#/components/schemas/TransactionType'
        state_update_old:
          type: string
          example: 55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122
        state_update_new:
          type: string
          example: 55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122
        in_msg:
          $ref: '#/components/schemas/Message'
        out_msgs:
          type: array
          items:
            $ref: '#/components/schemas/Message'
        block:
          type: string
          example: (-1,4234234,8000000000000000)
        prev_trans_hash:
          type: string
          example: 55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122
        prev_trans_lt:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        compute_phase:
          $ref: '#/components/schemas/ComputePhase'
        storage_phase:
          $ref: '#/components/schemas/StoragePhase'
        credit_phase:
          $ref: '#/components/schemas/CreditPhase'
        action_phase:
          $ref: '#/components/schemas/ActionPhase'
        bounce_phase:
          $ref: '#/components/schemas/BouncePhaseType'
        aborted:
          type: boolean
          example: true
        destroyed:
          type: boolean
          example: true
        raw:
          type: string
          format: cell
          description: hex encoded boc with raw transaction
          example: >-
            b5ee9c72410206010001380003b372cf3b5b8c891e517c9addbda1c0386a09ccacbb0e3faf630b51cfc8152325acb00002ac5795c0e41fdf79135cb7da03cc623b165d614b562a51eeccd8a5e097f405abf6b37f4e73000002ac5629732c1666887ed000144030480102030101a004008272abc8f2971aa4404ac6da1597720f348b2e1247b1ad9f55cbd3b6812f0a5f08b269bb65039fb1f6074d00f794e857f6dfd01131d299df456af10a8a4943d4d165000d0c80608840492001ab48015581f575c3b8c6ab3d6
    JettonQuantity:
      type: object
      required:
        - quantity
        - wallet_address
        - jetton
      properties:
        quantity:
          type: string
          x-js-format: bigint
          example: '597968399'
        wallet_address:
          $ref: '#/components/schemas/AccountAddress'
        jetton:
          $ref: '#/components/schemas/JettonPreview'
    NftItem:
      type: object
      required:
        - address
        - index
        - verified
        - metadata
        - approved_by
        - trust
      properties:
        address:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        index:
          type: integer
          format: int64
          example: 58
        owner:
          $ref: '#/components/schemas/AccountAddress'
        collection:
          type: object
          required:
            - address
            - name
            - description
          properties:
            address:
              type: string
              format: address
              example: >-
                0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
            name:
              type: string
              example: TON Diamonds
            description:
              type: string
              example: Best collection in TON network
        verified:
          type: boolean
          description: >-
            Collection master contract confirmed that this item is part of
            collection
          example: true
        metadata:
          type: object
          additionalProperties: true
          example: {}
        sale:
          $ref: '#/components/schemas/Sale'
        previews:
          type: array
          items:
            $ref: '#/components/schemas/ImagePreview'
        dns:
          type: string
          example: crypto.ton
        approved_by:
          allOf:
            - $ref: '#/components/schemas/NftApprovedBy'
          deprecated: true
          description: Please use trust field
        include_cnft:
          type: boolean
          example: false
        trust:
          $ref: '#/components/schemas/TrustType'
        code_hash:
          type: string
          description: Hash of the NFT item account code cell (hex)
        data_hash:
          type: string
          description: Hash of the NFT item account data cell (hex)
    AccountAddress:
      type: object
      required:
        - address
        - is_scam
        - is_wallet
      properties:
        address:
          type: string
          format: maybe-address
          example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365
        name:
          type: string
          example: Ton foundation
          description: >-
            Display name. Data collected from different sources like moderation
            lists, dns, collections names and over.
        is_scam:
          type: boolean
          example: true
          description: Is this account was marked as part of scammers activity
        icon:
          type: string
          example: https://ton.org/logo.png
        is_wallet:
          type: boolean
          example: true
    Action:
      type: object
      required:
        - type
        - status
        - simple_preview
        - base_transactions
      properties:
        type:
          type: string
          example: TonTransfer
          enum:
            - TonTransfer
            - ExtraCurrencyTransfer
            - ContractDeploy
            - JettonTransfer
            - FlawedJettonTransfer
            - JettonBurn
            - JettonMint
            - NftItemTransfer
            - Subscribe
            - UnSubscribe
            - AuctionBid
            - NftPurchase
            - DepositStake
            - WithdrawStake
            - WithdrawStakeRequest
            - ElectionsDepositStake
            - ElectionsRecoverStake
            - JettonSwap
            - SmartContractExec
            - DomainRenew
            - Purchase
            - AddExtension
            - RemoveExtension
            - SetSignatureAllowedAction
            - GasRelay
            - DepositTokenStake
            - WithdrawTokenStakeRequest
            - LiquidityDeposit
            - Unknown
        status:
          type: string
          example: ok
          enum:
            - ok
            - failed
        TonTransfer:
          $ref: '#/components/schemas/TonTransferAction'
        ExtraCurrencyTransfer:
          $ref: '#/components/schemas/ExtraCurrencyTransferAction'
        ContractDeploy:
          $ref: '#/components/schemas/ContractDeployAction'
        JettonTransfer:
          $ref: '#/components/schemas/JettonTransferAction'
        FlawedJettonTransfer:
          $ref: '#/components/schemas/FlawedJettonTransferAction'
        JettonBurn:
          $ref: '#/components/schemas/JettonBurnAction'
        JettonMint:
          $ref: '#/components/schemas/JettonMintAction'
        NftItemTransfer:
          $ref: '#/components/schemas/NftItemTransferAction'
        Subscribe:
          $ref: '#/components/schemas/SubscriptionAction'
        UnSubscribe:
          $ref: '#/components/schemas/UnSubscriptionAction'
        AuctionBid:
          $ref: '#/components/schemas/AuctionBidAction'
        NftPurchase:
          $ref: '#/components/schemas/NftPurchaseAction'
        DepositStake:
          $ref: '#/components/schemas/DepositStakeAction'
        WithdrawStake:
          $ref: '#/components/schemas/WithdrawStakeAction'
        WithdrawStakeRequest:
          $ref: '#/components/schemas/WithdrawStakeRequestAction'
        ElectionsDepositStake:
          $ref: '#/components/schemas/ElectionsDepositStakeAction'
        ElectionsRecoverStake:
          $ref: '#/components/schemas/ElectionsRecoverStakeAction'
        JettonSwap:
          $ref: '#/components/schemas/JettonSwapAction'
        SmartContractExec:
          $ref: '#/components/schemas/SmartContractAction'
        DomainRenew:
          $ref: '#/components/schemas/DomainRenewAction'
        Purchase:
          $ref: '#/components/schemas/PurchaseAction'
        AddExtension:
          $ref: '#/components/schemas/AddExtensionAction'
        RemoveExtension:
          $ref: '#/components/schemas/RemoveExtensionAction'
        SetSignatureAllowedAction:
          $ref: '#/components/schemas/SetSignatureAllowedAction'
        GasRelay:
          $ref: '#/components/schemas/GasRelayAction'
        DepositTokenStake:
          $ref: '#/components/schemas/DepositTokenStakeAction'
        WithdrawTokenStakeRequest:
          $ref: '#/components/schemas/WithdrawTokenStakeRequestAction'
        LiquidityDeposit:
          $ref: '#/components/schemas/LiquidityDepositAction'
        simple_preview:
          $ref: '#/components/schemas/ActionSimplePreview'
        base_transactions:
          type: array
          items:
            type: string
            description: transaction hash
            example: e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e
    AccountStatus:
      type: string
      example: active
      enum:
        - nonexist
        - uninit
        - active
        - frozen
    TransactionType:
      type: string
      example: TransOrd
      enum:
        - TransOrd
        - TransTickTock
        - TransSplitPrepare
        - TransSplitInstall
        - TransMergePrepare
        - TransMergeInstall
        - TransStorage
    Message:
      type: object
      required:
        - msg_type
        - created_lt
        - ihr_disabled
        - bounce
        - bounced
        - value
        - fwd_fee
        - ihr_fee
        - import_fee
        - created_at
        - hash
      properties:
        msg_type:
          type: string
          example: int_msg
          enum:
            - int_msg
            - ext_in_msg
            - ext_out_msg
        created_lt:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        ihr_disabled:
          type: boolean
          example: true
        bounce:
          type: boolean
          example: true
        bounced:
          type: boolean
          example: true
        value:
          type: integer
          format: int64
          x-js-format: bigint
          example: 60000000
        value_extra:
          type: array
          items:
            $ref: '#/components/schemas/ExtraCurrency'
        fwd_fee:
          type: integer
          format: int64
          x-js-format: bigint
          example: 5681002
        ihr_fee:
          type: integer
          format: int64
          x-js-format: bigint
          example: 5681002
        destination:
          $ref: '#/components/schemas/AccountAddress'
        source:
          $ref: '#/components/schemas/AccountAddress'
        import_fee:
          type: integer
          format: int64
          x-js-format: bigint
          example: 5681002
        created_at:
          type: integer
          format: int64
          example: 5681002
        op_code:
          type: string
          x-js-format: bigint
          example: '0xdeadbeaf'
        init:
          $ref: '#/components/schemas/StateInit'
        hash:
          type: string
          example: 1219de582369ac80ee1afe12147930f458a54ff1eea612611a8bc6bd31581a6c
        raw_body:
          type: string
          format: cell
          description: hex-encoded BoC with raw message body
          example: B5EE9C7201010101001100001D00048656C6C6F2C20776F726C64218
        decoded_op_name:
          type: string
          example: nft_transfer
        decoded_body: {}
    ComputePhase:
      type: object
      required:
        - skipped
      properties:
        skipped:
          type: boolean
          example: true
        skip_reason:
          $ref: '#/components/schemas/ComputeSkipReason'
        success:
          type: boolean
          example: true
        gas_fees:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000
        gas_used:
          type: integer
          format: int64
          x-js-format: bigint
          example: 10000
        vm_steps:
          type: integer
          format: int32
          example: 5
        exit_code:
          type: integer
          example: 0
          format: int32
        exit_code_description:
          type: string
    StoragePhase:
      type: object
      required:
        - fees_collected
        - status_change
      properties:
        fees_collected:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        fees_due:
          type: integer
          format: int64
          example: 25713146000001
          x-js-format: bigint
        status_change:
          $ref: '#/components/schemas/AccStatusChange'
    CreditPhase:
      type: object
      required:
        - fees_collected
        - credit
      properties:
        fees_collected:
          type: integer
          format: int64
          x-js-format: bigint
          example: 100
        credit:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000
    ActionPhase:
      type: object
      required:
        - success
        - result_code
        - total_actions
        - skipped_actions
        - fwd_fees
        - total_fees
      properties:
        success:
          type: boolean
          example: true
        result_code:
          type: integer
          format: int32
          example: 5
        total_actions:
          type: integer
          format: int32
          example: 5
        skipped_actions:
          type: integer
          format: int32
          example: 5
        fwd_fees:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000
        total_fees:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000
        result_code_description:
          type: string
    BouncePhaseType:
      type: string
      example: cskip_no_state
      enum:
        - TrPhaseBounceNegfunds
        - TrPhaseBounceNofunds
        - TrPhaseBounceOk
    JettonPreview:
      type: object
      required:
        - address
        - name
        - symbol
        - decimals
        - verification
        - image
        - score
      properties:
        address:
          type: string
          format: address
          example: 0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0
        name:
          type: string
          example: Wrapped TON
        symbol:
          type: string
          example: WTON
        decimals:
          type: integer
          example: 9
        image:
          type: string
          example: https://cache.tonapi.io/images/jetton.jpg
        verification:
          $ref: '#/components/schemas/JettonVerificationType'
        custom_payload_api_uri:
          type: string
        score:
          type: integer
          format: int32
        scaled_ui:
          $ref: '#/components/schemas/ScaledUI'
        description:
          type: string
    Sale:
      type: object
      required:
        - address
        - market
        - price
      properties:
        address:
          type: string
          format: address
          example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365
        market:
          $ref: '#/components/schemas/AccountAddress'
        owner:
          $ref: '#/components/schemas/AccountAddress'
        price:
          $ref: '#/components/schemas/Price'
    ImagePreview:
      type: object
      required:
        - resolution
        - url
      properties:
        resolution:
          type: string
          example: 100x100
        url:
          type: string
          example: https://site.com/pic1.jpg
    NftApprovedBy:
      type: array
      items:
        type: string
        example: getgems
        enum:
          - getgems
          - tonkeeper
    TrustType:
      type: string
      example: whitelist
      enum:
        - whitelist
        - graylist
        - blacklist
        - none
    TonTransferAction:
      type: object
      required:
        - sender
        - recipient
        - amount
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        amount:
          type: integer
          description: amount in nanotons
          format: int64
          example: 123456789
          x-js-format: bigint
        comment:
          type: string
          example: |-
            Hi! This is your salary. 
            From accounting with love.
        encrypted_comment:
          $ref: '#/components/schemas/EncryptedComment'
        refund:
          $ref: '#/components/schemas/Refund'
    ExtraCurrencyTransferAction:
      type: object
      required:
        - sender
        - recipient
        - amount
        - currency
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: amount in quanta of tokens
        comment:
          type: string
          example: |-
            Hi! This is your salary. 
            From accounting with love.
        encrypted_comment:
          $ref: '#/components/schemas/EncryptedComment'
        currency:
          $ref: '#/components/schemas/EcPreview'
    ContractDeployAction:
      type: object
      required:
        - address
        - interfaces
      properties:
        address:
          type: string
          format: address
          example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
        interfaces:
          type: array
          items:
            type: string
          example:
            - nft_item
            - nft_royalty
    JettonTransferAction:
      type: object
      required:
        - amount
        - jetton
        - senders_wallet
        - recipients_wallet
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        senders_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        recipients_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: amount in quanta of tokens
        comment:
          type: string
          example: |-
            Hi! This is your salary. 
            From accounting with love.
        encrypted_comment:
          $ref: '#/components/schemas/EncryptedComment'
        refund:
          $ref: '#/components/schemas/Refund'
        jetton:
          $ref: '#/components/schemas/JettonPreview'
    FlawedJettonTransferAction:
      type: object
      required:
        - sent_amount
        - received_amount
        - jetton
        - senders_wallet
        - recipients_wallet
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        senders_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        recipients_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        sent_amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: sent amount in quanta of tokens
        received_amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: actually received amount in quanta of tokens
        comment:
          type: string
          example: |-
            Hi! This is your salary. 
            From accounting with love.
        encrypted_comment:
          $ref: '#/components/schemas/EncryptedComment'
        refund:
          $ref: '#/components/schemas/Refund'
        jetton:
          $ref: '#/components/schemas/JettonPreview'
    JettonBurnAction:
      type: object
      required:
        - amount
        - jetton
        - sender
        - senders_wallet
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        senders_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: amount in quanta of tokens
        jetton:
          $ref: '#/components/schemas/JettonPreview'
    JettonMintAction:
      type: object
      required:
        - amount
        - jetton
        - recipient
        - recipients_wallet
      properties:
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        recipients_wallet:
          type: string
          format: address
          example: 0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B
        amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
          description: amount in quanta of tokens
        jetton:
          $ref: '#/components/schemas/JettonPreview'
    NftItemTransferAction:
      type: object
      required:
        - nft
      properties:
        sender:
          $ref: '#/components/schemas/AccountAddress'
        recipient:
          $ref: '#/components/schemas/AccountAddress'
        nft:
          type: string
          format: maybe-address
          example: ''
        comment:
          type: string
          example: |-
            Hi! This is your salary. 
            From accounting with love.
        encrypted_comment:
          $ref: '#/components/schemas/EncryptedComment'
        payload:
          type: string
          description: raw hex encoded payload
          example: 0234de3e21d21b3ee21f3
        refund:
          $ref: '#/components/schemas/Refund'
    SubscriptionAction:
      type: object
      required:
        - subscriber
        - subscription
        - beneficiary
        - admin
        - price
        - initial
      properties:
        subscriber:
          $ref: '#/components/schemas/AccountAddress'
        subscription:
          type: string
          format: address
          example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
        beneficiary:
          $ref: '#/components/schemas/AccountAddress'
        admin:
          $ref: '#/components/schemas/AccountAddress'
        amount:
          deprecated: true
          type: integer
          format: int64
          example: 1000000000
          x-js-format: bigint
        price:
          $ref: '#/components/schemas/Price'
        initial:
          type: boolean
          example: false
    UnSubscriptionAction:
      type: object
      required:
        - subscriber
        - subscription
        - beneficiary
        - admin
      properties:
        subscriber:
          $ref: '#/components/schemas/AccountAddress'
        subscription:
          type: string
          format: address
          example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
        beneficiary:
          $ref: '#/components/schemas/AccountAddress'
        admin:
          $ref: '#/components/schemas/AccountAddress'
    AuctionBidAction:
      type: object
      required:
        - amount
        - bidder
        - auction
        - auction_type
      properties:
        auction_type:
          type: string
          enum:
            - DNS.ton
            - DNS.tg
            - NUMBER.tg
            - getgems
        amount:
          $ref: '#/components/schemas/Price'
        nft:
          $ref: '#/components/schemas/NftItem'
        bidder:
          $ref: '#/components/schemas/AccountAddress'
        auction:
          $ref: '#/components/schemas/AccountAddress'
    NftPurchaseAction:
      type: object
      required:
        - amount
        - seller
        - buyer
        - auction_type
        - nft
      properties:
        auction_type:
          type: string
          enum:
            - DNS.ton
            - DNS.tg
            - NUMBER.tg
            - getgems
        amount:
          $ref: '#/components/schemas/Price'
        nft:
          $ref: '#/components/schemas/NftItem'
        seller:
          $ref: '#/components/schemas/AccountAddress'
        buyer:
          $ref: '#/components/schemas/AccountAddress'
    DepositStakeAction:
      description: validator's participation in elections
      type: object
      required:
        - amount
        - staker
        - pool
        - implementation
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1660050553
        staker:
          $ref: '#/components/schemas/AccountAddress'
        pool:
          $ref: '#/components/schemas/AccountAddress'
        implementation:
          $ref: '#/components/schemas/PoolImplementationType'
    WithdrawStakeAction:
      description: validator's participation in elections
      type: object
      required:
        - amount
        - staker
        - pool
        - implementation
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1660050553
        staker:
          $ref: '#/components/schemas/AccountAddress'
        pool:
          $ref: '#/components/schemas/AccountAddress'
        implementation:
          $ref: '#/components/schemas/PoolImplementationType'
    WithdrawStakeRequestAction:
      description: validator's participation in elections
      type: object
      required:
        - staker
        - pool
        - implementation
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1660050553
        staker:
          $ref: '#/components/schemas/AccountAddress'
        pool:
          $ref: '#/components/schemas/AccountAddress'
        implementation:
          $ref: '#/components/schemas/PoolImplementationType'
    ElectionsDepositStakeAction:
      type: object
      required:
        - amount
        - staker
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1660050553
        staker:
          $ref: '#/components/schemas/AccountAddress'
    ElectionsRecoverStakeAction:
      type: object
      required:
        - amount
        - staker
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1660050553
        staker:
          $ref: '#/components/schemas/AccountAddress'
    JettonSwapAction:
      type: object
      required:
        - dex
        - amount_in
        - amount_out
        - user_wallet
        - router
      properties:
        dex:
          type: string
          example: stonfi
        amount_in:
          type: string
          x-js-format: bigint
          example: '1660050553'
        amount_out:
          type: string
          x-js-format: bigint
          example: '1660050553'
        ton_in:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000000000
        ton_out:
          type: integer
          example: 2000000000
          format: int64
          x-js-format: bigint
        user_wallet:
          $ref: '#/components/schemas/AccountAddress'
        router:
          $ref: '#/components/schemas/AccountAddress'
        jetton_master_in:
          $ref: '#/components/schemas/JettonPreview'
        jetton_master_out:
          $ref: '#/components/schemas/JettonPreview'
    SmartContractAction:
      type: object
      required:
        - executor
        - contract
        - ton_attached
        - operation
      properties:
        executor:
          $ref: '#/components/schemas/AccountAddress'
        contract:
          $ref: '#/components/schemas/AccountAddress'
        ton_attached:
          type: integer
          description: amount in nanotons
          format: int64
          example: 123456789
          x-js-format: bigint
        operation:
          type: string
          example: NftTransfer or 0x35d95a12
        payload:
          type: string
        refund:
          $ref: '#/components/schemas/Refund'
    DomainRenewAction:
      type: object
      required:
        - domain
        - contract_address
        - renewer
      properties:
        domain:
          type: string
          example: vasya.ton
        contract_address:
          type: string
          format: address
          example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
        renewer:
          $ref: '#/components/schemas/AccountAddress'
    PurchaseAction:
      type: object
      required:
        - source
        - destination
        - invoice_id
        - amount
        - metadata
      properties:
        source:
          $ref: '#/components/schemas/AccountAddress'
        destination:
          $ref: '#/components/schemas/AccountAddress'
        invoice_id:
          type: string
          example: 03cfc582-b1c3-410a-a9a7-1f3afe326b3b
        amount:
          $ref: '#/components/schemas/Price'
        metadata:
          $ref: '#/components/schemas/Metadata'
    AddExtensionAction:
      type: object
      required:
        - wallet
        - extension
      properties:
        wallet:
          $ref: '#/components/schemas/AccountAddress'
        extension:
          type: string
          format: address
          example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365
    RemoveExtensionAction:
      type: object
      required:
        - wallet
        - extension
      properties:
        wallet:
          $ref: '#/components/schemas/AccountAddress'
        extension:
          type: string
          format: address
          example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365
    SetSignatureAllowedAction:
      type: object
      required:
        - wallet
        - allowed
      properties:
        wallet:
          $ref: '#/components/schemas/AccountAddress'
        allowed:
          type: boolean
    GasRelayAction:
      type: object
      required:
        - amount
        - relayer
        - target
      properties:
        amount:
          type: integer
          format: int64
          x-js-format: bigint
          example: 1000000000
        relayer:
          $ref: '#/components/schemas/AccountAddress'
        target:
          $ref: '#/components/schemas/AccountAddress'
    DepositTokenStakeAction:
      type: object
      required:
        - staker
        - protocol
      properties:
        staker:
          $ref: '#/components/schemas/AccountAddress'
        protocol:
          $ref: '#/components/schemas/Protocol'
        stake_meta:
          $ref: '#/components/schemas/Price'
    WithdrawTokenStakeRequestAction:
      type: object
      required:
        - staker
        - protocol
      properties:
        staker:
          $ref: '#/components/schemas/AccountAddress'
        protocol:
          $ref: '#/components/schemas/Protocol'
        stake_meta:
          $ref: '#/components/schemas/Price'
    LiquidityDepositAction:
      type: object
      required:
        - protocol
        - from
        - tokens
      properties:
        protocol:
          $ref: '#/components/schemas/Protocol'
        from:
          $ref: '#/components/schemas/AccountAddress'
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/VaultDepositInfo'
    ActionSimplePreview:
      type: object
      description: shortly describes what this action is about.
      required:
        - name
        - description
        - accounts
      properties:
        name:
          type: string
          example: Ton Transfer
        description:
          type: string
          example: Transferring 5 Ton
        action_image:
          type: string
          description: a link to an image for this particular action.
        value:
          type: string
          example: 5 Ton
        value_image:
          type: string
          description: a link to an image that depicts this action's asset.
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountAddress'
    ExtraCurrency:
      type: object
      required:
        - amount
        - preview
      properties:
        amount:
          type: string
          x-js-format: bigint
          example: '1000000000'
        preview:
          $ref: '#/components/schemas/EcPreview'
    StateInit:
      type: object
      required:
        - boc
        - interfaces
      properties:
        boc:
          type: string
          format: cell
          example: >-
            b5ee9c72010106010044000114ff00f4a413f4bcf2c80b01020120020302014804050004f2300038d06c21d31f30ed44d0d33f3001c00197a4c8cb3fc9ed549330f206e20011a13431da89a1a67e61
        interfaces:
          type: array
          items:
            type: string
    ComputeSkipReason:
      type: string
      example: cskip_no_state
      enum:
        - cskip_no_state
        - cskip_bad_state
        - cskip_no_gas
        - cskip_suspended
    AccStatusChange:
      type: string
      example: acst_unchanged
      enum:
        - acst_unchanged
        - acst_frozen
        - acst_deleted
    JettonVerificationType:
      type: string
      enum:
        - whitelist
        - graylist
        - blacklist
        - none
    ScaledUI:
      type: object
      required:
        - numerator
        - denominator
      properties:
        numerator:
          type: string
          x-js-format: bigint
          example: '597968399'
        denominator:
          type: string
          x-js-format: bigint
          example: '597968399'
    Price:
      type: object
      required:
        - currency_type
        - value
        - decimals
        - token_name
        - verification
        - image
      properties:
        currency_type:
          $ref: '#/components/schemas/CurrencyType'
        value:
          type: string
          x-js-format: bigint
          example: '123000000000'
        decimals:
          type: integer
          example: 9
        token_name:
          type: string
          example: TON
        verification:
          $ref: '#/components/schemas/TrustType'
        image:
          type: string
          example: https://cache.tonapi.io/images/jetton.jpg
        jetton:
          type: string
          format: address
          example: 0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0
    EncryptedComment:
      type: object
      required:
        - encryption_type
        - cipher_text
      properties:
        encryption_type:
          type: string
          example: simple
        cipher_text:
          type: string
          example: A6A0BD6608672B...CE3AF8DB
    Refund:
      type: object
      required:
        - type
        - origin
      properties:
        type:
          type: string
          example: DNS.ton
          enum:
            - DNS.ton
            - DNS.tg
            - GetGems
        origin:
          type: string
          example: 0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf
    EcPreview:
      type: object
      required:
        - id
        - symbol
        - decimals
        - image
      properties:
        id:
          type: integer
          example: 239
          format: int32
        symbol:
          type: string
          example: FMS
        decimals:
          type: integer
          example: 5
        image:
          type: string
          example: https://cache.tonapi.io/images/extra.jpg
    PoolImplementationType:
      type: string
      enum:
        - whales
        - tf
        - liquidTF
    Metadata:
      type: object
      required:
        - encrypted_binary
      properties:
        encrypted_binary:
          type: string
          description: hex encoded bytes
        decryption_key:
          type: string
          description: hex encoded bytes
          example: dead.....beef
    Protocol:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: Ethena
        image:
          type: string
          example: https://cache.tonapi.io/images/jetton.jpg
    VaultDepositInfo:
      type: object
      required:
        - price
        - vault
      properties:
        price:
          $ref: '#/components/schemas/Price'
        vault:
          type: string
          format: address
          example: 0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0
    CurrencyType:
      type: string
      example: jetton
      enum:
        - native
        - extra_currency
        - jetton
        - fiat
  responses:
    Error:
      description: Some error during request processing
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
              error_code:
                type: integer
                format: int64

````