Skip to main content

Anza Solana Kit Types

The SDK is built on top of @solana/kit and shares its core types directly. You do not need to import @solana/kit yourself — these types flow through the SDK’s own types naturally — but it helps to know where they come from:
  • Address — a base58-encoded public key string. Every mint, destinationAddress, and user-address parameter in the SDK is an Address.
  • TransactionSignature — a base58-encoded signature string. Returned by every operation that submits a transaction.
  • SignableTransaction / SignedTransaction — the versioned transaction types passed to IUmbraSigner.signTransaction.
  • GetLatestBlockhash, GetEpochInfo — RPC function types used in the deps of most factory functions.
If you are writing unit tests or building a custom RPC layer, the @solana/kit documentation is the primary reference for these types.

Function Types

Every returned function has a named type exported from the same subpath as its factory. There is no separate @umbra-privacy/sdk/interfaces re-export in V18 — types ship alongside their factories.
import type {
  // Deposit family
  ATAIntoETADirectDepositorFunction,
  ATAIntoReceiverBurnableStealthPoolNoteCreatorFunction,
} from "@umbra-privacy/sdk/deposit";

import type {
  // Withdrawal family
  ETAIntoATAWithdrawerFunction,
} from "@umbra-privacy/sdk/withdrawal";

import type {
  // Burn family
  BurnableStealthPoolNoteScannerFunction,
  ReceiverBurnableStealthPoolNoteIntoETABurnerFunction,
  SelfBurnableStealthPoolNoteIntoETABurnerFunction,
  SelfBurnableStealthPoolNoteIntoATABurnerFunction,
} from "@umbra-privacy/sdk/burn";

import type { UserRegistrationFunction } from "@umbra-privacy/sdk/registration";
import type {
  QueryUserAccountFunction,
  QueryEncryptedBalanceFunction,
} from "@umbra-privacy/sdk/query";
This is useful when you build a factory function once and store it in React state or a context:
import { useState, useEffect } from "react";
import type { ATAIntoETADirectDepositorFunction } from "@umbra-privacy/sdk/deposit";
import { getATAIntoETADirectDepositorFunction } from "@umbra-privacy/sdk/deposit";

const [deposit, setDeposit] =
  useState<ATAIntoETADirectDepositorFunction | null>(null);

useEffect(() => {
  if (client) {
    setDeposit(() => getATAIntoETADirectDepositorFunction({ client }));
  }
}, [client]);
The full inventory of factory + function types mirrors the operation families above. See the Reference for the complete list.