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

@kub-chain/contracts

v1.0.0

Published

A library of Solidity smart contracts implementing the KAP token standards and supporting access-control, KYC, and utility primitives for the KUB Chain (https://kubchain.com/) ecosystem.

Readme

KUB Contracts

A library of Solidity smart contracts implementing the KAP token standards and supporting access-control, KYC, and utility primitives for the KUB ecosystem.

Overview

This repository provides reusable, abstract base contracts for building KAP-compliant tokens and applications on KUB:

  • KAP token standards - fungible (KAP-20, KAP-22), non-fungible (KAP-721), and multi-token (KAP-1155) implementations.
  • Access control — owner, committee, and project-router-based authorization models.
  • KYC integration — hooks into KUB's on-chain KYC registry to enforce KYC-level requirements.
  • Utilities & libraries — pausing, introspection (KAP-165), and gas-efficient enumerable data structures.

All contracts target Solidity ^0.8.0 and are released under the MIT license.

Repository structure

contracts/
├── token/
│   ├── KAP-20/      Fungible token standard (ERC-20-like) with KYC + admin routing
│   ├── KAP-22/      Period/stamp-based fungible token with transfer routing & whitelist
│   ├── KAP-721/     Non-fungible token standard (ERC-721-like), enumerable + metadata
│   └── KAP-1155/    Multi-token standard (ERC-1155-like), enumerable + metadata
├── access/          Ownable, Committee, Authorization(KAP), AccessController(KAP)
├── kyc/             KYCHandler — KYC level enforcement against the KUB KYC registry
├── utils/           Pausable, Context, KAP-165 introspection
├── libs/            Address, String, EnumerableSet (uint/address), EnumerableMap
└── interfaces/      IAdminProjectRouter, IKYCBitkubChain

Token standards

| Standard | Type | Description | | --- | --- | --- | | KAP-20 | Fungible | ERC-20-style token integrated with KYC, the admin project router, committee control, and a transfer router. | | KAP-22 | Fungible | Period-based ("stamp") token tracking balances per period, with a transfer router and address whitelist. | | KAP-721 | Non-fungible | ERC-721-style NFT with enumerable and metadata extensions. | | KAP-1155 | Multi-token | ERC-1155-style token with enumerable and metadata extensions. |

Access & KYC

  • Ownable / Committee — single-owner and committee-governed roles.
  • Authorization / AuthorizationKAP — permissioning via an AdminProjectRouter.
  • AccessController / AccessControllerKAP — compose Ownable, Committee, Authorization, and KYCHandler, adding helpers such as onlyOwnerOrCommittee and transfer-router management.
  • KYCHandler — stores the accepted KYC level and toggles whether only KYC-verified addresses may interact, validating against IKYCBitkubChain.

Usage

These are abstract base contracts intended to be inherited and configured by your concrete token. For example, a KAP-20 token is constructed with its name, symbol, project name, decimals, and the addresses of the KYC registry, admin project router, committee, and transfer router, along with the accepted KYC level:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {KAP20} from "./contracts/token/KAP-20/KAP20.sol";

contract MyToken is KAP20 {
    constructor(
        address kyc,
        address adminProjectRouter,
        address committee,
        address transferRouter
    )
        KAP20(
            "My Token",      // name
            "MTK",           // symbol
            "my-project",    // project name
            18,              // decimals
            kyc,
            adminProjectRouter,
            committee,
            transferRouter,
            4                // accepted KYC level
        )
    {}
}

Use the contracts as provided rather than copying and modifying them, so deployments stay consistent with the KAP standards and KUB's KYC and admin-routing requirements. For more information, visit KUB Docs.

Security

These contracts integrate with privileged roles (owner, committee, admin project router) and an external KYC registry. Configure those addresses carefully, and review the access-control wiring before deploying to mainnet. Using this code is not a substitute for an independent security audit.

License

Released under the MIT License.