lbry-sdk-node
v0.1.8
Published
download and bootstrap lbryio/lbry-sdk releases in nodejs
Downloads
14
Maintainers
Readme
Lbry SDK NodeJS
This is small package to download and bootstrap lbryio/lbry-sdk releases in nodejs.
Original code was taken and adapted from lbryio/electron-starter and lbryio/lbry-redux.
How this should work?
# 1.
npm install lbry-sdk-node --save
# After the install an additional script runs that downloads the lbry-sdk (0.93.0)
Example Usage:
const { Lbry } = require('lbry-sdk-node/lbry');
const { launchSDK } = require('lbry-sdk-node/start');
const statusCheck = () => Lbry.status().then(status => {
console.log(`isRunning ${status.is_running}`)
console.log(status);
})
const searchClaims = () => Lbry.claim_list().then(claims => {
console.log(claims);
})
launchSDK().then(isSDKRunning => {
console.log(`after launch ${isSDKRunning}`);
statusCheck();
searchClaims();
}).catch(error => {
console.error(error);
})