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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@thencc/dapi-lib

v0.0.17

Published

The NCC dAPIs SDK is a TypeScript library that provides a convenient way to access NCC's decentralized APIs. It aims to simplify the integration process and streamline the development of Typescript applications that interact with NCC's dAPIs.

Downloads

14

Readme

NCC dAPIs Typescript SDK

The NCC dAPIs SDK is a TypeScript library that provides a convenient way to access NCC's decentralized APIs. It aims to simplify the integration process and streamline the development of Typescript applications that interact with NCC's dAPIs.

Features

  • Access NCC's decentralized APIs easily
  • Currently supports the following workflows:
    • Peels
    • Users
    • TTM
    • Bricks
    • Impression
    • LiNR
    • getAccessToken
    • listAccounts
  • Provides TypeScript typings for improved development experience

Installation

To use the NCC dAPIs SDK, follow these steps:

  1. Ensure that you have Node.js (version X.X.X) and npm (version X.X.X) installed on your machine.
  2. Clone the repository:
    git clone https://github.com/thencc/dapi-lib.git
  3. Navigate to the project directory:
    cd dapi-lib
  4. Install the dependencies:
    npm install

Usage

Local development

Generating JS Schemas

To generate JavaScript schemas from the main branch of NCC_dAPIs comment stubs, follow these steps:

  1. Make sure you have Docker installed on your machine as a prerequisite.
  2. Have a personal access token with the repo and package scopes enabled. Export it as an ENV variable named GIT_ACCESS_TOKEN.
  3. Run the following command:
    npm run reschema
    This command will generate the JS schemas based on the comment stubs in the main branch of NCC_dAPIs repository.
  4. Now, you can add new types to src/model.ts such as:
    // Note: a new URL path, aka "/new/valid-url" in the example, 
    //  will be auto-completed if it is a valid part of the generated schema
    export type NewParams = paths["/new/valid-url"]["post"]["requestBody"]["content"]["application/json"];
    export type NewSuccessResponse = paths["/new/valid-url"]["post"]["responses"]["200"]["content"]["application/json"];
    
    // Note: add your new param type definition to the "ValidParams" type
    export type ValidParams = AccessTokenParams | NewParams;

Running Tests

To run Jest tests for the NCC dAPIs SDK, follow these steps:

  1. Make sure you have a running Algorand sandbox node connected to the Testnet as a prerequisite.
  2. Run the following command:
    npm run test
    This command will execute the Jest test suite for the SDK, ensuring its proper functionality.

Contributing

Contributions to the NCC dAPIs SDK are welcome! If you encounter any issues or have suggestions for improvements, please create a new issue or submit a pull request.