This page is generated by scripts/gen-api-refs.mjs from the SDK sources on each build, so it
stays in sync with the code. It is the exported public surface; the narrative reference with
examples lives in identity , entitlements , and the
JavaScript and Python pages.
Sources: citrate-sdk-js@328bdea, citrate-sdk-python@850b3c1.
JavaScript, @citratelabs/sdk
identity
Symbol Kind Summary UserIdtype A 0x-prefixed 32-byte hex user id (the raw stable identifier the factory salts with) uuidToUserIdfunction Derive the raw 32-byte AA userId from an OIDC subject UUID addressToUserIdfunction Left-pad a 20-byte EOA address to a 32-byte AA userId (SIWE-keyed principals) predictWalletAddressfunction Predict the counterfactual smart-wallet address for a userId. Pure + offline verifyWalletAddressOnChainfunction Verify the locally-predicted address against the on-chain factory (ground truth) generateVerifierfunction A 43-char base64url verifier (256 bits of entropy) challengeFromVerifierfunction S256 challenge for a verifier verifyIdTokenfunction Verify an OIDC ID token and return its (now-trusted) claims. Throws IdTokenError on any failure DeployPermitinterface A factory deploy permit signed by the authority's identity-signer
entitlements
Symbol Kind Summary TIERSconst The five tiers the authority mints (mirrors citrate-identity TIERS) CapabilitySetinterface What a principal may do. Explicit set membership — never derived from an ordering DEFAULT_CAPABILITIESconst The canonical default tier→capability map normalizeTierfunction Normalize an entitlement tier value at the trust boundary. Unknown/garbage collapses to EntitlementClaimLikeinterface The minimal shape of the entitlement claim this module reads capabilitiesfunction Capabilities for a raw tier value (normalized first) canfunction Whether a claim grants a capability. Applies the same fail-safe + role-bypass semantics as
Python, citrate-labs-sdk
citrate_sdk.identity
Symbol Kind Summary WalletPredictionErrorclass uuid_to_user_iddef keccak256(utf8(lowercase(uuid))) — matches the authority's wallet-claims.ts address_to_user_iddef Left-pad a 20-byte EOA to a 32-byte AA userId (SIWE-keyed principals) generate_verifierdef A 43-char base64url verifier (256 bits of entropy) challenge_from_verifierdef Pkceclass create_pkcedef IdTokenErrorclass IdentityErrorclass TokenSetclass UserInfoclass IdentityClientclass
citrate_sdk.entitlements
Symbol Kind Summary CapabilitySetclass normalize_tierdef Fail-safe: unknown/garbage/non-str collapses to public. Never escalates capabilitiesdef
citrate_sdk.gateway
Symbol Kind Summary GatewayErrorclass GatewayClientclass
Command line
citrate (Python)
usage: citrate [-h] {contract,wallet,entitlement,gateway} ...
Citrate SDK command line
positional arguments:
{contract,wallet,entitlement,gateway}
contract Print the federation contract table
wallet Embedded smart-account wallet helpers
entitlement Entitlement capabilities
gateway Inference gateway
optional arguments:
-h, --help show this help message and exit