@zubari/sdk 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -887,6 +887,27 @@ var WdkApiClient = class {
887
887
  };
888
888
  }
889
889
  }
890
+ /**
891
+ * Get transaction status by hash
892
+ * Fetches from blockchain explorers to check confirmation status
893
+ */
894
+ async getTransactionStatus(txHash, chain, network = "testnet") {
895
+ try {
896
+ const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/tx-status`, {
897
+ method: "POST",
898
+ headers: {
899
+ "Content-Type": "application/json"
900
+ },
901
+ body: JSON.stringify({ txHash, chain, network })
902
+ });
903
+ return await response.json();
904
+ } catch (error) {
905
+ return {
906
+ success: false,
907
+ error: error instanceof Error ? error.message : "Failed to get transaction status"
908
+ };
909
+ }
910
+ }
890
911
  };
891
912
  var DEFAULT_API_URL = process.env.NEXT_PUBLIC_API_URL || "https://ckgwifsxka.us-east-2.awsapprunner.com";
892
913
  var wdkApiClient = null;