Basic Usage

Get started quickly with these simple examples.

Quick Start - Widget

The fastest way to display reputation data:

<!DOCTYPE html>
<html>
<head>
  <title>DotPassport Widget</title>
</head>
<body>
  <div id="widget"></div>

  <script type="module">
    import { createWidget } from '@dotpassport/sdk';

    createWidget({
      apiKey: 'your_api_key',
      address: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
      type: 'reputation'
    }).mount('#widget');
  </script>
</body>
</html>

Quick Start - API Client

Fetch reputation data programmatically:


Widget Types

Reputation Widget

Shows overall reputation score with category breakdown:

Badge Widget

Displays earned achievement badges:

Profile Widget

Shows user profile with identity information:

Category Widget

Displays a specific reputation category:


API Methods

Get Scores

Get Badges

Get Profile


React Example


Vue Example


Error Handling


Themes


Last updated