Skip to content

Commit

Permalink
try to clarify when timebounds are attached to tx in JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed May 17, 2024
1 parent afd392b commit 462e5f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/contract/assembled_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,11 @@ export class AssembledTransaction<T> {
* If you don't want to simulate the transaction, you can set `simulate` to
* `false` in the options.
*
* const tx = await AssembledTransaction.build({
* ...,
* simulate: false,
* })
* @example
* const tx = await AssembledTransaction.build({
* ...,
* simulate: false,
* })
*/
static async build<T>(
options: AssembledTransactionOptions<T>,
Expand Down
7 changes: 4 additions & 3 deletions src/contract/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { BASE_FEE, Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base";
import type { Client } from "./client";
import type { AssembledTransaction } from "./assembled_transaction";
import { DEFAULT_TIMEOUT } from "./utils";

export type XDR_BASE64 = string;
export type u32 = number;
Expand Down Expand Up @@ -99,8 +98,10 @@ export type MethodOptions = {
fee?: string;

/**
* The maximum amount of time to wait for the transaction to complete.
* Default: {@link DEFAULT_TIMEOUT}
* The timebounds which should be set for transactions generated by this
* contract client.
* @see {@link module:contract.Client#DEFAULT_TIMEOUT}
* @default module:contract.Client#DEFAULT_TIMEOUT
*/
timeoutInSeconds?: number;

Expand Down
2 changes: 2 additions & 0 deletions src/contract/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import type { AssembledTransaction } from "./assembled_transaction";

/**
* The default timebounds, in seconds, during which a transaction will be valid.
* This is attached to the transaction at the time it is built, which takes
* place _before_ transaction simulation, and _before_ transaction signing.
* @constant {number}
* @default 300
* @memberof module:contract.Client
Expand Down

0 comments on commit 462e5f6

Please sign in to comment.