References
Enumerations
Enumeration | Description |
---|---|
CryptoErrorType | Error types for cryptographic operations. |
IFrameApiErrorType | Error types for iframe API integration. |
JwtErrorType | Error types for JWT handling and validation. |
KeybanNetwork | The 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. |
SdkErrorTypes | Enum representing all possible SDK error types. |
Classes
Class | Description |
---|---|
CryptoError | Error thrown when a cryptographic operation fails. |
IFrameApiError | Error thrown by the iframe API server/client layer. |
JwtError | Error thrown when JWT validation fails or a token is malformed. |
KeybanAccount | Abstract 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. |
KeybanBaseError | The 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. |
KeybanClient | Main 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. |
SdkError | Class representing an SDK-specific error. |
Interfaces
Interface | Description |
---|---|
ClientShareProvider | Represents a storage provider for the client share. |
IKeybanAccount | Account service contract. |
IKeybanApi | Aggregated API surface exposed through the iframe transport. |
IKeybanAuth | Authentication service contract. |
IKeybanClientShareStorage | Storage for persisting and retrieving the MPC client share on the integrator side. |
IKeybanDpp | Digital Product Passport (DPP) operations. |
IKeybanLoyalty | Loyalty operations for wallet passes and tier retrieval. |
IKeybanSigner | MPC signer contract for a given curve (ECDSA/EdDSA). |
KeybanInputRef | Ref interface for KeybanInput component. Provides imperative methods to control the input. |
Type Aliases
Type Alias | Description |
---|---|
Address | Represents an Ethereum address in hexadecimal format. |
ApiResult | A tuple representing the result of an API call to the Keyban servers. |
AuthConnection | Represents the types of authentication connections available. |
AuthContext | Represents the authentication context, extending the base authentication state with loading status and methods for various login/logout flows. |
AuthSendOtpArgs | Arguments for sending a One-Time Password (OTP). |
AuthSignInArgs | Arguments for signing in a user. |
AuthSignUpArgs | Arguments for signing up a user using email and password. |
Balance | Represents a balance with optional metadata. |
BaseAuth | Represents the authentication state of the user. |
EstimateERC20TransferParams | Parameters to estimate an ERC‑20 transfer, without fees. Derived from TransferERC20Params by omitting fees . |
EstimateNftTransferParams | Parameters to estimate an NFT transfer, without fees. Derived from TransferNftParams by omitting fees . |
EvmFeeDetails | EIP‑1559 fee parameters for EVM transactions. Used by EVM account transfer methods to override gas pricing when needed. |
FeeDetails | - |
FeesEstimation | Represents 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) |
FeesUnit | Represents the unit of fees in a specific blockchain. |
FormatedBalanceProps | Props for the FormattedBalance component. |
Hash | Represents a cryptographic hash value in hexadecimal format. |
Hex | Represents a hexadecimal value in blockchain-related contexts. |
KeybanApiStatus | - |
KeybanAssetTransfer | - |
KeybanClientConfig | Configuration options for initializing the Keyban client. |
KeybanInputProps | Props for the KeybanInput component. |
KeybanNftBalance | - |
KeybanOrder | - |
KeybanProviderProps | Defines the properties for the KeybanProvider component. |
KeybanToken | - |
KeybanTokenBalance | - |
KeybanUser | - |
LoyaltyRewardTier | Loyalty reward tier information. |
NativeCurrency | Represents the native currency of a blockchain network. |
Order | - |
OrderItem | - |
PaginatedData | An object representing a paginated data API result. |
PaginationArgs | Arguments for paginating a collection. |
PaginationExtra | An object allowing extra interactions with the Keyban API. |
Prettify | - |
StellarFeeDetails | Stellar 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). |
TransferERC20Params | Parameters for transferring ERC‑20-like fungible tokens. |
TransferNftParams | Parameters for transferring NFTs (ERC‑721 / ERC‑1155 on EVM chains). |
Variables
Variable | Description |
---|---|
KeybanInput | KeybanInput 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
Function | Description |
---|---|
formatBalance | Format a balance using the client's native/fee units or the token metadata. |
FormattedBalance | A React component that formats and displays a balance. |
KeybanProvider | Provider 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. |
useFormattedBalance | Formats 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 |
useKeybanAccount | Retrieves the current KeybanAccount associated with the Keyban client. |
useKeybanAccountBalance | Hook to retrieve and subscribe to the balance of a Keyban account. |
useKeybanAccountNft | The 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. |
useKeybanAccountNfts | Returns an ApiResult of the NFTs of an account. |
useKeybanAccountOrders | Returns an ApiResult tuple for the orders history of an account. |
useKeybanAccountTokenBalance | The 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. |
useKeybanAccountTokenBalances | Returns an ApiResult of the ERC20 tokens of an account. |
useKeybanAccountTransferHistory | Returns an ApiResult tuple for the transfer history of an account. |
useKeybanAuth | Custom hook to access the Keyban authentication context. |
useKeybanClient | Hook to access the Keyban SDK functionalities within a React component. |