solana_kit_rpc_parsed_types 0.9.1 copy "solana_kit_rpc_parsed_types: ^0.9.1" to clipboard
solana_kit_rpc_parsed_types: ^0.9.1 copied to clipboard

Parsed account data types for the Solana Kit Dart SDK.

solana_kit_rpc_parsed_types #

pub package docs website CI coverage

Parsed account data types for the Solana Kit Dart SDK.

When an RPC call returns jsonParsed account data, the response carries a type string and an info map. This package defines those shapes, including the typed variants for well-known programs such as SPL Token.

Installation #

Install the package directly:

dependencies:
  "solana_kit_rpc_parsed_types": ^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 #

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 #

Parsed account data #

RpcParsedType models the {type, info} shape of a jsonParsed account response.

import 'package:solana_kit_rpc_parsed_types/solana_kit_rpc_parsed_types.dart';

void main() {
  const parsed = RpcParsedType(
    type: 'spl-token-account',
    info: {'mint': 'So11111111111111111111111111111111111111112'},
  );

  print('Parsed type: ${parsed.type}');
  print('Parsed info: ${parsed.info}');
}

Typed token variants #

For SPL Token accounts, the package provides typed variants of the parsed data so you can pattern match instead of casting maps.

import 'package:solana_kit_rpc_parsed_types/solana_kit_rpc_parsed_types.dart';

void main() {
  const parsed = RpcParsedType(
    type: 'spl-token-account',
    info: {'mint': 'So11111111111111111111111111111111111111112'},
  );

  print(parsed.type);
}

Key APIs #

  • RpcParsedType: the generic {type, info} shape.
  • Typed variants for well-known programs (for example SPL Token account and mint data).

Example #

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

  • Import path: package:solana_kit_rpc_parsed_types/solana_kit_rpc_parsed_types.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.
0
likes
160
points
627
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Parsed account data types for the Solana Kit Dart SDK.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

solana_kit_addresses, solana_kit_errors, solana_kit_rpc_types

More

Packages that depend on solana_kit_rpc_parsed_types