solana_kit_program_client_core 0.9.1
solana_kit_program_client_core: ^0.9.1 copied to clipboard
Program client core for the Solana Kit Dart SDK.
solana_kit_program_client_core #
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.9.1
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 #
- Package page: https://pub.dev/packages/solana_kit_program_client_core
- API reference: https://pub.dev/documentation/solana_kit_program_client_core/latest/
- Workspace docs: https://openbudgetfun.github.io/solana_kit/
- Package catalog entry: https://openbudgetfun.github.io/solana_kit/reference/package-catalog#solana_kit_program_client_core
- Source code: https://github.com/openbudgetfun/solana_kit/tree/main/packages/solana_kit_program_client_core
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
mdtto keep package guidance aligned. - After updating shared docs templates, run
docs:updatefrom 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.