-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const getCurrentEpoch: (endpoint: string) => Promise<number>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Retrieves the date and time corresponding to a given Solana slot number. | ||
* | ||
* @param {string} endpoint - The Solana network endpoint to connect to. | ||
* @param {number} slot - The Solana slot number for which to retrieve the timestamp. | ||
* @returns {Promise<Date>} - A promise that resolves to a Date object representing the timestamp for the given slot. | ||
* @throws {Error} - Throws an error if unable to fetch the block time for the given slot. | ||
* | ||
* @example | ||
* ``` | ||
* const endpoint = 'https://api.mainnet-beta.solana.com'; | ||
* const slot = 123456789; // Example slot number | ||
* | ||
* try { | ||
* const timestamp = await getTimestampFromSlot(endpoint, slot); | ||
* console.log('Date for slot:', timestamp); | ||
* } catch (error) { | ||
* console.error('Error getting date for slot:', error); | ||
* } | ||
* ``` | ||
*/ | ||
export declare function getTimestampFromSlot(endpoint: string, slot: number): Promise<Date>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export declare const VERSION = "0.2.3"; | ||
export declare const VERSION = "0.2.4"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const VERSION = '0.2.3' | ||
export const VERSION = '0.2.4' |