> ## Documentation Index
> Fetch the complete documentation index at: https://docs.panoqore.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> The TypeScript and Go clients.

> [!NOTE]
>
> The SDKs are not published to a package registry yet. Until they are, call the REST API directly, or build from source if you have access to the repositories.

Both clients speak Connect on `/panoqore.v1.<Service>/<Method>`, the same handlers as REST. They add your key to each call, and an `Idempotency-Key` if you did not set one. That generated key protects a retry inside the SDK, but not a restart of your process, so for money, pass your own.

## TypeScript

Node 20 or later. It covers `ledger`, `lending`, `fees`, `approvals`, `fx` and `identity`.

```ts theme={null}
import { panoqore, errorCode, ErrorCode, idempotent, Posting_Side } from "@panoqore/sdk";

const pq = panoqore({ baseUrl: process.env.PANOQORE_URL!, apiKey: process.env.PANOQORE_API_KEY! });

try {
  const entry = await pq.ledger.postEntry(
    {
      kind: "TRANSFER",
      externalRef: "instalment:42:paid",
      postings: [
        { accountId: wallet, side: Posting_Side.DEBIT, amount: "500000", currency: "NGN" },
        { accountId: settlement, side: Posting_Side.CREDIT, amount: "500000", currency: "NGN" },
      ],
    },
    idempotent("instalment:42:paid"),
  );
} catch (e) {
  if (errorCode(e) === ErrorCode.InsufficientFunds) {
    // Refused. The same key replays this refusal for 7 days, so try again later under a new key.
  }
}
```

Network failures and 503s are retried twice with backoff. Set `retries` to change that. Refusals are never retried.

## Go

It covers `Ledger`, `Approvals`, `FX` and `Identity`.

```go theme={null}
c := sdk.New(os.Getenv("PANOQORE_URL"), os.Getenv("PANOQORE_API_KEY"))
entry, err := c.Ledger.PostEntry(sdk.WithIdempotencyKey(ctx, myTxnID), &panoqorev1.PostEntryRequest{ /* ... */ })
if sdk.Code(err) == sdk.InsufficientFunds {
	// ...
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.