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

@napcatlabs/protocol

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@napcatlabs/protocol

Napcat Protocol SDK

latest
npmnpm
Version
0.1.34
Version published
Maintainers
2
Created
Source

Napcat Protocol SDK

Napcat Protocol SDK! This is the official SDK that allows you to interact with the Napcat protocol on the Solana blockchain.

Install

Install these dependencies over:

npm:

npm install @napcat/protocol

yarn:

yarn add @napcat/protocol

How to Use

Here’s a basic example of how you can start using the SDK:

import { Connection, PublicKey } from '@solana/web3.js'
import { Wallet } from '@coral-xyz/anchor'
import NapcatProtocolClient from '@napcat/protocol'

const connection = new Connection('https://api.mainnet-beta.solana.com')
const wallet = new Wallet(/* Your private key here */)

const napcatClient = new NapcatProtocolClient(connection, wallet)

// Example: Claiming Rewards
async function claimRewards() {
  const vaultPubkey = new PublicKey('vaultPublicKeyHere')
  const userPubkey = new PublicKey('userPublicKeyHere')
  const userPositionPubkey = new PublicKey('userPositionPublicKeyHere')

  const args = {
    vaultPubkey,
    userPubkey,
    userPositionPubkey
  }

  try {
    const txSignature = await napcatClient.claimRewards(args)
    console.log('Rewards claimed successfully! Transaction:', txSignature)
  } catch (error) {
    console.error('Error claiming rewards:', error)
  }
}

claimRewards()

Keywords

solana

FAQs

Package last updated on 01 May 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