open-index/open-npm huggingface dataset:
npm package: @namebasehq/exchange-api
Description: An easy-to-use Node.js interface for the Namebase exchange.
Author: Anthony Liu
Latest version: 0.0.10

Namebase Exchange Api
==

An easy-to-use Node.js package that lets you programmatically interact with the Namebase exchange.

## Usage

Here is some sample code demonstrating how to use this package. First, go to https://www.namebase.io/pro and generate an API key.

Note: this is not a comprehensive enumeration of the supported features. Read the source code for a full list. The raw API documentation can be found here: https://github.com/namebasehq/exchange-api-documentation/

```javascript
const namebase = require('@namebasehq/exchange-api');
const exchange = new namebase.Exchange(
  /* ACCESS KEY */,
  /* SECRET KEY */
);

// get the last trade price
const result1 = await exchange.priceTicker(namebase.HNSBTC);

// place a limit sell order
const quantity = '112.010000'; // units are HNS for the HNSBTC market
const orderPrice = '0.00004321'; // units are BTC for the HNSBTC market
const result2 = await exchange.limitSell(
  namebase.HNSBTC,
  quantity,
  orderPrice
);

// find all open orders
const result3 = await exchange.openOrders(namebase.HNSBTC);

if (result3.length > 0) {
  // pick a random order
  const orderIds = result3.map(order => order.orderId);
  const orderIndex = Math.floor(Math.random() * orderIds.length);

  // cancel the order
  const result4 = await exchange.cancelOrder(
    namebase.HNSBTC,
    orderIds[orderIndex]
  );
}
```
npm package: @namebasehq/hs-client
Description: HSD node and wallet client
Author: Christopher Jeffrey
Latest version: 2.0.0

# hs-client

REST and RPC clients for handshake.

## Usage

``` js
const {NodeClient, WalletClient} = require('hs-client');
```

## Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. `</legalese>`

## License

- Copyright (c) 2017, Christopher Jeffrey (MIT License).

See LICENSE for more info.
npm package: @namebasehq/namebase-types
Description: Check types at runtime.
Author: Anthony Liu
Latest version: 0.0.12

Namebase Types
==

This package lets you do things like this:

```js
const {
  OR,
  OBJECT,
  STRING,
  INTEGER,
  BOOLEAN,
  ENUM,
  exceptions,
} = require('namebase-types');

const parser = OR(
  OBJECT({
    a: STRING,
    b: INTEGER,
  }),
  OBJECT({
    a: STRING,
    b: INTEGER,
    c: BOOLEAN,
    d: ENUM(10, 20),
  }),
)

// returns { a: "foo", b: 4 }
parser({ a: "foo", b: 4 })

// returns { a: "foo", b: 4, c: true, d: 20 }
parser({ a: "foo", b: 4, c: true, d: 20 })

// throws exceptions.InvalidType({ key: "a" })
parser({ a: false, b: 4, c: true, d: 20 })

// throws exceptions.MissingKey({ key: "b" })
parser({ a: "foo", c: true, d: 10 })

// throws exceptions.MissingKey({ key: "c" })
parser({ a: "foo", b: 4, d: 10 })

// throws exceptions.ExtraKey({ key: "e" })
parser({ a: "foo", b: 4, c: true, d: 10, e: "bar" })
```

Check the tests for more details. Note: instead of passing in the built-in primitives (STRING, INTEGER, BOOLEAN, ENUM, OBJECT), you can pass in any parsing function that returns its parsed input on success (and throws otherwise).

## License

MIT License: https://igliu.mit-license.org
npm package: @namecheap/tsoa
Description: Build swagger-compliant REST APIs using TypeScript and Node
Author: Luke Autry
Latest version: 4.1.5

<div align="center">
  <a href="https://tsoa-community.github.io/docs/" target="blank">
    <h1>tsoa</h1>
  </a>
Pronounced so·uh

OpenAPI-compliant REST APIs using TypeScript and Node

![build status](https://github.com/lukeautry/tsoa/actions/workflows/runTestsOnPush.yml/badge.svg)
[![npm version](https://img.shields.io/npm/v/tsoa/latest)](https://www.npmjs.com/package/tsoa)

</div>

## Goal

- TypeScript controllers and models as the single source of truth for your API
- A valid OpenAPI (formerly Swagger) spec (2.0 or 3.0 if you choose 😍) is generated from your controllers and models, including:
  - Paths (e.g. GET /users)
  - Definitions based on TypeScript interfaces (models)
  - Parameters/model properties marked as required or optional based on TypeScript (e.g. myProperty?: string is optional in the OpenAPI spec)
  - jsDoc supported for object descriptions (most other metadata can be inferred from TypeScript types)
- Routes are generated for middleware of choice
  - Express, Hapi, and Koa currently supported, other middleware can be supported using a simple handlebars template
  - Validate request payloads

## Philosophy

- Rely on TypeScript type annotations to generate API metadata if possible
- If regular type annotations aren't an appropriate way to express metadata, use decorators
- Use jsdoc for pure text metadata (e.g. endpoint descriptions)
- Minimize boilerplate
- Models are best represented by interfaces (pure data structures), but can also be represented by classes
- Runtime validation of tsoa should behave as closely as possible to the specifications that the generated OpenAPI 2/3 schema describes. Any differences in validation logic are clarified by logging warnings during the generation of the OpenAPI Specification (OAS) and/or the routes.
  - Please note that by enabling OpenAPI 3 you minimize the chances of divergent validation logic since OpenAPI 3 has a more expressive schema syntax.

## Getting Started

- [Documentation](https://tsoa-community.github.io/docs/)
- [API Reference](https://tsoa-community.github.io/reference/)
- [Getting started guide](https://tsoa-community.github.io/docs/getting-started)

## Examples

Check out the [guides](https://tsoa-community.github.io/docs/getting-started)

See example controllers in [the tests](tests/fixtures/controllers)

See example models in [the tests](tests/fixtures/testModel.ts)

## Help wanted

### Contributing code

To contribute (via a PR), please first see the [Contributing Guide](https://github.com/lukeautry/tsoa/tree/master/docs/CONTRIBUTING.md)

### Becoming a maintainer

tsoa wants additional maintainers! The library has increased in popularity and has quite a lot of pull requests and issues. [Please post in this issue](https://github.com/lukeautry/tsoa/issues/236) if you're willing to take on the role of a maintainer.