vault-sdk-blockapex
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-beta.3 • Public • Published

@jito-foundation/vault-sdk

Package Purpose

The @jito-foundation/vault-sdk is a TypeScript SDK for interacting with Jito's Vault program on Solana.

Technical Requirements

  • Node.js
  • Peer Dependencies:
    • solana2": "npm:@solana/web3.js@^2.0.0
    • @solana/spl-token
  • TypeScript type definitions included

Features

The SDK provides functionality for:

Account Management

  • Config accounts
  • Vault accounts
  • NCN (Node Consensus Network) tickets
  • Slasher tickets
  • Operator delegations
  • Withdrawal tickets
  • State tracking

Instructions

  • Minting operations
  • Delegation management
  • Withdrawal operations
  • Token account management
  • Administrative functions
  • Vault initialization and updates
  • NCN ticket management

Example Usage

Here's a basic example of creating a mint instruction:

const instruction = getMintToInstruction({
  config: configKey,
  vault: vaultKey,
  vrtMint: vrtMintKey,
  depositor: {
    publicKey: depositorKey,
    signTransaction: async () => {
      /* ... */
    },
    signAllTransactions: async () => {
      /* ... */
    },
  },
  depositorTokenAccount: depositorTokenKey,
  vaultTokenAccount: vaultTokenKey,
  depositorVrtTokenAccount: depositorVrtTokenKey,
  vaultFeeTokenAccount: vaultFeeTokenKey,
  amountIn: 1000n,
  minAmountOut: 900n,
});

Installation

Install the SDK:

yarn add @jito-foundation/vault-sdk

Install peer dependencies:

yarn add solana2": "npm:@solana/web3.js@^2.0.0 @solana/spl-token

Repository Information

  • License: MIT
  • Author: Jito Foundation

Package Structure

packages/vault-sdk/
├── src/           # Source files
│   ├── accounts/  # Account definitions
│   ├── instructions/# Program instructions
│   ├── programs/  # Program definitions
│   ├── shared/    # Shared utilities
│   └── types/     # TypeScript types
├── dist/          # Compiled JavaScript
└── README.md      # Documentation

Development

Build the package:

yarn build

Clean build artifacts:

yarn clean

Readme

Keywords

none

Package Sidebar

Install

npm i vault-sdk-blockapex

Weekly Downloads

5

Version

0.1.0-beta.3

License

MIT

Unpacked Size

1.05 MB

Total Files

282

Last publish

Collaborators

  • ahmed863