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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hyr0-xyz/program

v0.0.8

Published

TypeScript SDK for building dApps on Hyr0 Protocol

Readme

@hyr0-xyz/program

TypeScript SDK for building dApps on Hyro Protocol. This SDK provides high-level APIs for interacting with Hyro Protocol's Vault and Transaction systems.

Installation

npm install @hyr0-xyz/program @solana/kit
# or
yarn add @hyr0-xyz/program @solana/kit
# or
pnpm add @hyr0-xyz/program @solana/kit

Features

  • Vault Operations: Create, fetch, and manage vaults
  • Transaction Operations: Create and execute transactions through vaults
  • PDA Helpers: Easy-to-use functions for deriving Program Derived Addresses
  • Type-Safe: Full TypeScript support with type-safe APIs
  • Built on @solana/kit: Uses the latest Solana TypeScript toolkit

Quick Start

Vault Operations

import { VaultSDK } from '@hyr0-xyz/program';
import { createSolanaRpc } from '@solana/kit';

// Get RPC connection
const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');

// Get vault PDA from seed
const [vaultPda, authorityPda] = await VaultSDK.getVaultPda('my-vault-seed');

// Fetch vault data
const vault = await VaultSDK.fetch(rpc, vaultPda[0]);
console.log('Vault data:', vault.data);

// Get related PDAs
const shareSignerPda = await VaultSDK.getShareSignerPda(vaultPda);
const shareMintPda = await VaultSDK.getShareMintPda(vaultPda);

Transaction Operations

import { TransactionSDK } from '@hyr0-xyz/program';

// Get transaction PDA
const transactionPda = await TransactionSDK.getTransactionPda(vaultPda, 1);

// Fetch transaction data
const transaction = await TransactionSDK.fetch(rpc, transactionPda[0]);
console.log('Transaction data:', transaction.data);

// Build create transaction instruction
const createTxIx = await TransactionSDK.buildCreateTxInstruction({
  vault: vaultPda[0],
  nonce: 1,
  programId: 'YourProgramId...',
  accounts: [
    {
      pubkey: 'AccountAddress...',
      isSigner: false,
      isWritable: true,
    },
  ],
  data: new Uint8Array([...]),
  policyAccount: 'PolicyAccount...',
  policyProgram: 'PolicyProgram...',
  signer: yourSigner,
});

// Build execute transaction instruction
const executeTxIx = await TransactionSDK.buildExecuteTxInstruction({
  vault: vaultPda[0],
  transaction: transactionPda[0],
  policyAccount: 'PolicyAccount...',
  policyProgram: 'PolicyProgram...',
  signer: yourSigner,
});

PDA Helpers

import { getVaultPda, getTransactionPda, getShareSignerPda } from '@hyr0-xyz/program';

// Get vault and authority PDAs
const [vault, authority] = await getVaultPda('my-seed');

// Get transaction PDA
const txPda = await getTransactionPda(vault, 1);

// Get share signer PDA
const shareSigner = await getShareSignerPda(vault);

API Reference

VaultSDK

getVaultPda(seed: string)

Get vault PDA and authority PDA from a seed string.

fetch(rpc, address)

Fetch vault account data from the blockchain.

getShareSignerPda(vault)

Get the share signer PDA for a vault.

getShareMintPda(vault)

Get the share mint PDA for a vault.

getVaultTokenAccountPda(vault, underlyingMint)

Get the vault token account PDA.

buildInitializeVaultInstruction(params)

Build an instruction to initialize a new vault.

TransactionSDK

getTransactionPda(vault, nonce)

Get transaction PDA from vault and nonce.

fetch(rpc, address)

Fetch transaction account data from the blockchain.

buildCreateTxInstruction(params)

Build an instruction to create a new transaction.

buildExecuteTxInstruction(params)

Build an instruction to execute a transaction.

Development

# Install dependencies
npm install

# Build
npm run build

# Type check
npm run typecheck

License

ISC