fix: update pezkuwi mainnet genesis hash and remove npm token from repo

- Update genesis hash to mainnet value
- Remove npmAuthToken from .yarnrc.yml (use GitHub Secrets instead)
- Add pezsp_* and pezframe_* path support in PortableRegistry
This commit is contained in:
2026-01-31 07:33:44 +03:00
parent 31467f90d4
commit 2db0d19928
65 changed files with 10832 additions and 113 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
],
"type": "module",
"types": "./build/index.d.ts",
"version": "16.5.9",
"version": "16.5.11",
"main": "./build/cjs/index.js",
"module": "./build/index.js",
"exports": {
+2 -2
View File
@@ -342,10 +342,10 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
*/
public override get hash (): CodecHash {
if (!this.#hashCache) {
this.#hashCache = super.hash;
this.#hashCache = super.hash as CodecHash;
}
return this.#hashCache;
return this.#hashCache!;
}
/**
+1 -1
View File
@@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { Raw } from '@pezkuwi/types-codec';
import jsonVec from '@pezkuwi/types-support/json/AccountIdVec.001.json' assert { type: 'json' };
import jsonVec from '@pezkuwi/types-support/json/AccountIdVec.001.json' with { type: 'json' };
import { TypeRegistry } from '../create/index.js';
+1 -1
View File
@@ -8,7 +8,7 @@
import type { BlockValue } from './Block.js';
import block00300 from '@pezkuwi/types-support/json/SignedBlock.003.00.json' assert { type: 'json' };
import block00300 from '@pezkuwi/types-support/json/SignedBlock.003.00.json' with { type: 'json' };
import metadataStatic from '@pezkuwi/types-support/metadata/static-bizinikiwi';
import { stringify } from '@pezkuwi/util';
@@ -7,7 +7,7 @@
import type { ExtrinsicStatus } from './types.js';
import rpc from '@pezkuwi/types-support/json/ExtrinsicStatus.001.json' assert { type: 'json' };
import rpc from '@pezkuwi/types-support/json/ExtrinsicStatus.001.json' with { type: 'json' };
import { TypeRegistry } from '../../create/index.js';
@@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import json3 from '@pezkuwi/types-support/json/GrandpaRoundstate.001.json' assert { type: 'json' };
import json3 from '@pezkuwi/types-support/json/GrandpaRoundstate.001.json' with { type: 'json' };
import { TypeRegistry } from '../../create/index.js';
@@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import json3 from '@pezkuwi/types-support/json/Header.003.json' assert { type: 'json' };
import json3 from '@pezkuwi/types-support/json/Header.003.json' with { type: 'json' };
import { TypeRegistry } from '../../create/index.js';
@@ -5,11 +5,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import json1 from '@pezkuwi/types-support/json/Header.001.json' assert { type: 'json' };
import json2 from '@pezkuwi/types-support/json/Header.002.json' assert { type: 'json' };
import json3 from '@pezkuwi/types-support/json/Header.003.json' assert { type: 'json' };
import block00300 from '@pezkuwi/types-support/json/SignedBlock.003.00.json' assert { type: 'json' };
import block00301 from '@pezkuwi/types-support/json/SignedBlock.003.01.json' assert { type: 'json' };
import json1 from '@pezkuwi/types-support/json/Header.001.json' with { type: 'json' };
import json2 from '@pezkuwi/types-support/json/Header.002.json' with { type: 'json' };
import json3 from '@pezkuwi/types-support/json/Header.003.json' with { type: 'json' };
import block00300 from '@pezkuwi/types-support/json/SignedBlock.003.00.json' with { type: 'json' };
import block00301 from '@pezkuwi/types-support/json/SignedBlock.003.01.json' with { type: 'json' };
import { BN } from '@pezkuwi/util';
import { TypeRegistry } from '../../create/index.js';
@@ -7,7 +7,7 @@
import type { RuntimeVersion } from './types.js';
import rpc from '@pezkuwi/types-support/json/RuntimeVersion.002.json' assert { type: 'json' };
import rpc from '@pezkuwi/types-support/json/RuntimeVersion.002.json' with { type: 'json' };
import { TypeRegistry } from '../../create/index.js';
@@ -6,7 +6,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { TypeRegistry } from '@pezkuwi/types/create';
import json from '@pezkuwi/types-support/json/StorageChangeSet.001.json' assert { type: 'json' };
import json from '@pezkuwi/types-support/json/StorageChangeSet.001.json' with { type: 'json' };
describe('StorageChangeSet', (): void => {
const registry = new TypeRegistry();
@@ -6,8 +6,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import json1 from '@pezkuwi/types-support/json/EventRecord.001.json' assert { type: 'json' };
import json3 from '@pezkuwi/types-support/json/EventRecord.003.json' assert { type: 'json' };
import json1 from '@pezkuwi/types-support/json/EventRecord.001.json' with { type: 'json' };
import json3 from '@pezkuwi/types-support/json/EventRecord.003.json' with { type: 'json' };
import rpcMetadata from '@pezkuwi/types-support/metadata/static-bizinikiwi';
import { TypeRegistry } from '../../create/index.js';
@@ -53,29 +53,38 @@ const PRIMITIVE_ALIAS: Record<string, string> = {
const PATHS_ALIAS = splitNamespace([
// full matching on exact names...
// these are well-known types with additional encoding
'sp_core::crypto::AccountId32',
'sp_runtime::generic::era::Era',
'sp_runtime::multiaddress::MultiAddress',
'pezsp_core::crypto::AccountId32',
'sp_core::crypto::AccountId32', // upstream compatibility
'pezsp_runtime::generic::era::Era',
'sp_runtime::generic::era::Era', // upstream compatibility
'pezsp_runtime::multiaddress::MultiAddress',
'sp_runtime::multiaddress::MultiAddress', // upstream compatibility
// ethereum overrides (Frontier, Moonbeam, Pezkuwi claims)
'fp_account::AccountId20',
'account::AccountId20',
'pezkuwi_runtime_common::claims::EthereumAddress',
// weights 2 is a structure, however for 1.5. with a single field it
// should be flatenned (can appear in Compact<Weight> extrinsics)
'frame_support::weights::weight_v2::Weight',
'sp_weights::weight_v2::Weight',
'pezframe_support::weights::weight_v2::Weight',
'frame_support::weights::weight_v2::Weight', // upstream compatibility
'pezsp_weights::weight_v2::Weight',
'sp_weights::weight_v2::Weight', // upstream compatibility
// wildcard matching in place...
// these have a specific encoding or logic, use a wildcard for {pallet, darwinia}_democracy
'*_democracy::vote::Vote',
'*_conviction_voting::vote::Vote',
'*_identity::types::Data',
// these are opaque Vec<u8> wrappers
'sp_core::OpaqueMetadata',
'sp_core::OpaquePeerId',
'sp_core::offchain::OpaqueMultiaddr',
'pezsp_core::OpaqueMetadata',
'sp_core::OpaqueMetadata', // upstream compatibility
'pezsp_core::OpaquePeerId',
'sp_core::OpaquePeerId', // upstream compatibility
'pezsp_core::offchain::OpaqueMultiaddr',
'sp_core::offchain::OpaqueMultiaddr', // upstream compatibility
// shorten some well-known types
'primitive_types::*',
'sp_arithmetic::per_things::*',
'pezsp_arithmetic::per_things::*',
'sp_arithmetic::per_things::*', // upstream compatibility
// runtime
'*_runtime::RuntimeCall',
'*_runtime::RuntimeEvent',
@@ -173,7 +182,7 @@ function matchParts (first: string[], second: (string | Text)[]): boolean {
function getAliasPath ({ def, path }: SiType): string | null {
// specific logic for weights - we override when non-complex struct
// (as applied in Weight 1.5 where we also have `Compact<{ refTime: u64 }>)
if (['frame_support::weights::weight_v2::Weight', 'sp_weights::weight_v2::Weight'].includes(path.join('::'))) {
if (['pezframe_support::weights::weight_v2::Weight', 'frame_support::weights::weight_v2::Weight', 'pezsp_weights::weight_v2::Weight', 'sp_weights::weight_v2::Weight'].includes(path.join('::'))) {
return !def.isComposite || def.asComposite.fields.length === 1
? 'WeightV1'
: null;
@@ -419,7 +428,7 @@ function registerTypes (lookup: PortableRegistry, lookups: Record<string, string
const siSignature = lookup.getSiType(sigParam.type.unwrap());
const nsSignature = siSignature.path.join('::');
let nsAccountId = siAddress.path.join('::');
const isMultiAddress = nsAccountId === 'sp_runtime::multiaddress::MultiAddress';
const isMultiAddress = nsAccountId === 'pezsp_runtime::multiaddress::MultiAddress' || nsAccountId === 'sp_runtime::multiaddress::MultiAddress';
// With multiaddress, we check the first type param again
if (isMultiAddress) {
@@ -437,7 +446,7 @@ function registerTypes (lookup: PortableRegistry, lookups: Record<string, string
Address: isMultiAddress
? 'MultiAddress'
: 'AccountId',
ExtrinsicSignature: ['sp_runtime::MultiSignature'].includes(nsSignature)
ExtrinsicSignature: ['pezsp_runtime::MultiSignature', 'sp_runtime::MultiSignature'].includes(nsSignature)
? 'MultiSignature'
: names[sigParam.type.unwrap().toNumber()] || 'MultiSignature'
});
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @pezkuwi/dev
export const packageInfo = { name: '@pezkuwi/types', path: 'auto', type: 'auto', version: '16.5.9' };
export const packageInfo = { name: '@pezkuwi/types', path: 'auto', type: 'auto', version: '16.5.11' };