@@ -38,6 +38,14 @@ const OrbitChainConfig = models.OrbitChainConfig;
3838const OrbitWithdrawal = models . OrbitWithdrawal ;
3939const OrbitDeposit = models . OrbitDeposit ;
4040
41+ /**
42+ * Retrieves a list of orbit deposits for a workspace
43+ * @param {string } workspaceId - The workspace id
44+ * @param {number } page - The page number
45+ * @param {number } itemsPerPage - The number of items per page
46+ * @param {string } order - The order to sort by
47+ * @returns {Promise<Array> } - A list of orbit deposits
48+ */
4149const getWorkspaceOrbitDeposits = async ( workspaceId , page , itemsPerPage , order ) => {
4250 if ( ! workspaceId )
4351 throw new Error ( 'Missing parameter' ) ;
@@ -54,6 +62,14 @@ const getWorkspaceOrbitDeposits = async (workspaceId, page, itemsPerPage, order)
5462 } ) ;
5563}
5664
65+ /**
66+ * Retrieves the l2 transaction containing an orbit withdrawal
67+ * Data will be used to build claim calldata
68+ * @param {string } workspaceId - The workspace id
69+ * @param {string } hash - The hash of the transaction
70+ * @param {number } messsageNumber - The message number of the withdrawal
71+ * @returns {Promise<Object> } - The orbit withdrawal
72+ */
5773const getL2TransactionForOrbitWithdrawalClaim = async ( workspaceId , hash , messsageNumber ) => {
5874 if ( ! workspaceId || ! hash )
5975 throw new Error ( 'Missing parameter' ) ;
@@ -248,17 +264,6 @@ const getOrbitBatch = async (workspaceId, batchNumber) => {
248264 return batch . toJSON ( ) ;
249265} ;
250266
251- const getWorkspaceByIdWithOrbitConfig = async ( workspaceId ) => {
252- if ( ! workspaceId )
253- throw new Error ( 'Missing parameter' ) ;
254-
255- const workspace = await Workspace . findByPk ( workspaceId , {
256- include : 'orbitConfig'
257- } ) ;
258-
259- return workspace . toJSON ( ) ;
260- } ;
261-
262267/**
263268 * Retrieves a list of orbit batches for a workspace
264269 * @param {string } workspaceId - The workspace id
@@ -3410,7 +3415,6 @@ module.exports = {
34103415 getImportedAccounts : getImportedAccounts ,
34113416 getFilteredNativeAccounts : getFilteredNativeAccounts ,
34123417 getWorkspaceOrbitBatches : getWorkspaceOrbitBatches ,
3413- getWorkspaceByIdWithOrbitConfig : getWorkspaceByIdWithOrbitConfig ,
34143418 getOrbitBatch : getOrbitBatch ,
34153419 getOrbitBatchBlocks : getOrbitBatchBlocks ,
34163420 getWorkspaceOrbitBatchTransactions : getWorkspaceOrbitBatchTransactions ,
0 commit comments