Skip to content
Docs · Widget

AllowanceGuard Widget

A drop-in security component you can paste into any website. Configure it below, copy the snippet, and your users get an approval scanner without leaving your page.

Pending store approval

The browser extension is built and submitted to the Chrome Web Store and Firefox Add-ons. Reviewer approval is pending. The configuration playground below works today; install snippets will go live the moment the extension lands in each store.

Live Preview

Real-time preview

AllowanceGuard

No allowances found

Configuration

Customize widget

Demo wallet (Vitalik's address)

Generated Code

React Component

<AllowanceGuardWidget
  walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  chainId={1}
  showRiskOnly={false}
  maxItems={5}
  theme="light"
  compact={false}
  onAllowanceClick={(allowance) => {
    console.log('Allowance clicked:', allowance)
  }}
/>

HTML/JavaScript

<!DOCTYPE html>
<html>
<head>
  <title>My DeFi App</title>
  <script src="https://unpkg.com/allowance-guard-widget@latest/dist/widget.js"></script>
</head>
<body>
  <div id="allowance-guard-widget"></div>
  
  <script>
    AllowanceGuardWidget.init({
      container: '#allowance-guard-widget',
      walletAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
      chainId: 1,
      showRiskOnly: false,
      maxItems: 5,
      theme: 'light',
      compact: false,
      onAllowanceClick: (allowance) => {
        console.log('Allowance clicked:', allowance)
      }
    })
  </script>
</body>
</html>

Installation

The configuration above is real and runs against the live API. The install snippets below are previews of what the published install flow will look like once the extension lands in each store.

What you can do today

  • · Use the REST API v1 to scan wallets — see API Reference.
  • · Clone the Node.js SDK from /sdk.
  • · Subscribe to the GitHub repo to be notified when the extension publishes.

React (preview)

Pending

1. Install (when published):

npm install allowance-guard-widget

2. Use:

<AllowanceGuardWidget
  walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  chainId={1}
  showRiskOnly={false}
  maxItems={5}
  theme="light"
  compact={false}
  onAllowanceClick={(allowance) => {
    console.log('Allowance clicked:', allowance)
  }}
/>

HTML (preview)

Pending

1. Include the script:

<script src="https://cdn.allowanceguard.com/widget.js"></script>

2. Mount and initialise:

<div id="allowance-guard"></div>
AllowanceGuard.init({...})

Widget Properties

PropertyTypeDefaultDescription
walletAddressstring-The wallet address to display allowances for
chainIdnumber1The blockchain chain ID to filter by
showRiskOnlybooleanfalseShow only high-risk allowances
maxItemsnumber10Maximum number of allowances to display
themestring'light'Widget theme: 'light', 'dark', or 'auto'
compactbooleanfalseUse compact display mode
onAllowanceClickfunction-Callback when an allowance is clicked
Allowance Guard