@@ -52,9 +52,10 @@ pub mod storage {
5252 //! from modern or historic runtimes.
5353 //! - See [`encode_storage_key_prefix`] to encode storage prefixes, and [`encode_storage_key`] to encode
5454 //! storage keys.
55- //! - See [`StorageTypeInfo`] for the underlying trait which extracts the relevant information.
55+ //! - See [`StorageTypeInfo`] for the underlying trait which provides storage entry information.
56+ //! - See [`StorageEntryInfo`] for a underlying trait which provides information about the available
57+ //! storage entries.
5658
57- pub use crate :: methods:: Entry ;
5859 pub use crate :: methods:: storage_decoder:: {
5960 StorageKey , StorageKeyDecodeError , StorageKeyPart , StorageKeyPartValue ,
6061 StorageKeyValueDecodeError , StorageValueDecodeError ,
@@ -68,7 +69,8 @@ pub mod storage {
6869 encode_storage_key_with_info, encode_storage_key_with_info_to,
6970 } ;
7071 pub use crate :: methods:: storage_type_info:: {
71- StorageHasher , StorageInfo , StorageInfoError , StorageKeyInfo , StorageTypeInfo ,
72+ StorageEntry , StorageEntryInfo , StorageHasher , StorageInfo , StorageInfoError ,
73+ StorageKeyInfo , StorageTypeInfo ,
7274 } ;
7375 pub use crate :: utils:: {
7476 DecodableValues , EncodableValues , IntoDecodableValues , IntoEncodableValues ,
@@ -81,13 +83,14 @@ pub mod constants {
8183 //! - See [`decode_constant`] and [`decode_constant_with_info`] to decode constants
8284 //! - See [`ConstantTypeInfo`] for the underlying trait which extracts constant
8385 //! information from metadata.
86+ //! - See [`ConstantEntryInfo`] for a underlying trait which provides information about the available
87+ //! constants.
8488
85- pub use crate :: methods:: Entry ;
8689 pub use crate :: methods:: constant_decoder:: {
8790 ConstantDecodeError , decode_constant, decode_constant_with_info,
8891 } ;
8992 pub use crate :: methods:: constant_type_info:: {
90- ConstantInfo , ConstantInfoError , ConstantTypeInfo ,
93+ ConstantEntry , ConstantEntryInfo , ConstantInfo , ConstantInfoError , ConstantTypeInfo ,
9194 } ;
9295}
9396
@@ -98,8 +101,9 @@ pub mod runtime_apis {
98101 //! the name and inputs to make a Runtime API call.
99102 //! - See [`decode_runtime_api_response`] to decode Runtime API responses.
100103 //! - See [`RuntimeApiTypeInfo`] for the underlying trait which extracts the relevant information.
104+ //! - See [`RuntimeApiEntryInfo`] for a underlying trait which provides information about the available
105+ //! Runtime APIs.
101106
102- pub use crate :: methods:: Entry ;
103107 pub use crate :: methods:: runtime_api_decoder:: {
104108 RuntimeApiDecodeError , decode_runtime_api_response, decode_runtime_api_response_with_info,
105109 } ;
@@ -108,7 +112,8 @@ pub mod runtime_apis {
108112 encode_runtime_api_inputs_with_info_to, encode_runtime_api_name,
109113 } ;
110114 pub use crate :: methods:: runtime_api_type_info:: {
111- RuntimeApiInfo , RuntimeApiInfoError , RuntimeApiInput , RuntimeApiTypeInfo ,
115+ RuntimeApiEntry , RuntimeApiEntryInfo , RuntimeApiInfo , RuntimeApiInfoError , RuntimeApiInput ,
116+ RuntimeApiTypeInfo ,
112117 } ;
113118 pub use crate :: utils:: { EncodableValues , IntoEncodableValues } ;
114119}
@@ -120,8 +125,9 @@ pub mod view_functions {
120125 //! and the encoded input data required to call a given View Function.
121126 //! - See [`decode_view_function_response`] to decode View Function responses.
122127 //! - See [`ViewFunctionTypeInfo`] for the underlying trait which extracts the relevant information.
128+ //! - See [`ViewFunctionEntryInfo`] for a underlying trait which provides information about the available
129+ //! View Functions.
123130
124- pub use crate :: methods:: Entry ;
125131 pub use crate :: methods:: view_function_decoder:: {
126132 ViewFunctionDecodeError , decode_view_function_response,
127133 decode_view_function_response_with_info,
@@ -131,7 +137,8 @@ pub mod view_functions {
131137 encode_view_function_inputs_to, encode_view_function_inputs_with_info_to,
132138 } ;
133139 pub use crate :: methods:: view_function_type_info:: {
134- ViewFunctionInfo , ViewFunctionInfoError , ViewFunctionInput , ViewFunctionTypeInfo ,
140+ ViewFunctionEntry , ViewFunctionEntryInfo , ViewFunctionInfo , ViewFunctionInfoError ,
141+ ViewFunctionInput , ViewFunctionTypeInfo ,
135142 } ;
136143 pub use crate :: utils:: { EncodableValues , IntoEncodableValues } ;
137144}
@@ -142,12 +149,15 @@ pub mod custom_values {
142149 //! - See [`decode_custom_value`] and [`decode_custom_value_with_info`] to decode custom values
143150 //! - See [`CustomValueTypeInfo`] for the underlying trait which extracts custom value
144151 //! information from metadata.
152+ //! - See [`CustomValueEntryInfo`] for a underlying trait which provides information about the available
153+ //! custom values.
145154
146155 pub use crate :: methods:: custom_value_decoder:: {
147156 CustomValueDecodeError , decode_custom_value, decode_custom_value_with_info,
148157 } ;
149158 pub use crate :: methods:: custom_value_type_info:: {
150- CustomValue , CustomValueInfo , CustomValueInfoError , CustomValueTypeInfo ,
159+ CustomValue , CustomValueEntryInfo , CustomValueInfo , CustomValueInfoError ,
160+ CustomValueTypeInfo ,
151161 } ;
152162}
153163
@@ -162,8 +172,30 @@ pub mod legacy_types {
162172 pub fn relay_chain ( ) -> scale_info_legacy:: ChainTypeRegistry {
163173 // This is a convenience function to load the Polkadot relay chain types.
164174 // It is used in the examples in this crate.
165- let bytes = include_bytes ! ( "../types/polkadot_types.yaml" ) ;
166- serde_yaml:: from_slice ( bytes) . expect ( "Polkadot types are valid YAML" )
175+ let bytes = include_bytes ! ( "../types/polkadot_relay_types.yaml" ) ;
176+ serde_yaml:: from_slice ( bytes) . expect ( "Polkadot RC types are valid YAML" )
177+ }
178+ }
179+
180+ // Hidden until the types are ready.
181+ #[ doc( hidden) ]
182+ pub mod kusama {
183+ //! Legacy types for Kusama chains.
184+
185+ /// Legacy types for the Kusama Relay Chain.
186+ pub fn relay_chain ( ) -> scale_info_legacy:: ChainTypeRegistry {
187+ // This is a convenience function to load the Polkadot relay chain types.
188+ // It is used in the examples in this crate.
189+ let bytes = include_bytes ! ( "../types/kusama_relay_types.yaml" ) ;
190+ serde_yaml:: from_slice ( bytes) . expect ( "Kusama RC types are valid YAML" )
191+ }
192+
193+ /// Legacy types for the Kusama Asset Hub.
194+ pub fn asset_hub ( ) -> scale_info_legacy:: ChainTypeRegistry {
195+ // This is a convenience function to load the Polkadot relay chain types.
196+ // It is used in the examples in this crate.
197+ let bytes = include_bytes ! ( "../types/kusama_assethub_types.yaml" ) ;
198+ serde_yaml:: from_slice ( bytes) . expect ( "Kusama AssetHub types are valid YAML" )
167199 }
168200 }
169201}
@@ -177,9 +209,11 @@ pub mod helpers {
177209 //! will use a tracing visitor (if the `error-tracing` feature is enabled) to provide more
178210 //! information in the event that decoding fails.
179211
212+ pub use crate :: methods:: Entry ;
213+
180214 pub use crate :: utils:: {
181215 DecodableValues , DecodeErrorTrace , EncodableValues , IntoDecodableValues ,
182- IntoEncodableValues , decode_with_error_tracing, list_storage_entries_any ,
216+ IntoEncodableValues , decode_with_error_tracing,
183217 } ;
184218 #[ cfg( feature = "legacy" ) ]
185219 pub use crate :: utils:: { type_registry_from_metadata, type_registry_from_metadata_any} ;
@@ -205,6 +239,8 @@ mod test {
205239 #[ test]
206240 fn test_deserializing_legacy_types ( ) {
207241 let _ = crate :: legacy_types:: polkadot:: relay_chain ( ) ;
242+ let _ = crate :: legacy_types:: kusama:: relay_chain ( ) ;
243+ let _ = crate :: legacy_types:: kusama:: asset_hub ( ) ;
208244 }
209245
210246 macro_rules! impls_trait {
0 commit comments