UNPKG

lighthouse-package-fork

Version:

NPM package and CLI tool to interact with lighthouse protocol

20 lines (19 loc) 685 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const lighthouse_encryption_sdk_browser_1 = require("lighthouse-encryption-sdk-browser"); exports.default = async (publicKey, shareTo, cid, signedMessage) => { const { error } = await (0, lighthouse_encryption_sdk_browser_1.shareToAddress)(publicKey, cid, signedMessage, shareTo); if (error) { throw error; } /* { data: { cid: 'QmUHDKv3NNL1mrg4NTW4WwJqetzwZbGNitdjr2G6Z5Xe6s', shareTo: [ '0x487fc2fE07c593EAb555729c3DD6dF85020B5160' ], status: "Success" } } */ return { data: { cid, shareTo, status: 'Success' } }; };