# vasp-gateway

> Enables a VASP to interact with the USTRWG Bulletin Board Web server or other VASPs

Latest version **1.0.10** (published 2021-10-01) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install vasp-gateway
pnpm add vasp-gateway
yarn add vasp-gateway
bun add vasp-gateway
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2021-10-01 |
| First published | 2020-12-01 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 14.17.5 |
| Dependencies | 5 |
| Unpacked size | 120.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | robertst-bitgo |

## Links

- npm: https://www.npmjs.com/package/vasp-gateway
- npm.io page: https://npm.io/package/vasp-gateway

## Dependencies (5)

- [openpgp](https://npm.io/package/openpgp.md) ^5.0.0-2
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [jsonschema](https://npm.io/package/jsonschema.md) ^1.3.0
- [superagent](https://npm.io/package/superagent.md) ^5.3.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.12.1

## Recent versions

- 1.0.10 (latest) — 2021-10-01
- 1.0.9 — 2021-06-04
- 1.0.8 — 2021-05-19
- 1.0.7 — 2021-05-13
- 1.0.6 — 2021-04-13
- 1.0.5 — 2021-03-31
- 1.0.4 — 2021-03-30
- 1.0.3 — 2021-03-25
- 1.0.2 — 2021-03-24
- 1.0.1 — 2020-12-03
- 1.0.0 — 2020-12-01

## README

# vasp_gateway

VaspGateway - JavaScript client for vasp_gateway
The interaction a VASP's HTTP client would have with the Bulletin Board web-server or another VASP
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.0.1
- Package version: 0.0.1
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install vasp_gateway --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your vasp_gateway from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var VaspGateway = require('vasp_gateway');


var api = new VaspGateway.BaseP2pApi()
var txClaim = new VaspGateway.TxClaim(); // {TxClaim} 
api.claimAddress(txClaim).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*VaspGateway.BaseP2pApi* | [**claimAddress**](docs/BaseP2pApi.md#claimAddress) | **POST** /claim | To be used by VASPs to claim an address
*VaspGateway.BaseP2pApi* | [**sendPii**](docs/BaseP2pApi.md#sendPii) | **POST** /pii | To be used by VASPs to send PII to another VASP
*VaspGateway.DefaultApi* | [**getTransaction**](docs/DefaultApi.md#getTransaction) | **GET** /transactions/{eventUuid} | To be used by VASP(S) to retrieve information about a specific transaction
*VaspGateway.DefaultApi* | [**getTransactions**](docs/DefaultApi.md#getTransactions) | **GET** /transactions | To be used by VASP(R) to retrieve transactions awaiting PII
*VaspGateway.DefaultApi* | [**getVaspInfo**](docs/DefaultApi.md#getVaspInfo) | **GET** /vasps/{vaspUuid} | To be used by VASPs to get information about other VASPs’ PII and claim endpoints
*VaspGateway.DefaultApi* | [**postTransaction**](docs/DefaultApi.md#postTransaction) | **POST** /transactions | To be used by VASP(S) to post eligible transactions


## Documentation for Models

 - [VaspGateway.Tx](docs/Tx.md)
 - [VaspGateway.TxAnnouncement](docs/TxAnnouncement.md)
 - [VaspGateway.TxAnnouncementReceipt](docs/TxAnnouncementReceipt.md)
 - [VaspGateway.TxClaim](docs/TxClaim.md)
 - [VaspGateway.TxClaimResponse](docs/TxClaimResponse.md)
 - [VaspGateway.TxPii](docs/TxPii.md)
 - [VaspGateway.TxPiiResponse](docs/TxPiiResponse.md)
 - [VaspGateway.VaspMetadata](docs/VaspMetadata.md)


## Documentation for Authorization



### BulletinBoardAuth


- **Type**: API key
- **API key parameter name**: x-api-token
- **Location**: HTTP header

---
_Source: https://npm.io/package/vasp-gateway · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
