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
      • Credit Card Transactions
      • Payment Mode
      • Bridge Mode
      • Status Mode
      • Configuration Options
    • Upgrading
      • v1.4.x
    • Using the Kima SDK Without the Widget
      • Transaction Data
      • Message Signing
      • 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

Using the Kima SDK Without the Widget

Previousv1.4.xNextTransaction Data

Last updated 3 months ago

CtrlK
  • Using Kima SDK without the widget
  • Transaction Flow
  • Reference Implementation
  • Selecting Chains and Amount
  • Supported Chains and Tokens

Using Kima SDK without the widget

The Kima Widget serves as a reference implementation written in React. If your project uses another framework, or you want to make a custom component, it’s possible to interact with the Kima Transaction Backend directly. But:

🚨 CREDIT CARD TRANSACTIONS ARE ONLY SUPPORTED USING THE WIDGET 🚨

The frontend kima-transaction-widget is required as it must handle KYC and interactions with 3rd party widgets.

Transaction Flow

  1. User selects the origin and target chains and amount

  2. Fetch the service fees from Kima to obtain a feeId

  3. User signs a message containing the transaction details

  4. User approves Kima to transfer the origin tokens on their behalf

  5. The transaction details are submitted to the Kima Transaction Backend including the signed message and feeId

  6. The UI polls the Kima GraphQL endpoint for status updates until the transaction has completed

Reference Implementation

The React component on the Kima Github:

@Kimafinance/kima-transaction-widget

Selecting Chains and Amount

The frontend component will need to provide the following information. This will be used to calculate the service fee and the approval for Kima to move tokens on behalf of the user.

  • Origin (from)

    • chain: this is the chain the user tokens will come from

    • token: the (stable coin) token the user will pay with (or bridge from)

    • address: the source user address- i.e. the connected user

    • amount: the amount of tokens to transfer

  • Target (to)

    • Chain: the destination chain

    • Token: the (stable coin) token being delivered

      • In a payment scenario this will be the same as the origin token

    • Address: the receiving address

      • In a bridge transaction this will be same as the connected user

Supported Chains and Tokens

See the list of chains and tokens in the Supported Blockchains section.