GLAM is a platform for deploying institutional-grade investment products on Solana. Through programmable vaults and mints, GLAM provides infrastructure for onchain operations with fine-grained acccess controls.
- Node v20.11.0 or higher
- Pnpm v9.1.2 or higher
- Rust v1.75.0 or higher
- Anchor CLI 0.30.1
- Solana CLI 1.18.23
Install Solana CLI (recommended):
sh -c "$(curl -sSfL https://release.anza.xyz/v1.18.23/install)"
git clone https://github.com/glamsystems/glam.git
cd glam
pnpm install
Build and run the test suite:
pnpm run anchor-build
pnpm run anchor-test
Start the development server:
pnpm run dev
import * as anchor from "@coral-xyz/anchor";
import { GlamClient, WSOL } from "@glamsystems/glam-sdk";
import { PublicKey } from "@solana/web3.js";
const glamClient = new GlamClient();
const statePda = new PublicKey("FMHLPaEeCbuivqsAfHrr28FpWJ9oKHTx3jzFbb3tYhq4");
async function main() {
const vaultPda = glamClient.getVaultPda(statePda);
const vaultWsolBalance = await glamClient.getVaultTokenBalance(statePda, WSOL);
// Wrap 0.1 SOL
const txSig = await glamClient.wsol.wrap(statePda, new anchor.BN(100_000_000));
// Check updated balance
const vaultWsolBalanceAfter = await glamClient.getVaultTokenBalance(statePda, WSOL);
}
For detailed API documentation and advanced usage examples, visit our Developer Documentation.