Using Skip API Key

Skip has added a layer of authentication to their APIs, for which they have asked to pass API Key in all the API calls. Although its optional but this will help in data tracking and enable addition

Integration Options

The Elements SDK allows integration with Skip APIs in two ways:

  1. Without API Key: Basic integration with some feature restrictions.

  2. With API Key: Full integration using an API Key for enhanced functionality.

Elements SDK allows you to integrate with both options with and without API key.

1. No API Key setup

This setup provides basic access to Skip API with some restrictions on features.

2. With API Key

Using Leap Integrator ID (for Skip API Access)

For security purposes you will not be using actual API KEY in the code, instead use our integratorID

import {
  ElementsProvider,
  Swaps,
  WalletType,
  initCachingLayer,
  AsyncIDBStorage,
  setLeapIntegratorID,
} from '@leapwallet/elements'
import '@leapwallet/elements/styles.css'


// Reach out to us, and we will share the integratorID with you
setLeapIntegratorID(INTEGRATOR_ID)


const YourDapp = ({ connectedWalletName }) => {
  // trigger the dApp's connect wallet flow
  const connectWallet = () => {}
  
  // set this to the currently connected wallet
  const connectedWalletType = WalletType.LEAP

  // .leap-ui is required for the styles to be applied correctly
  return (
    <div className="leap-ui">
      <ElementsProvider
        connectWallet={connectWallet}
        connectedWalletType={connectedWalletType}
      >
        <Swaps />
      </ElementsProvider>
    </div>
  )
}

Use your own API Key (provided by Skip)

If you have your own API Key, we will generate a unique integrator ID for you. You can then use this integrator ID in your integration as described above.

Steps to Integrate with Your API Key:

  1. Obtain your API Key from Skip.

  2. Contact us to receive your unique integrator ID.

  3. Use the integrator ID in your code (following the example above).

Additional Information

  • Leap Integrator ID: Use the integrator ID provided by Leap for secure access.

  • API Key: If you have your own API Key, use the corresponding integrator ID for full access to Skip API features.

Last updated