Skip to content

Commit

Permalink
create a util namespace and add validateTimebounds to it
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed May 14, 2024
1 parent 22db24a commit 9d663a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Transaction } from "@stellar/stellar-base";

/** @namespace Utils */
export class Utils {
/**
* Verifies if the current date is within the transaction's timebonds
*
* @static
* @function
* @memberof Utils
* @param {Transaction} transaction the transaction whose timebonds will be validated.
* @param {number} [gracePeriod=0] an additional window of time that should be considered valid on either end of the transaction's time range.
* @returns {boolean} returns true if the current time is within the transaction's [minTime, maxTime] range.
*/
static validateTimebounds(
Expand Down

0 comments on commit 9d663a1

Please sign in to comment.