Skip to content

Commit

Permalink
docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron committed Jun 11, 2024
1 parent 2e1e965 commit 2724b84
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
14 changes: 6 additions & 8 deletions src/contract/assembled_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,8 @@ export class AssembledTransaction<T> {
}

/**
* Sign the transaction with the `wallet`, included previously. If you did
* not previously include one, you need to include one now that at least
* includes the `signTransaction` method.
* Sign the transaction with the signTransaction function included previously.
* If you did not previously include one, you need to include one now.
*/
sign = async ({
force = false,
Expand Down Expand Up @@ -587,11 +586,10 @@ export class AssembledTransaction<T> {
}

/**
* Sign the transaction with the `wallet`, included previously. If you did
* not previously include one, you need to include one now that at least
* includes the `signTransaction` method. After signing, this method will
* send the transaction to the network and return a `SentTransaction` that
* keeps track of all the attempts to fetch the transaction.
* Sign the transaction with the `signTransaction` function included previously.
* If you did not previously include one, you need to include one now.
* After signing, this method will send the transaction to the network and
* return a `SentTransaction` that keeps track * of all the attempts to fetch the transaction.
*/
signAndSend = async ({
force = false,
Expand Down
15 changes: 11 additions & 4 deletions src/contract/sent_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,19 @@ export class SentTransaction<T> {
}

/**
* Initialize a `SentTransaction` from an existing `AssembledTransaction` and
* a `signed` AssembledTransaction. This will also send the transaction to the
* network.
* Initialize a `SentTransaction` from `options` and a `signed`
* AssembledTransaction. This will also send the transaction to the network.
*/
static init = async <U>(
/** {@link SentTransactionOptions} from which this SentTransaction was initialized */
/**
* Configuration options for initializing the SentTransaction.
*
* @typedef {Object} SentTransactionOptions
* @property {number} [timeoutInSeconds] - Optional timeout duration in seconds for the transaction.
* @property {string} rpcUrl - The RPC URL of the network to which the transaction will be sent.
* @property {boolean} [allowHttp] - Optional flag to allow HTTP connections (default is false, HTTPS is preferred).
* @property {(xdr: xdr.ScVal) => U} parseResultXdr - Function to parse the XDR result returned by the network.
*/
options: SentTransactionOptions<U>,
/** The signed transaction to send to the network */
signed: Tx,
Expand Down

0 comments on commit 2724b84

Please sign in to comment.