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

@verityguard/emblem-sdk-client

v1.5.1

Published

Client SDK for interacting with the Emblem API

Readme

Emblem SDK Client

Client SDK for interacting with the Emblem API

Installation

npm install @verityguard/emblem-sdk-client

or

yarn add @verityguard/emblem-sdk-client

Usage

import React, { useRef } from 'react';
import { EmblemButton } from '@verityguard/emblem-sdk-client';

function App() {
  const closeWindowRef = useRef<() => void>();

  useEffect(() => {
    if (completed) {
      closeWindowRef.current?.();
    }
  }, [completed]);

  return (
    <div>
      <EmblemButton
        url="https://emblem.generflow.com"
        projectKey="public_key_1234"
        state="state1234"
        style={{ marginRight: "1rem", border: "1px solid gray" }}
        postbackUrl="https://example.com/postback"
        postbackHeaders={JSON.stringify({ 'x-gateway': 'abcd-1234' })}
        onSuccessUrl="https://example.com/redirect"
        onClickCallback={() => console.log("onClick callback")}
        assignCloseWindow={(closeFn) => {
          closeWindowRef.current = closeFn;
        }}
        openInNewTab
      />
    </div>
  );
}

export default App;

EmblemButton Props

| Prop | Type | Required | Description | | ----------------- | ------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | url | string | true | Emblem host url | | projectKey | string | true | Project key is provided by Emblem | | state | string | true | State is a unique identifier for the user provided by the integrator (you). This can be JSON encoded if you want to store more data with it. Emblem will pass this string along through every step | | postbackUrl | string | true | URL that Emblem will send a POST request to after the user completes the age verification flow | | postbackHeaders | string | false | JSON stringified object that will be url encoded within the button component. These headers will be included with the POST request | | postbackOverride | boolean | false | If true, only the postback will be sent. The POST to the project key's verification url will not be sent | | onSuccessUrl | string | false | If provided the user will be redirected to this url on successful verification | | onClickCallback | function | false | This function will be called in addition to opening the Emblem window | | label | string | false | Custom button text | | className | string | false | Custom CSS class | | style | object | false | Custom style object | | assignCloseWindow | (closeFunc: () => void) => void | false | Allows implementers to receive a function that can be used to programmatically close the opened Emblem window on-demand | | openInNewTab | boolean | false | If true, the Emblem window will be opened in a new tab instead of a new window. This property is a no-op when onSuccessUrl is set. |

interface Props {
  url: string;
  projectKey: string;
  state: string;
  postbackUrl: string;
  postbackHeaders?: string;
  postbackOverride?: boolean; 
  onSuccessUrl?: string;
  onClickCallback?: () => void;
  label?: string;
  className?: string;
  style?: CSSProperties;
  assignCloseWindow?: (closeFunc: () => void) => void;
  openInNewTab?: boolean;
}

Contributing

If you have suggestions for how emblem-sdk-client could be improved, or want to report a bug, open an issue! We'd love all and any contributions.