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 userAddress 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 @umbra-privacy/sdk/interfaces. Store functions in state, type React context values, or annotate variables without re-running the factory:
import type {
  DepositIntoEncryptedBalanceFunction,
  UserRegistrationFunction,
  FetchClaimableUtxosFunction,
  ClaimSelfClaimableUtxoIntoEncryptedBalanceFunction,
} from "@umbra-privacy/sdk/interfaces";
This is useful when you build a factory function once and store it in React state or a context:
const [deposit, setDeposit] = useState<DepositIntoEncryptedBalanceFunction | null>(null);

useEffect(() => {
  if (client) {
    setDeposit(() => getDirectDepositIntoEncryptedBalanceFunction({ client }));
  }
}, [client]);
The full list of exported function types mirrors the factory functions - one type per returned function. See the Reference for the complete inventory.