@@ -96,6 +96,7 @@ import type { Status } from "./types/Status.js";
9696 * @param options - The options for the quote.
9797 * @param options.transactionHash - The hash of the origin transaction to get the bridge status for.
9898 * @param options.chainId - The chain ID of the origin token.
99+ * @param options.transactionId - The transaction ID received from the `prepare` request.
99100 * @param options.client - Your thirdweb client.
100101 *
101102 * @returns A promise that resolves to a status object for the transaction.
@@ -105,13 +106,16 @@ import type { Status } from "./types/Status.js";
105106 * @beta
106107 */
107108export async function status ( options : status . Options ) : Promise < status . Result > {
108- const { transactionHash, client } = options ;
109+ const { transactionHash, client, transactionId } = options ;
109110 const chainId = "chainId" in options ? options . chainId : options . chain . id ;
110111
111112 const clientFetch = getClientFetch ( client ) ;
112113 const url = new URL ( `${ getThirdwebBaseUrl ( "bridge" ) } /v1/status` ) ;
113114 url . searchParams . set ( "transactionHash" , transactionHash ) ;
114115 url . searchParams . set ( "chainId" , chainId . toString ( ) ) ;
116+ if ( transactionId ) {
117+ url . searchParams . set ( "transactionId" , transactionId ) ;
118+ }
115119
116120 const response = await clientFetch ( url . toString ( ) ) ;
117121 if ( ! response . ok ) {
@@ -195,6 +199,8 @@ export declare namespace status {
195199 transactionHash : ox__Hex . Hex ;
196200 /** The chain ID where the transaction occurred */
197201 chainId : number ;
202+ /** The transaction ID received from the `prepare` request */
203+ transactionId ?: string ;
198204 /** Your thirdweb client */
199205 client : ThirdwebClient ;
200206 }
@@ -203,6 +209,8 @@ export declare namespace status {
203209 transactionHash : ox__Hex . Hex ;
204210 /** The chain object where the transaction occurred */
205211 chain : Chain ;
212+ /** The transaction ID received from the `prepare` request */
213+ transactionId ?: string ;
206214 /** Your thirdweb client */
207215 client : ThirdwebClient ;
208216 } ;
0 commit comments