Compare commits
3 Commits
v0.2.0-dev
...
v0.2.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | b64ce75a70 | |
Derrick Hammer | 46559e7cbd | |
Derrick Hammer | 22ccc91566 |
|
@ -1,3 +1,5 @@
|
|||
# [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.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",
|
||||
"version": "0.2.0-develop.37",
|
||||
"version": "0.2.0-develop.38",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.37",
|
||||
"version": "0.2.0-develop.38",
|
||||
"dependencies": {
|
||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||
"@lumeweb/libportal": "0.2.0-develop.20",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.37",
|
||||
"version": "0.2.0-develop.38",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -4,15 +4,16 @@ import {
|
|||
encodeCid as encodeCidPortal,
|
||||
} from "@lumeweb/libportal";
|
||||
import { addContextToErr } from "#err.js";
|
||||
import type { CID } from "@lumeweb/libportal";
|
||||
|
||||
export function encodeCid(hash: Uint8Array, size: bigint): any;
|
||||
export function encodeCid(hash: string, size: bigint): any;
|
||||
export function encodeCid(hash: Uint8Array, size: bigint): ErrTuple<string>;
|
||||
export function encodeCid(hash: string, size: bigint): ErrTuple<string>;
|
||||
export function encodeCid(
|
||||
hash: any,
|
||||
size: bigint,
|
||||
type?: number,
|
||||
hashType?: number,
|
||||
): ErrTuple {
|
||||
): ErrTuple<CID> {
|
||||
try {
|
||||
return [encodeCidPortal(hash, size, type, hashType), null];
|
||||
} catch (e) {
|
||||
|
@ -20,7 +21,7 @@ export function encodeCid(
|
|||
}
|
||||
}
|
||||
|
||||
export function decodeCid(cid: string): ErrTuple {
|
||||
export function decodeCid(cid: string): ErrTuple<CID> {
|
||||
try {
|
||||
return [decodeCidPortal(cid), null];
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue