View as Markdown

SDK reference · Node SDK

prov.identify.listSigningKeys

prov.identify.listSigningKeys in Node SDK.

Signature

prov.identify.listSigningKeys(agentId: string): Promise<{ data: Array<Record<string, unknown>> }>

Parameters

agentIdstringRequired

Request fields

idstringpathRequired
The agent's ID.

Returns

Promise<{ data: Array<Record<string, unknown>> }> The agent's signing keys.

HTTP operation

GET /v1/identify/agents/{id}/signing_keys: List an agent's signing keys

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "pantry-pal", "category": "shopping_agent" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/agents/${agentId}/signing_keys`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "jwk": {
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "G_STrQBvTD7Bi8OjlNnLcKPPiPp03Vh0sJKTMG7QzFY"
    }
  }),
})).json();
const keyId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/agents/${agentId}/signing_keys`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.