Skip to content

Commit

Permalink
add send mode to signAndSendTransaction (#38)
Browse files Browse the repository at this point in the history
* add send mode to signAndSendTransaction

* generalize naming

* add changeset

---------

Co-authored-by: Jordan Sexton <[email protected]>
  • Loading branch information
0xproflupin and jordaaash authored Jan 3, 2024
1 parent c68c266 commit f8618d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-mails-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/wallet-standard-features': minor
---

Add `mode` option to `signAndSendTransaction` input
6 changes: 6 additions & 0 deletions packages/core/features/src/signAndSendTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export interface SolanaSignAndSendTransactionOutput {

/** Options for signing and sending a transaction. */
export type SolanaSignAndSendTransactionOptions = SolanaSignTransactionOptions & {
/** Mode for signing and sending transactions. */
readonly mode?: SolanaSignAndSendTransactionMode;

/** Desired commitment level. If provided, confirm the transaction after sending. */
readonly commitment?: SolanaTransactionCommitment;

Expand All @@ -64,3 +67,6 @@ export type SolanaSignAndSendTransactionOptions = SolanaSignTransactionOptions &
/** Maximum number of times for the RPC node to retry sending the transaction to the leader. */
readonly maxRetries?: number;
};

/** Mode for signing and sending transactions. */
export type SolanaSignAndSendTransactionMode = 'parallel' | 'serial';

0 comments on commit f8618d5

Please sign in to comment.