This commit is contained in:
Jaco
2022-05-30 15:42:31 +03:00
committed by GitHub
parent 06cb4aadfa
commit bd0b6426a7
20 changed files with 191 additions and 187 deletions
+7 -7
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/api-base": "8.6.2-1",
"@polkadot/rpc-augment": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-augment": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/api-base": "8.6.2",
"@polkadot/rpc-augment": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-augment": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/util": "^9.3.1"
},
"devDependencies": {
"@polkadot/types-support": "8.6.2-1"
"@polkadot/types-support": "8.6.2"
}
}
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/rpc-core": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/rpc-core": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/util": "^9.3.1",
"rxjs": "^7.5.5"
}
+6 -6
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/api": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-create": "8.6.2-1",
"@polkadot/api": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/types-create": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/util-crypto": "^9.3.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/api-augment": "8.6.2",
"@polkadot/keyring": "^9.3.1"
}
}
+12 -12
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/api": "8.6.2-1",
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/api-base": "8.6.2-1",
"@polkadot/rpc-core": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/api": "8.6.2",
"@polkadot/api-augment": "8.6.2",
"@polkadot/api-base": "8.6.2",
"@polkadot/rpc-core": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/util-crypto": "^9.3.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api": "8.6.2-1",
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/rpc-augment": "8.6.2-1",
"@polkadot/rpc-provider": "8.6.2-1",
"@polkadot/types-support": "8.6.2-1"
"@polkadot/api": "8.6.2",
"@polkadot/api-augment": "8.6.2",
"@polkadot/rpc-augment": "8.6.2",
"@polkadot/rpc-provider": "8.6.2",
"@polkadot/types-support": "8.6.2"
}
}
+14 -14
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/api-base": "8.6.2-1",
"@polkadot/api-derive": "8.6.2-1",
"@polkadot/api-augment": "8.6.2",
"@polkadot/api-base": "8.6.2",
"@polkadot/api-derive": "8.6.2",
"@polkadot/keyring": "^9.3.1",
"@polkadot/rpc-augment": "8.6.2-1",
"@polkadot/rpc-core": "8.6.2-1",
"@polkadot/rpc-provider": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-augment": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-create": "8.6.2-1",
"@polkadot/types-known": "8.6.2-1",
"@polkadot/rpc-augment": "8.6.2",
"@polkadot/rpc-core": "8.6.2",
"@polkadot/rpc-provider": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-augment": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/types-create": "8.6.2",
"@polkadot/types-known": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/util-crypto": "^9.3.1",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/types-support": "8.6.2-1"
"@polkadot/api-augment": "8.6.2",
"@polkadot/types-support": "8.6.2"
}
}
+4 -4
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/rpc-core": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/rpc-core": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/util": "^9.3.1"
}
}
+5 -5
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/rpc-augment": "8.6.2-1",
"@polkadot/rpc-provider": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/rpc-augment": "8.6.2",
"@polkadot/rpc-provider": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/util": "^9.3.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^9.3.1",
"@polkadot/rpc-augment": "8.6.2-1"
"@polkadot/rpc-augment": "8.6.2"
}
}
+3 -3
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/keyring": "^9.3.1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-support": "8.6.2-1",
"@polkadot/types": "8.6.2",
"@polkadot/types-support": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/util-crypto": "^9.3.1",
"@polkadot/x-fetch": "^9.3.1",
+10 -10
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -33,15 +33,15 @@
"@babel/core": "^7.18.2",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.18.3",
"@polkadot/api": "8.6.2-1",
"@polkadot/api-augment": "8.6.2-1",
"@polkadot/rpc-augment": "8.6.2-1",
"@polkadot/rpc-provider": "8.6.2-1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-augment": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-create": "8.6.2-1",
"@polkadot/types-support": "8.6.2-1",
"@polkadot/api": "8.6.2",
"@polkadot/api-augment": "8.6.2",
"@polkadot/rpc-augment": "8.6.2",
"@polkadot/rpc-provider": "8.6.2",
"@polkadot/types": "8.6.2",
"@polkadot/types-augment": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/types-create": "8.6.2",
"@polkadot/types-support": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/x-ws": "^9.3.1",
"handlebars": "^4.7.7",
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/util": "^9.3.1"
}
}
+4 -4
View File
@@ -20,16 +20,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/util": "^9.3.1"
},
"devDependencies": {
"@polkadot/types": "8.6.2-1",
"@polkadot/types-augment": "8.6.2-1",
"@polkadot/types-support": "8.6.2-1",
"@polkadot/types": "8.6.2",
"@polkadot/types-augment": "8.6.2",
"@polkadot/types-support": "8.6.2",
"@polkadot/util-crypto": "^9.3.1"
}
}
+3 -3
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-codec": "8.6.2",
"@polkadot/util": "^9.3.1"
},
"devDependencies": {
"@polkadot/types": "8.6.2-1"
"@polkadot/types": "8.6.2"
}
}
+7 -6
View File
@@ -4,7 +4,7 @@
import type { Codec, CodecClass, Registry, U8aBitLength, UIntBitLength } from '@polkadot/types-codec/types';
import type { TypeDef } from '../types';
import { BTreeMap, BTreeSet, Bytes, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Null, Option, OptionBool, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
import { BTreeMap, BTreeSet, Bytes, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Null, Option, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
import { assert, isNumber, stringify } from '@polkadot/util';
import { TypeDefInfo } from '../types';
@@ -118,11 +118,12 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
[TypeDefInfo.Option]: (registry: Registry, value: TypeDef): CodecClass<Codec> => {
assert(value.sub && !Array.isArray(value.sub), 'Expected type information for Option');
return (
value.sub.type === 'bool'
? OptionBool
: createWithSub(Option, value)
);
// NOTE This is opt-in (unhandled), not by default
// if (value.sub.type === 'bool') {
// return OptionBool;
// }
return createWithSub(Option, value);
},
[TypeDefInfo.Plain]: (registry: Registry, value: TypeDef): CodecClass<Codec> =>
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/networks": "^9.3.1",
"@polkadot/types": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-create": "8.6.2-1",
"@polkadot/types": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/types-create": "8.6.2",
"@polkadot/util": "^9.3.1"
}
}
+1 -1
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
+5 -5
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.6.2-1",
"version": "8.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.3",
"@polkadot/keyring": "^9.3.1",
"@polkadot/types-augment": "8.6.2-1",
"@polkadot/types-codec": "8.6.2-1",
"@polkadot/types-create": "8.6.2-1",
"@polkadot/types-augment": "8.6.2",
"@polkadot/types-codec": "8.6.2",
"@polkadot/types-create": "8.6.2",
"@polkadot/util": "^9.3.1",
"@polkadot/util-crypto": "^9.3.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^9.3.1",
"@polkadot/types-support": "8.6.2-1"
"@polkadot/types-support": "8.6.2"
}
}
@@ -784,12 +784,13 @@ export class PortableRegistry extends Struct implements ILookup {
if (specialVariant === 'Option') {
const sub = this.#createSiDef(params[0].type.unwrap());
if (sub.type === 'bool') {
return withTypeString(this.registry, {
info: TypeDefInfo.Plain,
type: 'OptionBool'
});
}
// NOTE This is opt-in (unhandled), not by default
// if (sub.type === 'bool') {
// return withTypeString(this.registry, {
// info: TypeDefInfo.Plain,
// type: 'OptionBool'
// });
// }
return withTypeString(this.registry, {
info: TypeDefInfo.Option,