Skip to main content
Module

x/polkadot/types/extrinsic/ExtrinsicUnknown.ts

Package publishing for deno.land/x/polkadot
Go to Latest
File

import type { Registry } from 'https://deno.land/x/polkadot@0.2.40/types-codec/types/index.ts';import type { ExtrinsicOptions } from './types.ts';
import { Struct } from 'https://deno.land/x/polkadot@0.2.40/types-codec/mod.ts';
import { UNMASK_VERSION } from './constants.ts';
/** * @name GenericExtrinsicUnknown * @description * A default handler for extrinsics where the version is not known (default throw) */export class GenericExtrinsicUnknown extends Struct { constructor (registry: Registry, _value?: unknown, { isSigned = false, version = 0 }: Partial<ExtrinsicOptions> = {}) { super(registry, {});
throw new Error(`Unsupported ${isSigned ? '' : 'un'}signed extrinsic version ${version & UNMASK_VERSION}`); }}