SDK reference · Node SDK
prov.mandate.grants.setHolderBinding
prov.mandate.grants.setHolderBinding in Node SDK. required (grants to your own agent carry holderKey) or not_required (an outside agent may get a bearer hand-off).
Signature
prov.mandate.grants.setHolderBinding(agentId: string, holderBinding: "required" | "not_required"): Promise<HolderBinding>Parameters
agentIdstringRequiredholderBinding"required" | "not_required"Required
Request fields
agent_idstringpathRequired- The agent, yours or registered in another account.
holder_bindingenumRequired- The setting. One of
required,not_required.
Returns
Promise<HolderBinding> The setting.
HTTP operation
PUT /v1/mandate/holder_bindings/{agent_id}: Set an agent's holder binding
Errors
- authentication_required
- insufficient_scope
- insufficient_role
- invalid_json
- parameter_invalid
- resource_missing
- rate_limit_exceeded
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/holder_bindings/agt_01M7Z71YM4GVGFZ5D6PQQE0VZN`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "holder_binding": "required" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/mandate/holder_bindings/agt_01M7Z71YM4GVGFZ5D6PQQE0VZN", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"holder_binding": "required"
}).json()