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

@carv_admin/carv-id-tg-sdk

v0.0.5

Published

<p align="center"> <img src="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='64'%20height='64'%20rx='32'%20fill='%23713FFE'/%3e%3crect%20x='1'%20y='1'

Downloads

13

Readme

The SDK for CARV ID ecosystem. (Only Telegram is supported.)

  • CARV ID SDK
  • CARV ID SDK Widget

🎾 Demo

📒 Memo

💊 Usage

1、UMD

<script src="https://cdn.jsdelivr.net/npm/@carv_admin/carv-id-tg-sdk@latest/dist/carv-id-tg-sdk.umd.js" defer></script>

<script>
 window.onload = function () {
  const CarvIdInstance = new CarvIdSDK.CarvId({
    showWidget: true,
    authorizeConfig: {
      client_id: "0a17299349c4b3e57bc8c25581b01bd0ec80c279",
      client_secret:
        "871cc95ca5a54866492bb052e0d487799e21a5c5896b7cd2ecbe813876a4b286",
      response_type: "code",
      state: "test app state",
      scope: "carv_id_basic_read email_basic_read evm_address_basic_read",
      redirect_uri: "https://t.me/BabyChinBot/carv_id_demo"
    }
  });
  console.log(CarvIdInstance, "CARV ID SDK initialized");
}
</script>

2、ES Module

pnpm add @carv_admin/carv-id-tg-sdk
import {
  CarvId,
  Enum_Env,
  Enum_CarvIdTheme,
  Enum_CarvIdIconPlacement,
} from "@carv_admin/carv-id-tg-sdk";

window.onload = function() => {
  const CarvIdInstance = new CarvId({
    env: Enum_Env.DEV,
    theme: Enum_CarvIdTheme.LIGHT,
    showWidget: true,
    widgetOptions: {
      size: "60px",
      placement: Enum_CarvIdIconPlacement.BOTTOM_RIGHT
    },
    onLoad: (data) => {
      console.log("onLoad", data);
    },
    onAuthSuccess: (data) => {
      console.log("onAuthSuccess", data);
    },
    onAuthFailed: (data) => {
      console.log("onAuthFailed", data);
    }
  });
  console.log(CarvIdInstance, "CARV ID SDK initialized");
}

🧩 Methods

// Initialize
const carvIdInstance = new CarvId(Options: I_CarvIdOptions)

🔹 authenticateUser: () => void

// Start authorization process
carvIdInstance.authenticateUser();

🔹 openIdentityPage: () => void

// Open CARV ID identity page
carvIdInstance.openIdentityPage();

🔹 handleAuthCallback: Promise<I_AuthenticateResponse>

// Callback triggered after authorization
CarvIdInstance.handleAuthCallback().then((res: I_AuthenticateResponse) => {
  // {code: string, state: string}
  console.log(res, "handleAuthCallback");
  if (res.code) {
    console.log("Authorize success", res.code);
  }
});

🛠️ Options

🔸 I_CarvIdOptions

interface I_CarvIdOptions {
  env?: Enum_Env;
  theme?: Enum_CarvIdTheme;
  showWidget?: boolean;
  widgetOptions?: I_CarvIdWidgetOptions;
  authorizeConfig: I_CarvIdAuthorizeConfig;
  onLoad?: (data: CarvId) => void;
  onAuthSuccess?: (data: I_AuthenticateResponse) => void;
  onAuthFailed?: (data: I_AuthenticateResponse) => void;
}

| Field | Description | Type | Default | | ---------------- | ------------------------------------------------------ | -------------------------------------- | ---------------------- | | env | Environment | Enum_Env | Enum_Env.PROD | | theme | Theme mode | Enum_CarvIdTheme | Enum_CarvIdTheme.LIGHT | | showWidget | Show widget icon | Boolean | false | | widgetOptions | Widget options | I_CarvIdWidgetOptions | undefined | | authorizeConfig | Configuration for authorization | I_CarvIdAuthorizeConfig | undefined | | onLoad | Callback that triggered after SDK initialized | (data: CarvId) => void | undefined | | onAuthSuccess | Callback that triggered after authorization successful | (data: I_AuthenticateResponse) => void | undefined | | onAuthFailed | Callback that triggered after authorization failed | (data: I_AuthenticateResponse) => void | undefined |

🔸 I_CarvIdWidgetOptions

interface I_CarvIdWidgetOptions {
  theme?: Enum_CarvIdTheme;
  size?: string;
  className?: string;
  draggable?: boolean;
  watchResize?: boolean;
  rememberPosition?: boolean;
  placement?: Enum_CarvIdIconPlacement;
  offset?: I_CarvIdIconPlacementOffset;
}

| Field | Description | Type | Default | | ---------------- | ------------------------------- | --------------------------- | -------------------------------------------- | | theme | Theme mode | Enum_CarvIdTheme | Enum_CarvIdTheme.LIGHT | | size | Icon size | String | "48px" | | placement | Icon placement | Enum_CarvIdIconPlacement | Enum_CarvIdIconPlacement.BOTTOM_RIGHT | | offset | The offset config for placement | I_CarvIdIconPlacementOffset | { left: 20, right: 20, top: 40, bottom: 60 } | | className | The class name of widget | String | "" | | draggable | Enable drag interaction | Boolean | true | | watchResize | Watch the resize event | Boolean | true | | rememberPosition | Remember icon position | Boolean | true |

🧿 Turborepo

This project generated from a Turborepo starter. Run the following command to init a new project:

npx create-turbo@latest -e with-vite

And this project includes the following packages and apps:

- Apps

  • carv-id-sdk-demo: used for testing SDK

- Packages

  • docs: a vanilla vite ts app
  • web: another vanilla vite ts app
  • @carvid/carv-id-tg-sdk: a CARV ID core component
  • @carvid/utils: a stub utility library shared by all applications
  • @carvid/eslint-config: shared eslint configurations
  • @carvid/typescript-config: tsconfig.jsons used throughout the monorepo

🦴 Utils

This Turborepo has some additional tools already setup for you: