class TypeRegistry
implements Registry
import { TypeRegistry } from "https://dotland.deno.dev/x/polkadot@0.2.35/types/mod.ts";
Constructors
new
TypeRegistry(createdAtHash?: Hash | Uint8Array | string)Properties
optional
createdAtHash: Hashreadonly
knownTypes: RegisteredTypesreadonly
lookup: PortableRegistryreadonly
metadata: MetadataLatestMethods
clearCache(): void
createClass<T extends Codec = Codec, K extends string = string>(type: K): CodecClass<DetectCodec<T, K>>
createClassUnsafe<T extends Codec = Codec, K extends string = string>(type: K): CodecClass<T>
createLookupType(lookupId: SiLookupTypeId | number): LookupString
createType<T extends Codec = Codec, K extends string = string>(type: K, ...params: unknown[]): DetectCodec<T, K>
createTypeUnsafe<T extends Codec = Codec, K extends string = string>(): T
findMetaCall(callIndex: Uint8Array): CallFunction
findMetaError(errorIndex: ): RegistryError
findMetaEvent(eventIndex: Uint8Array): CodecClass<GenericEventData>
get<T extends Codec = Codec, K extends string = string>(): CodecClass<T> | undefined
getChainProperties(): ChainProperties | undefined
getClassName(Type: CodecClass): string | undefined
getDefinition(typeName: string): string | undefined
getModuleInstances(specName: AnyString, moduleName: string): string[] | undefined
getOrThrow<T extends Codec = Codec, K extends string = string, R = DetectCodec<T, K>>(name: K): CodecClass<R>
getOrUnknown<T extends Codec = Codec, K extends string = string, R = DetectCodec<T, K>>(name: K): CodecClass<R>
getSignedExtensionExtra(): Record<string, string>
getSignedExtensionTypes(): Record<string, string>
getUnsafe<T extends Codec = Codec, K extends string = string>(): CodecClass<T> | undefined
hasClass(name: string): boolean
hasDef(name: string): boolean
hasType(name: string): boolean
isLookupType(value: string): value is LookupString
register(type: CodecClass | RegistryTypes): void
register(name: string, type: CodecClass): void
setChainProperties(properties?: ChainProperties): void
setHasher(hasher?: CodecHasher | null): void
setKnownTypes(knownTypes: RegisteredTypes): void
setLookup(lookup: PortableRegistry): void
setMetadata(): void
setSignedExtensions(signedExtensions?: string[], userExtensions?: ExtDef): void