npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deriverse/sqds-admin-kit

v1.0.8

Published

TypeScript SDK for Deriverse protocol administration via Squads multisig on Solana

Readme

@deriverse/sqds-admin-kit

TypeScript SDK for Deriverse protocol administration via Squads multisig on Solana.

Features

  • Create Squads multisig transactions for Deriverse protocol operations
  • Type-safe interface with full TypeScript support
  • Dual ESM/CommonJS module support
  • Comprehensive documentation with JSDoc comments

Installation

npm install @deriverse/sqds-admin-kit
# or
yarn add @deriverse/sqds-admin-kit
# or
pnpm add @deriverse/sqds-admin-kit

Requirements

  • Node.js >= 18.0.0
  • @solana/web3.js >= 1.90.0 (peer dependency)

Quick Start

import { AdminEngine } from '@deriverse/sqds-admin-kit';
import { Connection, PublicKey } from '@solana/web3.js';

// Initialize connection
const connection = new Connection('https://api.mainnet-beta.solana.com');

// Create AdminEngine instance
const engine = new AdminEngine({
  connection,
  proposer: new PublicKey('YOUR_PROPOSER_PUBKEY'),
});

// Create a multisig transaction instruction
const instruction = await engine.newHolderAccountInstruction();

API Reference

AdminEngine

The main class for interacting with the Deriverse protocol via Squads multisig.

Constructor

const engine = new AdminEngine({
  connection: Connection,      // Solana RPC connection
  proposer: PublicKey,         // Transaction proposer public key
  programId?: PublicKey,       // Optional: Custom program ID (defaults to mainnet)
  holderMultisigPda?: PublicKey,   // Optional: Holder multisig PDA
  operatorMultisigPda?: PublicKey, // Optional: Operator multisig PDA
  clientMultisigPda?: PublicKey,   // Optional: Client multisig PDA
  holderVaultIndex?: number,   // Optional: Holder vault index (default: 0)
  operatorVaultIndex?: number, // Optional: Operator vault index (default: 0)
  clientVaultIndex?: number,   // Optional: Client vault index (default: 0)
  privateModeAuthority?: PublicKey, // Optional: Private mode authority
  drvsMint?: PublicKey,        // Optional: DRVS mint address
  version?: number,            // Optional: Protocol version
});

Holder Operations

newHolderAccountInstruction()

Create a new holder account.

const ix = await engine.newHolderAccountInstruction();

newOperatorInstruction()

Add a new operator to the protocol.

const ix = await engine.newOperatorInstruction();

Operator Operations

newRootAccountInstruction(args?)

Initialize the root account.

const ix = await engine.newRootAccountInstruction({
  privateMode: true, // Enable private mode
});

newBaseCurrencyInstruction(args?)

Add a new base currency to the protocol.

import { USDC_MINT } from '@deriverse/sqds-admin-kit';

const ix = await engine.newBaseCurrencyInstruction({
  newBaseCrncyMint: USDC_MINT,
});

setVarianceInstruction(args)

Set variance for an instrument.

const ix = await engine.setVarianceInstruction({
  assetTokenId: 1,
  crncyTokenId: 0,
  variance: 0.04, // 4%
});

setInstrReadyForPerpUpgradeInstruction(args)

Mark an instrument as ready for perpetual upgrade.

const ix = await engine.setInstrReadyForPerpUpgradeInstruction({
  assetTokenId: 1,
  crncyTokenId: 0,
});

terminatePrivateModeInstruction()

Terminate private mode.

const ix = await engine.terminatePrivateModeInstruction();

changePrivateModeAuthorityInstruction(args)

Change the private mode authority.

const ix = await engine.changePrivateModeAuthorityInstruction({
  authority: new PublicKey('NEW_AUTHORITY'),
});

changeAirdropAuthorityInstruction(args)

Change the airdrop authority.

const ix = await engine.changeAirdropAuthorityInstruction({
  authority: new PublicKey('NEW_AUTHORITY'),
});

changePointsProgramExpirationInstruction(args)

Change the points program expiration.

const ix = await engine.changePointsProgramExpirationInstruction({
  date: new Date('2025-12-31'),
});

changeRefProgramInstruction(args)

Change the referral program parameters.

const ix = await engine.changeRefProgramInstruction({
  programDuration: 86400 * 30, // 30 days
  linkDuration: 86400 * 7,    // 7 days
  feesDiscount: 0.1,          // 10% discount
  feesRatio: 0.5,             // 50% ratio
});

votingResetInstruction()

Reset voting.

const ix = await engine.votingResetInstruction();

Client Operations

depositInstruction(args)

Deposit tokens.

const ix = await engine.depositInstruction({
  mint: USDC_MINT,
  amount: 100,
});

withdrawInstruction(args)

Withdraw tokens.

const ix = await engine.withdrawInstruction({
  mint: USDC_MINT,
  amount: 50,
});

spotLpInstruction(args)

Execute a spot LP operation.

const ix = await engine.spotLpInstruction({
  assetTokenId: 1,
  crncyTokenId: 0,
  side: 0,        // 0 = buy, 1 = sell
  amount: 10,     // percentage
  edgePrice: 1.5,
});

dividendsClaimInstruction()

Claim dividends.

const ix = await engine.dividendsClaimInstruction();

votingInstruction(args)

Submit a vote.

const ix = await engine.votingInstruction({
  choice: 1,
  votingCounter: 42,
});

Direct Instructions (No Multisig Wrapper)

newPrivateClientInstruction(args)

Add a private client (returns raw instruction, not wrapped in multisig).

const ix = engine.newPrivateClientInstruction({
  wallet: new PublicKey('CLIENT_WALLET'),
  lifeTime: 86400 * 365, // 1 year in seconds
});

Utility Methods

findGeneralPda(tag)

Find a general PDA by tag.

findInstrPDA(args)

Find an instrument PDA.

rootAccount()

Get the root account PDA.

communityAccount()

Get the community account PDA.

privateClientsAccount()

Get the private clients account PDA.

tokenAccount(mint)

Get a token account PDA for a given mint.

clientPrimaryAccount()

Get the client primary account PDA.

clientCommunityAccount()

Get the client community account PDA.

checkAccount(account)

Check if an account exists on-chain.

Constants

The package exports the following constants:

import {
  VERSION,                // Current protocol version
  PROGRAM_ID,             // Deriverse program ID
  DRVS_MINT,              // DRVS token mint
  USDC_MINT,              // USDC token mint
  HOLDER_MULTISIG_PDA,    // Holder multisig PDA
  OPERATOR_MULTISIG_PDA,  // Operator multisig PDA
  CLIENT_MULTISIG_PDA,    // Client multisig PDA
  PRIVATE_MODE_AUTHORITY, // Private mode authority
  HOLDER_ACCOUNT_SEED,    // Holder account seed
  DRVS_AUTHORITY_SEED,    // DRVS authority seed
} from '@deriverse/sqds-admin-kit';

TypeScript Support

This package includes TypeScript definitions. All interfaces are exported:

import type {
  AdminEngineArgs,
  GetInstrPdaArgs,
  NewRootAccountArgs,
  NewBaseCurrencyArgs,
  NewPrivateClientArgs,
  DepositArgs,
  WithdrawArgs,
  SetVarianceArgs,
  SetInstrReadyForPerpUpgradeArgs,
  SpotLpArgs,
  VotingArgs,
  ChangePrivateModeAuthorityArgs,
  ChangeAirdropAuthorityArgs,
  ChangePointsProgramExpirationArgs,
  ChangeRefProgramArgs,
} from '@deriverse/sqds-admin-kit';

License

Apache-2.0

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Links