Installation
Install Khizab via your package manager, a <script>
tag, or build from source.
Package Manager
Install the required packages.
pnpm add khizab @aptos-labs/[email protected] @tanstack/react-query
pnpm add khizab @aptos-labs/[email protected] @tanstack/react-query
npm install khizab @aptos-labs/[email protected] @tanstack/react-query
npm install khizab @aptos-labs/[email protected] @tanstack/react-query
yarn add khizab @aptos-labs/[email protected] @tanstack/react-query
yarn add khizab @aptos-labs/[email protected] @tanstack/react-query
bun add khizab @aptos-labs/[email protected] @tanstack/react-query
bun add khizab @aptos-labs/[email protected] @tanstack/react-query
- Aptos Sdk is an SDK for accessing the Aptos blockchain data, submitting transactions, and more!.
- TanStack Query is an async state manager that handles requests, caching, and more.
- TypeScript is optional, but highly recommended. Learn more about TypeScript support.
CDN
If you're not using a package manager, you can also use Khizab via an ESM-compatible CDN such as esm.sh. Simply add a <script type="module">
tag to the bottom of your HTML file with the following content.
<script type="module">
import React from 'https://esm.sh/[email protected]'
import { QueryClient } from 'https://esm.sh/@tanstack/react-query'
import { createClient } from 'https://esm.sh/@aptos-labs/[email protected]'
import { createConfig } from 'https://esm.sh/khizab'
</script>
<script type="module">
import React from 'https://esm.sh/[email protected]'
import { QueryClient } from 'https://esm.sh/@tanstack/react-query'
import { createClient } from 'https://esm.sh/@aptos-labs/[email protected]'
import { createConfig } from 'https://esm.sh/khizab'
</script>
Check out the React docs for info on how to use React without JSX.
Requirements
Khizab is optimized for modern browsers. It is compatible with the following browsers.
- Chrome 64+
- Edge 79+
- Firefox 67+
- Opera 51+
- Safari 12+
Using Unreleased Commits
If you can't wait for a new release to test the latest features, you can either install from the canary
tag (tracks the main
branch).
pnpm add khizab@canary
pnpm add khizab@canary
npm install khizab@canary
npm install khizab@canary
yarn add khizab@canary
yarn add khizab@canary
bun add khizab@canary
bun add khizab@canary
Or clone the Khizab repo to your local machine, build, and link it yourself.
gh repo clone khizab/khizab
cd khizab
pnpm install
pnpm build
cd packages/react
pnpm link --global
gh repo clone khizab/khizab
cd khizab
pnpm install
pnpm build
cd packages/react
pnpm link --global
Then go to the project where you are using Khizab and run pnpm link --global khizab
(or the package manager that you used to link Khizab globally). Make sure you installed the required peer dependencies and their versions are correct.