@atomiqlabs/base 13.1.5 → 13.1.7

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,18 @@ 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
+ withdrawals: {
207
+ [btcTxId: string]: SpvWithdrawalClaimedState | SpvWithdrawalFrontedState;
208
+ };
209
+ latestBlockheight?: number;
210
+ }>;
199
211
  /**
200
212
  * Parses withdrawal data from the parsed bitcoin transaction
201
213
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/base",
3
- "version": "13.1.5",
3
+ "version": "13.1.7",
4
4
  "description": "Base classes and interfaces for atomiq protocol",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -215,7 +215,10 @@ export interface SpvVaultContract<
215
215
  * @param startBlockheight
216
216
  */
217
217
  getHistoricalWithdrawalStates?(recipient: string, startBlockheight?: number): Promise<{
218
- [btcTxId: string]: SpvWithdrawalClaimedState | SpvWithdrawalFrontedState
218
+ withdrawals: {
219
+ [btcTxId: string]: SpvWithdrawalClaimedState | SpvWithdrawalFrontedState
220
+ },
221
+ latestBlockheight?: number
219
222
  }>;
220
223
 
221
224
  /**