Skip to main content

References

Enumerations

EnumerationDescription
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
KeybanAccountA KeybanAccount represents a user's account in the Keyban system. It provides methods to interact with the blockchain, including signing messages, fetching balances, transferring tokens, and estimating transaction costs.
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.
KeybanClientShareProviderA client share provider implementation for the Keyban client.
SdkErrorClass representing an SDK-specific error.

Interfaces

InterfaceDescription
ClientShareProviderRepresents a storage provider for the client share.
SignInPropsConfiguration options for the SignIn component.

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.
BalanceRepresents a balance with optional metadata.
BaseAuthRepresents the authentication state of the user.
EstimateERC20TransferParamsRepresents the parameters required to estimate an ERC20 token transfer, excluding the transaction options.
EstimateNftTransferParamsParameters required to estimate the transfer of an NFT, excluding transaction options.
FeesEstimationRepresents the estimation of fees for a transaction.
FeesUnitRepresents the unit of fees in a specific blockchain.
FormatedBalancePropsProps for the FormattedBalance component.
GqlwalletTokenBalancesQuery-
HashRepresents a cryptographic hash value in hexadecimal format.
HexRepresents a hexadecimal value in blockchain-related contexts.
KeybanApiStatusRepresents the status of the Keyban API.
KeybanAssetTransfer-
KeybanClientConfigConfiguration options for initializing the Keyban client.
KeybanNftBalance-
KeybanProviderPropsDefines the properties for the KeybanProvider component.
KeybanToken-
KeybanTokenBalance-
KeybanUser-
NativeCurrencyRepresents the native currency of a blockchain network.
PaginatedDataAn object representing a paginated data API result.
PaginationArgsArguments for paginating a collection.
PaginationExtraAn object allowing extra interactions with the Keyban API.
TransactionOptionsRepresents the options for a transaction. see KeybanAccount#transfer
TransferERC20ParamsRepresents the parameters for transferring ERC20 tokens.
TransferNftParamsRepresents the parameters for transferring ERC721 and ERC1155 tokens.

Variables

VariableDescription
KeybanAuthContextReact Context for managing and providing authentication state and functions.

Functions

FunctionDescription
formatBalanceFormats the balance into a human-readable string with the appropriate decimals and symbol.
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.
SignInSignIn component renders a sign-in form with email and password fields, along with options to sign in with Google or Facebook, and a link to sign up. It includes validation for email and password fields and displays error messages if the inputs are invalid.
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.
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 of 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.