Compare commits

..

No commits in common. "v0.1.0-develop.60" and "v0.1.0-develop.59" have entirely different histories.

4 changed files with 5 additions and 12 deletions

View File

@ -1,10 +1,3 @@
# [0.1.0-develop.60](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.59...v0.1.0-develop.60) (2023-09-19)
### Bug Fixes
* bad base32 encoding, multiformats handles the prefix ([155e0b4](https://git.lumeweb.com/LumeWeb/libs5/commit/155e0b4c0c9e04a97ca88e9b1cbec72ade0225bf))
# [0.1.0-develop.59](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.58...v0.1.0-develop.59) (2023-09-11)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.60",
"version": "0.1.0-develop.59",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.60",
"version": "0.1.0-develop.59",
"dependencies": {
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libs5",
"version": "0.1.0-develop.60",
"version": "0.1.0-develop.59",
"type": "module",
"main": "lib/index.js",
"repository": {

View File

@ -13,7 +13,7 @@ export default abstract class Multibase {
} else if (data[0] === "f") {
bytes = Uint8Array.from(hexToBytes(data.substring(1)));
} else if (data[0] === "b") {
let str = data;
let str = data.substring(1).toUpperCase();
while (str.length % 4 !== 0) {
str += "=";
}
@ -38,7 +38,7 @@ export default abstract class Multibase {
}
toBase32(): string {
return `${base32.encode(this.toBytes()).replace(/=/g, "").toLowerCase()}`;
return `b${base32.encode(this.toBytes()).replace(/=/g, "").toLowerCase()}`;
}
toBase64Url(): string {