chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+24
View File
@@ -0,0 +1,24 @@
import { isHex, isU8a, u8aToHex, u8aToU8a } from '@pezkuwi/util';
import { decodeAddress } from '@pezkuwi/util-crypto';
export class Pairs {
#map = {};
add(pair) {
this.#map[decodeAddress(pair.address).toString()] = pair;
return pair;
}
all() {
return Object.values(this.#map);
}
get(address) {
const pair = this.#map[decodeAddress(address).toString()];
if (!pair) {
throw new Error(`Unable to retrieve keypair '${isU8a(address) || isHex(address)
? u8aToHex(u8aToU8a(address))
: address}'`);
}
return pair;
}
remove(address) {
delete this.#map[decodeAddress(address).toString()];
}
}