Using the Kima SDK Without the Widget

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.

Transaction Flow

  1. User selects the origin and target chains and amount

  2. User approves Kima to transfer origin tokens

  3. The transaction details are submitted to the Kima Transaction Backend

  4. 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.

Last updated