@atomiqlabs/base 13.1.3 → 13.1.5
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/utils/RetryUtils.js
CHANGED
|
@@ -55,7 +55,7 @@ async function tryWithRetries(func, retryPolicy, errorAllowed, abortSignal) {
|
|
|
55
55
|
if (errorAllowed != null && checkError(e, errorAllowed))
|
|
56
56
|
throw e;
|
|
57
57
|
err = e;
|
|
58
|
-
logger.
|
|
58
|
+
logger.debug("tryWithRetries(): Error on try number: " + i, e);
|
|
59
59
|
}
|
|
60
60
|
if (abortSignal != null && abortSignal.aborted)
|
|
61
61
|
throw (abortSignal.reason || new Error("Aborted"));
|
package/package.json
CHANGED
|
@@ -3,7 +3,12 @@ import {SpvVaultData, SpvVaultTokenData} from "./SpvVaultData";
|
|
|
3
3
|
import {SpvWithdrawalTransactionData} from "./SpvWithdrawalTransactionData";
|
|
4
4
|
import {BtcStoredHeader} from "../btcrelay/types/BtcStoredHeader";
|
|
5
5
|
import {RelaySynchronizer} from "../btcrelay/synchronizer/RelaySynchronizer";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
SpvWithdrawalClaimedState,
|
|
8
|
+
SpvWithdrawalClosedState,
|
|
9
|
+
SpvWithdrawalFrontedState,
|
|
10
|
+
SpvWithdrawalState
|
|
11
|
+
} from "./SpvWithdrawalState";
|
|
7
12
|
import {Buffer} from "buffer";
|
|
8
13
|
import {BtcTx} from "../btc/rpc/BitcoinRpc";
|
|
9
14
|
|
|
@@ -203,6 +208,16 @@ export interface SpvVaultContract<
|
|
|
203
208
|
*/
|
|
204
209
|
getWithdrawalStates(withdrawalTxs: {withdrawal: WithdrawalTX, scStartBlockheight?: number}[]): Promise<{[btcTxId: string]: SpvWithdrawalState | null}>;
|
|
205
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Returns the full history as fetched from the chain for a specific recipient
|
|
213
|
+
*
|
|
214
|
+
* @param recipient A recipient to check the history for
|
|
215
|
+
* @param startBlockheight
|
|
216
|
+
*/
|
|
217
|
+
getHistoricalWithdrawalStates?(recipient: string, startBlockheight?: number): Promise<{
|
|
218
|
+
[btcTxId: string]: SpvWithdrawalClaimedState | SpvWithdrawalFrontedState
|
|
219
|
+
}>;
|
|
220
|
+
|
|
206
221
|
/**
|
|
207
222
|
* Parses withdrawal data from the parsed bitcoin transaction
|
|
208
223
|
*
|
package/src/utils/RetryUtils.ts
CHANGED
|
@@ -61,7 +61,7 @@ export async function tryWithRetries<T>(func: (retryCount: number) => Promise<T>
|
|
|
61
61
|
} catch (e) {
|
|
62
62
|
if (errorAllowed != null && checkError(e, errorAllowed)) throw e;
|
|
63
63
|
err = e;
|
|
64
|
-
logger.
|
|
64
|
+
logger.debug("tryWithRetries(): Error on try number: " + i, e);
|
|
65
65
|
}
|
|
66
66
|
if (abortSignal != null && abortSignal.aborted) throw (abortSignal.reason || new Error("Aborted"));
|
|
67
67
|
if (i !== retryPolicy.maxRetries - 1) {
|