Compare commits
No commits in common. "v0.2.0-develop.38" and "v0.2.0-develop.37" have entirely different histories.
v0.2.0-dev
...
v0.2.0-dev
|
@ -1,5 +1,3 @@
|
||||||
# [0.2.0-develop.38](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.37...v0.2.0-develop.38) (2023-09-02)
|
|
||||||
|
|
||||||
# [0.2.0-develop.37](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.36...v0.2.0-develop.37) (2023-09-02)
|
# [0.2.0-develop.37](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.36...v0.2.0-develop.37) (2023-09-02)
|
||||||
|
|
||||||
# [0.2.0-develop.36](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.35...v0.2.0-develop.36) (2023-09-02)
|
# [0.2.0-develop.36](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.35...v0.2.0-develop.36) (2023-09-02)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.38",
|
"version": "0.2.0-develop.37",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.38",
|
"version": "0.2.0-develop.37",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||||
"@lumeweb/libportal": "0.2.0-develop.20",
|
"@lumeweb/libportal": "0.2.0-develop.20",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.38",
|
"version": "0.2.0-develop.37",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -4,16 +4,15 @@ import {
|
||||||
encodeCid as encodeCidPortal,
|
encodeCid as encodeCidPortal,
|
||||||
} from "@lumeweb/libportal";
|
} from "@lumeweb/libportal";
|
||||||
import { addContextToErr } from "#err.js";
|
import { addContextToErr } from "#err.js";
|
||||||
import type { CID } from "@lumeweb/libportal";
|
|
||||||
|
|
||||||
export function encodeCid(hash: Uint8Array, size: bigint): ErrTuple<string>;
|
export function encodeCid(hash: Uint8Array, size: bigint): any;
|
||||||
export function encodeCid(hash: string, size: bigint): ErrTuple<string>;
|
export function encodeCid(hash: string, size: bigint): any;
|
||||||
export function encodeCid(
|
export function encodeCid(
|
||||||
hash: any,
|
hash: any,
|
||||||
size: bigint,
|
size: bigint,
|
||||||
type?: number,
|
type?: number,
|
||||||
hashType?: number,
|
hashType?: number,
|
||||||
): ErrTuple<CID> {
|
): ErrTuple {
|
||||||
try {
|
try {
|
||||||
return [encodeCidPortal(hash, size, type, hashType), null];
|
return [encodeCidPortal(hash, size, type, hashType), null];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -21,7 +20,7 @@ export function encodeCid(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function decodeCid(cid: string): ErrTuple<CID> {
|
export function decodeCid(cid: string): ErrTuple {
|
||||||
try {
|
try {
|
||||||
return [decodeCidPortal(cid), null];
|
return [decodeCidPortal(cid), null];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue