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.
KeybanNetworkThe KeybanNetwork enumeration defines the various blockchain networks supported by the Keyban SDK. Each member of the enumeration represents a specific blockchain network identified by its unique name.
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.
IKeybanAccountAccount service contract.
IKeybanApiAggregated API surface exposed through the iframe transport.
IKeybanAuthAuthentication service contract.
IKeybanClientShareStorageStorage for persisting and retrieving the MPC client share on the integrator side.
IKeybanDppDigital Product Passport (DPP) operations.
IKeybanLoyaltyLoyalty operations for wallet passes and tier retrieval.
IKeybanSignerMPC signer contract for a given curve (ECDSA/EdDSA).
KeybanInputRefRef interface for KeybanInput component. Provides imperative methods to control the input.

Type Aliases

Type AliasDescription
AddressRepresents an Ethereum address in hexadecimal format.
ApiResultA tuple representing the result of an API call to the Keyban servers.
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.
AuthSendOtpArgsArguments for sending a One-Time Password (OTP).
AuthSignInArgsArguments for signing in a user.
AuthSignUpArgsArguments for signing up a user using email and password.
BalanceRepresents a balance with optional metadata.
BaseAuthRepresents the authentication state of the user.
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.
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.
HashRepresents a cryptographic hash value in hexadecimal format.
HexRepresents a hexadecimal value in blockchain-related contexts.
KeybanApiStatus-
KeybanAssetTransfer-
KeybanClientConfigConfiguration options for initializing the Keyban client.
KeybanInputPropsProps for the KeybanInput component.
KeybanNftBalance-
KeybanOrder-
KeybanProviderPropsDefines the properties for the KeybanProvider component.
KeybanToken-
KeybanTokenBalance-
KeybanUser-
LoyaltyRewardTierLoyalty reward tier information.
NativeCurrencyRepresents the native currency of a blockchain network.
Order-
OrderItem-
PaginatedDataAn object representing a paginated data API result.
PaginationArgsArguments for paginating a collection.
PaginationExtraAn object allowing extra interactions with the Keyban API.
Prettify-
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).
TransferERC20ParamsParameters for transferring ERC‑20-like fungible tokens.
TransferNftParamsParameters for transferring NFTs (ERC‑721 / ERC‑1155 on EVM chains).

Variables

VariableDescription
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.

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.
useKeybanAuthCustom hook to access the Keyban authentication context.
useKeybanClientHook to access the Keyban SDK functionalities within a React component.