@hillzgroup/hzd-sdk-acm
v0.5.0
Published
Type-safe TypeScript SDK for the HillzDealer ACM gRPC service.
Readme
HillzDealer ACM SDK
Type-safe TypeScript SDK for the ACM gRPC service.
Features
- Fully typed request/response APIs generated from
proto/acm.proto - Built-in ACM-compatible HMAC signing for all unary methods
- Configurable gRPC channel, call options, and metadata header names
Install
bun add @hillz/hzd-sdk-acmUsage
import { AcmSdk, ChallengeReason } from "@hillz/hzd-sdk-acm";
const sdk = new AcmSdk({
grpc: { address: "127.0.0.1:50051" },
hmac: { secret: process.env.ACM_HMAC_SECRET! },
});
await sdk.connect({ timeoutMs: 5_000 });
const createUser = await sdk.createUser({
email: "[email protected]",
password: "StrongPass123",
});
const challenge = await sdk.requestChallenge({
sessionId: "session-id",
deviceId: "device-id",
reason: ChallengeReason.CHALLENGE_REASON_CHANGE_PASSWORD,
});
sdk.close();Development
bun run generate:proto
bun run typecheck
bun run build