New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@elycart/api

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elycart/api

SDK для Elycart

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
0
Weekly downloads
 
Created
Source

Elycart SDK для TypeScript/JavaScript

npm JSR JSR Score

Библиотека для взаимодействия с API Elycart.

import { Elycart } from "@elycart/api";

const elycart = new Elycart(process.env.TOKEN, process.env.SECRET_KEY);

const payment = await elycart.createInvoice({
    title: "Покупка донат-кейса",
    username: "elycart",
    price: 10, // рублей
});

console.log(payment.url);

API Reference

Фичи

  • Отличная документация кода с помощью JSDoc (сгенерировано из OpenAPI)
  • Современная и с умнейшими типами
  • 0 зависимостей

Webhook

Пример использования webhook с фреймворком Hono

import { Hono } from "hono";
import { Elycart, webhookHandler } from "@elycart/api";

const elycart = new Elycart(process.env.TOKEN, process.env.SECRET_KEY);

elycart.on(({ data }) => {});

const app = new Hono();

app.post("/", webhookHandler(elycart, "hono"));

export default app;

Поддерживаемые webhook адаптеры

или любой другой фреймворк

// a non-existing framework for the example
import { App } from "some-http-framework";
import { Elycart } from "@elycart/api";

const elycart = new Elycart(process.env.TOKEN, process.env.SECRET_KEY);

const app = new App().post("/t-kassa", async (req) => {
    // req.body must be json equivalent to Webhook notification body
    await elycart.emit(req.body);
});

app.listen(80);

Keywords

FAQs

Package last updated on 31 Jul 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