Skip to content

Commit

Permalink
chore: minor improvements, categorize functions in the fleek namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed May 29, 2024
1 parent aebbf2e commit a51b52b
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions dts/lib.fleek.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,42 @@
* @category Fleek Node API
*/
declare namespace Fleek {
/** Fetch some blake3 content
* @param {Uint8Array} hash - Blake3 hash of content to fetch
* @returns {Promise<bool>} True if the fetch was successful
*/
/** Fetch some blake3 content, ensuring it's in the blockstore.
* @param {Uint8Array} hash - Blake3 hash of content to fetch
* @returns {Promise<bool>} True if the fetch was successful
* @category Fleek Node API
*/
function fetchBlake3(hash: Uint8Array): Promise<boolean>;
/** Load a blockstore handle to some blake3 content
* @param {Uint8Array} hash - Blake3 hash of the content
* @returns {Promise<ContentHandle>}
*/

/** Load a content handle to some blake3 content in the blockstore.
* @param {Uint8Array} hash - Blake3 hash of the content
* @returns {Promise<ContentHandle>}
* @category Fleek Node API
*/
function loadContent(hash: Uint8Array): Promise<ContentHandle>;
/** Fetch a clients FLK balance.
* @param {Uint8Array} account - The balance to check
* @returns {Promise<BigInt>} BigInt of the balance
*/

/** Query application for a client's FLK balance.
* @param {Uint8Array} account - The balance to check
* @returns {Promise<BigInt>} BigInt of the balance
* @category Fleek Node API
*/
function queryClientFlkBalance(account: Uint8Array): Promise<BigInt>;
/** Fetch a clients bandwidth balance.
* @param {Uint8Array} account - The balance to check
* @returns {Promise<BigInt>} BigInt of the balance
*/

/** Query application for a client's bandwidth balance.
* @param {Uint8Array} account - The balance to check
* @returns {Promise<BigInt>} BigInt of the balance
* @category Fleek Node API
*/
function queryClientBandwidthBalance(
account: Uint8Array,
): Promise<BigInt>;

/** Handle to blockstore content.
* Utility for traversing the proof and reading blocks from the blockstore.
* @property {Uint8Array} proof - Raw blake3 proof of the content
* @property {number} length - Number of blocks in the content
* @category Fleek Node API
*/
* Holds the proof for the content and traverses it, to read each inner block from the blockstore.
* @property {Uint8Array} proof - Raw blake3 proof of the content
* @property {number} length - Number of blocks in the content
* @category Fleek Node API
*/
class ContentHandle {
constructor(proof: Uint8Array);
proof: Uint8Array;
Expand Down

0 comments on commit a51b52b

Please sign in to comment.