solana_kit_rpc_parsed_types 0.9.1
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 #
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 #
- Package page: https://pub.dev/packages/solana_kit_rpc_parsed_types
- API reference: https://pub.dev/documentation/solana_kit_rpc_parsed_types/latest/
- Workspace docs: https://openbudgetfun.github.io/solana_kit/
- Package catalog entry: https://openbudgetfun.github.io/solana_kit/reference/package-catalog#solana_kit_rpc_parsed_types
- Source code: https://github.com/openbudgetfun/solana_kit/tree/main/packages/solana_kit_rpc_parsed_types
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
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.