Module

x/polkadot/types/mod.ts>TypeRegistry

Package publishing for deno.land/x/polkadot
Go to Latest
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

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

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>
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): 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): value is LookupString
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