Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ya-ts-client

Package Overview
Dependencies
Maintainers
7
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ya-ts-client

TypeScript generated API clients for various Yagna public APIs. Core library for Golem Network related libraries and SDKs

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66
decreased by-83.58%
Maintainers
7
Weekly downloads
 
Created
Source

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:

Installation

npm 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.

import { PaymentApi } from "ya-ts-client";
// Or refer to the whole library:
//import * as YaTsClient from "ya-ts-client";

/**
 * Example of usage of the Payment API
 */
const payment = new PaymentApi.Client({
  BASE: "http://localhost:7465/payment-api/v1",
  HEADERS: {
    Authorization: "Bearer your-app-key",
  },
});

const allocations = await payment.requestor.getAllocations();
console.log("Allocated funds:", allocations);

See also

Keywords

FAQs

Package last updated on 25 Mar 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc