Skip to main content

Module clientgen

Module clientgen 

Source
Expand description

§Client Generation Module

Generates typed client SDKs from Hopper schema types.

The generator operates on the in-memory schema types (ProgramManifest, LayoutManifest, InstructionDescriptor, etc.) and produces source code via core::fmt::Display wrappers.

§Supported Languages

  • TypeScript: Full SDK with accounts, instructions, events, types.
  • Kotlin: Android SDK for Solana Mobile, using @solana/web3.js patterns mapped to com.solana.mobilewalletadapter and org.sol4k.

§Usage

hopper client gen --ts @my-program.manifest.json
hopper client gen --kt @my-program.manifest.json

Structs§

KtAccounts
Generates Kotlin data classes and decoders for account layouts.
KtClientGen
Generates all Kotlin client files for a program.
KtEvents
Generates Kotlin event data classes and decoders.
KtInstructions
Generates Kotlin instruction builders from a ProgramManifest.
KtTypes
Generates Kotlin header type and discriminator constants.
TsAccounts
Generates accounts.ts content from a ProgramManifest.
TsClientGen
Generates all TypeScript client files for a program and writes them using newline separators with file markers.
TsEvents
Generates events.ts content from a ProgramManifest.
TsIndex
Generates index.ts content (re-exports).
TsInstructions
Generates instructions.ts content from a ProgramManifest.
TsTypes
Generates types.ts content (shared type aliases).