/** * Restate request identity (Runtime Architecture §9.1, §12.3). Restate signs * every request to the Worker endpoint with an Ed25519 private key; the * Runtime accepts only requests that verify against the public key. * * - The private key is a PKCS#8 PEM at `docker/restate-identity.pem` (mode * 0600), mounted read-only into the restate service as * `RESTATE_WORKER__INVOKER__REQUEST_IDENTITY_PRIVATE_KEY_PEM_FILE`. * - The public key goes to the Runtime as `NYLORUN_RESTATE_IDENTITY_KEY`, in * Restate's format: `publickeyv1_` followed by the base58btc encoding of * the raw 32-byte public key. Restate logs the same string as the key id * (`kid`) when it loads the PEM. */ export declare const IDENTITY_KEY_PREFIX = "publickeyv1_"; /** Base58 with the Bitcoin alphabet; each leading zero byte becomes "1". */ export declare function base58btc(bytes: Uint8Array): string; /** The `publickeyv1_...` string for an Ed25519 private key PEM. */ export declare function identityPublicKey(privateKeyPem: string): string; export declare function generateIdentityPem(): string; /** * Read the identity PEM at `path`, creating it (mode 0600) on first start, and * return its public key. An existing key is kept, so Restate's signatures stay * valid across starts. */ export declare function ensureIdentityKey(path: string, write: (path: string, text: string, mode: number) => Promise): Promise<{ publicKey: string; created: boolean; }>;