Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/natureloved/DeadMan-Vault/llms.txt

Use this file to discover all available pages before exploring further.

Returns all vaults associated with a given Stacks owner address, ordered by creation date descending (newest first). Each vault is serialized to camelCase JSON with the sensitive keeper_key_ciphertext field stripped — that value never leaves the server. Use this endpoint to populate a dashboard listing or to check the current lifecycle status of every vault an address owns.

Endpoint

GET /api/vaults?address={ownerAddress}

Request Parameters

Query Parameters

address
string
required
The Stacks address of the vault owner (e.g. ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM). All vaults where owner_address matches this value are returned.

Response

A JSON array of serialized vault objects. The array is empty ([]) when the address owns no vaults. Fields are returned in camelCase.
id
string
UUID of the vault record.
ownerAddress
string
Stacks address of the vault owner.
ownerEmail
string | null
Email address used for lifecycle notification emails, if provided at creation time.
vaultName
string | null
Human-readable display name for the vault.
status
string
Current lifecycle state of the vault. One of funding, active, warning, grace_period, triggered, or claimed.
totalDeposited
string
The USDCx amount locked in the vault, as a decimal string (e.g. "100").
heartbeatIntervalDays
number
How many days the owner has between each required proof-of-life heartbeat.
lastHeartbeatBlock
number | null
The Stacks block height at which the most recent heartbeat was recorded. null before the vault is activated.
heartbeatDeadlineBlock
number | null
The Stacks block height by which the next heartbeat must arrive before the keeper advances the vault toward triggered. null until the vault is funded and active.
messageToBeneficiaries
string | null
Optional message displayed to beneficiaries on the claim page after the vault is triggered.
txId
string | null
The on-chain transaction ID of the FlowVault deposit call, set after funding is finalized.
keeperAddress
string | null
The Stacks address of the vault’s dedicated custodial keeper keypair. Fund this address with USDCx before calling the fund endpoint to activate the vault.
createdAt
string
ISO 8601 timestamp of when the vault record was created.
updatedAt
string
ISO 8601 timestamp of the last time the vault record was modified.
keeper_key_ciphertext is intentionally absent from every response. The encrypted keeper private key never leaves the server.

Example Request

curl -X GET "https://your-app.vercel.app/api/vaults?address=ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"

Example Response

[
  {
    "id": "a3f2c891-4b7e-4d3a-9c12-8f1e2d3a4b5c",
    "ownerAddress": "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
    "ownerEmail": "alice@example.com",
    "vaultName": "Family Trust",
    "status": "active",
    "totalDeposited": "500",
    "heartbeatIntervalDays": 90,
    "lastHeartbeatBlock": 148200,
    "heartbeatDeadlineBlock": 161160,
    "messageToBeneficiaries": "Please use these funds wisely.",
    "txId": "0xabc123def456...",
    "keeperAddress": "ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG",
    "createdAt": "2024-11-01T09:15:00.000Z",
    "updatedAt": "2024-12-15T14:30:00.000Z"
  },
  {
    "id": "b7d4e902-5c8f-4e4b-ad23-9g2f3e4b5c6d",
    "ownerAddress": "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
    "ownerEmail": null,
    "vaultName": null,
    "status": "funding",
    "totalDeposited": "250",
    "heartbeatIntervalDays": 30,
    "lastHeartbeatBlock": null,
    "heartbeatDeadlineBlock": null,
    "messageToBeneficiaries": null,
    "txId": null,
    "keeperAddress": "ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5YC7D3C5",
    "createdAt": "2024-12-20T08:00:00.000Z",
    "updatedAt": "2024-12-20T08:00:00.000Z"
  }
]

Error Responses

StatusErrorDescription
400Missing addressThe address query parameter was not provided.
500Server misconfigured: missing Supabase env varsRequired server-side environment variables (NEXT_PUBLIC_SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY) are absent.
500Supabase error messageA database error occurred while querying the vaults table.

Build docs developers (and LLMs) love