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

@kifpool/advanced-api-sdk

v0.1.6

Published

Kifpool Advanced API SDK

Downloads

11

Readme

Kifpool Advanced API SDK

Introduction

The @kifpool/advanced-api-sdk is a powerful and flexible SDK for interacting with Kifpool Advanced API. It provides a functional programming approach to interacting with APIs while supporting features such as request simulation, encryption, and logging.

Installation

npm install @kifpool/advanced-api-sdk

or using Yarn:

yarn add @kifpool/advanced-api-sdk

Usage

Importing the SDK

import api from '@kifpool/advanced-api-sdk';

Creating a Connection

To interact with an API, you need to set up a connection using the IConnection interface.

const connection: api.IConnection = {
    host: 'https://something.com',
    simulate: true,
};

Making API Requests

Fetching Fear and Greed Index

api.functional.fear_and_greed.index(connection).then((response) => {
    console.log(response);
});

Fetching Token List with Pagination

async function getTokens() {
    const response = await api.functional.token.index(connection, {page: 1, limit: 10});
    console.log(response);
}

getTokens();

IConnection Interface

The IConnection interface allows you to define the connection settings for the SDK. Below are the available options:

Properties

  • host (string) - The remote HTTP server's host address.
  • headers (object) - Optional custom headers for API requests.
  • simulate (boolean | Partial<IRandomGenerator>) - Enables simulation mode where requests return mock data instead of hitting the API.
  • logger ((event: IFetchEvent) => Promise<void>) - A callback function triggered after fetch events.
  • encryption (IEncryptionPassword | IEncryptionPassword.Closure) - Configures AES-128/256 encryption for secure communication.
  • options (IConnection.IOptions) - Additional options for the fetch function.
  • fetch (typeof fetch) - Custom fetch function, useful for Node.js environments without built-in fetch.

Fetch Options (IConnection.IOptions)

These options allow additional configurations for fetch requests:

  • cache ("default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload") - Determines how the request interacts with the cache.
  • credentials ("omit" | "same-origin" | "include") - Defines how credentials are sent with requests.
  • integrity (string) - Cryptographic hash of the resource.
  • keepalive (boolean) - Enables or disables keepalive mode.
  • mode ("cors" | "navigate" | "no-cors" | "same-origin") - Defines CORS behavior.
  • redirect ("error" | "follow" | "manual") - Determines how redirects are handled.
  • referrer (string) - The referrer URL.
  • referrerPolicy ("no-referrer" | "origin" | "same-origin" | ...) - Defines referrer behavior.
  • signal (AbortSignal | null) - Allows request cancellation.