Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | eb33beddaf | |
Derrick Hammer | d379801e4d | |
Derrick Hammer | 19426b7fdb |
|
@ -1,3 +1,10 @@
|
||||||
|
# [0.1.0-develop.74](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.73...v0.1.0-develop.74) (2023-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* use base64urlpad ([19426b7](https://git.lumeweb.com/LumeWeb/libs5/commit/19426b7fdb05517c437f7bfb7aa78876647fa470))
|
||||||
|
|
||||||
# [0.1.0-develop.73](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.72...v0.1.0-develop.73) (2023-11-18)
|
# [0.1.0-develop.73](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.72...v0.1.0-develop.73) (2023-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.73",
|
"version": "0.1.0-develop.74",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libs5",
|
"name": "@lumeweb/libs5",
|
||||||
"version": "0.1.0-develop.73",
|
"version": "0.1.0-develop.74",
|
||||||
"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.73",
|
"version": "0.1.0-develop.74",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { base58btc } from "multiformats/bases/base58";
|
import { base58btc } from "multiformats/bases/base58";
|
||||||
import { bytesToHex, hexToBytes, utf8ToBytes } from "@noble/hashes/utils";
|
import { bytesToHex, hexToBytes, utf8ToBytes } from "@noble/hashes/utils";
|
||||||
import { base32 } from "multiformats/bases/base32";
|
import { base32 } from "multiformats/bases/base32";
|
||||||
import { base64, base64url } from "multiformats/bases/base64";
|
import { base64, base64urlpad } from "multiformats/bases/base64";
|
||||||
|
|
||||||
export default abstract class Multibase {
|
export default abstract class Multibase {
|
||||||
abstract toBytes(): Uint8Array;
|
abstract toBytes(): Uint8Array;
|
||||||
|
@ -23,7 +23,7 @@ export default abstract class Multibase {
|
||||||
while (str.length % 4 !== 0) {
|
while (str.length % 4 !== 0) {
|
||||||
str += "=";
|
str += "=";
|
||||||
}
|
}
|
||||||
bytes = base64url.decode(str);
|
bytes = base64urlpad.decode(str);
|
||||||
} else if (data[0] === ":") {
|
} else if (data[0] === ":") {
|
||||||
bytes = utf8ToBytes(data);
|
bytes = utf8ToBytes(data);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue