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

@akashnetwork/akash-api

v1.4.0

Published

Akash API TypeScript client

Downloads

874

Readme

Akash API TypeScript Bindings

npm version License: Apache-2.0 semantic-release: conventionalcommits

This package provides TypeScript bindings for the Akash API, generated from protobuf definitions.

Installation

To install the package, run:

npm install @akashnetwork/akash-api

Usage

You can import the generated namespaces from the package like this:

import * as akashDeploymentV1beta1 from '@akashnetwork/akash-api/akash/deployment/v1beta1';
import * as akashDiscoveryV1 from '@akashnetwork/akash-api/akash/discovery/v1';
// ... and so on for other namespaces

TypeScript 4.5 and above

If you're using TypeScript 4.5 or above, the package exports all the paths of the generated namespaces, so you can import them directly.

TypeScript below 4.5

If you're using a version of TypeScript below 4.5, the package provides a tsconfig.paths.json file that you can extend in your local TypeScript configuration to resolve the paths. Here's how you can do it: In your tsconfig.json file, add the following:

{
  "extends": "@akashnetwork/akash-api/tsconfig.paths.json"
}

Contributing

Contributions are welcome. Please submit a pull request or create an issue to discuss the changes you want to make.

Contributing to Generated Files

The files in the src/generated directory are auto-generated and should not be modified directly. If you need to make changes to these files, follow the steps below:

  1. Create a new file in the src/patch directory with the same path as the file you want to modify. For example, if you want to modify src/generated/cosmos/base/v1beta1/coin.ts, you should create the directory src/patch/cosmos/base/v1beta1/coin.ts.

  2. Add your changes to a new file in the src/patch directory. The new file should have the same name as the file you want to modify.

  3. Rename the original file in the src/generated directory by appending .original.ts to its name. For example, src/generated/cosmos/base/v1beta1/coin.ts should be renamed to src/generated/cosmos/base/v1beta1/coin.original.ts.

  4. Create a new file in the src/generated directory with the same name as the original file. This new file should re-export everything from the corresponding file in the src/patch directory. For example, the content of src/generated/cosmos/base/v1beta1/coin.ts should be:

export * from '../../../../patch/cosmos/base/v1beta1/coin';

NOTE: Naming and paths are important to prevent the original file from being overwritten when the code is regenerated. See script/preserve-ts-patches.sh and script/restore-ts-patches.sh for more implementation details.

License

This package is licensed under the Apache-2.0.