* 11.0.1

* Re-adjust for ws usage

* Correct dev dependencies

* Bump dev
This commit is contained in:
Jaco
2023-03-04 16:50:01 +02:00
committed by GitHub
parent 3d43aba4a1
commit 3437fb65cd
38 changed files with 224 additions and 845 deletions
+3 -3
View File
@@ -16,16 +16,16 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@ledgerhq/hw-transport": "^6.28.1",
"@ledgerhq/hw-transport-webhid": "^6.27.12",
"@ledgerhq/hw-transport-webusb": "^6.27.12",
"@polkadot/util": "10.4.3-9-x"
"@polkadot/util": "11.0.0",
"tslib": "^2.5.0"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.28.9"
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '11.0.0' };
+5 -5
View File
@@ -19,13 +19,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@ledgerhq/hw-transport": "^6.28.1",
"@polkadot/hw-ledger-transports": "10.4.3-9-x",
"@polkadot/util": "10.4.3-9-x",
"@zondax/ledger-substrate": "^0.40.5"
"@polkadot/hw-ledger-transports": "11.0.0",
"@polkadot/util": "11.0.0",
"@zondax/ledger-substrate": "^0.40.5",
"tslib": "^2.5.0"
}
}
+8 -8
View File
@@ -52,7 +52,7 @@ export class Ledger {
}
public async getAddress (confirm = false, accountOffset = 0, addressOffset = 0, { account = LEDGER_DEFAULT_ACCOUNT, addressIndex = LEDGER_DEFAULT_INDEX, change = LEDGER_DEFAULT_CHANGE }: Partial<AccountOptions> = {}): Promise<LedgerAddress> {
return this.#withApp(async (app: SubstrateApp): Promise<LedgerAddress> => {
return this.withApp(async (app: SubstrateApp): Promise<LedgerAddress> => {
const { address, pubKey } = await wrapError(app.getAddress(account + accountOffset, change, addressIndex + addressOffset, confirm));
return {
@@ -63,7 +63,7 @@ export class Ledger {
}
public async getVersion (): Promise<LedgerVersion> {
return this.#withApp(async (app: SubstrateApp): Promise<LedgerVersion> => {
return this.withApp(async (app: SubstrateApp): Promise<LedgerVersion> => {
const { device_locked: isLocked, major, minor, patch, test_mode: isTestMode } = await wrapError(app.getVersion());
return {
@@ -75,7 +75,7 @@ export class Ledger {
}
public async sign (message: Uint8Array, accountOffset = 0, addressOffset = 0, { account = LEDGER_DEFAULT_ACCOUNT, addressIndex = LEDGER_DEFAULT_INDEX, change = LEDGER_DEFAULT_CHANGE }: Partial<AccountOptions> = {}): Promise<LedgerSignature> {
return this.#withApp(async (app: SubstrateApp): Promise<LedgerSignature> => {
return this.withApp(async (app: SubstrateApp): Promise<LedgerSignature> => {
const buffer = u8aToBuffer(message);
const { signature } = await wrapError(app.sign(account + accountOffset, change, addressIndex + addressOffset, buffer));
@@ -85,7 +85,7 @@ export class Ledger {
});
}
#getApp = async (): Promise<SubstrateApp> => {
async getApp (): Promise<SubstrateApp> {
if (!this.#app) {
const def = transports.find(({ type }) => type === this.#transport);
@@ -99,11 +99,11 @@ export class Ledger {
}
return this.#app;
};
}
#withApp = async <T> (fn: (app: SubstrateApp) => Promise<T>): Promise<T> => {
async withApp <T> (fn: (app: SubstrateApp) => Promise<T>): Promise<T> {
try {
const app = await this.#getApp();
const app = await this.getApp();
return await fn(app);
} catch (error) {
@@ -111,5 +111,5 @@ export class Ledger {
throw error;
}
};
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '11.0.0' };
+6 -6
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/util": "10.4.3-9-x",
"@polkadot/util-crypto": "10.4.3-9-x"
"@polkadot/util": "11.0.0",
"@polkadot/util-crypto": "11.0.0",
"tslib": "^2.5.0"
},
"peerDependencies": {
"@polkadot/util": "10.4.3-9-x",
"@polkadot/util-crypto": "10.4.3-9-x"
"@polkadot/util": "11.0.0",
"@polkadot/util-crypto": "11.0.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '11.0.0' };
+5 -5
View File
@@ -17,14 +17,14 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/util": "10.4.3-9-x",
"@substrate/ss58-registry": "^1.39.0"
"@polkadot/util": "11.0.0",
"@substrate/ss58-registry": "^1.39.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/hw-ledger": "10.4.3-9-x"
"@polkadot/hw-ledger": "11.0.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '11.0.0' };
+8 -8
View File
@@ -22,29 +22,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": {
"crypto": false,
"stream": false
},
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@noble/hashes": "1.2.0",
"@noble/secp256k1": "1.7.1",
"@polkadot/networks": "10.4.3-9-x",
"@polkadot/util": "10.4.3-9-x",
"@polkadot/wasm-crypto": "^6.4.1",
"@polkadot/x-bigint": "10.4.3-9-x",
"@polkadot/x-randomvalues": "10.4.3-9-x",
"@polkadot/networks": "11.0.0",
"@polkadot/util": "11.0.0",
"@polkadot/wasm-crypto": "^7.0.2",
"@polkadot/x-bigint": "11.0.0",
"@polkadot/x-randomvalues": "11.0.0",
"@scure/base": "1.1.1",
"ed2curve": "^0.3.0",
"tslib": "^2.5.0",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@types/ed2curve": "^0.2.2"
},
"peerDependencies": {
"@polkadot/util": "10.4.3-9-x"
"@polkadot/util": "11.0.0"
}
}
@@ -65,7 +65,7 @@ describe('blake2AsU8a', (): void => {
expect(a).toEqual(b);
});
for (const bitLength of <const> [256, 512]) {
for (const bitLength of [256, 512] as const) {
describe(`bitLength=${bitLength}`, (): void => {
perfWasm(`blake2AsU8a, bitLength=${bitLength}`, 64000, (input, onlyJs) =>
blake2AsU8a(input, bitLength, null, onlyJs)
@@ -26,7 +26,7 @@ describe('hmacShaAsU8a', (): void => {
)
};
for (const bitLength of <const> [256, 512]) {
for (const bitLength of [256, 512] as const) {
describe(`bitLength=${bitLength}`, (): void => {
for (const onlyJs of [false, true]) {
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
@@ -25,7 +25,7 @@ describe('keccakAsU8a', (): void => {
)
};
for (const bitLength of <const> [256, 512]) {
for (const bitLength of [256, 512] as const) {
describe(`bitLength=${bitLength}`, (): void => {
for (const onlyJs of [false, true]) {
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
@@ -19,7 +19,7 @@ describe('mnemonicGenerate', (): void => {
for (const onlyJs of [false, true]) {
describe(`onlyJs=${(onlyJs && 'true') || 'false'}`, (): void => {
for (const num of <const> [12, 15, 18, 21, 24]) {
for (const num of [12, 15, 18, 21, 24] as const) {
it(`generates a valid mnemonic (${num} words)`, (): void => {
const mnemonic = mnemonicGenerate(num, onlyJs);
const isValid = mnemonicValidate(mnemonic);
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/util-crypto', path: 'auto', type: 'auto', version: '11.0.0' };
@@ -24,7 +24,7 @@ describe('pbkdf2Encode', (): void => {
await waitReady();
});
for (const rounds of <const> [256, 1024, 2048]) {
for (const rounds of [256, 1024, 2048] as const) {
it(`has equivalent Wasm & JS results (${rounds} rounds)`, (): void => {
const salt = randomAsU8a();
+8 -8
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"exports": {
"./hex/toU8a": {
@@ -37,15 +37,15 @@
}
},
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-bigint": "10.4.3-9-x",
"@polkadot/x-global": "10.4.3-9-x",
"@polkadot/x-textdecoder": "10.4.3-9-x",
"@polkadot/x-textencoder": "10.4.3-9-x",
"@polkadot/x-bigint": "11.0.0",
"@polkadot/x-global": "11.0.0",
"@polkadot/x-textdecoder": "11.0.0",
"@polkadot/x-textencoder": "11.0.0",
"@types/bn.js": "^5.1.1",
"bn.js": "^5.2.1"
"bn.js": "^5.2.1",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/x-randomvalues": "10.4.3-9-x"
"@polkadot/x-randomvalues": "11.0.0"
}
}
+2 -2
View File
@@ -18,12 +18,12 @@ import { hasProcess } from './has';
type ConsoleType = 'error' | 'log' | 'warn';
type LogType = ConsoleType | 'debug';
const logTo = <const> {
const logTo = {
debug: 'log',
error: 'error',
log: 'log',
warn: 'warn'
};
} as const;
function formatOther (value: unknown): unknown {
if (value && isObject(value) && value.constructor === Object) {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/util', path: 'auto', type: 'auto', version: '11.0.0' };
+3 -3
View File
@@ -20,9 +20,9 @@
"./shim.cjs"
],
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x"
"@polkadot/x-global": "11.0.0",
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-bigint', path: 'auto', type: 'auto', version: '11.0.0' };
+4 -4
View File
@@ -17,11 +17,11 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/util": "10.4.3-9-x",
"buffer-es6": "^4.9.3"
"@polkadot/util": "11.0.0",
"buffer-es6": "^4.9.3",
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '11.0.0' };
+7 -5
View File
@@ -17,14 +17,16 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x",
"@types/node-fetch": "^2.6.2",
"node-fetch": "^3.3.0"
"@polkadot/x-global": "11.0.0",
"node-fetch": "^3.3.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/node-fetch": "^2.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-fetch', path: 'auto', type: 'auto', version: '11.0.0' };
+2 -2
View File
@@ -17,9 +17,9 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.21.0"
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-global', path: 'auto', type: 'auto', version: '11.0.0' };
+4 -4
View File
@@ -17,16 +17,16 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x"
"@polkadot/x-global": "11.0.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/util": "10.4.3-9-x",
"@polkadot/util": "11.0.0",
"@types/react-native": "^0.71.3"
},
"denoDependencies": {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-randomvalues', path: 'auto', type: 'auto', version: '11.0.0' };
+3 -3
View File
@@ -17,13 +17,13 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x"
"@polkadot/x-global": "11.0.0",
"tslib": "^2.5.0"
},
"denoDependencies": {
"util": "std@0.161.0/node/util.ts"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-textdecoder', path: 'auto', type: 'auto', version: '11.0.0' };
+3 -3
View File
@@ -17,13 +17,13 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x"
"@polkadot/x-global": "11.0.0",
"tslib": "^2.5.0"
},
"denoDependencies": {
"util": "std@0.161.0/node/util.ts"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-textencoder', path: 'auto', type: 'auto', version: '11.0.0' };
+6 -4
View File
@@ -17,14 +17,16 @@
},
"sideEffects": false,
"type": "module",
"version": "10.4.3-9-x",
"version": "11.0.0",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@babel/runtime": "^7.21.0",
"@polkadot/x-global": "10.4.3-9-x",
"@types/ws": "^8.5.4",
"@polkadot/x-global": "11.0.0",
"tslib": "^2.5.0",
"ws": "^8.12.1"
},
"devDependencies": {
"@types/ws": "^8.5.4"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '10.4.3-9-x' };
export const packageInfo = { name: '@polkadot/x-ws', path: 'auto', type: 'auto', version: '11.0.0' };