@rosen-bridge/abstract-extractor 0.1.1 → 0.1.2-7aba94c9
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.
|
@@ -19,17 +19,21 @@ export class NodeNetwork extends AbstractNetwork {
|
|
|
19
19
|
* @param box
|
|
20
20
|
* @returns ErgoBox
|
|
21
21
|
*/
|
|
22
|
-
convertToErgoBox = async (box: IndexedErgoBox): Promise<ErgoBox> =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
convertToErgoBox = async (box: IndexedErgoBox): Promise<ErgoBox> => {
|
|
23
|
+
const tx = await this.getTxBlock(box.transactionId!);
|
|
24
|
+
return {
|
|
25
|
+
transactionId: box.transactionId || '',
|
|
26
|
+
index: box.index || 0,
|
|
27
|
+
value: box.value || 0n,
|
|
28
|
+
ergoTree: box.ergoTree || '',
|
|
29
|
+
creationHeight: box.creationHeight || 0,
|
|
30
|
+
assets: box.assets || [],
|
|
31
|
+
additionalRegisters: box.additionalRegisters,
|
|
32
|
+
boxId: box.boxId || '',
|
|
33
|
+
blockId: tx.hash,
|
|
34
|
+
spentTransactionId: box.spentTransactionId,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
39
|
* return block information of specified tx
|