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
1. No API Key setup
2. With API Key
Using Leap Integrator ID (for Skip API Access)
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)
Additional Information
Last updated