src/utils/skynet-ops.js
// Writes related data to skydb.
Writes related data to skydb.
Writes related data to skydb .
async function writeJsonToSkyDB(dataKey, toWriteJson) {
    try {
        const res = await skynetClient.db.setJSON(SKAPP_PRIVATE_KEY, dataKey, toWriteJson);
        console.debug(`Writing JSON to SkyDB:\n\tdataKey=${dataKey}\n\ttoWriteJson=${JSON.stringify(toWriteJson)}\n\t->res=${JSON.stringify(res)}`);
        return res;
    } catch (e) {
        console.error(`Error writing data to SkyDB: ${e.message}`);
    }
}
async function writeJsonToSkyDB ( dataKey , toWriteJson ) { try { const res = await skynetClient . db . setJSON ( SKAPP_PRIVATE_KEY , dataKey , toWriteJson ) ; console . debug ( ` \n \t ${ dataKey } \n \t ${ JSON . stringify ( toWriteJson ) } \n \t ${ JSON . stringify ( res ) } ` ) ; return res ; } catch ( e ) { console . error ( ` ${ e . message } ` ) ; } }
Writes related data to skydb.
Writes related data to skydb .