@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.
@@ -103,6 +103,21 @@ interface SendTransactionResponse {
103
103
  network?: string;
104
104
  error?: string;
105
105
  }
106
+ interface TransactionStatusResponse {
107
+ success: boolean;
108
+ hash?: string;
109
+ status?: 'confirmed' | 'pending' | 'failed';
110
+ blockNumber?: number;
111
+ confirmations?: number;
112
+ timestamp?: number;
113
+ from?: string;
114
+ to?: string;
115
+ value?: string;
116
+ fee?: string;
117
+ chain?: string;
118
+ network?: string;
119
+ error?: string;
120
+ }
106
121
  /**
107
122
  * WDK API Client for server-side Tether WDK integration
108
123
  */
@@ -134,6 +149,11 @@ declare class WdkApiClient {
134
149
  * Fetches from blockchain explorers (Etherscan, mempool.space, etc.)
135
150
  */
136
151
  getTransactionHistory(seed: string, chain: NetworkType, network?: 'mainnet' | 'testnet', limit?: number): Promise<TransactionHistoryResponse>;
152
+ /**
153
+ * Get transaction status by hash
154
+ * Fetches from blockchain explorers to check confirmation status
155
+ */
156
+ getTransactionStatus(txHash: string, chain: NetworkType, network?: 'mainnet' | 'testnet'): Promise<TransactionStatusResponse>;
137
157
  }
138
158
  /**
139
159
  * Get or create the WDK API client instance
@@ -556,4 +576,4 @@ declare function getTransactionService(config?: Partial<TransactionServiceConfig
556
576
  */
557
577
  declare function createTransactionService(config?: Partial<TransactionServiceConfig>): TransactionService;
558
578
 
559
- export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type ChainBalance, type DeriveAddressResponse, type DeriveAllAddressesResponse, type FeeEstimate, type FeeRates, type GenerateSeedResponse, type MultiChainAddresses, type SendTransactionResponse, type SupportedChain, SwapService, type TransactionHistoryItem, type TransactionHistoryResponse, type TransactionParams, type TransactionResult, TransactionService, type TransactionServiceConfig, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, type TransactionHistoryItem$1 as WdkTransactionHistoryItem, type TransactionResult$1 as WdkTransactionResult, ZubariWdkService, type ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser };
579
+ export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type ChainBalance, type DeriveAddressResponse, type DeriveAllAddressesResponse, type FeeEstimate, type FeeRates, type GenerateSeedResponse, type MultiChainAddresses, type SendTransactionResponse, type SupportedChain, SwapService, type TransactionHistoryItem, type TransactionHistoryResponse, type TransactionParams, type TransactionResult, TransactionService, type TransactionServiceConfig, type TransactionStatusResponse, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, type TransactionHistoryItem$1 as WdkTransactionHistoryItem, type TransactionResult$1 as WdkTransactionResult, ZubariWdkService, type ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser };
@@ -103,6 +103,21 @@ interface SendTransactionResponse {
103
103
  network?: string;
104
104
  error?: string;
105
105
  }
106
+ interface TransactionStatusResponse {
107
+ success: boolean;
108
+ hash?: string;
109
+ status?: 'confirmed' | 'pending' | 'failed';
110
+ blockNumber?: number;
111
+ confirmations?: number;
112
+ timestamp?: number;
113
+ from?: string;
114
+ to?: string;
115
+ value?: string;
116
+ fee?: string;
117
+ chain?: string;
118
+ network?: string;
119
+ error?: string;
120
+ }
106
121
  /**
107
122
  * WDK API Client for server-side Tether WDK integration
108
123
  */
@@ -134,6 +149,11 @@ declare class WdkApiClient {
134
149
  * Fetches from blockchain explorers (Etherscan, mempool.space, etc.)
135
150
  */
136
151
  getTransactionHistory(seed: string, chain: NetworkType, network?: 'mainnet' | 'testnet', limit?: number): Promise<TransactionHistoryResponse>;
152
+ /**
153
+ * Get transaction status by hash
154
+ * Fetches from blockchain explorers to check confirmation status
155
+ */
156
+ getTransactionStatus(txHash: string, chain: NetworkType, network?: 'mainnet' | 'testnet'): Promise<TransactionStatusResponse>;
137
157
  }
138
158
  /**
139
159
  * Get or create the WDK API client instance
@@ -556,4 +576,4 @@ declare function getTransactionService(config?: Partial<TransactionServiceConfig
556
576
  */
557
577
  declare function createTransactionService(config?: Partial<TransactionServiceConfig>): TransactionService;
558
578
 
559
- export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type ChainBalance, type DeriveAddressResponse, type DeriveAllAddressesResponse, type FeeEstimate, type FeeRates, type GenerateSeedResponse, type MultiChainAddresses, type SendTransactionResponse, type SupportedChain, SwapService, type TransactionHistoryItem, type TransactionHistoryResponse, type TransactionParams, type TransactionResult, TransactionService, type TransactionServiceConfig, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, type TransactionHistoryItem$1 as WdkTransactionHistoryItem, type TransactionResult$1 as WdkTransactionResult, ZubariWdkService, type ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser };
579
+ export { BrowserAddressDerivation, type ChainAddress$1 as BrowserChainAddress, type BrowserMultiChainAddresses, type ChainAddress, type ChainBalance, type DeriveAddressResponse, type DeriveAllAddressesResponse, type FeeEstimate, type FeeRates, type GenerateSeedResponse, type MultiChainAddresses, type SendTransactionResponse, type SupportedChain, SwapService, type TransactionHistoryItem, type TransactionHistoryResponse, type TransactionParams, type TransactionResult, TransactionService, type TransactionServiceConfig, type TransactionStatusResponse, type ValidateSeedResponse, WdkApiClient, type WdkApiConfig, type TransactionHistoryItem$1 as WdkTransactionHistoryItem, type TransactionResult$1 as WdkTransactionResult, ZubariWdkService, type ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser };
@@ -267,6 +267,27 @@ var WdkApiClient = class {
267
267
  };
268
268
  }
269
269
  }
270
+ /**
271
+ * Get transaction status by hash
272
+ * Fetches from blockchain explorers to check confirmation status
273
+ */
274
+ async getTransactionStatus(txHash, chain, network = "testnet") {
275
+ try {
276
+ const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/tx-status`, {
277
+ method: "POST",
278
+ headers: {
279
+ "Content-Type": "application/json"
280
+ },
281
+ body: JSON.stringify({ txHash, chain, network })
282
+ });
283
+ return await response.json();
284
+ } catch (error) {
285
+ return {
286
+ success: false,
287
+ error: error instanceof Error ? error.message : "Failed to get transaction status"
288
+ };
289
+ }
290
+ }
270
291
  };
271
292
  var DEFAULT_API_URL = process.env.NEXT_PUBLIC_API_URL || "https://ckgwifsxka.us-east-2.awsapprunner.com";
272
293
  var wdkApiClient = null;