Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

30 Commits

Repository files navigation

lbry-nodejs

A nodejs RPC wrapper for LBRY protocol


Donate LBRY credits

bUgP1zxWitRBcz4kJdGzgsNoFQU4H71yYu

Donate Bitcoin

1GXHUyUaMu8RnmHqApz3CuLAbGhcxbqGjT


To get started:

1) Download the and run the lbrynet-daemon:

$ ./lbrynet-daemon

Or download the app, and open it.

2) Require the module in your application

constlbry=require('lbry-nodejs')

3) Use a method

lbry.get('name').then((data)=>console.log(data)).catch((error)=>console.error(error))

Example

Method with required parameters

resolve_name

Inputs

constname='itsadisaster'
Method
lbry.resolve_name(name)
Response
constresponse={"id": null,"jsonrpc": "2.0","result": {"author": "Written and directed by Todd Berger","content_type": "video/mp4","description": "Four couples meet for Sunday brunch only to discover they are stuck in a house together as the world may be about to end.","fee": {"USD": {"address": "bX4sH7PbLLfwiMfm5HJKAmzdhoQK3pSuSU","amount": 5.0}},"language": "en","license": "Oscilloscope Laboratories","nsfw": false,"sources": {"lbry_sd_hash": "8e877083818a51734b2722e7f53b3352255feca8c38be619471ef1af730b272f295ff1a774cf28f71dfad7b3a249e747"},"thumbnail": "http://ia.media-imdb.com/images/M/MV5BMTQwNjYzMTQ0Ml5BMl5BanBnXkFtZTcwNDUzODM5Nw@@._V1_SY1000_CR0,0,673,1000_AL_.jpg","title": "It's a Disaster","ver": "0.0.3"}}

Method with optional parameters:

peer_list

Inputs

constblob_hash='some_blob_hash'constoptional_paramaters={timeout: 60}
Method
lbry.peer_list(blob_hash,optional_paramaters)
Response
constresponse={"id": null,"jsonrpc": "2.0","result": {}}

Currently available methods

☑️ blob_announce_all

☑️ blob_reflect_all

☑️ claim_list_mine

☑️ channel_list_mine

☑️ channel_new

☑️ daemon_stop

☑️ status

☑️ settings_get

☑️ transaction_list

☑️ wallet_new_address

☑️ version

☑️ help

☑️ resolve_name

☑️ blob_delete

☑️ blob_get

☑️ blob_list

☑️ block_show

☑️ claim_abandon

☑️ claim_list

☑️ claim_new_support

☑️ claim_show

☑️ file_list

☑️ file_seed

☑️ get

☑️ get_availability

☑️ peer_list

☑️ publish

☑️ reflect

☑️ report_bug

☑️ send_amount_to_address

☑️ settings_set

☑️ stream_cost_estimate

☑️ transaction_show

☑️ wallet_is_address_mine

☑️ wallet_public_key

☑️ wallet_list

☑️ wallet_unused_address

☑️ file_set_status

About

A LBRY API wrapper for node.js

Topics

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages