New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@cryptocadet/sdk

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cryptocadet/sdk

SDK for CryptoCadet altcoin payment processor API.

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
0
Created
Source

Cadet SDK

The Cadet SDK is a simple and robust JavaScript/TypeScript library for interacting with the CryptoCadet API. This SDK enables developers to seamlessly integrate CryptoCadet's features into their applications.

Features

  • User Management: Create users, retrieve user details, and update information.
  • Product Management: Add, update, delete, and fetch product details.
  • Network Integration: Manage and query blockchain network details.
  • Subscription Management: Handle user subscriptions easily.

Installation

Install the SDK using npm or yarn:

npm install @cryptocadet/sdk

or

yarn add @cryptocadet/sdk

Usage

Initialization

Import and initialize the SDK with your API and Secret keys:

import CadetSDK from 'cryptocadet/sdk';

const sdk = new CadetSDK('your-public-api-key', 'your-secret-key');
await sdk.authenticate();

Methods

User Management

Create User
const response = await sdk.createUser('user@example.com');
console.log(response);
Get User
const user = await sdk.getUser();
console.log(user);

Product Management

Create Product
const product = { productId: 'prod123', price: 99.99 };
const response = await sdk.createProduct(product);
console.log(response);
Delete Product
const response = await sdk.deleteProduct('prod123');
console.log(response);
Get Product Price
const response = await sdk.getProductPrice('prod123');
console.log(response);

Network Management

Add Network
const response = await sdk.addNetwork('Ethereum');
console.log(response);
Get Network Details
const response = await sdk.getNetwork('Ethereum');
console.log(response);

Subscription Management

Cancel Subscription
const response = await sdk.cancelSubscription();
console.log(response);

Wallet Management

Update Wallet Address
const response = await sdk.updateWalletAddress('0x1234567890abcdef1234567890abcdef12345678');
console.log(response);

API Reference

For a detailed description of all available endpoints and parameters, refer to the CryptoCadet API Documentation.

Development

Build

To build the project:

npm run build

Run Tests

The SDK is tested using Jest. To run tests:

npm test

Linting

Ensure your code meets the project's style guidelines:

npm run lint

Contributing

We welcome contributions! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter any issues, feel free to open an issue on GitHub or contact us at hello@cryptocadet.app.

Happy Coding! 🎉

Keywords

react

FAQs

Package last updated on 12 Jan 2025

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