Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Jun 24, 2024
1 parent c26cd7f commit fa283fd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/horizon/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,24 @@ export class Server {
});
}

/**
* Submits an asynchronous transaction to the network. Unlike the synchronous version, which blocks
* and waits for the transaction to be ingested in Horizon, this endpoint relays the response from
* core directly back to the user.
*
* By default this function calls {@link Server#checkMemoRequired}, you can
* skip this check by setting the option `skipMemoRequiredCheck` to `true`.
*
* @see [Submit
* Async Transaction](https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-async-transaction)
* @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit.
* @param {object} [opts] Options object
* @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo
* required check, default: `false`. See
* [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md).
* @returns {Promise} Promise that resolves or rejects with response from
* horizon.
*/
public async submitAsyncTransaction(
transaction: Transaction | FeeBumpTransaction,
opts: Server.SubmitTransactionOptions = { skipMemoRequiredCheck: false }
Expand Down

0 comments on commit fa283fd

Please sign in to comment.