Kima Network Documentation
  • What is Kima?
  • Supported blockchains
  • Supported tokens
  • Supported fiat currencies and payment methods
  • Adding Kima to your wallet
  • Try Kima with the Demo App
    • The Kima Light Demo App
    • The Kima Advanced Demo App
    • Kima Faucets
    • Kima Block Explorer
  • Become a Kima validator
    • Hardware and operating system requirements
    • Installation
    • Appendix
  • Become a Kima delegator
    • Benefits
    • How does it work?
    • Preparations
    • Delegate
    • Reclaim delegation
  • Become a liquidity provider
    • Benefits
    • Supported blockchains
    • Prepare to provide liquidity
    • Deposit assets in Kima pools
    • Withdraw liquidity
  • Kima governance
    • Draft a proposal
    • On-chain proposal
    • Off-chain proposal
    • References
  • The Kima SDK
    • Kima Use Cases for Developers
    • The Kima Transaction Back End
    • The Kima Transaction Widget
      • Installation
      • React
      • NextJS
      • Payment Mode
      • Bridge Mode
      • Status Mode
      • Configuration Options
    • Upgrading
      • v1.4.x
    • Using the Kima SDK Without the Widget
      • Approval
      • Submitting the Transaction
      • Getting the Transaction Status
  • Further reading
  • Legal
    • Terms and conditions
    • Privacy policy
    • Disclaimer
  • FAQ
Powered by GitBook
On this page
Export as PDF
  1. The Kima SDK
  2. The Kima Transaction Widget

Installation

PreviousThe Kima Transaction WidgetNextReact

Last updated 2 months ago

Add the widget to your React project using npm or your favorite javascript package manager.

npm install @kimafinance/kima-transaction-widget redux react-redux pino-pretty

You'll need to add the following:

  • The <KimaProvider> component in App.tsx

  • The <KimaTransactionWidget> which interacts with Kima

  • A link to the Kima Transaction Backend (or build your own)

  • A WalletConnect project id

For the purposes of this example, we'll just add the widget to App.tsx, but it can go anywhere it makes sense for your project.

Open App.tsx, wrap your existing componts with the <KimaProvider> and add the <KimaTransactionWidget> component.

If you don't have one already, you'll need to get a (free) WallectConnect project ID from and add it to the <KimaProvider> component.

import React from 'react'

import {
  KimaTransactionWidget,
  KimaProvider,
  ModeOptions,
  NetworkOptions,
  ColorModeOptions
} from '@kimafinance/kima-transaction-widget'
import '@kimafinance/kima-transaction-widget/index.css'

const App = () => {
  return (
    <KimaProvider
      walletConnectProjectId='your-project-id'
      networkOption={NetworkOptions.testnet}
    >
      <KimaTransactionWidget
        theme={{ colorMode: ColorModeOptions.light }}
        mode={ModeOptions.bridge}
        kimaBackendUrl='http://localhost:3001'
      />
    </KimaProvider>
  )
}

export default App

In the following sections, we'll go through the framework specific configuration for Vinalla React and NextJS.

Reown Cloud