Skip to main content

References

Enumerations

EnumerationDescription
CryptoErrorTypeError types for cryptographic operations.
IFrameApiErrorTypeError types for iframe API integration.
JwtErrorTypeError types for JWT handling and validation.
SdkErrorTypesEnum representing all possible SDK error types.

Classes

ClassDescription
CryptoErrorError thrown when a cryptographic operation fails.
IFrameApiErrorError thrown by the iframe API server/client layer.
JwtErrorError thrown when JWT validation fails or a token is malformed.
KeybanAccountAbstract account bound to a specific chain implementation (EVM, Starknet, Stellar). Provides methods to sign messages and to transfer/estimate fees for native currency, ERC‑20-like tokens, and NFTs, when supported by the target network. Obtain an instance via KeybanClient.initialize.
KeybanBaseErrorThe KeybanBaseError class serves as the foundational structure for all custom errors within the Keyban SDK. It extends the native JavaScript Error class, providing additional properties to enrich error handling with more context and information.
KeybanClientMain client for interacting with the Keyban API and associated services. This class provides methods to initialize accounts, retrieve balances, query NFTs, and interact with the Keyban blockchain.
SdkErrorClass representing an SDK-specific error.

Interfaces

InterfaceDescription
ClientShareProviderRepresents a storage provider for the client share.
IAccountServiceAccount service.
IApplicationServiceApplication service.
IAuthServiceAuthentication service.
IClientShareStorageServiceStorage for persisting and retrieving the MPC client share on the integrator side.
IDppServiceDigital Product Passport (DPP) operations.
IKeybanApiAggregated API surface exposed through the iframe transport.
ILoyaltyServiceLoyalty operations for wallet passes and tier retrieval.
ISignerServiceMPC signer for a given curve (ECDSA/EdDSA).
KeybanInputRefRef interface for KeybanInput component. Provides imperative methods to control the input.

Type Aliases

Type AliasDescription
AccountComplete on-chain account information returned by the Keyban API.
AccountAssignmentPending loyalty assignment created before an account exists.
AddressRepresents an Ethereum address in hexadecimal format.
ApiResultA tuple representing the result of an API call to the Keyban servers.
ApplicationApplication configuration and metadata.
ApplicationFeatureString literal union of the supported application features.
ApplicationThemeModeString literal union describing the theme mode options.
AuthConnectionRepresents the types of authentication connections available.
AuthContextRepresents the authentication context, extending the base authentication state with loading status and methods for various login/logout flows.
AuthMethod-
AuthSendOtpArgsArguments for sending a One-Time Password (OTP).
AuthSignInArgsArguments for signing in a user.
AuthUpdateUserArgs-
AuthUserAuthenticated user profile.
BalanceRepresents a balance with optional metadata.
BaseAuthRepresents the authentication state of the user.
ChatRole-
CreateInvestFund-
CurrencyString literal union of supported loyalty currencies.
DppApplicationMetricsDPP metrics for a specific application.
DppClaimResultResult of a DPP claim operation.
DppMetricsDPP metrics for tracking Digital Product Passport lifecycle.
DppMetricsByOrgDPP metrics grouped by organization.
DppPassport-
DppProductProduct template for Digital Product Passports.
DppProductStatusString literal union of the DPP product statuses.
DynamicFieldDef-
DynamicFieldsType-
DynamicFieldType-
EstimateERC20TransferParamsParameters to estimate an ERC‑20 transfer, without fees. Derived from TransferERC20Params by omitting fees.
EstimateNftTransferParamsParameters to estimate an NFT transfer, without fees. Derived from TransferNftParams by omitting fees.
EvmFeeDetailsEIP‑1559 fee parameters for EVM transactions. Used by EVM account transfer methods to override gas pricing when needed.
EvmNetworkAllowed EVM network identifiers.
FeeDetails-
FeesEstimationRepresents a transaction fee estimation returned by estimation methods. The concrete shape of the details field depends on the underlying network: - EVM chains: EvmFeeDetails (EIP-1559 fields) - Stellar: StellarFeeDetails (fee per operation as string)
FeesUnitRepresents the unit of fees in a specific blockchain.
FormatedBalancePropsProps for the FormattedBalance component.
GoogleGeminiModel-
GqlEdge-
GqlPaginatedData-
HashRepresents a cryptographic hash value in hexadecimal format.
HexRepresents a hexadecimal value in blockchain-related contexts.
InvestFundInvestment fund definition.
InvestFundStatusString literal union of the invest fund statuses.
KeybanApiStatus-
KeybanAssetTransfer-
KeybanClientConfigConfiguration options for initializing the Keyban client.
KeybanInputPropsProps for the KeybanInput component.
KeybanNft-
KeybanNftBalance-
KeybanOrder-
KeybanProviderPropsDefines the properties for the KeybanProvider component.
KeybanToken-
KeybanTokenBalance-
LlmModelPricing-
LlmProvider-
LlmUsageByModel-
LlmUsageByOrganization-
LlmUsageByProvider-
LlmUsageMeta-
LlmUsageMetadata-
LlmUsageRecord-
LlmUsageResponse-
LlmUsageTimeline-
LoyaltyApplicationMetricsLoyalty metrics for a specific application.
LoyaltyMetricsLoyalty metrics for tracking program engagement and customer behavior.
LoyaltyMetricsByOrgLoyalty metrics grouped by organization.
LoyaltyRewardTierLoyalty reward tier definition.
NativeCurrencyRepresents the native currency of a blockchain network.
NetworkUnion across every supported blockchain runtime.
ObjectEnum-
ObjectPaths-
Order-
OrderItem-
Organization-
PaginatedDataAn object representing a paginated data API result.
PaginationArgsArguments for paginating a collection.
PaginationExtraAn object allowing extra interactions with the Keyban API.
Prettify-
ProblemDetailsRFC 7807 Problem Details for HTTP APIs.
ProductDetailStatsDetailed statistics for a DPP product sheet.
ProductStatsAggregated statistics for all DPP product sheets at organization level.
QuotaEntity-
QuotaOperation-
QuotaOrganization-
QuotaUsage-
ShopifyPassportFields-
ShopifyProductFields-
ShopifyShop-
StarknetNetworkAllowed Starknet network identifiers.
StellarFeeDetailsStellar fee per operation represented as a string in stroops. In congestion, Horizon exposes a higher mode fee; otherwise it's the base fee (100 stroops).
StellarNetworkAllowed Stellar network identifiers.
TierDistributionTier distribution representing customer spread across loyalty tiers.
TimeSeriesDataPointTime series data point for tracking product sheet creation trends over time.
TransferERC20ParamsParameters for transferring ERC‑20-like fungible tokens.
TransferNftParamsParameters for transferring NFTs (ERC‑721 / ERC‑1155 on EVM chains).
UpdateInvestFund-

Variables

VariableDescription
ApplicationFeatureFlags describing which product surfaces (DPP, Loyalty, or Invest) are enabled for a given application. Used throughout the SDK to flip UI and API capabilities.
ApplicationThemeModeEnumerates the supported UI presentation modes for hosted applications. Typedoc consumers rely on this union to toggle light/dark specific assets.
AuthMethod-
ChatRoleChat message role
CurrencyLimited list of fiat currencies supported by the loyalty engine for point accrual and redemption calculations.
DppProductStatusWorkflow states describing where a Digital Product Passport sheet sits in the publication lifecycle.
EvmNetworkCanonical blockchain network identifiers supported by Keyban across EVM, Starknet, and Stellar stacks. These unions align with backend configuration keys and Tilt profiles to prevent drift.
GoogleGeminiModelGoogle Gemini models supported in MVP Note: Gemini 1.5 models were retired in 2025, using 2.5 series
InvestFundStatusStatus of an investment fund in the platform lifecycle.
KeybanInputKeybanInput renders a secure iframe-based input component for the Keyban SDK client. This component provides a secure way to handle sensitive user inputs like emails, phone numbers, passwords, and OTP codes by isolating them in a sandboxed iframe.
LlmProviderSupported LLM providers
NetworkNormalized lookup that collapses duplicated enum values (e.g. both Starknet/Stellar define Mainnet) into a single Record consumable by Zod.
QuotaEntity-
QuotaOperation-
StarknetNetwork-
StellarNetwork-

Functions

FunctionDescription
formatBalanceFormat a balance using the client's native/fee units or the token metadata.
FormattedBalanceA React component that formats and displays a balance.
KeybanProviderProvider component for the Keyban SDK. This component wraps the application and provides Keyban SDK functionalities to the components within the application. It is responsible for configuring the Keyban client with the appropriate options and ensuring that the SDK is accessible via the useKeybanClient hook.
useFormattedBalanceFormats a balance in a human-readable format using the Keyban client. This is typically used to display the balance of an account, as retrieved by
useKeybanAccountRetrieves the current KeybanAccount associated with the Keyban client.
useKeybanAccountBalanceHook to retrieve and subscribe to the balance of a Keyban account.
useKeybanAccountNftThe useKeybanAccountNft React hook allows you to fetch the balance of a specific NFT (ERC721 or ERC1155) owned by a Keyban account. It provides detailed information about the NFT, including metadata and collection details, offering a reactive and easy-to-use interface within functional components.
useKeybanAccountNftsReturns an ApiResult of the NFTs of an account.
useKeybanAccountOrdersReturns an ApiResult tuple for the orders history of an account.
useKeybanAccountTokenBalanceThe useKeybanAccountTokenBalance React hook allows you to fetch the balance of a specific token (ERC20) owned by a Keyban account. It provides detailed information about the token, including metadata and collection details, offering a reactive and easy-to-use interface within functional components.
useKeybanAccountTokenBalancesReturns an ApiResult of the ERC20 tokens of an account.
useKeybanAccountTransferHistoryReturns an ApiResult tuple for the transfer history of an account.
useKeybanApplicationRetrives application details.
useKeybanAuthCustom hook to access the Keyban authentication context.
useKeybanClientHook to access the Keyban SDK functionalities within a React component.
useKeybanNftRetrives a single nft data.
useKeybanPassportRetrives a single product.
useKeybanPassportTokenRetrives a single passport token.
useKeybanProductRetrives a single product.
useLoyaltyOptimisticBalanceRetrieves the current optimisticBalance associated with the Keyban client.