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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.ton.org/feedback

```json
{
  "path": "/ecosystem/api/toncenter/v2/accounts/get-extended-address-information",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Get extended address information

> Returns detailed account information with parsed contract state. For wallet contracts, identifies the wallet version (v3, v4, v5) and extracts wallet-specific fields like `seqno` and public key. For other contracts, returns the raw state.



## OpenAPI

````yaml get /api/v2/getExtendedAddressInformation
openapi: 3.1.1
info:
  title: TON HTTP API C++
  description: >
    This API enables HTTP access to TON blockchain - getting accounts and
    wallets information, looking up blocks and transactions, sending messages to
    the blockchain, calling get methods of smart contracts, and more.


    In addition to REST API, all methods are available through a JSON-RPC
    endpoint  with `method` equal to method name and `params` passed as a
    dictionary.


    The response contains a JSON object, which always has a boolean field `ok`
    and either `error` or `result`. If `ok` equals true, the request was
    successful and the result of the query can be found in the `result` field.
    In case of an unsuccessful request, `ok` equals false and the error is
    explained in the `error`.


    API Key should be sent either as `api_key` query parameter or `X-API-Key`
    header
  version: 2.1.1
servers:
  - url: https://toncenter.com
    description: TON Mainnet
  - url: https://testnet.toncenter.com
    description: TON Testnet
security: []
tags:
  - name: Accounts
    description: Information about accounts
  - name: Transactions
    description: Fetching and locating transactions
  - name: Blocks
    description: Information about blocks
  - name: Run method
    description: Run get-method of smart contracts
  - name: Send
    description: Send data to blockchain
  - name: Utils
    description: Some useful methods
  - name: Configuration
    description: Information about blockchain config
  - name: RPC
    description: JSON-RPC and POST endpoints
paths:
  /api/v2/getExtendedAddressInformation:
    get:
      tags:
        - Accounts
      summary: Get extended address information
      description: >-
        Returns detailed account information with parsed contract state. For
        wallet contracts, identifies the wallet version (v3, v4, v5) and
        extracts wallet-specific fields like `seqno` and public key. For other
        contracts, returns the raw state.
      operationId: getExtendedAddressInformation_get
      parameters:
        - $ref: '#/components/parameters/address'
        - $ref: '#/components/parameters/seqnoOptional'
      responses:
        '200':
          description: >-
            Returns detailed account information including parsed contract state
            and type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtendedAddressInformationResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422_address'
        '429':
          $ref: '#/components/responses/429'
        '504':
          $ref: '#/components/responses/504'
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
components:
  parameters:
    address:
      name: address
      in: query
      required: true
      schema:
        $ref: '#/components/schemas/TonAddr'
      description: The account address to query.
    seqnoOptional:
      name: seqno
      in: query
      description: >-
        Query state at a specific block height. If omitted, returns the current
        state. Use this to look up historical data at a specific point in time.
      required: false
      schema:
        type: integer
        format: int32
  schemas:
    ExtendedAddressInformationResponse:
      type: object
      additionalProperties: false
      required:
        - ok
        - result
      properties:
        ok:
          type: boolean
          default: true
          description: >-
            Returns `true` if the request succeeded; otherwise `false`. See the
            `error` field for details.
        result:
          $ref: '#/components/schemas/ExtendedAddressInformation'
          description: Response data. Present only when `ok` is `true`.
        '@extra':
          type: string
          description: >-
            Optional request ID that can be passed in the request and received
            back in the response. Useful for matching async responses.
    TonAddr:
      type: string
      x-usrv-cpp-type: ton_http::types::ton_addr
      description: >-
        Account address in [raw](/foundations/addresses/formats#raw-format)
        format (e.g., `0:ca6e321c...`) or
        [user-friendly](/foundations/addresses/formats#user-friendly-format)
        format (e.g., `EQDKbjIcfM...`). All formats are automatically detected.
    ExtendedAddressInformation:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - fullAccountState
          default: fullAccountState
          description: >-
            TonLib type identifier for extended account state responses. Refer
            to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        address:
          $ref: '#/components/schemas/AccountAddress'
          description: Account address object.
        balance:
          $ref: '#/components/schemas/Int256'
          description: >-
            The account balance in nanotons (the smallest unit of TON). 1 TON =
            1,000,000,000 nanotons (10^9), so divide by 10^9 to get the
            human-readable TON amount. Refer to the [units and decimals
            guide](/ecosystem/wallet-apps/deep-links#read-more) for more
            context. If this field appears on a Jetton wallet, the balance is in
            the token's base units. Divide by 10^decimals, where `decimals` is
            defined by the Jetton master contract. Refer to the [Jetton
            overview](/standard/tokens/jettons/overview) for details on how
            Jetton decimals work.
        extra_currencies:
          type: array
          items:
            $ref: '#/components/schemas/ExtraCurrencyBalance'
          description: >-
            Array of non-TON currency balances held by this account. Each entry
            contains a currency ID (integer) and balance amount (decimal
            string). Empty array if the account holds no extra currencies.
        last_transaction_id:
          $ref: '#/components/schemas/InternalTransactionId'
          description: >-
            Reference to the most recent transaction. Use as starting point for
            getTransactions.
        block_id:
          $ref: '#/components/schemas/TonBlockIdExt'
          description: Full block identifier where this event occurred.
        sync_utime:
          type: integer
          format: int64
          description: Unix timestamp of the block from which this data was read.
        account_state:
          $ref: '#/components/schemas/AccountState'
          description: Detailed account state including contract type and internal data.
        revision:
          type: integer
          description: >-
            Contract revision number. Different revisions may have different
            behavior.
      required:
        - '@type'
        - address
        - balance
        - extra_currencies
        - last_transaction_id
        - block_id
        - sync_utime
        - account_state
        - revision
    AccountAddress:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - accountAddress
          default: accountAddress
          description: >-
            TonLib type identifier for account address objects. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        account_address:
          type: string
          x-usrv-cpp-type: ton_http::types::ton_addr
          description: >-
            The account address in raw format (`workchain:hex`), e.g.
            `0:abc123...`. Use the [pack
            address](/ecosystem/api/toncenter/v2/utils/pack-address) endpoint to
            convert to user-friendly base64 format.
    Int256:
      type: string
      x-usrv-cpp-type: ton_http::types::int256
      description: >-
        A large integer represented as a string to avoid precision loss. Used
        for balances and other values that may exceed JavaScript's safe integer
        limit.
    ExtraCurrencyBalance:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - extraCurrency
          default: extraCurrency
          description: >-
            TonLib type identifier for extra currency balance entries. Refer to
            the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        id:
          type: integer
          format: int32
          description: >-
            A 32-bit integer identifying the extra currency. Currency IDs are
            defined at the blockchain configuration level and stored in
            `ConfigParam 7` of the masterchain. Refer to the [extra currency
            minting
            documentation](https://docs.ton.org/v3/documentation/infra/minter-flow)
            for details.
        amount:
          $ref: '#/components/schemas/Int256'
          description: Currency balance amount as a decimal string.
      required:
        - '@type'
        - id
        - amount
    InternalTransactionId:
      type: object
      additionalProperties: false
      description: >-
        A reference to a specific transaction. The combination of `lt` (logical
        time) and `hash` uniquely identifies any transaction. Use these values
        for pagination and lookups.
      properties:
        '@type':
          type: string
          enum:
            - internal.transactionId
          default: internal.transactionId
          description: >-
            TonLib type identifier for transaction ID references. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        lt:
          type: string
          description: >-
            Logical time of this transaction. A globally unique counter that
            orders all events on the blockchain.
          x-usrv-cpp-type: std::int64_t
        hash:
          $ref: '#/components/schemas/TonHash'
          description: SHA-256 hash of this transaction, encoded in base64.
      required:
        - '@type'
        - lt
        - hash
    TonBlockIdExt:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - ton.blockIdExt
          default: ton.blockIdExt
          description: >-
            TonLib type identifier for full block identifiers. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        workchain:
          type: integer
          description: 'Workchain ID: `-1` for masterchain, `0` for basechain.'
        shard:
          type: string
          x-usrv-cpp-type: std::int64_t
          description: >-
            Shard identifier as a signed 64-bit integer string. Masterchain uses
            `-9223372036854775808`.
        seqno:
          type: integer
          description: >-
            Block sequence number within its workchain and shard. For the
            masterchain (workchain `-1`), this equals the global block height.
            For basechain shards (workchain `0`), this is the sequence number
            local to that specific shard, not a global height.
        root_hash:
          $ref: '#/components/schemas/TonHash'
          description: Merkle root hash of the block state tree.
        file_hash:
          $ref: '#/components/schemas/TonHash'
          description: >-
            Hash of the serialized block file. Together with `root_hash`,
            uniquely identifies a block.
      required:
        - '@type'
        - workchain
        - shard
        - seqno
        - root_hash
        - file_hash
      description: >-
        A complete block identifier with cryptographic hashes. Contains
        `workchain`, `shard`, `seqno` (position) plus `root_hash` and
        `file_hash` (verification).
    AccountState:
      oneOf:
        - $ref: '#/components/schemas/AccountStateRaw'
        - $ref: '#/components/schemas/AccountStateWalletV3'
        - $ref: '#/components/schemas/AccountStateWalletV4'
        - $ref: '#/components/schemas/AccountStateWalletHighloadV1'
        - $ref: '#/components/schemas/AccountStateWalletHighloadV2'
        - $ref: '#/components/schemas/AccountStateDns'
        - $ref: '#/components/schemas/AccountStateRWallet'
        - $ref: '#/components/schemas/AccountStatePChan'
        - $ref: '#/components/schemas/AccountStateUninited'
      discriminator:
        propertyName: '@type'
        mapping:
          raw.accountState:
            $ref: '#/components/schemas/AccountStateRaw'
          wallet.v3.accountState:
            $ref: '#/components/schemas/AccountStateWalletV3'
          wallet.v4.accountState:
            $ref: '#/components/schemas/AccountStateWalletV4'
          wallet.highload.v1.accountState:
            $ref: '#/components/schemas/AccountStateWalletHighloadV1'
          wallet.highload.v2.accountState:
            $ref: '#/components/schemas/AccountStateWalletHighloadV2'
          dns.accountState:
            $ref: '#/components/schemas/AccountStateDns'
          rwallet.accountState:
            $ref: '#/components/schemas/AccountStateRWallet'
          pchan.accountState:
            $ref: '#/components/schemas/AccountStatePChan'
          uninited.accountState:
            $ref: '#/components/schemas/AccountStateUninited'
    TonHash:
      type: string
      x-usrv-cpp-type: ton_http::types::ton_hash
      description: >-
        A 256-bit hash value. Accepts either hex format (64 characters) or
        base64 format (44 characters). Used for block hashes, transaction
        hashes, and cryptographic proofs.
    AccountStateRaw:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - raw.accountState
          default: raw.accountState
          description: >-
            TonLib type identifier for raw (unrecognized) contract states. Refer
            to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        code:
          $ref: '#/components/schemas/Bytes'
          description: >-
            Smart contract code in BoC format, base64 encoded. Empty if account
            is uninitialized.
        data:
          $ref: '#/components/schemas/Bytes'
          description: Smart contract persistent storage in BoC format, base64 encoded.
        frozen_hash:
          $ref: '#/components/schemas/TonHash'
          description: Hash of the frozen state. Only present for frozen accounts.
      required:
        - '@type'
        - code
        - data
        - frozen_hash
      title: Raw account state
      description: >-
        Unrecognized or non-wallet contract state. Identified by `@type:
        raw.accountState`. Returned when TonLib cannot parse the contract as a
        known type.
    AccountStateWalletV3:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - wallet.v3.accountState
          default: wallet.v3.accountState
          description: >-
            TonLib type identifier for Wallet v3 contracts. Refer to the [TonLib
            type reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
        seqno:
          type: integer
          format: int32
          description: >-
            Wallet contract sequence number. Used for replay protection: each
            outgoing transaction must include the current `seqno` and increments
            it by 1. Fetch the current value before sending a transaction.
      required:
        - '@type'
        - wallet_id
        - seqno
      title: Wallet v3
      description: >-
        Standard wallet contract version 3. Identified by `@type:
        wallet.v3.accountState`. The most widely deployed wallet type prior to
        v4.
    AccountStateWalletV4:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - wallet.v4.accountState
          default: wallet.v4.accountState
          description: >-
            TonLib type identifier for Wallet v4 contracts. Refer to the [TonLib
            type reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
        seqno:
          type: integer
          format: int32
          description: >-
            Wallet contract sequence number. Used for replay protection: each
            outgoing transaction must include the current `seqno` and increments
            it by 1. Fetch the current value before sending a transaction.
      required:
        - '@type'
        - wallet_id
        - seqno
      title: Wallet v4
      description: >-
        Standard wallet contract version 4. Identified by `@type:
        wallet.v4.accountState`. Adds plugin support over v3.
    AccountStateWalletHighloadV1:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - wallet.highload.v1.accountState
          default: wallet.highload.v1.accountState
          description: >-
            TonLib type identifier for Highload Wallet v1 contracts. Refer to
            the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
        seqno:
          type: integer
          format: int32
          description: >-
            Wallet contract sequence number. Used for replay protection: each
            outgoing transaction must include the current `seqno` and increments
            it by 1. Fetch the current value before sending a transaction.
      required:
        - '@type'
        - wallet_id
        - seqno
      title: Highload wallet v1
      description: >-
        High-throughput wallet contract version 1. Identified by `@type:
        wallet.highload.v1.accountState`. Designed for sending many transactions
        in a single block.
    AccountStateWalletHighloadV2:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - wallet.highload.v2.accountState
          default: wallet.highload.v2.accountState
          description: >-
            TonLib type identifier for Highload Wallet v2 contracts. Refer to
            the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
      required:
        - '@type'
        - wallet_id
      title: Highload wallet v2
      description: >-
        High-throughput wallet contract version 2. Identified by `@type:
        wallet.highload.v2.accountState`. Improved version of highload v1 with
        better replay protection.
    AccountStateDns:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - dns.accountState
          default: dns.accountState
          description: >-
            TonLib type identifier for DNS resolver contracts. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
      required:
        - '@type'
        - wallet_id
      title: DNS contract
      description: >-
        TON DNS contract state. Identified by `@type: dns.accountState`. Used by
        contracts that resolve TON domain names.
    AccountStateRWallet:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - rwallet.accountState
          default: rwallet.accountState
          description: >-
            TonLib type identifier for restricted wallet contracts. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        wallet_id:
          type: integer
          format: int64
          description: >-
            Subwallet ID for v3+ wallets. Allows creating multiple wallets from
            one key. The default value is `0x29a9a317` (698983191) on both
            mainnet and testnet, derived from the first 4 bytes of the TON
            mainnet initial state hash. Note: v5 wallets use a different scheme
            with network-specific values to prevent cross-network transaction
            replay. Refer to the [wallet interaction
            guide](/standard/wallets/interact) for full details.
        seqno:
          type: integer
          format: int32
          description: >-
            Wallet contract sequence number. Used for replay protection: each
            outgoing transaction must include the current `seqno` and increments
            it by 1. Fetch the current value before sending a transaction.
        unlocked_balance:
          type: integer
          format: int64
          description: Balance available for immediate withdrawal, in nanotons.
        config:
          $ref: '#/components/schemas/RWalletConfig'
          description: Spending limits and restrictions configuration.
      required:
        - '@type'
        - wallet_id
        - seqno
        - unlocked_balance
        - config
      title: Restricted wallet
      description: >-
        Restricted wallet contract state. Identified by `@type:
        rwallet.accountState`. Used for wallets with vesting or transfer
        restrictions.
    AccountStatePChan:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - pchan.accountState
          default: pchan.accountState
          description: >-
            TonLib type identifier for payment channel contracts. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        config:
          $ref: '#/components/schemas/PChanConfig'
          description: Payment channel configuration (parties, timeouts, keys).
        state:
          $ref: '#/components/schemas/PChanState'
          description: Current payment channel state (init, close, or payout phase).
        description:
          type: string
          description: Human-readable payment channel description.
      required:
        - '@type'
        - config
        - state
        - description
      title: Payment channel
      description: >-
        Payment channel contract state. Identified by `@type:
        pchan.accountState`. Used for off-chain payment channels between two
        parties.
    AccountStateUninited:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - uninited.accountState
          default: uninited.accountState
          description: >-
            TonLib type identifier for uninitialized accounts. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        frozen_hash:
          $ref: '#/components/schemas/TonHash'
          description: >-
            Hash of the frozen state. Present if account was frozen before being
            uninitialized.
      required:
        - '@type'
        - frozen_hash
      title: Uninitialized
      description: >-
        Account exists on-chain but has no deployed contract. Identified by
        `@type: uninited.accountState`. The address has received TON but no code
        has been deployed yet.
    Bytes:
      type: string
      x-usrv-cpp-type: ton_http::types::bytes
      description: >-
        Binary data encoded as base64. Used for serialized cells (BoC format),
        message bodies, and smart contract code/data.
    RWalletConfig:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - rwallet.config
          default: rwallet.config
          description: >-
            TonLib type identifier for restricted wallet configuration. Refer to
            the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        start_at:
          type: integer
          format: int64
          description: Unix timestamp when the spending limits become active.
        limits:
          type: array
          items:
            $ref: '#/components/schemas/RWalletLimit'
          description: >-
            Array of spending limit rules. Each entry defines a time window in
            seconds and the maximum spendable amount in nanotons within that
            window.
      required:
        - '@type'
        - start_at
        - limits
    PChanConfig:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - pchan.config
          default: pchan.config
          description: >-
            TonLib type identifier for payment channel configuration. Refer to
            the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        alice_public_key:
          type: string
          description: Alice's Ed25519 public key for signing channel operations.
        alice_address:
          $ref: '#/components/schemas/AccountAddress'
          description: Alice's on-chain wallet address.
        bob_public_key:
          type: string
          description: Bob's Ed25519 public key for signing channel operations.
        bob_address:
          $ref: '#/components/schemas/AccountAddress'
          description: Bob's on-chain wallet address.
        init_timeout:
          type: integer
          format: int32
          description: >-
            Maximum seconds allowed to complete channel initialization before it
            expires.
        close_timeout:
          type: integer
          format: int32
          description: Maximum seconds allowed to complete cooperative channel closure.
        channel_id:
          type: integer
          format: int64
          description: Unique numeric identifier for this payment channel.
      required:
        - '@type'
        - alice_public_key
        - alice_address
        - bob_public_key
        - bob_address
        - init_timeout
        - close_timeout
        - channel_id
    PChanState:
      oneOf:
        - $ref: '#/components/schemas/PChanStateInit'
        - $ref: '#/components/schemas/PChanStateClose'
        - $ref: '#/components/schemas/PChanStatePayout'
      discriminator:
        propertyName: '@type'
        mapping:
          pchan.stateInit:
            $ref: '#/components/schemas/PChanStateInit'
          pchan.stateClose:
            $ref: '#/components/schemas/PChanStateClose'
          pchan.statePayout:
            $ref: '#/components/schemas/PChanStatePayout'
    RWalletLimit:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - rwallet.limit
          default: rwallet.limit
          description: >-
            TonLib type identifier for restricted wallet spending limit rules.
            Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        seconds:
          type: integer
          format: int32
          description: Duration of this spending limit window in seconds.
        value:
          type: integer
          format: int64
          description: Maximum spendable amount within this time period, in nanotons.
      required:
        - '@type'
        - seconds
        - value
    PChanStateInit:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - pchan.stateInit
          default: pchan.stateInit
          description: >-
            TonLib type identifier for payment channels in the initialization
            phase. Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        signed_A:
          type: boolean
          description: >-
            Returns `true` if Alice has signed the initialization; otherwise
            `false`.
        signed_B:
          type: boolean
          description: >-
            Returns `true` if Bob has signed the initialization; otherwise
            `false`.
        min_A:
          type: integer
          format: int64
          description: Minimum deposit required from Alice, in nanotons.
        min_B:
          type: integer
          format: int64
          description: Minimum deposit required from Bob, in nanotons.
        expire_at:
          type: integer
          format: int64
          description: Unix timestamp when the initialization offer expires.
        A:
          type: integer
          format: int64
          description: Alice's deposited amount in nanotons.
        B:
          type: integer
          format: int64
          description: Bob's deposited amount in nanotons.
      required:
        - '@type'
        - signed_A
        - signed_B
        - min_A
        - min_B
        - expire_at
        - A
        - B
    PChanStateClose:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - pchan.stateClose
          default: pchan.stateClose
          description: >-
            TonLib type identifier for payment channels in the closing phase.
            Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        signed_A:
          type: boolean
          description: >-
            Returns `true` if Alice has signed the close proposal; otherwise
            `false`.
        signed_B:
          type: boolean
          description: >-
            Returns `true` if Bob has signed the close proposal; otherwise
            `false`.
        min_A:
          type: integer
          format: int64
          description: Minimum guaranteed payout for Alice, in nanotons.
        min_B:
          type: integer
          format: int64
          description: Minimum guaranteed payout for Bob, in nanotons.
        expire_at:
          type: integer
          format: int64
          description: Unix timestamp when the close proposal expires.
        A:
          type: integer
          format: int64
          description: Alice's final balance in nanotons.
        B:
          type: integer
          format: int64
          description: Bob's final balance in nanotons.
      required:
        - '@type'
        - signed_A
        - signed_B
        - min_A
        - min_B
        - expire_at
        - A
        - B
    PChanStatePayout:
      type: object
      additionalProperties: false
      properties:
        '@type':
          type: string
          enum:
            - pchan.statePayout
          default: pchan.statePayout
          description: >-
            TonLib type identifier for payment channels in the payout phase.
            Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        A:
          type: integer
          format: int64
          description: Alice's payout amount in nanotons.
        B:
          type: integer
          format: int64
          description: Bob's payout amount in nanotons.
      required:
        - '@type'
        - A
        - B
  responses:
    '401':
      description: API key does not exist. Check for typos or generate a new key.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 401
                description: HTTP status code `401`.
              error:
                type: string
                enum:
                  - API key does not exist
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 401
            error: API key does not exist
    '403':
      description: >-
        API key is not allowed for this network (e.g. testnet key used on
        mainnet).
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 403
                description: HTTP status code `403`.
              error:
                type: string
                enum:
                  - Network not allowed
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 403
            error: Network not allowed
    '429':
      description: >-
        Rate limit exceeded. Back off and retry, or use an API key for higher
        limits.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 429
                description: HTTP status code `429`.
              error:
                type: string
                enum:
                  - Ratelimit exceeded
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 429
            error: Ratelimit exceeded
    '504':
      description: Timeout waiting for liteserver response.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 504
                description: HTTP status code `504`.
              error:
                type: string
                enum:
                  - LITE_SERVER_NETWORK timeout
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 504
            error: LITE_SERVER_NETWORK timeout
    422_address:
      description: Invalid address or `seqno` parameter.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 422
                description: HTTP status code `422`.
              error:
                type: string
                enum:
                  - empty address
                  - failed to parse address
                  - failed to parse seqno
                  - seqno should be positive
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 422
            error: empty address
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key header of the form `X-API-Key: <token>`, where `<token>` is the
        API key. Requests without a key are limited to 1 RPS. Refer to the
        [authentication guide](/ecosystem/api/toncenter/v2-authentication) for
        details.
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        API key query parameter of the form `?api_key=<token>`, where `<token>`
        is the API key. Equivalent to the header method. Refer to the
        [authentication guide](/ecosystem/api/toncenter/v2-authentication) for
        details.

````