References
Enumerations
Enumeration | Description |
---|---|
KeybanChain | The KeybanChain 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 |
---|---|
KeybanAccount | The KeybanAccount class 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. |
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 |
---|---|
FeesUnit | Represents the unit of fees in a specific blockchain. |
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. |
Balance | Represents a balance with optional metadata. |
EncryptedData | Type representing the encrypted data. |
EstimateERC20TransferParams | Represents the parameters required to estimate an ERC20 token transfer, excluding the transaction options. |
EstimateNftTransferParams | Parameters required to estimate the transfer of an NFT, excluding transaction options. |
FeesEstimation | Represents the estimation of fees for a transaction. |
FormatedBalanceProps | Props for the FormattedBalance component. |
GqlwalletTokenBalancesQuery | - |
Hash | Represents a cryptographic hash value in hexadecimal format. |
Hex | Represents a hexadecimal value in blockchain-related contexts. |
KeybanApiStatus | Represents the status of the Keyban API. |
KeybanAssetTransfer | - |
KeybanClientConfig | Configuration options for the Keyban client. |
KeybanNftBalance | - |
KeybanProviderProps | Props for the KeybanProvider component, which includes KeybanClientConfig properties. |
KeybanToken | - |
KeybanTokenBalance | - |
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. |
TransactionOptions | Represents the options for a transaction. see KeybanAccount#transfer |
TransferERC20Params | Represents the parameters for transferring ERC20 tokens. |
TransferNftParams | Represents the parameters for transferring ERC721 and ERC1155 tokens. |
Functions
Function | Description |
---|---|
decrypt | Decrypts the given encrypted data using the provided key. |
encrypt | Encrypts the given data using the provided JsonWebKey. |
formatBalance | Formats the balance into a human-readable string with the appropriate decimals and symbol. |
FormattedBalance | A React component that formats and displays a balance. |
generateKey | Generates a cryptographic key and exports it in JSON Web Key (JWK) format. |
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. |
useKeybanAccountTokenBalances | Returns an ApiResult of the ERC20 tokens of an account. |
useKeybanAccountTransferHistory | Returns an ApiResult of the transfer history of an account. |
useKeybanClient | Hook to access the Keyban SDK functionalities within a React component. |