---
updatedAt: 2026-09-16T08:30:58.000Z
agentTools:
  projectIndex: https://docs.utila.io/llms.txt
---

# DeriveContextHash

Derive a deterministic 32-byte value bound to (wallet main address,
network, application, context). The derivation is stateless: the same
inputs always yield the same output (so it can be re-derived later), and
changing any input produces an independent, unpredictable output. This
value should not be relied on for long-term confidentiality.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Utila API",
    "version": "v2"
  },
  "tags": [
    {
      "name": "Wallets"
    }
  ],
  "paths": {
    "/v2/vaults/{vault_id}/wallets/{wallet_id}:deriveContextHash": {
      "post": {
        "summary": "DeriveContextHash",
        "description": "Derive a deterministic 32-byte value bound to (wallet main address,\nnetwork, application, context). The derivation is stateless: the same\ninputs always yield the same output (so it can be re-derived later), and\nchanging any input produces an independent, unpredictable output. This\nvalue should not be relied on for long-term confidentiality.",
        "operationId": "Wallets_DeriveContextHash",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v2DeriveContextHashResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "vault_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "wallet_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletsDeriveContextHashBody"
              }
            }
          },
          "required": true
        },
        "tags": [
          "Wallets"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.utila.io"
    }
  ],
  "components": {
    "schemas": {
      "WalletsDeriveContextHashBody": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string",
            "description": "The network the derivation is bound to.\n\nFormat: `networks/{network_id}`"
          },
          "application": {
            "type": "string",
            "description": "Application domain tag used for domain separation, e.g. \"babylon-btc-vault\"."
          },
          "context": {
            "type": "string",
            "description": "Application-supplied value that participates in domain separation."
          }
        },
        "required": [
          "network",
          "application",
          "context"
        ]
      },
      "v2DeriveContextHashResponse": {
        "type": "object",
        "properties": {
          "contextHash": {
            "type": "string",
            "format": "byte",
            "description": "The derived 32-byte value.",
            "readOnly": true
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
```