Skip to content

Commit 460bcd5

Browse files
hw-{ledger, ledger-transports}, keyring, networks, util, util-crypto, x-{bigint, fetch, global, randomvalues, textdecoder, textencoder, ws} 13.5.2
1 parent 3284e71 commit 460bcd5

File tree

19 files changed

+39
-19
lines changed

19 files changed

+39
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## master
44

5+
- hw-{ledger, ledger-transports}, keyring, networks, util, util-crypto, x-{bigint, fetch, global, randomvalues, textdecoder, textencoder, ws} 13.5.2
56
- api, api-{augment, base, contract, derive}, rpc-{augment, core, provider}, types, types-{augment, codec, create, known} 16.2.1
67
- phishing 0.25.12
78
- api, api-{augment, base, contract, derive}, rpc-{augment, core, provider}, types, types-{augment, codec, create, known} 16.1.2

hw-ledger-transports/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

hw-ledger/defaults.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const genericLedgerApps = {
4747
encointer: 'Encointer',
4848
frequency: 'Frequency',
4949
integritee: 'Integritee',
50+
liberland: 'Liberland',
5051
polimec: 'Polimec',
5152
vara: 'Vara'
5253
};

hw-ledger/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/hw-ledger', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/hw-ledger', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

keyring/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/keyring', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/keyring', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

networks/defaults/genesis.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export const knownGenesis: KnownGenesis = {
8989
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
9090
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf' // Kusama CC1
9191
],
92+
liberland: [
93+
'0x6bd89e052d67a45bb60a9a23e8581053d5e0d619f15cb9865946937e690c42d6'
94+
],
9295
matrixchain: [
9396
'0x3af4ff48ec76d2efc8476730f423ac07e25ad48f5f4c9dc39c778b164d808615'
9497
],

networks/defaults/ledger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const knownLedger: KnownLedger = {
2525
karura: 0x000002ae,
2626
khala: 0x000001b2,
2727
kusama: 0x000001b2,
28+
liberland: 0x000002ff,
2829
matrixchain: 0x00000483,
2930
nodle: 0x000003eb,
3031
origintrail: 0x00000162,

networks/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/networks', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/networks', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

util-crypto/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/util-crypto', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/util-crypto', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

util-crypto/scrypt/fromU8a.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@ interface Result {
1212
}
1313

1414
export function scryptFromU8a (data: Uint8Array): Result {
15+
if (!(data instanceof Uint8Array)) {
16+
throw new Error('Expected input to be a Uint8Array');
17+
}
18+
19+
// Ensure the input is exactly 44 bytes: 32 for salt + 3 * 4 for N, p, r
20+
if (data.length < 32 + 12) {
21+
throw new Error(`Invalid input length: expected 44 bytes, found ${data.length}`);
22+
}
23+
1524
const salt = data.subarray(0, 32);
16-
const N = u8aToBn(data.subarray(32 + 0, 32 + 4), BN_LE_OPTS).toNumber();
17-
const p = u8aToBn(data.subarray(32 + 4, 32 + 8), BN_LE_OPTS).toNumber();
18-
const r = u8aToBn(data.subarray(32 + 8, 32 + 12), BN_LE_OPTS).toNumber();
25+
const N = u8aToBn(data.subarray(32, 36), BN_LE_OPTS).toNumber();
26+
const p = u8aToBn(data.subarray(36, 40), BN_LE_OPTS).toNumber();
27+
const r = u8aToBn(data.subarray(40, 44), BN_LE_OPTS).toNumber();
1928

2029
// FIXME At this moment we assume these to be fixed params, this is not a great idea
2130
// since we lose flexibility and updates for greater security. However we need some

util/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/util', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/util', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-bigint/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-bigint', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-bigint', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-fetch/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-fetch', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-fetch', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-global/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-global', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-global', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-randomvalues/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-randomvalues', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-randomvalues', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-randomvalues/react-native.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { base64Decode } from 'https://deno.land/x/polkadot/wasm-util/base64.ts';
66
import { xglobal } from 'https://deno.land/x/polkadot/x-global/mod.ts';
77

88
import { crypto as cryptoBrowser, getRandomValues as getRandomValuesBrowser } from './browser.ts';
9-
import { insecureRandomValues } from './fallback.ts';
109

1110
export { packageInfo } from './packageInfo.ts';
1211

@@ -26,6 +25,10 @@ interface RNExt {
2625
* random utiliy generation functions.
2726
**/
2827
function getRandomValuesRn (output: Uint8Array): Uint8Array {
28+
if (!NativeModules['ExpoRandom'] && !(NativeModules as RNExt).RNGetRandomValues) {
29+
throw new Error('No secure random number generator available. This environment does not support crypto.getRandomValues and no React Native secure RNG module is available.');
30+
}
31+
2932
return base64Decode(
3033
(NativeModules as RNExt).RNGetRandomValues
3134
? (NativeModules as RNExt).RNGetRandomValues.getRandomBase64(output.length)
@@ -37,8 +40,10 @@ function getRandomValuesRn (output: Uint8Array): Uint8Array {
3740
export const getRandomValues = (
3841
(typeof xglobal.crypto === 'object' && typeof xglobal.crypto.getRandomValues === 'function')
3942
? getRandomValuesBrowser
40-
: (typeof xglobal['nativeCallSyncHook'] === 'undefined' || !NativeModules['ExpoRandom'])
41-
? insecureRandomValues
43+
: (typeof xglobal['nativeCallSyncHook'] === 'undefined')
44+
? () => {
45+
throw new Error('No secure random number generator available. This environment does not support crypto.getRandomValues.');
46+
}
4247
: getRandomValuesRn
4348
);
4449

x-textdecoder/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-textdecoder', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-textdecoder', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-textencoder/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-textencoder', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-textencoder', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

x-ws/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22

3-
export const packageInfo = { name: '@polkadot/x-ws', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.1' };
3+
export const packageInfo = { name: '@polkadot/x-ws', path: new URL(import.meta.url).pathname, type: 'deno', version: '13.5.2' };

0 commit comments

Comments
 (0)