@atomiqlabs/base 10.0.0-dev.18 → 10.0.0-dev.19
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.
|
@@ -86,6 +86,14 @@ export interface ChainInterface<TX = any, Signer extends AbstractSigner = Abstra
|
|
|
86
86
|
* @param txId Transaction ID
|
|
87
87
|
*/
|
|
88
88
|
getTxIdStatus(txId: string): Promise<"not_found" | "pending" | "success" | "reverted">;
|
|
89
|
+
/**
|
|
90
|
+
* Returns the latest known finalized block data (this is a block with 100% certainty of not getting re-org, i.e.
|
|
91
|
+
* a block already committed on L1)
|
|
92
|
+
*/
|
|
93
|
+
getFinalizedBlock(): Promise<{
|
|
94
|
+
height: number;
|
|
95
|
+
blockHash: string;
|
|
96
|
+
}>;
|
|
89
97
|
/**
|
|
90
98
|
* Signs, sends a batch of transaction and optionally waits for their confirmation
|
|
91
99
|
*
|
|
@@ -169,17 +169,21 @@ export interface SpvVaultContract<TX = any, Signer extends AbstractSigner = Abst
|
|
|
169
169
|
*/
|
|
170
170
|
getAllVaults(owner?: string): Promise<Data[]>;
|
|
171
171
|
/**
|
|
172
|
-
* Returns current state of the withdrawal as specified by the bitcoin transaction ID
|
|
172
|
+
* Returns current state of the withdrawal as specified by the bitcoin transaction ID, optionally
|
|
173
|
+
* only check withdrawals from the provided block height
|
|
173
174
|
*
|
|
174
175
|
* @param btcTxId
|
|
176
|
+
* @param scStartBlockheight
|
|
175
177
|
*/
|
|
176
|
-
getWithdrawalState(btcTxId: string): Promise<SpvWithdrawalState>;
|
|
178
|
+
getWithdrawalState(btcTxId: string, scStartBlockheight?: number): Promise<SpvWithdrawalState>;
|
|
177
179
|
/**
|
|
178
|
-
* Returns current state of the withdrawals as specified by the bitcoin transaction IDs
|
|
180
|
+
* Returns current state of the withdrawals as specified by the bitcoin transaction IDs, optionally
|
|
181
|
+
* only check withdrawals from the provided block height
|
|
179
182
|
*
|
|
180
183
|
* @param btcTxIds
|
|
184
|
+
* @param scStartBlockheight
|
|
181
185
|
*/
|
|
182
|
-
getWithdrawalStates(btcTxIds: string[]): Promise<{
|
|
186
|
+
getWithdrawalStates(btcTxIds: string[], scStartBlockheight?: number): Promise<{
|
|
183
187
|
[btcTxId: string]: SpvWithdrawalState;
|
|
184
188
|
}>;
|
|
185
189
|
/**
|
package/package.json
CHANGED
|
@@ -109,6 +109,12 @@ export interface ChainInterface<
|
|
|
109
109
|
*/
|
|
110
110
|
getTxIdStatus(txId: string): Promise<"not_found" | "pending" | "success" | "reverted">;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Returns the latest known finalized block data (this is a block with 100% certainty of not getting re-org, i.e.
|
|
114
|
+
* a block already committed on L1)
|
|
115
|
+
*/
|
|
116
|
+
getFinalizedBlock(): Promise<{height: number, blockHash: string}>;
|
|
117
|
+
|
|
112
118
|
/**
|
|
113
119
|
* Signs, sends a batch of transaction and optionally waits for their confirmation
|
|
114
120
|
*
|
|
@@ -180,18 +180,22 @@ export interface SpvVaultContract<
|
|
|
180
180
|
getAllVaults(owner?: string): Promise<Data[]>;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
* Returns current state of the withdrawal as specified by the bitcoin transaction ID
|
|
183
|
+
* Returns current state of the withdrawal as specified by the bitcoin transaction ID, optionally
|
|
184
|
+
* only check withdrawals from the provided block height
|
|
184
185
|
*
|
|
185
186
|
* @param btcTxId
|
|
187
|
+
* @param scStartBlockheight
|
|
186
188
|
*/
|
|
187
|
-
getWithdrawalState(btcTxId: string): Promise<SpvWithdrawalState>;
|
|
189
|
+
getWithdrawalState(btcTxId: string, scStartBlockheight?: number): Promise<SpvWithdrawalState>;
|
|
188
190
|
|
|
189
191
|
/**
|
|
190
|
-
* Returns current state of the withdrawals as specified by the bitcoin transaction IDs
|
|
192
|
+
* Returns current state of the withdrawals as specified by the bitcoin transaction IDs, optionally
|
|
193
|
+
* only check withdrawals from the provided block height
|
|
191
194
|
*
|
|
192
195
|
* @param btcTxIds
|
|
196
|
+
* @param scStartBlockheight
|
|
193
197
|
*/
|
|
194
|
-
getWithdrawalStates(btcTxIds: string[]): Promise<{[btcTxId: string]: SpvWithdrawalState}>;
|
|
198
|
+
getWithdrawalStates(btcTxIds: string[], scStartBlockheight?: number): Promise<{[btcTxId: string]: SpvWithdrawalState}>;
|
|
195
199
|
|
|
196
200
|
/**
|
|
197
201
|
* Parses withdrawal data from the parsed bitcoin transaction
|