Installations
npm install ya-ts-client
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>=18.0.0
Node Version
18.18.2
NPM Version
9.8.1
Score
77
Supply Chain
85.8
Quality
88.6
Maintenance
100
Vulnerability
81.3
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
golemfactory
Download Statistics
Total Downloads
56,761
Last Day
9
Last Week
61
Last Month
266
Last Year
29,840
GitHub Statistics
2 Stars
80 Commits
2 Forks
5 Watching
7 Branches
9 Contributors
Bundle Size
98.98 kB
Minified
7.08 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.3
Package Id
ya-ts-client@1.1.3
Unpacked Size
510.95 kB
Size
62.73 kB
File Count
429
NPM Version
9.8.1
Node Version
18.18.2
Publised On
01 Jul 2024
Total Downloads
Cumulative downloads
Total Downloads
56,761
Last day
125%
9
Compared to previous day
Last week
-14.1%
61
Compared to previous week
Last month
11.8%
266
Compared to previous month
Last year
90.5%
29,840
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Yagna TS Client
The ya-ts-client
package provides low level API bindings in form of collection TypeScript clients generated from
the Yagna public API OpenApi specifications.
The primary and only purpose of this package is to provide that basic implementation. As a "core" library, it shouldn't need to be added as a dependency to any user code, only to other Golem Network related SDKs or libraries.
If you want to start building solutions using Golem Network, here are more suitable options:
- Official JS SDK - @golem-sdk/golem-js - which models the Decentralized Computation Marketplace logic
- TaskExecutor - @golem-sdk/task-executor - built on top of
@golem-sdk/golem-js
and provides a "task oriented" API for simple distributed computation scenarios
Installation
1npm install --save ya-ts-client
Usage
The library exposes multiple API clients which are auto-generated from the official OpenApi specifications. The documentation of the generated API is hosted on GitHub pages.
Working with API Clients
Here's just one example of how to use the Payment
module's ApiClient
to obtain the list of allocations.
1import { PaymentApi } from "ya-ts-client"; 2// Or refer to the whole library: 3//import * as YaTsClient from "ya-ts-client"; 4 5/** 6 * Example of usage of the Payment API 7 */ 8const payment = new PaymentApi.Client({ 9 BASE: "http://localhost:7465/payment-api/v1", 10 HEADERS: { 11 Authorization: "Bearer your-app-key", 12 }, 13}); 14 15const allocations = await payment.requestor.getAllocations(); 16console.log("Allocated funds:", allocations);
See also
No vulnerabilities found.
No security vulnerabilities found.