From 37bfb3e2bd4e7eb4ca04c355775f457be8402062 Mon Sep 17 00:00:00 2001 From: Snazzah Date: Tue, 11 Aug 2020 21:49:23 -0500 Subject: [PATCH] Add claim search function to LBRY module --- src/structures/LBRY.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/structures/LBRY.js b/src/structures/LBRY.js index cacc0f7..b7ee6f6 100644 --- a/src/structures/LBRY.js +++ b/src/structures/LBRY.js @@ -154,7 +154,7 @@ class LBRY { } // #endregion - // #region Wallet & Address Methods + // #region Wallet, Address, Claim Methods /** * Return the balance of a wallet */ @@ -180,6 +180,20 @@ class LBRY { static listAddresses() { return this._sdkRequest('address_list', { page_size: 1 }); } + + /** + * Search for stream and channel claims on the blockchain. + * @param {object} options + * @param {string} options.name The claim name to search + * @param {string} options.text The text to search + * @param {string} options.claimID The claim ID to search + * @param {string} options.channel Signed channel name (e.g: @Coolguy3289) + * @param {string} options.channelType The type of claim + */ + static searchClaim({ name, text, claimID, channel, channelType }) { + return this._sdkRequest('claim_search', { + name, text, claim_id: claimID, channel, channel_type: channelType }); + } // #endregion }