npm package: @lethean/api-apollo
Description: Distributed_Virtual_Private_Marketplace
Latest version: 1.2.2

# @lethean/api-apollo

@LetheanApiApollo - JavaScript client for @lethean/api-apollo
Distributed Virtual Private Marketplace
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.2.2
- Package version: 1.2.2
- Build package: org.openapitools.codegen.languages.JavascriptApolloClientCodegen
For more information, please visit [https://lt.hn](https://lt.hn)

## 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 @lethean/api-apollo --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 @lethean/api-apollo 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/lthn.io/projects/sdk/clients/javascript-apollo
then install it via:

```shell
    npm install lthn.io/projects/sdk/clients/javascript-apollo --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 @LetheanApiApollo = require('@lethean/api-apollo');


var api = new @LetheanApiApollo.ExplorerApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getActivity(callback);

```

## Documentation for API Endpoints

All URIs are relative to *https://dvpm.io*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*@LetheanApiApollo.ExplorerApi* | [**getActivity**](docs/ExplorerApi.md#getActivity) | **GET** /v1/explorer/activity | 
*@LetheanApiApollo.ExplorerApi* | [**getBlock**](docs/ExplorerApi.md#getBlock) | **GET** /v1/explorer/chain/block/{id} | 
*@LetheanApiApollo.ExplorerApi* | [**getEmission**](docs/ExplorerApi.md#getEmission) | **GET** /v1/explorer/chain/emission | 
*@LetheanApiApollo.ExplorerApi* | [**getMempool**](docs/ExplorerApi.md#getMempool) | **GET** /v1/explorer/chain/mempool | 
*@LetheanApiApollo.ExplorerApi* | [**getNetworkInfo**](docs/ExplorerApi.md#getNetworkInfo) | **GET** /v1/explorer/chain/stats | 
*@LetheanApiApollo.ExplorerApi* | [**getOutputsBlocks**](docs/ExplorerApi.md#getOutputsBlocks) | **GET** /v1/explorer/chain/block/outputs | 
*@LetheanApiApollo.ExplorerApi* | [**getRawBlockData**](docs/ExplorerApi.md#getRawBlockData) | **GET** /v1/explorer/chain/block/raw/{id} | 
*@LetheanApiApollo.ExplorerApi* | [**getRawTransactionData**](docs/ExplorerApi.md#getRawTransactionData) | **GET** /v1/explorer/chain/transaction/raw/{tx_hash} | 
*@LetheanApiApollo.ExplorerApi* | [**getTransaction**](docs/ExplorerApi.md#getTransaction) | **GET** /v1/explorer/chain/transaction/{tx_hash} | 
*@LetheanApiApollo.ExplorerApi* | [**getTransactions**](docs/ExplorerApi.md#getTransactions) | **GET** /v1/explorer/chain/transactions | 
*@LetheanApiApollo.ExplorerApi* | [**getVersion**](docs/ExplorerApi.md#getVersion) | **GET** /v1/explorer/chain/version | 
*@LetheanApiApollo.ExplorerApi* | [**proveTransfer**](docs/ExplorerApi.md#proveTransfer) | **GET** /v1/explorer/validate/transfer | 
*@LetheanApiApollo.ExplorerApi* | [**searchChain**](docs/ExplorerApi.md#searchChain) | **GET** /v1/explorer/chain/search/{id} | 
*@LetheanApiApollo.VpnApi* | [**listServices**](docs/VpnApi.md#listServices) | **GET** /v1/services/public-nodes | 


## Documentation for Models

 - [@LetheanApiApollo.Activity](docs/Activity.md)
 - [@LetheanApiApollo.BlockDTO](docs/BlockDTO.md)
 - [@LetheanApiApollo.BlockEntity](docs/BlockEntity.md)
 - [@LetheanApiApollo.BlockOutputEntity](docs/BlockOutputEntity.md)
 - [@LetheanApiApollo.BlockOutputsDTO](docs/BlockOutputsDTO.md)
 - [@LetheanApiApollo.BlockOutputsEntity](docs/BlockOutputsEntity.md)
 - [@LetheanApiApollo.CertificatesEntity](docs/CertificatesEntity.md)
 - [@LetheanApiApollo.Commit](docs/Commit.md)
 - [@LetheanApiApollo.CommitAuthor](docs/CommitAuthor.md)
 - [@LetheanApiApollo.CommitLink](docs/CommitLink.md)
 - [@LetheanApiApollo.CommitMediaThumbnail](docs/CommitMediaThumbnail.md)
 - [@LetheanApiApollo.CommitSummary](docs/CommitSummary.md)
 - [@LetheanApiApollo.EcdhInfo](docs/EcdhInfo.md)
 - [@LetheanApiApollo.EmissionDTO](docs/EmissionDTO.md)
 - [@LetheanApiApollo.EmissionEntity](docs/EmissionEntity.md)
 - [@LetheanApiApollo.InputsEntity](docs/InputsEntity.md)
 - [@LetheanApiApollo.MempoolDTO](docs/MempoolDTO.md)
 - [@LetheanApiApollo.MempoolEntity](docs/MempoolEntity.md)
 - [@LetheanApiApollo.MgsEntity](docs/MgsEntity.md)
 - [@LetheanApiApollo.MixinEntity](docs/MixinEntity.md)
 - [@LetheanApiApollo.NetworkStatsDTO](docs/NetworkStatsDTO.md)
 - [@LetheanApiApollo.NetworkStatsEntity](docs/NetworkStatsEntity.md)
 - [@LetheanApiApollo.OutputEntity](docs/OutputEntity.md)
 - [@LetheanApiApollo.ProveTransferDTO](docs/ProveTransferDTO.md)
 - [@LetheanApiApollo.ProveTransferEntity](docs/ProveTransferEntity.md)
 - [@LetheanApiApollo.ProveTransferOutputsEntity](docs/ProveTransferOutputsEntity.md)
 - [@LetheanApiApollo.ProxySettingsEntity](docs/ProxySettingsEntity.md)
 - [@LetheanApiApollo.RangeSigsEntity](docs/RangeSigsEntity.md)
 - [@LetheanApiApollo.RawBlockDTO](docs/RawBlockDTO.md)
 - [@LetheanApiApollo.RawBlockEntity](docs/RawBlockEntity.md)
 - [@LetheanApiApollo.RawBlockMinerTx](docs/RawBlockMinerTx.md)
 - [@LetheanApiApollo.RawBlockMinerVin](docs/RawBlockMinerVin.md)
 - [@LetheanApiApollo.RawBlockMinerVinGen](docs/RawBlockMinerVinGen.md)
 - [@LetheanApiApollo.RawBlockMinerVout](docs/RawBlockMinerVout.md)
 - [@LetheanApiApollo.RawTransactionDTO](docs/RawTransactionDTO.md)
 - [@LetheanApiApollo.RawTransactionEntity](docs/RawTransactionEntity.md)
 - [@LetheanApiApollo.RawTransactionEntityVin](docs/RawTransactionEntityVin.md)
 - [@LetheanApiApollo.RawTransactionEntityVinKey](docs/RawTransactionEntityVinKey.md)
 - [@LetheanApiApollo.RawTransactionEntityVout](docs/RawTransactionEntityVout.md)
 - [@LetheanApiApollo.RawTransactionEntityVoutTarget](docs/RawTransactionEntityVoutTarget.md)
 - [@LetheanApiApollo.RawTransactionRctSignature](docs/RawTransactionRctSignature.md)
 - [@LetheanApiApollo.RctSigEntity](docs/RctSigEntity.md)
 - [@LetheanApiApollo.RctSigPrunable](docs/RctSigPrunable.md)
 - [@LetheanApiApollo.SearchDTO](docs/SearchDTO.md)
 - [@LetheanApiApollo.SearchEntity](docs/SearchEntity.md)
 - [@LetheanApiApollo.ServiceEntity](docs/ServiceEntity.md)
 - [@LetheanApiApollo.TimeRangeEntity](docs/TimeRangeEntity.md)
 - [@LetheanApiApollo.TransactionBlock](docs/TransactionBlock.md)
 - [@LetheanApiApollo.TransactionDTO](docs/TransactionDTO.md)
 - [@LetheanApiApollo.TransactionEntity](docs/TransactionEntity.md)
 - [@LetheanApiApollo.TransactionsDTO](docs/TransactionsDTO.md)
 - [@LetheanApiApollo.TransactionsEntity](docs/TransactionsEntity.md)
 - [@LetheanApiApollo.TxnEntity](docs/TxnEntity.md)
 - [@LetheanApiApollo.VersionDTO](docs/VersionDTO.md)
 - [@LetheanApiApollo.VersionEntity](docs/VersionEntity.md)
 - [@LetheanApiApollo.VoutTarget](docs/VoutTarget.md)
 - [@LetheanApiApollo.VpnSettingsEntity](docs/VpnSettingsEntity.md)


## Documentation for Authorization

All endpoints do not require authorization.