Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/types/create/index.ts>TypeRegistry

Package publishing for deno.land/x/polkadot
Go to Latest
class TypeRegistry
implements Registry
import { TypeRegistry } from "https://deno.land/x/polkadot@0.2.14/types/create/index.ts";

Constructors

new
TypeRegistry(createdAtHash?: Hash | Uint8Array | string)

Properties

readonly
chainDecimals: number[]
readonly
chainSS58: number | undefined
readonly
chainTokens: string[]
optional
createdAtHash: Hash
readonly
firstCallIndex: Uint8Array
readonly
knownTypes: RegisteredTypes
readonly
lookup: PortableRegistry
readonly
metadata: MetadataLatest
readonly
signedExtensions: string[]
readonly
unknownTypes: string[]

Methods

private
_registerObject(obj: RegistryTypes): void
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): string
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>(
type: K,
params: unknown[],
options?: CreateOptions,
): T
findMetaCall(callIndex: Uint8Array): CallFunction
findMetaEvent(eventIndex: Uint8Array): CodecClass<GenericEventData>
get<T extends Codec = Codec, K extends string = string>(
name: K,
withUnknown?: boolean,
knownTypeDef?: TypeDef,
): CodecClass<T> | 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, msg?: string): 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>(
name: K,
withUnknown?: boolean,
knownTypeDef?: TypeDef,
): CodecClass<T> | undefined
hasClass(name: string): boolean
hasDef(name: string): boolean
hash(data: Uint8Array): IU8a
hasType(name: string): boolean
isLookupType(value: string): boolean
register(name: string, type: CodecClass): void
setHasher(hasher?: CodecHasher | null): void
setKnownTypes(knownTypes: RegisteredTypes): void
setMetadata(
metadata: Metadata,
signedExtensions?: string[],
userExtensions?: ExtDef,
): void
setSignedExtensions(signedExtensions?: string[], userExtensions?: ExtDef): void