@comms-id/australian-address-autocomplete
Typed client for the Comms.ID Address API (https://api.comms.id/address/v1): suggestions as a user types, and one suggestion resolved to a structured address.
src/ is generated from the Address contract by @comms-id/forge-transformers. Do not edit it: change the contract and run pnpm --filter @comms-id/forge-transformers generate.
import { createAustralianAddressAutocompleteClient } from "@comms-id/australian-address-autocomplete/server";
const client = createAustralianAddressAutocompleteClient({
clientId: process.env.COMMS_ID_CLIENT_ID!,
privateJwk: JSON.parse(process.env.COMMS_ID_PRIVATE_JWK!),
});
const { suggestions } = await client.suggest({ query: "1 Martin Pl" });
COMMS_ID_PRIVATE_JWK is an ML-DSA-87 private JWK (kty AKP, with priv and pub). The server entry needs Node.js 24.7 or later, or a Cloudflare Worker with the compatibility flag webcrypto_modern_algorithms.
Entries: . (types and errors, safe in a browser), ./server (signs each call), ./browser (your relay route; never signs), ./fixtures (LOCAL FIXTURES, no network), ./descriptor (what @comms-id/relay may forward).
LICENSE is the consumer client licence.