SDK reference

Use this page when you need the stable SDK names after you have chosen an integration path.

Entry points

ImportUse
@taxkit/sdkUse TaxKit.calculate, TaxKit.safe.calculate and TaxKit.createClient.
@taxkit/sdk/auUse Australian calculator helpers such as au.incomeTax.annual.
@taxkit/sdk/effectUse calculateRunRequest, calculateReportRequest, calculateReport and the Effect client helper.
@taxkit/sdk/au/effectUse Australian calculation descriptors in Effect programs.
@taxkit/sdk/schemasImport schema-facing types that are re-exported for SDK consumers.

The SDK package remains private until release approval. The public import shape is still the developer contract used by docs and examples.

Plain SDK

Use TaxKit.calculate when you already have descriptor-typed input and want a Promise for the report:

ts
import { Cents, aud } from "@taxkit/core/primitives";
import { TaxKit } from "@taxkit/sdk";
import { au } from "@taxkit/sdk/au";

const report = await TaxKit.calculate(au.calculations.annualIncomeTax, {
  taxableIncome: aud(Cents.make(9_000_000)),
});

Use the AU helper when you do not need to pass the descriptor yourself:

ts
import { Cents, aud } from "@taxkit/core/primitives";
import { au } from "@taxkit/sdk/au";

const report = await au.incomeTax.annual({
  taxableIncome: aud(Cents.make(9_000_000)),
});

Safe SDK

Use TaxKit.safe.calculate when expected calculator failures should be values:

ts
import { Cents, aud } from "@taxkit/core/primitives";
import { TaxKit } from "@taxkit/sdk";
import { au } from "@taxkit/sdk/au";

const result = await TaxKit.safe.calculate(au.calculations.annualIncomeTax, {
  taxableIncome: aud(Cents.make(9_000_000)),
});

if (result._tag === "TaxKitSuccess") {
  console.log(result.value.liability.cents);
}

Effect SDK

Use calculateRunRequest when you need a full CalculatorRunResponse with the descriptor-decoded report:

ts
import { audFromCents } from "@taxkit/core/primitives";
import { AuAnnualIncomeTaxCalculation } from "@taxkit/sdk/au/effect";
import { calculateRunRequest } from "@taxkit/sdk/effect";
import { Effect, Option } from "effect";

const effect = Effect.gen(function* () {
  const taxableIncome = yield* audFromCents(9_000_000);
  return yield* calculateRunRequest(AuAnnualIncomeTaxCalculation, {
    payload: {
      facts: { taxableIncome },
      jurisdiction: Option.some(
        Option.some(AuAnnualIncomeTaxCalculation.jurisdiction)
      ),
      taxYear: Option.some(Option.some(AuAnnualIncomeTaxCalculation.taxYear)),
    },
  });
});

Use calculateReportRequest when you have a full request and only need the report. Use calculateReport when you already have descriptor-typed facts.

Owning sources

Used by