Skip to content

internet-court/internet-court-skill / vendored/sendaifun/glam

Solana vault management via GLAM Protocol. Triggers: glam, glam-cli, glam-sdk, vault create/manage, tokenized vault, share class, DeFi vault, treasury, asset management, access control, delegate permissions, Jupiter swap, Kamino lending/borrow/vaults/farms, staking (Marinade/native/SPL/Sanctum/LST), cross-chain USDC (CCTP), timelock, subscription/redemption, NAV pricing, token transfer. Supports CLI and TypeScript SDK.

resources/sdk/mint.md

View on GitHub
# Mint Operations (SDK only)

Share class token management is available through the SDK (`client.mint`), not as CLI commands.

**Prerequisite:** Vault must have a share class (configured via JSON template at vault creation).

## SDK Methods

### `client.mint.fetchTokenHolders`

List all token holders for the vault's share class.

```typescript
const holders = await client.mint.fetchTokenHolders(mintPda);
// Returns: { owner: PublicKey, amount: BN }[]
```

### `client.mint.update`

Update share class mint settings.

```typescript
await client.mint.update({
  minSubscription?: BN,
  minRedemption?: BN,
}, txOptions);
```

### `client.mint.pauseSubscription` / `unpauseSubscription`

```typescript
await client.mint.pauseSubscription(txOptions);
await client.mint.unpauseSubscription(txOptions);
```

### `client.mint.pauseRedemption` / `unpauseRedemption`

```typescript
await client.mint.pauseRedemption(txOptions);
await client.mint.unpauseRedemption(txOptions);
```

### `client.mint.initializeWithStateParams`

Create a new share class for a vault.

```typescript
const { mintPda, txId } = await client.mint.initializeWithStateParams(vaultPda, {
  name: string,
  symbol: string,
  decimals: number,
  // ... additional mint config
}, txOptions);
```

### `client.mint.setTokenAccountsStates`

Freeze or unfreeze token accounts (prevents/allows transfers).

```typescript
await client.mint.setTokenAccountsStates(vaultPda, {
  accounts: [accountPubkey1, accountPubkey2],
  frozen: true, // true to freeze, false to unfreeze
}, txOptions);
```

### `client.mint.mint`

Issue (mint) new tokens.

```typescript
await client.mint.mint(amount, recipientPubkey, txOptions);
```

### `client.mint.burn`

Burn tokens from an account.

```typescript
await client.mint.burn(amount, fromPubkey, txOptions);
```

### `client.mint.forceTransfer`

Force transfer tokens between accounts (requires permanent delegate authority).

```typescript
await client.mint.forceTransfer(vaultPda, {
  source: PublicKey,
  destination: PublicKey,
  amount: BN,
}, txOptions);
```

---

## Typical Workflows

### Compliance Freeze (SDK)

```typescript
// 1. List holders to identify accounts
const holders = await client.mint.fetchTokenHolders(mintPda);

// 2. Freeze flagged accounts
await client.mint.setTokenAccountsStates(vaultPda, {
  accounts: [suspiciousAccount],
  frozen: true,
});

// 3. Later, unfreeze cleared accounts
await client.mint.setTokenAccountsStates(vaultPda, {
  accounts: [clearedAccount],
  frozen: false,
});
```

### Forced Redemption (SDK)

```typescript
// 1. Force transfer tokens back to vault
await client.mint.forceTransfer(vaultPda, {
  source: investorTokenAccount,
  destination: vaultTokenAccount,
  amount: new BN(5000),
});

// 2. Burn the returned tokens
await client.mint.burn(new BN(5000), vaultTokenAccount);
```
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall