Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fullstack-development/pab-api-js
PAB API JavaScript wrapper
https://github.com/fullstack-development/pab-api-js
Last synced: about 5 hours ago
JSON representation
PAB API JavaScript wrapper
- Host: GitHub
- URL: https://github.com/fullstack-development/pab-api-js
- Owner: fullstack-development
- License: apache-2.0
- Created: 2021-08-11T06:43:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-23T19:12:10.000Z (over 2 years ago)
- Last Synced: 2024-05-01T12:37:18.366Z (7 months ago)
- Language: TypeScript
- Size: 199 KB
- Stars: 5
- Watchers: 7
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pab-api-js
JavaScript wrapper for PAB (Plutus Application Backend) API. Works in both the browser and on Node.js. Includes TypeScript types definitions.
## Installation
```bash
npm install --save git+https://github.com/fullstack-development/pab-api-js.git
```## Usage
```javascript
import { Pab } from 'pab-api-js';const pab = new Pab('http://localhost:9080/');
const getReport = async () => {
try {
const result = await pab.getFullReport();
console.log(result);
} catch (error) {
console.log(error);
}
};getReport();
```
## Development
To bundle the result code, run
```bash
npm run build
```To format code (in folder src)
```bash
npm run format
```For tests, you first need to run PAB with any contract
```bash
npm run test
```