npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goodsdks/ui-components

v1.0.7

Published

The `claim-button` web component provides a simple and interactive way for users to claim Universal Basic Income (UBI) in the form of GoodDollars (G$) on supported blockchain networks (Celo, Fuse, and XDC). It integrates with the GoodDollar ecosystem to m

Downloads

45

Readme

Claim Button Web Component

The claim-button web component provides a simple and interactive way for users to claim Universal Basic Income (UBI) in the form of GoodDollars (G$) on supported blockchain networks (Celo, Fuse, and XDC). It integrates with the GoodDollar ecosystem to manage wallet connections, eligibility checks, and token claims, offering a seamless experience for users within any web application.

What It Does

The claim-button enables users to:

  • Connect their cryptocurrency wallet (via Reown AppKit).
  • Check their eligibility to claim G$ tokens based on the GoodDollar protocol.
  • If this is a new user, they will be guided through our Face-Verification flow
  • Claim their UBI with a single click, handling all blockchain transactions.
  • View their G$ token balance.
  • See a countdown timer until their next claim if they’ve already claimed for the current period.
  • Switch between supported chains (Celo, Fuse, and XDC) if entitlements are available on another network.

How to Use It

You can integrate the claim-button into your project in two ways:

Option 1: Using the Standalone Script

Can be used in any website, for a quick setup:

  1. Download the Script: Download the claim-button.global.js file from the project releases or build it from the source.
  2. Include in HTML: Add the script to your HTML file.
  3. Add the Component: Use the <claim-button> tag where you want it to appear.
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Claim Button Example</title>
  </head>
  <body>
    <claim-button id="claimBtn" environment="production"></claim-button>
    <script src="path/to/claim-button.global.js"></script>
    <script type="module">
      // Wait for the component to be defined
      customElements.whenDefined("claim-button").then(() => {
        const claimBtn = document.getElementById("claimBtn")
        claimBtn.appkitConfig = {
          projectId: "71dd03d057d89d0af68a4c627ec59694",
          metadata: {
            name: "AppKit",
            description: "AppKit Example",
            url: "https://example.com",
            icons: ["https://avatars.githubusercontent.com/u/179229932"],
          },
        }
      })
    </script>
  </body>
</html>

Option 2: Using ESM Modules

Note:: see above example for the metadata configuration, for simplicity removed from below examples.

For projects with a modern JavaScript setup:

  1. Install the Package: Add the @goodsdks/ui-components package to your project.
    npm install @goodsdks/ui-components
  2. Import the Component: Import it in your JavaScript or TypeScript file.
    import "@goodsdks/ui-components"
  3. For use in HTML: Place the <claim-button> tag in your template.
    <claim-button environment="production"></claim-button>
  4. For use in React": Place the <claim-button> tag in your render method.
    render(<claim-button environment="production"></claim-button>)

Configurable Options

Customize the claim-button using these properties:

  • environment: Defines the environment for contract interactions.
    • Values: "production", "staging", or "development".
    • Default: "development".
    • Example:
      <claim-button environment="production"></claim-button>
  • appkitConfig: (Set via JavaScript property)
    Provides configuration for wallet connection and custom branding in wallet dialogs.
    • Expected to be an object with at least projectId and a metadata object containing your app's details.
    • Example:
      // In your JavaScript, after the component is defined:
      customElements.whenDefined("claim-button").then(() => {
        document.querySelector("claim-button").appkitConfig = {
          projectId: "YOUR_PROJECT_ID",
          metadata: {
            name: "YourAppName",
            description: "A short app description",
            url: "https://yourapp.example.com",
            icons: ["https://yourapp.example.com/icon.png"],
          },
        }
      })
    • Note: appkitConfig cannot be set as an HTML attribute; it must be set on the element as a property from JavaScript.
  • supportedChains: (Optional property) Restricts the networks presented in the wallet modal and entitlement checks. Provide an array of chain IDs (e.g. [122, 42220, 50]). By default the component enables Fuse, Celo, and XDC.

Additional Notes

  • Dependencies: The component uses @reown/appkit for wallet connections, @goodsdks/citizen-sdk for claim logic, viem for blockchain interactions, and lit for the reactive UI.
  • Supported Chains: Works on Celo, Fuse, and XDC networks. The component automatically rotates between multiple RPC endpoints per chain to mitigate rate limits.
  • Feedback: Displays loading states, success messages, errors, and a countdown timer as needed.

This README provides all you need to get started with the claim-button web component in your web projects!