@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.42 → 1.0.3-dev.3-PROJ-1296.43

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.
@@ -1,7 +1,9 @@
1
1
  import { Pool } from "pg";
2
2
  import { WithdrawRequestDetails } from "./types";
3
+ import { WithdrawalCommitment } from "../entities";
3
4
  declare class WithdrawalService {
4
5
  static get_crypto_withdrawal_request: (pool: Pool, request_id: number) => Promise<WithdrawRequestDetails | null>;
6
+ static get_withdrawal_commitments: (pool: Pool, blockchain: string, chainId: string, escrowAddress: string) => Promise<WithdrawalCommitment>;
5
7
  }
6
8
  export default WithdrawalService;
7
9
  //# sourceMappingURL=WithdrawalService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WithdrawalService.d.ts","sourceRoot":"","sources":["../../src/services/WithdrawalService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,cAAM,iBAAiB;IACnB,MAAM,CAAC,6BAA6B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,4CAQ3E;CACJ;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"WithdrawalService.d.ts","sourceRoot":"","sources":["../../src/services/WithdrawalService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE,cAAM,iBAAiB;IACnB,MAAM,CAAC,6BAA6B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,4CAQ3E;IAED,MAAM,CAAC,0BAA0B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,EAAE,SAAS,MAAM,EAAE,eAAe,MAAM,mCAUhH;CACJ;AAED,eAAe,iBAAiB,CAAC"}
@@ -19,4 +19,11 @@ WithdrawalService.get_crypto_withdrawal_request = (pool, request_id) => __awaite
19
19
  `, [request_id]);
20
20
  return result.rows[0].fn_get_crypto_withdrawal_details;
21
21
  });
22
+ WithdrawalService.get_withdrawal_commitments = (pool, blockchain, chainId, escrowAddress) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const status = "scheduled";
24
+ const result = yield pool.query(`
25
+ SELECT multisig.fn_get_withdrawal_commitments($1::text,$2::text,$3::text,$4::text);
26
+ `, [blockchain, chainId, escrowAddress, status]);
27
+ return result.rows[0].fn_get_withdrawal_commitments;
28
+ });
22
29
  exports.default = WithdrawalService;
@@ -0,0 +1,16 @@
1
+ export interface WithdrawalCommitment {
2
+ id: number;
3
+ blockchain: string;
4
+ chainId: string;
5
+ escrowContract: string;
6
+ commitmentHash: string;
7
+ requestId: number;
8
+ statusId: number;
9
+ status: string;
10
+ txHash: string | null;
11
+ finalizedAt: Date | null;
12
+ executeAt: Date;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ }
16
+ //# sourceMappingURL=withdrawal_service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withdrawal_service.d.ts","sourceRoot":"","sources":["../../../../src/services/types/db/withdrawal_service.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ercworldio/blockchain-shared",
3
- "version": "1.0.3-dev.3-PROJ-1296.42",
3
+ "version": "1.0.3-dev.3-PROJ-1296.43",
4
4
  "description": "Shared library for blockchain projects",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",