Skip to main content

References

Enumerations

EnumerationDescription
SdkErrorCodeEnum representing all possible SDK error types.

Classes

ClassDescription
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.
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.
KeybanError-
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.
IInvestServiceInvest identity 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).

Type Aliases

Type AliasDescription
AccountComplete on-chain account information returned by the Keyban API.
AccountAssignmentPending loyalty assignment created before an account exists.
AcquisitionChannelThird-party platform through which an organization was acquired (the "install a Keyban plugin" funnel). Non-secret attribution tag, set from the ?source= query param at free-plan signup.
AddressRepresents an Ethereum address in hexadecimal format.
AgentWallet-
AgentWalletBudget-
AgentWalletStatusString literal union of the agent wallet lifecycle statuses.
ApiErrorCodeStable, versioned error codes carried by RFC 7807 responses (problem-details.ts, field code). The code never changes once shipped; clients map it to a localized message via their own catalog and fall back to the English detail when unknown. Only errors that can reach a browser UI (admin, dpp consumer) carry a code — backend-only failures (5xx, device callbacks) leave it undefined.
ApplicationApplication configuration and metadata.
ApplicationEventType-
ApplicationFeatureString literal union of the supported application features.
ApplicationThemeModeString literal union describing the theme mode options.
AudiencePreviewEstimated reach of a campaign targeting filter, returned by the audience-preview endpoint. fullAvailabilityAt is an RFC 3339 string (the serialized network shape); counts are over the opted-in audience only.
AuthConnectionRepresents the types of authentication connections available.
AuthMethod- email-otp: Authentication via a one-time password sent to the user's e-mail address. - phone-otp: Authentication via a one-time password sent by SMS to the user's phone number. - google: Authentication delegated to Google OAuth 2.0 / Sign-in with Google. - auth0: Authentication delegated to an Auth0 tenant (used for enterprise SSO and legacy flows).
AuthSendOtpArgsArguments for sending a One-Time Password (OTP).
AuthSignInArgsArguments for signing in a user.
AuthUpdateUserArgs-
AuthUserAuthenticated user profile.
BalanceRepresents a balance with optional metadata.
CampaignWallet marketing campaign (Google/Apple notification push to loyalty cards).
CampaignContentSingle message (headline + body) persisted on the campaign (JSONB column).
CampaignStatsAggregated outcome of a campaign once it has started sending, returned by the campaign stats endpoint: a per-status delivery tally plus a revenue-free conversion proxy. Computed live, so figures keep moving until the campaign is finished; all zero before sending starts.
CampaignStatusLifecycle status of a marketing campaign.
CampaignTargetingAudience filter shape persisted on the campaign (JSONB column).
CertificationKeyHistoryItemHistorical certification key item. Includes status, activation dates, and registered networks.
CertificationKeyResponseCertification key response with on-chain registration status. Includes registration status, registered networks, and rotation progress.
CertificationKeyStatusCertification key status enum. - active: Currently used for signing - pending: Awaiting on-chain rotation to complete - rotated: Replaced by a newer key, kept for verification - revoked: Compromised or manually revoked
ChargebeeFeatureStable Chargebee feature IDs mapped to platform quota controls; also used as i18n translation keys on the frontend.
ChatRoleChat message role
ConsentDecisionA customer's current marketing-consent decision for one application, as read/written through the self-service consent endpoint. Tri-state: true = consented, false = refused, null = no decision yet or withdrawn.
ConsentLogEntryOne immutable entry of a customer's consent history for a given application and purpose (GDPR proof of consent, art. 7.1), returned by the consent-log endpoint, newest first.
CreateAgentWallet-
CreateImportMapperBody shape for creating an import mapper.
CreateInvestFund-
CreateInvestIdentity-
CreateInvestLockup-
CreateInvestNav-
CreateInvestOffer-
CreateSigner-
CurrencyFiat currencies supported by the loyalty engine for point accrual and redemption calculations (ISO 4217).
DidDocumentResponseW3C DID Document a tenant publishes at https://{domain}/.well-known/did.json so external verifiers can resolve did:web:{domain} and validate VC signatures without contacting Keyban.
DidWebConfigResponseResponse for GET / PUT /v1/dpp/certification-key/did-web-config. didDocument is null when the tenant has not configured a did:web domain.
DppAction-
DppActions-
DppActionType-
DppApplicationMetricsDPP metrics for a specific application.
DppCertificationStatus-
DppCharacteristicProvenance-
DppCharacteristicProvenanceRecord-
DppCharacteristicProvenanceStatusReview status of an AI-extracted characteristic (Trust structuration).
DppCharacteristicReviewEntry-
DppClaimResultResult of a DPP claim operation.
DppMetricsDPP metrics for tracking Digital Product Passport lifecycle.
DppMetricsByOrgDPP metrics grouped by organization.
DppPassport-
DppPassportEvent-
DppPassportEventType-
DppPassportStatusString literal union of the DPP passport lifecycle statuses.
DppSource- manual: The DPP passport was created by hand through the admin interface. - import: The passport was created via a bulk file import job (CSV/Excel upload). - shopify: The passport was automatically created from a Shopify product synchronisation.
DppUncpc-
DppVcStatusStateDerived lifecycle state of a passport's Verifiable Credential, surfaced for the consumer-facing VC banner (epic #4155).
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.
Event-
Event_Application-
Event_DppPassport-
Event_Wallet-
EventSubjectThe domain entity that an audit/quota event targets.
EventTypeThe type of audit/quota event.
EvmFeeDetailsEIP‑1559 fee parameters for EVM transactions. Used by EVM account transfer methods to override gas pricing when needed.
EvmNetworkAllowed EVM network identifiers.
ExchangeRateAssetString literal union of the quotable on-chain assets.
ExchangeRateConversion-
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.
GoogleGeminiModelGoogle Gemini models supported in MVP Note: Gemini 1.5 models were retired in 2025, using 2.5 series
HashRepresents a cryptographic hash value in hexadecimal format.
HexRepresents a hexadecimal value in blockchain-related contexts.
ImportJob-
ImportJobBatch-
ImportJobEntity-
ImportJobProgress-
ImportJobSource- upload: The import job was triggered by a user uploading a file (CSV/Excel) through the admin interface. - shopify: The import job was triggered by a Shopify product catalogue synchronisation. - scheduled: The import job was triggered by a url mapper's recurring CRON fetch — no user interaction.
ImportMapperAn import mapper: an ordered list of field mappings used to transform an imported JSON payload into a target model.
ImportMapperDestinationFieldA field an import-mapper row can write to, as a dot-path into the passport-creation input (e.g. product.name). required marks fields the input schema makes mandatory — the mapper form seeds a locked row for each. enumValues is set for fields tagged enumSelect on the schema: their value is constrained to a closed set, so the form renders a const-only select of these literals instead of a free-text path input.
ImportMapperRowA single row in an import mapper.
ImportMapperRowTypeType of an import-mapper row, describing how source is interpreted.
ImportMapperTypeSource type of an import mapper, deciding how the data to import is obtained.
IntentWithWalletA policy intent enriched with its owning agent wallet, as returned by GET /v1/agent-wallets/intents. Used by the admin intent-validation page.
IntlString-
InvestFundInvestment fund definition.
InvestFundStatusStatus of an investment fund through its lifecycle.
InvestHoldingHolding record representing the shares held by an investor in a fund.
InvestIdentityInvestor identity with KYC lifecycle tracking.
InvestIdentityStatusKYC verification status of an investor identity.
InvestLockupCustom lockup period for an investor in a specific fund.
InvestNavNAV (Net Asset Value) record for an investment fund.
InvestOfferSecondary market offer for an investment fund.
InvestOfferTypeString literal union of the invest offer types.
InvestTransactionTransaction record for an investment fund. Represents a share movement: initial distribution, buy-back, or secondary market transfer. Either seller or buyer may be null depending on type.
InvestTransactionStatusString literal union of the invest transaction statuses.
InvestTransactionTypeString literal union of the invest transaction types.
Job-
JobStatus-
KeybanApiStatus-
KeybanAssetTransfer-
KeybanClientConfigConfiguration options for initializing the Keyban client.
KeybanNft-
KeybanNftBalance-
KeybanOrder-
KeybanToken-
KeybanTokenBalance-
ListX402ResourcesQuery-
LlmModelPricing-
LlmProviderSupported LLM providers
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.
LoyaltyRewardTier-
Module-
MyInvestHoldingCurrent investor's holding in a fund (investor-facing, narrower than InvestHolding).
NativeCurrency-
NetworkUnion across every supported blockchain runtime.
ObjectEnum-
ObjectPath-
OnChainStatusOn-chain certifier status. - registered: Key is registered and valid on at least one network - pending: Key exists but not yet registered on-chain
Order-
OrderItem-
Organization-
OrganizationQuotas-
PaginationArgsArguments for paginating a collection.
Path-
PaymentRailString literal union of the supported agent-wallet payment rails.
Permission-
Permissions-
Plan-
PlanFeature-
PlanPrice-
PreferredCurrencyString literal union of the supported application display currencies.
Prettify-
ProblemDetailsRFC 7807 Problem Details for HTTP APIs.
QuotaUsage-
RotateCertificationKeyResponseResponse from the certification key rotation endpoint. Includes new key details and number of on-chain rotation jobs queued.
SetDidWebDomainRequestBody for PUT /v1/dpp/certification-key/did-web-config. Pass domain: null to disable self-hosted DID Web and fall back to did:key.
ShopifyPassportFields-
ShopifyProductFields-
ShopifyReport-
ShopifyShop-
Signer-
SignerRelayParamsParameters for ISignerService.relay.
SignerStatusString literal union of the signer lifecycle statuses.
SignerType- agentic: Backend-controlled account using MPC/TSS; the private key is never exposed to the end user.
StarknetFeeDetailsStarknet v3 transaction fee parameters using resource bounds. Contains gas limits and prices for l2_gas, l1_gas, and l1_data_gas.
StarknetNetworkAllowed Starknet network identifiers.
Statements-
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.
SupportedEmailLocale-
SupportedLocaleBCP 47 locale codes supported across the platform for user-facing content (e.g. DPP action labels, product descriptions). Source of truth shared between the backend, the admin UI and the DPP App.
TierDistributionTier distribution representing customer spread across loyalty tiers.
TransferERC20ParamsParameters for transferring ERC‑20-like fungible tokens.
TransferNftParamsParameters for transferring NFTs (ERC‑721 / ERC‑1155 on EVM chains).
UntpAddress-
UntpBitstringStatusListEntry-
UntpCharacteristics-
UntpClaim-
UntpClassification-
UntpConformityTopic-
UntpCountry-
UntpCredentialIssuer-
UntpDimension-
UntpDpp-
UntpIdGranularity-
UntpImage-
UntpLink-
UntpMaterial-
UntpMeasure-
UntpPackage-
UntpParty-
UntpPartyRole-
UntpPerformance-
UntpPeriod-
UntpProduct-
UntpRenderTemplate2024-
UntpRole-
UntpScore-
UpdateAgentWallet-
UpdateImportMapperBody shape for updating an import mapper.
UpdateInvestFund-
UpdateInvestIdentity-
UpdateInvestLockup-
UpdateInvestOffer-
UpdateSigner-
UpsertWalletPolicyPayload of PUT /v1/agent-wallets/:id/policy. Tri-state fields: omitted = keep current value, null = clear, value = set.
VerifyDidWebConfigResponseDiscriminated result of POST /v1/dpp/certification-key/did-web-config/verify. Always returned with HTTP 200; status: 'failed' carries a reason matching a VerifyDidWebFailureReason value for actionable UI messaging.
WalletEventType-
WalletInstallationWallet installation metrics (Google and Apple Wallet adoption).
WalletNotificationChannelString literal union of the wallet notification channels.
WalletPolicySpending policy attached to an agent wallet: reference currency, per-transaction/daily/weekly/monthly caps (decimal strings in centi-units of the currency), human-approval threshold, and recipient/domain allow-lists.
X402Accept-
X402Quality-
X402Resource-

Variables

VariableDescription
AcquisitionChannel-
AgentWalletStatusLifecycle status of an agent wallet.
ApiErrorCode-
ApplicationEventType-
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-
BARE_DOMAIN_REGEXBare lowercase domain matcher (example.com, api.openai.com) — no scheme, path, port, or whitespace. Shared source of truth consumed by both the backend domainString schema below and the admin UI (@keyban/types re-exports it for the agent-wallet creation wizard).
CampaignStatus-
CertificationKeyStatusCertification key status enum. - active: Currently used for signing - pending: Awaiting on-chain rotation to complete - rotated: Replaced by a newer key, kept for verification - revoked: Compromised or manually revoked
ChargebeeFeature-
ChatRoleChat message role
Currency-
DppActionType-
DppCertificationStatus-
DppCharacteristicProvenanceStatus-
DppPassportEventType-
DppPassportStatusLifecycle status of a DPP (Digital Product Passport).
DppSource-
DppVcStatusState-
EventSubject-
EventType-
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.
ExchangeRateAssetOn-chain assets the exchange-rate endpoint can quote against a fiat.
FALLBACK_EMAIL_LOCALEFinal step of the locale cascade when nothing else resolves. Shared by the nestjs-i18n module (fallbackLanguage) and I18nService so the default locale is declared exactly once.
GoogleGeminiModelGoogle Gemini models supported in MVP Note: Gemini 1.5 models were retired in 2025, using 2.5 series
ImportJobSource-
importMapperDestinationFieldsPassport fields an import-mapper row can target. Each is a field explicitly tagged mappable on the passport-creation input schema (the very schema the import validates against — see createDppPassportInputSchema). Generated rather than hand-maintained so the list can never drift from the schema.
ImportMapperRowType-
ImportMapperType-
InvestFundStatus-
InvestIdentityStatus-
InvestOfferTypeType of a secondary market offer.
InvestTransactionStatusStatus of an investment transaction through its lifecycle.
InvestTransactionTypeType of an investment transaction.
isBareDomainWhether s is a bare lowercase domain name per BARE_DOMAIN_REGEX.
JobStatus-
LlmProviderSupported LLM providers
NetworkNormalized lookup that collapses duplicated enum values (e.g. both Starknet/Stellar define Mainnet) into a single Record consumable by Zod.
NETWORK_NATIVE_CURRENCY-
OnChainStatusOn-chain certifier status. - registered: Key is registered and valid on at least one network - pending: Key exists but not yet registered on-chain
PaymentRailSettlement rail an agent wallet uses to move funds.
PreferredCurrencyFiat currency an application displays monetary values in (ISO 4217). It is the unit balances are converted to for display and the currency new spending policies are authored in. Deliberately a small curated set (not "any ISO code") because it drives a user-facing picker; the rate oracle can quote any of these against the on-chain assets.
roleStatements-
SignerStatusLifecycle status of an agentic signer.
SignerType-
StarknetNetwork-
statements-
StellarNetwork-
supportedEmailLocaleSchemaBCP 47 language tags the backend i18n infrastructure ships email bundles for (nestjs-i18n + ICU MessageFormat, see ADR 0089). en-US is the source of truth; the others are translated bundles.
SupportedLocale-
UntpIdGranularity-
UntpRole-
WalletEventType-
WalletNotificationChannelWallet platform materializing a loyalty card, able to receive push notifications attached to the pass.

Functions

FunctionDescription
formatBalanceFormat a balance using the client's native/fee units or the token metadata.
isSupportedEmailLocaleType guard to check if a value is a supported email locale. Uses the supportedEmailLocaleSchema as the canonical source of truth.