yarn add @human.tech/passport-embedSee the dev server for example advanced usage, although generally the following will suffice:
import React from 'react';
import { PassportScoreWidget } from '@human.tech/passport-embed';
const App = () => {
return (
{/* ... */}
<PassportScoreWidget
apiKey="API_KEY"
address="0x..."
scorerId="5"
collapseMode="overlay" /* or "shift" or "off" */
connectWalletCallback={/* your app's connect button callback */}
generateSignatureCallback={/* your app's wallet signature callback */}
/>
{/* ... */}
);
};Accepts a theme prop which can be used to customize the widget's appearance.
See PassportWidgetTheme. Colors are in R, G, B format.
# Install dependencies
yarn setup
# Start the development server
yarn dev:mockSee playground.