@polkadot/types-codec
Advanced tools
Comparing version 6.12.2-7 to 6.12.2-8
@@ -9,3 +9,2 @@ import type { HexString } from '@polkadot/util/types'; | ||
#private; | ||
readonly registry: CodecRegistry; | ||
createdAtHash?: IU8a; | ||
@@ -27,2 +26,3 @@ readonly initialU8aLength?: number; | ||
get isEmpty(): boolean; | ||
get registry(): CodecRegistry; | ||
/** | ||
@@ -29,0 +29,0 @@ * @description Compares the value of the input to see if there is a match |
import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase"; | ||
import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey"; | ||
var _registry = /*#__PURE__*/_classPrivateFieldLooseKey("registry"); | ||
var _raw = /*#__PURE__*/_classPrivateFieldLooseKey("raw"); | ||
@@ -15,3 +17,6 @@ | ||
constructor(registry, value, initialU8aLength) { | ||
this.registry = void 0; | ||
Object.defineProperty(this, _registry, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.createdAtHash = void 0; | ||
@@ -23,3 +28,3 @@ this.initialU8aLength = void 0; | ||
}); | ||
this.registry = registry; | ||
_classPrivateFieldLooseBase(this, _registry)[_registry] = registry; | ||
_classPrivateFieldLooseBase(this, _raw)[_raw] = value; | ||
@@ -56,2 +61,6 @@ this.initialU8aLength = initialU8aLength; | ||
} | ||
get registry() { | ||
return _classPrivateFieldLooseBase(this, _registry)[_registry]; | ||
} | ||
/** | ||
@@ -58,0 +67,0 @@ * @description Compares the value of the input to see if there is a match |
@@ -24,3 +24,2 @@ import type { HexString } from '@polkadot/util/types'; | ||
#private; | ||
readonly registry: CodecRegistry; | ||
createdAtHash?: IU8a; | ||
@@ -51,2 +50,3 @@ readonly initialU8aLength?: number; | ||
get hash(): IU8a; | ||
get registry(): CodecRegistry; | ||
/** | ||
@@ -53,0 +53,0 @@ * @description Compares the value of the input to see if there is a match |
@@ -73,2 +73,4 @@ import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase"; | ||
var _registry = /*#__PURE__*/_classPrivateFieldLooseKey("registry"); | ||
var _jsonMap = /*#__PURE__*/_classPrivateFieldLooseKey("jsonMap"); | ||
@@ -83,3 +85,6 @@ | ||
super(decoded); | ||
this.registry = void 0; | ||
Object.defineProperty(this, _registry, { | ||
writable: true, | ||
value: void 0 | ||
}); | ||
this.createdAtHash = void 0; | ||
@@ -95,3 +100,3 @@ this.initialU8aLength = void 0; | ||
}); | ||
this.registry = registry; | ||
_classPrivateFieldLooseBase(this, _registry)[_registry] = registry; | ||
this.initialU8aLength = decodedLength; | ||
@@ -176,2 +181,6 @@ _classPrivateFieldLooseBase(this, _jsonMap)[_jsonMap] = jsonMap; | ||
} | ||
get registry() { | ||
return _classPrivateFieldLooseBase(this, _registry)[_registry]; | ||
} | ||
/** | ||
@@ -178,0 +187,0 @@ * @description Compares the value of the input to see if there is a match |
@@ -23,3 +23,3 @@ { | ||
"type": "module", | ||
"version": "6.12.2-7", | ||
"version": "6.12.2-8", | ||
"main": "index.js", | ||
@@ -26,0 +26,0 @@ "dependencies": { |
@@ -6,3 +6,3 @@ // Copyright 2017-2021 @polkadot/types-codec authors & contributors | ||
name: '@polkadot/types-codec', | ||
version: '6.12.2-7' | ||
version: '6.12.2-8' | ||
}; |
@@ -62,3 +62,3 @@ /// <reference types="bn.js" /> | ||
} | ||
export interface IMethod<A extends AnyTuple = AnyTuple> extends Codec { | ||
export interface IMethod<A extends AnyTuple = AnyTuple, M = any> extends Codec { | ||
readonly args: A; | ||
@@ -68,3 +68,4 @@ readonly argsDef: ArgsDef; | ||
readonly data: Uint8Array; | ||
readonly meta: M; | ||
is: (tx: IMethod<AnyTuple>) => tx is IMethod<A>; | ||
} |
/// <reference types="bn.js" /> | ||
import type { BN } from '@polkadot/util'; | ||
import type { Codec, CodecClass } from './codec'; | ||
import type { AnyTuple } from './helpers'; | ||
import type { ICompact, IEnum, IMap, IMethod, INumber, IOption, IResult, ISet, IStruct, ITuple, IU8a, IVec } from './interfaces'; | ||
export declare type OnlyCodec<K, T, Types> = K extends keyof Types ? Types[K] : T extends ICompact | IEnum | IMap | IMethod | INumber | IOption | IResult | ISet | IStruct | ITuple | IU8a | IVec ? T : T extends Codec ? T : never; | ||
export interface RegistryError { | ||
args: string[]; | ||
docs: string[]; | ||
index: number; | ||
method: string; | ||
name: string; | ||
section: string; | ||
} | ||
export declare type RegistryTypes = Record<string, CodecClass | string | Record<string, string> | { | ||
@@ -16,2 +25,10 @@ _enum: string[] | Record<string, number> | Record<string, string | null>; | ||
} | ||
export interface CallBase<A extends AnyTuple, M = any> extends IMethod<A, M> { | ||
readonly method: string; | ||
readonly section: string; | ||
toJSON: () => any; | ||
} | ||
export interface CallFunction<A extends AnyTuple = AnyTuple, M = any> extends CallBase<A, M> { | ||
(...args: any[]): IMethod<A, M>; | ||
} | ||
export interface CodecRegistry { | ||
@@ -22,7 +39,7 @@ readonly chainDecimals: number[]; | ||
createdAtHash?: IU8a; | ||
findMetaCall(callIndex: Uint8Array): unknown; | ||
findMetaCall(callIndex: Uint8Array): CallFunction; | ||
findMetaError(errorIndex: Uint8Array | { | ||
error: BN; | ||
index: BN; | ||
}): unknown; | ||
}): RegistryError; | ||
findMetaEvent(eventIndex: Uint8Array): CodecClass<any>; | ||
@@ -29,0 +46,0 @@ isLookupType(value: string): boolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
390838
11079