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

0 commit comments

Comments
 (0)