@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-C4SuAZP4.d.ts → index-CR7fLCYO.d.ts} +1 -1
- package/dist/{index-DkB0ouBN.d.mts → index-Dh2ukHnr.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +21 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +21 -0
- package/dist/react/index.mjs.map +1 -1
- package/dist/services/index.d.mts +21 -1
- package/dist/services/index.d.ts +21 -1
- package/dist/services/index.js +21 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +21 -0
- package/dist/services/index.mjs.map +1 -1
- package/dist/wallet/index.d.mts +2 -2
- package/dist/wallet/index.d.ts +2 -2
- package/dist/wallet/index.js +21 -0
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +21 -0
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/{WalletManager-B4Ag188W.d.mts → WalletManager-CGIuecnp.d.mts} +11 -11
- package/dist/{WalletManager-9bC646Ax.d.ts → WalletManager-D1ohlVea.d.ts} +11 -11
|
@@ -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 };
|
package/dist/services/index.d.ts
CHANGED
|
@@ -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 };
|
package/dist/services/index.js
CHANGED
|
@@ -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;
|