Compare commits
3 Commits
v0.2.0-dev
...
v0.2.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 0aacc426f7 | |
Derrick Hammer | eabfb4eb1d | |
Derrick Hammer | bb0c8de24e |
|
@ -1,3 +1,5 @@
|
|||
# [0.2.0-develop.34](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.33...v0.2.0-develop.34) (2023-09-02)
|
||||
|
||||
# [0.2.0-develop.33](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.32...v0.2.0-develop.33) (2023-09-02)
|
||||
|
||||
# [0.2.0-develop.32](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.31...v0.2.0-develop.32) (2023-08-20)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.33",
|
||||
"version": "0.2.0-develop.34",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.33",
|
||||
"version": "0.2.0-develop.34",
|
||||
"dependencies": {
|
||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||
"@lumeweb/libportal": "0.2.0-develop.18",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.33",
|
||||
"version": "0.2.0-develop.34",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -7,9 +7,14 @@ import { addContextToErr } from "#err.js";
|
|||
|
||||
export function encodeCid(hash: Uint8Array, size: bigint): any;
|
||||
export function encodeCid(hash: string, size: bigint): any;
|
||||
export function encodeCid(hash: any, size: bigint): ErrTuple {
|
||||
export function encodeCid(
|
||||
hash: any,
|
||||
size: bigint,
|
||||
type?: number,
|
||||
hashType?: number,
|
||||
): ErrTuple {
|
||||
try {
|
||||
return [encodeCidPortal(hash, size), null];
|
||||
return [encodeCidPortal(hash, size, type, hashType), null];
|
||||
} catch (e) {
|
||||
return [null, addContextToErr(e as Error, "failed to encode cid")];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue