Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
ya-ts-client
Advanced tools
TypeScript generated API clients for various Yagna public APIs. Core library for Golem Network related libraries and SDKs
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:
@golem-sdk/golem-js
and provides a "task oriented" API for simple distributed computation scenariosnpm install --save ya-ts-client
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.
Here's just one example of how to use the Payment
module's ApiClient
to obtain the list of allocations.
import { Payment } from "ya-ts-client";
/**
* Example of usage of the Payment API
*/
const payment = new Payment.ApiClient({
BASE: "http://localhost:7465/payment-api/v1",
HEADERS: {
Authorization: "Bearer your-app-key",
},
});
const allocations = await payment.requestor.getAllocations();
enum
types generated for the libraryIn cases where you would like to make use of the enums
available in the generated modules, this snippet explains how to do it:
// Reach for the module you need
import { Activity } from "ya-ts-client";
// You can import the enum from the **namespace** like that
import ResultEnum = Activity.ExeScriptCommandResult.result;
// Simple alias lie this one won't work
// type ResultEnum = Activity.ExeScriptCommandResult.result; // INVALID!!!
export interface YaTsTest {
// Then refer to it via the alias
result: ResultEnum;
}
// Check it yourself :)
const x: YaTsTest = {
result: ResultEnum.OK,
};
// Outputs: { result: 'Ok' }
console.log(x);
FAQs
TypeScript generated API clients for various Yagna public APIs. Core library for Golem Network related libraries and SDKs
The npm package ya-ts-client receives a total of 0 weekly downloads. As such, ya-ts-client popularity was classified as not popular.
We found that ya-ts-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.