solana_kit_program_client_core

pub package docs website CI coverage

Core building blocks for generated Solana program clients in the Solana Kit Dart SDK.

This package provides the foundational types and utilities used by generated program clients, including instruction types that track storage changes, self-fetch functions for decoder-based account retrieval, and instruction input resolution helpers. You normally reach it through a generated client such as solana_kit_system or solana_kit_token.

Installation

Install the package directly:

dependencies:
  "solana_kit_program_client_core": ^0.10.0

If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:

dart pub add solana_kit

Inside this monorepo, Dart workspace resolution uses the local package automatically.

Documentation

For architecture notes, getting-started guides, and cross-package examples, start with the workspace docs site and then drill down into the package README and API reference.

Usage

Resolving instruction inputs

Generated instruction builders accept either concrete values or resolvers. The resolution helpers normalize those inputs into the values the builder needs.

import 'package:solana_kit_addresses/solana_kit_addresses.dart';
import 'package:solana_kit_program_client_core/solana_kit_program_client_core.dart';

void main() {
  const account = Address('11111111111111111111111111111111');

  final requiredValue = getNonNullResolvedInstructionInput(
    'authority',
    account,
  );
  final resolvedAddress = getAddressFromResolvedInstructionAccount(
    'authority',
    requiredValue,
  );

  print('Resolved instruction account: ${resolvedAddress.value}');
}

Self-fetch functions

Generated clients expose fetch* helpers that retrieve and decode accounts through a decoder, so callers get typed account data without manual RPC plumbing.

import 'package:solana_kit_addresses/solana_kit_addresses.dart';

Future<void> main() async {
  const address = Address('11111111111111111111111111111111');
  print(address);
}

Key APIs

  • Instruction types that track storage changes.
  • Self-fetch functions for decoder-based account retrieval.
  • Instruction input resolution helpers (getNonNullResolvedInstructionInput, getAddressFromResolvedInstructionAccount).

Example

Use example/main.dart as a runnable starting point for solana_kit_program_client_core.

  • Import path: package:solana_kit_program_client_core/solana_kit_program_client_core.dart
  • This section is centrally maintained with mdt to keep package guidance aligned.
  • After updating shared docs templates, run docs:update from the repo root.

Maintenance

  • Validate docs in CI and locally with docs:check.
  • Keep examples focused on one workflow and reference package README sections for deeper API details.

Libraries

solana_kit_program_client_core
Shared plumbing for generated program clients in the Solana Kit Dart SDK.