SDK reference · Node SDK

prov.mandate.grants.heartbeat

prov.mandate.grants.heartbeat in Node SDK. Check in to keep a standing mandate alive (the dead-man switch).

Signature

prov.mandate.grants.heartbeat(mandateId: string, params: { biometricAssertion: { authenticatorData: string; clientDataJSON: string; signature: string } }): Promise<{ grantId: string; status: string; event: "checkin" | "reactivate"; lastCheckinAt: string; nextCheckinDue: string }>

Parameters

mandateIdstringRequired
params{ biometricAssertion: { authenticatorData: string; clientDataJSON: string; signature: string } }Required

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The object's ID.
biometric_assertionobjectRequired
The passkey assertion over the challenge.
Show child attributes
authenticator_datastring
The base64url authenticatorData from the passkey assertion.
client_data_jsonstring
The base64url clientDataJSON from the passkey ceremony.
signaturestring
The base64url signature from the passkey assertion.

Returns

Promise<{ grantId: string; status: string; event: "checkin" | "reactivate"; lastCheckinAt: string; nextCheckinDue: string }> The check-in, with the mandate's status and when the next one is due.

HTTP operation

POST /v1/mandate/grants/{id}/heartbeat: Check in a mandate heartbeat

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grants/grt_01M5QFJRZCB3FZ2V3J76K9JSFX/heartbeat`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "biometric_assertion": {
      "authenticator_data": "SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAABQ",
      "client_data_json": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0In0",
      "signature": "MEUCIQDx5n0q4sSPVd3a2Wbl0L8kQ0YwGg"
    }
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.