Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 1c7aaf84d4 | |
Derrick Hammer | ea8c9841a0 | |
Derrick Hammer | 01d29f0b59 |
|
@ -1,3 +1,10 @@
|
||||||
|
# [0.1.0-develop.77](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.76...v0.1.0-develop.77) (2023-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* replace u with U in decodeString, and strip U in toBase64Url ([01d29f0](https://git.lumeweb.com/LumeWeb/libs5/commit/01d29f0b59cdadfb23c826d9649ed635745fa45e))
|
||||||
|
|
||||||
# [0.1.0-develop.76](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.75...v0.1.0-develop.76) (2023-11-18)
|
# [0.1.0-develop.76](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.75...v0.1.0-develop.76) (2023-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.76",
|
"version": "0.1.0-develop.77",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.76",
|
"version": "0.1.0-develop.77",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@noble/curves": "^1.1.0",
|
"@noble/curves": "^1.1.0",
|
||||||
"@noble/hashes": "^1.3.1",
|
"@noble/hashes": "^1.3.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.76",
|
"version": "0.1.0-develop.77",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default abstract class Multibase {
|
||||||
}
|
}
|
||||||
bytes = base32.decode(str);
|
bytes = base32.decode(str);
|
||||||
} else if (data[0] === "u") {
|
} else if (data[0] === "u") {
|
||||||
bytes = base64urlpad.decode(data);
|
bytes = base64urlpad.decode(data[0].toUpperCase() + data.substring(1));
|
||||||
} else if (data[0] === ":") {
|
} else if (data[0] === ":") {
|
||||||
bytes = utf8ToBytes(data);
|
bytes = utf8ToBytes(data);
|
||||||
} else {
|
} else {
|
||||||
|
@ -38,7 +38,7 @@ export default abstract class Multibase {
|
||||||
}
|
}
|
||||||
|
|
||||||
toBase64Url(): string {
|
toBase64Url(): string {
|
||||||
return `u${base64urlpad.encode(this.toBytes())}`;
|
return `u${base64urlpad.encode(this.toBytes()).substring(1)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
toBase58(): string {
|
toBase58(): string {
|
||||||
|
|
Loading…
Reference in New Issue