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
Last updated
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
Last updated
The Elements SDK allows integration with Skip APIs in two ways:
Without API Key: Basic integration with some feature restrictions.
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.
This setup provides basic access to Skip API with some restrictions on features.
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>
)
}
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:
Obtain your API Key from Skip.
Contact us to receive your unique integrator ID.
Use the integrator ID in your code (following the example above).
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.