@atomiqlabs/base 13.1.4 → 13.1.6

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.
@@ -4,7 +4,7 @@ import { SpvVaultData, SpvVaultTokenData } from "./SpvVaultData";
4
4
  import { SpvWithdrawalTransactionData } from "./SpvWithdrawalTransactionData";
5
5
  import { BtcStoredHeader } from "../btcrelay/types/BtcStoredHeader";
6
6
  import { RelaySynchronizer } from "../btcrelay/synchronizer/RelaySynchronizer";
7
- import { SpvWithdrawalState } from "./SpvWithdrawalState";
7
+ import { SpvWithdrawalClaimedState, SpvWithdrawalFrontedState, SpvWithdrawalState } from "./SpvWithdrawalState";
8
8
  import { Buffer } from "buffer";
9
9
  import { BtcTx } from "../btc/rpc/BitcoinRpc";
10
10
  /**
@@ -196,6 +196,15 @@ export interface SpvVaultContract<TX = any, Signer extends AbstractSigner = Abst
196
196
  }[]): Promise<{
197
197
  [btcTxId: string]: SpvWithdrawalState | null;
198
198
  }>;
199
+ /**
200
+ * Returns the full history as fetched from the chain for a specific recipient
201
+ *
202
+ * @param recipient A recipient to check the history for
203
+ * @param startBlockheight
204
+ */
205
+ getHistoricalWithdrawalStates?(recipient: string, startBlockheight?: number): Promise<{
206
+ [btcTxId: string]: SpvWithdrawalClaimedState | SpvWithdrawalFrontedState;
207
+ }>;
199
208
  /**
200
209
  * Parses withdrawal data from the parsed bitcoin transaction
201
210
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/base",
3
- "version": "13.1.4",
3
+ "version": "13.1.6",
4
4
  "description": "Base classes and interfaces for atomiq protocol",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -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 {SpvWithdrawalState} from "./SpvWithdrawalState";
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
  *