@belticlabs/agent-signer
v1.3.3
Published
HTTP request signing for Beltic-authenticated agents
Readme
@belticlabs/agent-signer
HTTP request signing for Beltic-authenticated agents.
Installation
npm install @belticlabs/agent-signerUsage
import { signHttpRequest, importPrivateKey } from '@belticlabs/agent-signer';
const privateKey = await importPrivateKey(pemString, 'EdDSA');
const signedHeaders = await signHttpRequest({
method: 'POST',
url: 'https://api.example.com/action',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ action: 'transfer' }),
privateKey,
keyId: 'key-thumbprint',
keyDirectoryUrl: 'https://api.beltic.dev/v1/agents/xxx/keys',
});What's Included
- HTTP request signing (RFC 9421)
- Key pair generation and import
- Credential signing
- Key directory generation
When to Use
Use @belticlabs/agent-signer for agent implementations that need to sign outgoing HTTP requests.
Documentation
See the full documentation at kya-docs.beltic.app
License
MIT
