@noti-io/sdk-nodejs
TypeScript icon, indicating that this package has built-in type declarations

1.0.23 • Public • Published

Noti - SDK-Node

This is a Node.js SDK project for simplifying interactions with external APIs.

Getting Started

To get started with this SDK, follow these steps:

  1. To install the SDK in your project, use npm:
npm install @noti-io/sdk-nodejs

For Usage

How to Use in Your Project

Import SDK

const {
  setApiKey,
  createWallet,
  importWallet,
  deleteWallet,
  getWallets,
  getWallet,
  deleteSnipe,
  createSnipe,
  getSnipeBatchById,
  setSnipeApiKey,
  getSnipeBatch,
} = require("@noti-io/sdk-nodejs") 

Api Key

Setting API Key

Before making any requests, you need to set your Snipe API key:

setApiKey('YOUR_API_KEY');

For Snipe

Get All Snipes

To retrieve all snipes, use:

const snipes = await getSnipeBatch();

This will return an array of SnipeResponse objects.

Get Snipes by ID

To retrieve snipes by ID, use:

const snipesById = await getSnipeBatchById('BATCH_ID');

Replace 'BATCH_ID' with the desired batch ID. This will return an array of SnipeResponse objects.

Create Snipe

To create a new snipe, use:

const newSnipe = await createSnipe({
  token: 'TOKEN',
  amount: 'AMOUNT',
  boost: 'BOOST'
});

Replace 'TOKEN', 'AMOUNT', and 'BOOST' with the desired values. This will return a CreateSnipeResponse object.

Delete Snipe

To delete a snipe, use:

const deletedSnipe = await deleteSnipe('BATCH_ID');

Replace 'BATCH_ID' with the ID of the snipe to be deleted. This will return a SnipeResponse object.

For Wallet

Create Wallet

To create new wallets, use:

const walletNames = ['wallet1', 'wallet2'];
const wallets = await createWallet(walletNames);

This will create new wallets with the given names and return an array of Wallet objects containing the address and privateKey for each wallet.

Import Wallet

To import existing wallets, use:

const walletsToImport = [
  { name: 'wallet1', privateKey: 'PRIVATE_KEY1' },
  { name: 'wallet2', privateKey: 'PRIVATE_KEY2' }
];
const importedWallets = await importWallet(walletsToImport);

This will import the provided wallets and return an array of Wallet objects.

Get All Wallets

To retrieve all wallets, use:

const wallets = await getWallets();

This will return an array of Wallet objects containing the address and privateKey for each wallet.

Get Wallet by ID

To retrieve a wallet by its ID, use:

const wallet = await getWallet('WALLET_ID');

Replace 'WALLET_ID' with the desired wallet ID. This will return a Wallet object.

Delete Wallet

To delete a wallet by its ID, use:

const deletedWallet = await deleteWallet('WALLET_ID');

Replace 'WALLET_ID' with the ID of the wallet to be deleted. This will return the deleted Wallet object.

/@noti-io/sdk-nodejs/

    Package Sidebar

    Install

    npm i @noti-io/sdk-nodejs

    Weekly Downloads

    0

    Version

    1.0.23

    License

    ISC

    Unpacked Size

    60.5 kB

    Total Files

    17

    Last publish

    Collaborators

    • evnoti