Assinafy
Create Assinafy requests with account-scoped credentials and typed SignatureKit errors.
Assinafy creates a document, registers the signer, and creates the assignment in the configured account. SignatureKit keeps the request shape typed and leaves ceremony ownership to Assinafy.
Installation
npm install @signature-kit/core @signature-kit/assinafyWhen to use
Use Assinafy when account-level organization and assignment tracking belong in Assinafy. Use local signing when your app owns the signature bytes and placement.
Keep credentials Redacted
Provider tokens enter as Redacted.make(...) and are unwrapped only inside the package HTTP boundary. Never pass remote tokens to React components or logs.
Minimal request
import { signatureHttpClientLive } from "@signature-kit/core/http"
import { createAssinafySignatureRequest } from "@signature-kit/assinafy"
import { Effect, Redacted } from "effect"
const program = createAssinafySignatureRequest(
{
apiKey: Redacted.make(process.env.ASSINAFY_API_KEY ?? ""),
accountId: process.env.ASSINAFY_ACCOUNT_ID ?? "",
environment: "sandbox",
},
{
title: "Service agreement",
message: "Review and sign this document.",
documents: [{ fileName: "contract.pdf", mimeType: "application/pdf", content: pdfBytes }],
recipients: [{ name: "Ada Lovelace", email: "ada@example.com", role: "signer" }],
send: true,
},
).pipe(Effect.provide(signatureHttpClientLive))
const request = await Effect.runPromise(program)Provider facts
- Credentials include both API key and account id.
- The adapter creates document, signer, and assignment in one request flow.
- Recoverable HTTP and response-shape failures surface as
SignatureKitError.
Errors
Invalid input, remote HTTP failures, and invalid response shapes fail as SignatureKitError. The provider, operation, and HTTP status fields are preserved when the upstream response exposes them.