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

# getCompressedAccount

> 指定されたアドレスまたはハッシュで圧縮されたアカウントを返します。

## リクエストパラメータ

<ParamField body="address" type="string" default="11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3">
  データを取得するための圧縮されたアカウントのSolana公開鍵
</ParamField>

<ParamField body="hash" type="string">
  アドレスが利用できない場合の圧縮されたSolanaアカウントのデータハッシュ識別子
</ParamField>


## OpenAPI

````yaml ja/openapi/zk-compression/getCompressedAccount.yaml POST /
openapi: 3.0.3
info:
  title: Solana State Compression API
  description: |
    効率的なデータストレージと取得のためにゼロ知識証明を使用した圧縮状態アカウント用の高度なSolanaインデクサーです。
    このAPIは、Solanaの状態圧縮技術により、コスト効率の高いNFTおよびトークン操作を可能にし、
    従来のアカウントと比較してストレージコストを最大1000倍削減します。
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: メインネットRPCエンドポイント
  - url: https://devnet.helius-rpc.com
    description: Devnet RPCエンドポイント
security: []
paths:
  /:
    summary: getCompressedAccount
    post:
      description: |
        状態圧縮技術を使用して圧縮されたSolanaアカウントの詳細データを取得します。
        このエンドポイントは、通常のSolanaアカウントと比較して最大1000倍のコスト節約で
        効率的なオンチェーンデータストレージへのアクセスを提供します。アドレスまたはハッシュを用いて圧縮されたNFTと
        'tトークンアカウントをクエリし、完全なアカウント情報、所有権の詳細、およびオンチェーンデータを取得します。

        主な利点:
        - Solana NFTプロジェクトとトークン発行者のコストを劇的に削減
        - 大量アプリケーションのためのストレージ料金を削減
        - Solanaのセキュリティとコンセンサスモデルとの完全な互換性
        - 大規模なNFTコレクションとトークンセットのためのスケーラブルなソリューション
        - 圧縮資産操作のスループット向上
      operationId: getCompressedAccount
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPCプロトコルのバージョン。
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストを識別するためのID。
                  default: '1'
                method:
                  type: string
                  description: 呼び出すメソッドの名前。
                  enum:
                    - getCompressedAccount
                  default: getCompressedAccount
                params:
                  type: object
                  description: |
                    Solanaでの圧縮アカウントデータを取得するためのリクエストパラメータ、
                    圧縮されたNFTおよびトークン用のアドレス識別子またはデータハッシュを含みます
                  default:
                    address: null
                    hash: gEF8v1TLb2T9vTaJarFj6kQoSfWNkskMSCJpPJSxZzT
                  properties:
                    address:
                      type: string
                      allOf:
                        - $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                      description: データを取得する圧縮アカウントのSolanaパブリックキー
                    hash:
                      type: string
                      allOf:
                        - $ref: '#/components/schemas/Hash'
                      nullable: true
                      description: アドレスが利用できない場合の圧縮されたSolanaアカウントのデータハッシュ識別子
                  additionalProperties: false
                  example:
                    address: null
                    hash: gEF8v1TLb2T9vTaJarFj6kQoSfWNkskMSCJpPJSxZzT
        required: true
      responses:
        '200':
          description: Solanaブロックチェーンから圧縮アカウントデータを正常に取得しました
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/Account'
                additionalProperties: false
        '400':
          description: Bad Request - 無効なリクエストパラメータまたは不正なリクエスト。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Unauthorized - 無効または不足しているAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - レート制限を超過しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - サービスは一時的に利用不可です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - リクエストがタイムアウトしました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    SerializablePubkey:
      type: string
      description: アカウント、プログラム、ユーザーを識別するために使用される、base58エンコードされた文字列として表されるSolanaパブリックキー。
      default: 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3
      example: 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3
    Hash:
      type: string
      description: Solanaの圧縮アカウント検証に使用される、base58文字列として表される32バイトの暗号学的ハッシュ。
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: このリクエストのための現在のSolanaブロックチェーンスロットコンテキスト
    Account:
      type: object
      required:
        - hash
        - owner
        - lamports
        - tree
        - leafIndex
        - seq
        - slotCreated
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: 圧縮されたSolanaアカウントの一意の識別子アドレス
        data:
          $ref: '#/components/schemas/AccountData'
          description: 圧縮されたSolanaアカウント内に保存されたオンチェーンデータ
        hash:
          $ref: '#/components/schemas/Hash'
          description: 検証用の圧縮アカウントデータの暗号学的ハッシュ
        lamports:
          $ref: '#/components/schemas/UnsignedInteger'
          description: この圧縮アカウントに保持されるSOL残高（1 SOL = 1,000,000,000 lamports）
        leafIndex:
          $ref: '#/components/schemas/UnsignedInteger'
          description: この圧縮アカウントが保存されているメルクルツリー内の位置インデックス
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮アカウントを所有するSolanaプログラム（通常は圧縮プログラム）
        seq:
          $ref: '#/components/schemas/UnsignedInteger'
          description: この圧縮アカウントへの更新を追跡するためのシーケンス番号
        slotCreated:
          $ref: '#/components/schemas/UnsignedInteger'
          description: この圧縮アカウントが作成されたSolanaブロックチェーンスロット
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮アカウントが保存されているメルクルツリーのアドレス
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPCプロトコルのバージョン。
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: エラーコード。
              example: -32602
            message:
              type: string
              description: エラーメッセージ。
            data:
              type: object
              description: エラーに関する追加情報。
        id:
          type: string
          description: リクエストと一致する識別子。
          example: '1'
    AccountData:
      type: object
      required:
        - discriminator
        - data
        - dataHash
      properties:
        data:
          $ref: '#/components/schemas/Base64String'
        dataHash:
          $ref: '#/components/schemas/Hash'
        discriminator:
          $ref: '#/components/schemas/UnsignedInteger'
      additionalProperties: false
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
      description: Solana圧縮アカウントのさまざまな数値パラメータに使用される非負整数値
    Base64String:
      type: string
      description: Solana上の圧縮アカウントデータを表すbase64エンコードされた文字列。
      default: SGVsbG8sIFdvcmxkIQ==
      example: SGVsbG8sIFdvcmxkIQ==
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        あなたのHelius
        APIキー。無償で[dashboard](https://dashboard.helius.dev/api-keys)から取得できます。

````