@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.23 → 1.0.3-dev.3-PROJ-1296.25

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 +1 @@
1
- {"version":3,"file":"ScheduleTransactionJob.d.ts","sourceRoot":"","sources":["../../src/entities/ScheduleTransactionJob.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAG/H,qBAGa,sBAAsB;IAE/B,EAAE,EAAG,MAAM,CAAC;IAGZ,UAAU,EAAG,MAAM,CAAC;IAGpB,cAAc,EAAG,aAAa,CAAC;IAG/B,MAAM,EAAG,iBAAiB,CAAC;IAG3B,UAAU,EAAG,cAAc,CAAC;IAG5B,QAAQ,EAAG,MAAM,CAAC;IAIlB,eAAe,EAAG,IAAI,GAAG,IAAI,CAAC;IAG9B,SAAS,EAAG,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAG,MAAM,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAG,IAAI,GAAG,IAAI,CAAC;IAGtB,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;IAG3B,WAAW,EAAG,MAAM,CAAC;IAGrB,aAAa,EAAG,MAAM,GAAG,IAAI,CAAC;IAG9B,aAAa,EAAG,IAAI,GAAG,IAAI,CAAC;IAG5B,QAAQ,EAAG,GAAG,CAAC;IAIf,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;CACrB"}
1
+ {"version":3,"file":"ScheduleTransactionJob.d.ts","sourceRoot":"","sources":["../../src/entities/ScheduleTransactionJob.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAG/H,qBAEa,sBAAsB;IAE/B,EAAE,EAAG,MAAM,CAAC;IAGZ,UAAU,EAAG,MAAM,CAAC;IAGpB,cAAc,EAAG,aAAa,CAAC;IAG/B,MAAM,EAAG,iBAAiB,CAAC;IAG3B,UAAU,EAAG,cAAc,CAAC;IAG5B,QAAQ,EAAG,MAAM,CAAC;IAIlB,eAAe,EAAG,IAAI,GAAG,IAAI,CAAC;IAG9B,SAAS,EAAG,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAG,MAAM,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAG,IAAI,GAAG,IAAI,CAAC;IAGtB,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;IAG3B,WAAW,EAAG,MAAM,CAAC;IAGrB,aAAa,EAAG,MAAM,GAAG,IAAI,CAAC;IAG9B,aAAa,EAAG,IAAI,GAAG,IAAI,CAAC;IAG5B,QAAQ,EAAG,GAAG,CAAC;IAIf,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;CACrB"}
@@ -85,5 +85,5 @@ __decorate([
85
85
  ], ScheduleTransactionJob.prototype, "updated_at", void 0);
86
86
  exports.ScheduleTransactionJob = ScheduleTransactionJob = __decorate([
87
87
  (0, typeorm_1.Entity)({ name: "schedule_transaction_jobs", schema: "multisig" }),
88
- (0, typeorm_1.Unique)(["request_id"])
88
+ (0, typeorm_1.Unique)(["request_id", 'operation_type'])
89
89
  ], ScheduleTransactionJob);
@@ -71,6 +71,9 @@ export declare const ErrorMessages: {
71
71
  readonly FAILED_CANCEL_WITHDRAWAL: "Failed to cancel scheduled withdrawal";
72
72
  readonly WITHDRAWAL_INSUFFICIENT_SIGNATURES: "Insufficient signatures for withdrawal scheduling";
73
73
  readonly WITHDRAWAL_INVALID_SIGNATURES: "One or more signatures are invalid for withdrawal scheduling";
74
+ readonly UNDEFINED_DESTINATION_DETAILS: "Lightning withdrawal has no destination payment details";
75
+ readonly UNDEFINED_WITHDRAWAL_TOKEN: "Token address does not exist in withdraw request";
76
+ readonly MISSING_WITHDRAWAL_DETAILS: "Withdraw request details is missing";
74
77
  };
75
78
  export declare const ErrorCodes: {
76
79
  readonly INTERNAL_SERVER: "error.internal_server_error";
@@ -138,6 +141,9 @@ export declare const ErrorCodes: {
138
141
  readonly FAILED_CANCEL_WITHDRAWAL: "error.failed_cancel_withdrawal";
139
142
  readonly WITHDRAWAL_INSUFFICIENT_SIGNATURES: "error.withdrawal_insufficient_signatures";
140
143
  readonly WITHDRAWAL_INVALID_SIGNATURES: "error.withdrawal_invalid_signatures";
144
+ readonly UNDEFINED_DESTINATION_DETAILS: "error.undefined_destination_details";
145
+ readonly UNDEFINED_WITHDRAWAL_TOKEN: "error.undefined_withdrawawal_token";
146
+ readonly MISSING_WITHDRAWAL_DETAILS: "error.invalid_withdraw_request";
141
147
  };
142
148
  export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
143
149
  export interface ErrorCodeEntry {
@@ -229,6 +235,9 @@ declare class BaseErrors {
229
235
  FailedCancelWithdrawal(): "Failed to cancel scheduled withdrawal";
230
236
  WithdrawalInvalidSignatures(): "One or more signatures are invalid for withdrawal scheduling";
231
237
  WithdrawalInsufficientSignatures(): "Insufficient signatures for withdrawal scheduling";
238
+ MissingWithdrawDetails(): "Withdraw request details is missing";
239
+ UndefinedWithdrawalToken(): "Token address does not exist in withdraw request";
240
+ UndefinedDestinationDetails(): "Lightning withdrawal has no destination payment details";
232
241
  /** Handler methods */
233
242
  handle_error: (error: any, source_method: string) => ErrorHandlerResponse;
234
243
  get_error_code_base: (message: string) => ErrorCodeEntry | null;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.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rawal`,
111
111
  WITHDRAWAL_INSUFFICIENT_SIGNATURES: `Insufficient signatures for withdrawal scheduling`,
112
112
  WITHDRAWAL_INVALID_SIGNATURES: `One or more signatures are invalid for withdrawal scheduling`,
113
+ UNDEFINED_DESTINATION_DETAILS: `Lightning withdrawal has no destination payment details`,
114
+ UNDEFINED_WITHDRAWAL_TOKEN: `Token address does not exist in withdraw request`,
115
+ MISSING_WITHDRAWAL_DETAILS: `Withdraw request details is missing`,
113
116
  };
114
117
  exports.ErrorCodes = {
115
118
  INTERNAL_SERVER: 'error.internal_server_error',
@@ -184,6 +187,9 @@ exports.ErrorCodes = {
184
187
  FAILED_CANCEL_WITHDRAWAL: `error.failed_cancel_withdrawal`,
185
188
  WITHDRAWAL_INSUFFICIENT_SIGNATURES: `error.withdrawal_insufficient_signatures`,
186
189
  WITHDRAWAL_INVALID_SIGNATURES: `error.withdrawal_invalid_signatures`,
190
+ UNDEFINED_DESTINATION_DETAILS: `error.undefined_destination_details`,
191
+ UNDEFINED_WITHDRAWAL_TOKEN: `error.undefined_withdrawawal_token`,
192
+ MISSING_WITHDRAWAL_DETAILS: `error.invalid_withdraw_request`,
187
193
  };
188
194
  class BaseErrors {
189
195
  constructor() {
@@ -301,6 +307,12 @@ class BaseErrors {
301
307
  return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.WITHDRAWAL_INSUFFICIENT_SIGNATURES });
302
308
  if (message.includes(exports.ErrorMessages.WITHDRAWAL_INVALID_SIGNATURES))
303
309
  return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.WITHDRAWAL_INVALID_SIGNATURES });
310
+ if (message.includes(exports.ErrorMessages.UNDEFINED_DESTINATION_DETAILS))
311
+ return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.UNDEFINED_DESTINATION_DETAILS });
312
+ if (message.includes(exports.ErrorMessages.UNDEFINED_WITHDRAWAL_TOKEN))
313
+ return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.UNDEFINED_WITHDRAWAL_TOKEN });
314
+ if (message.includes(exports.ErrorMessages.MISSING_WITHDRAWAL_DETAILS))
315
+ return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.MISSING_WITHDRAWAL_DETAILS });
304
316
  return null;
305
317
  };
306
318
  }
@@ -383,5 +395,10 @@ class BaseErrors {
383
395
  ;
384
396
  WithdrawalInsufficientSignatures() { return exports.ErrorMessages.WITHDRAWAL_INSUFFICIENT_SIGNATURES; }
385
397
  ;
398
+ MissingWithdrawDetails() { return exports.ErrorMessages.MISSING_WITHDRAWAL_DETAILS; }
399
+ ;
400
+ UndefinedWithdrawalToken() { return exports.ErrorMessages.UNDEFINED_WITHDRAWAL_TOKEN; }
401
+ ;
402
+ UndefinedDestinationDetails() { return exports.ErrorMessages.UNDEFINED_DESTINATION_DETAILS; }
386
403
  }
387
404
  exports.default = BaseErrors;
@@ -2,9 +2,11 @@ import { ScheduleJobStatus, ScheduleTransactionJob } from "../../../entities/Sch
2
2
  import { ClaimJobLockMetadata } from "../../types";
3
3
  import { Pool } from "pg";
4
4
  import { OperationType } from "../../../contracts/types/escrow";
5
- import { MarkCompleteScheduleJob } from "../../types/db";
5
+ import { MarkCompleteScheduleJob, ScheduleTransactionJobWithDetails } from "../../types/db";
6
6
  declare class ScheduleTransactionService {
7
7
  static get_available_jobs: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJob[]>;
8
+ /** Same as get_available_jobs but joins withdrawal details from accounting for each job. */
9
+ static get_available_jobs_with_details: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJobWithDetails[]>;
8
10
  /**
9
11
  * Requeues all jobs in the given status to "queued"
10
12
  * @param pool
@@ -15,16 +17,16 @@ declare class ScheduleTransactionService {
15
17
  * @param max_retries
16
18
  * @returns
17
19
  */
18
- requeue_expired_jobs: (pool: Pool, current_status: ScheduleJobStatus, limit: number, lock_owner: string, lock_reason: string, max_retries: number) => Promise<ScheduleTransactionJob[]>;
19
- batch_update_status: (pool: Pool, operation_type: OperationType, request_ids: number[], new_status: ScheduleJobStatus) => Promise<void>;
20
- batch_update_failed_jobs: (pool: Pool, request_ids: number[], new_status: ScheduleJobStatus, error_message?: string, retryable?: boolean) => Promise<void>;
21
- batch_update_executed_jobs: (pool: Pool, data: {
20
+ static requeue_expired_jobs: (pool: Pool, current_status: ScheduleJobStatus, limit: number, lock_owner: string, lock_reason: string, max_retries: number) => Promise<ScheduleTransactionJob[]>;
21
+ static batch_update_status: (pool: Pool, operation_type: OperationType, request_ids: number[], new_status: ScheduleJobStatus) => Promise<void>;
22
+ static batch_update_failed_jobs: (pool: Pool, request_ids: number[], new_status: ScheduleJobStatus, error_message?: string, retryable?: boolean) => Promise<void>;
23
+ static batch_update_executed_jobs: (pool: Pool, data: {
22
24
  operation_type: OperationType;
23
25
  request_id: number;
24
26
  tx_hash: string;
25
27
  sent_at: Date;
26
28
  }[]) => Promise<void>;
27
- mark_complete: (pool: Pool, payloads: MarkCompleteScheduleJob[]) => Promise<void>;
29
+ static mark_complete: (pool: Pool, payloads: MarkCompleteScheduleJob[]) => Promise<void>;
28
30
  }
29
31
  export default ScheduleTransactionService;
30
32
  //# sourceMappingURL=ScheduleTransactionService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduleTransactionService.d.ts","sourceRoot":"","sources":["../../../../src/services/db/timelock/ScheduleTransactionService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,cAAM,0BAA0B;IAE5B,MAAM,CAAC,kBAAkB,GAAU,MAAM,IAAI,EAAE,QAAO,MAAW,EAAE,YAAW,MAAY,EAAE,gBAAe,oBAA0F,KAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAwCxO;IAID;;;;;;;;;OASG;IACI,oBAAoB,GACvB,MAAM,IAAI,EACV,gBAAgB,iBAAiB,EACjC,OAAO,MAAM,EACb,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,aAAa,MAAM,KACpB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAwClC;IAIK,mBAAmB,GAAU,MAAM,IAAI,EAAE,gBAAgB,aAAa,EAAE,aAAa,MAAM,EAAE,EAAE,YAAY,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAAC,CAUjJ;IAGK,wBAAwB,GAC3B,MAAM,IAAI,EACV,aAAa,MAAM,EAAE,EACrB,YAAY,iBAAiB,EAC7B,gBAAgB,MAAM,EACtB,YAAY,OAAO,KACpB,OAAO,CAAC,IAAI,CAAC,CAwBd;IAGK,0BAA0B,GAC7B,MAAM,IAAI,EACV,MAAM;QAAE,cAAc,EAAE,aAAa,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,IAAI,CAAA;KAAE,EAAE,KAC9F,OAAO,CAAC,IAAI,CAAC,CAyBd;IAGK,aAAa,GAAU,MAAM,IAAI,EAAE,UAAU,uBAAuB,EAAE,mBAuB5E;CAGJ;AAED,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"ScheduleTransactionService.d.ts","sourceRoot":"","sources":["../../../../src/services/db/timelock/ScheduleTransactionService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;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AAM,IAAI,EAAE,UAAU,uBAAuB,EAAE,mBAuB5E;CAGJ;AAED,eAAe,0BAA0B,CAAC"}
@@ -12,19 +12,95 @@ var _a;
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  const uuid_1 = require("uuid");
14
14
  class ScheduleTransactionService {
15
- constructor() {
16
- /**
17
- * Requeues all jobs in the given status to "queued"
18
- * @param pool
19
- * @param current_status
20
- * @param limit
21
- * @param lock_owner
22
- * @param lock_reason
23
- * @param max_retries
24
- * @returns
25
- */
26
- this.requeue_expired_jobs = (pool, current_status, limit, lock_owner, lock_reason, max_retries) => __awaiter(this, void 0, void 0, function* () {
27
- const res = yield pool.query(`
15
+ }
16
+ _a = ScheduleTransactionService;
17
+ ScheduleTransactionService.get_available_jobs = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
18
+ const ttlSeconds = job_ttl_s;
19
+ const batchGroupId = (0, uuid_1.v4)();
20
+ const res = yield pool.query(`
21
+ WITH candidates AS (
22
+ SELECT id
23
+ FROM multisig.schedule_transaction_jobs
24
+ WHERE status = 'queued'
25
+ AND (lock_expires_at IS NULL OR lock_expires_at < now())
26
+ ORDER BY blockchain, chain_id ASC
27
+ LIMIT $1
28
+ FOR UPDATE SKIP LOCKED
29
+ )
30
+ UPDATE multisig.schedule_transaction_jobs cj
31
+ SET
32
+ status = 'processing',
33
+ locked_at = now(),
34
+ lock_expires_at = now() + ($2 || ' seconds')::interval,
35
+ batch_group_id = $3,
36
+ metadata = jsonb_set(
37
+ jsonb_set(
38
+ coalesce(cj.metadata, '{}'::jsonb),
39
+ '{lock_owner}',
40
+ to_jsonb($4::text)
41
+ ),
42
+ '{lock_reason}',
43
+ to_jsonb($5::text)
44
+ ),
45
+ updated_at = now()
46
+ FROM candidates c
47
+ WHERE cj.id = c.id
48
+ RETURNING cj.*;
49
+ `, [limit, ttlSeconds, batchGroupId, lock_metadata.lock_owner, lock_metadata.lock_reason]);
50
+ return res.rows;
51
+ });
52
+ /** Same as get_available_jobs but joins withdrawal details from accounting for each job. */
53
+ ScheduleTransactionService.get_available_jobs_with_details = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
54
+ const ttlSeconds = job_ttl_s;
55
+ const batchGroupId = (0, uuid_1.v4)();
56
+ const res = yield pool.query(`
57
+ WITH candidates AS (
58
+ SELECT id
59
+ FROM multisig.schedule_transaction_jobs
60
+ WHERE status = 'queued'
61
+ AND (lock_expires_at IS NULL OR lock_expires_at < now())
62
+ ORDER BY blockchain, chain_id ASC
63
+ LIMIT $1
64
+ FOR UPDATE SKIP LOCKED
65
+ ),
66
+ updated AS (
67
+ UPDATE multisig.schedule_transaction_jobs cj
68
+ SET
69
+ status = 'processing',
70
+ locked_at = now(),
71
+ lock_expires_at = now() + ($2 || ' seconds')::interval,
72
+ batch_group_id = $3,
73
+ metadata = jsonb_set(
74
+ jsonb_set(
75
+ coalesce(cj.metadata, '{}'::jsonb),
76
+ '{lock_owner}',
77
+ to_jsonb($4::text)
78
+ ),
79
+ '{lock_reason}',
80
+ to_jsonb($5::text)
81
+ ),
82
+ updated_at = now()
83
+ FROM candidates c
84
+ WHERE cj.id = c.id
85
+ RETURNING cj.*
86
+ )
87
+ SELECT u.*, accounting.fn_get_crypto_withdrawal_details(u.request_id) AS withdrawal_details
88
+ FROM updated u;
89
+ `, [limit, ttlSeconds, batchGroupId, lock_metadata.lock_owner, lock_metadata.lock_reason]);
90
+ return res.rows;
91
+ });
92
+ /**
93
+ * Requeues all jobs in the given status to "queued"
94
+ * @param pool
95
+ * @param current_status
96
+ * @param limit
97
+ * @param lock_owner
98
+ * @param lock_reason
99
+ * @param max_retries
100
+ * @returns
101
+ */
102
+ ScheduleTransactionService.requeue_expired_jobs = (pool, current_status, limit, lock_owner, lock_reason, max_retries) => __awaiter(void 0, void 0, void 0, function* () {
103
+ const res = yield pool.query(`
28
104
  WITH expired AS (
29
105
  SELECT id
30
106
  FROM multisig.schedule_transaction_jobs
@@ -59,19 +135,19 @@ class ScheduleTransactionService {
59
135
  WHERE cj.id = e.id
60
136
  RETURNING cj.*;
61
137
  `, [limit, lock_owner, lock_reason, current_status, max_retries]);
62
- return res.rows;
63
- });
64
- this.batch_update_status = (pool, operation_type, request_ids, new_status) => __awaiter(this, void 0, void 0, function* () {
65
- const status = new_status;
66
- yield pool.query(`
138
+ return res.rows;
139
+ });
140
+ ScheduleTransactionService.batch_update_status = (pool, operation_type, request_ids, new_status) => __awaiter(void 0, void 0, void 0, function* () {
141
+ const status = new_status;
142
+ yield pool.query(`
67
143
  UPDATE multisig.schedule_transaction_jobs
68
144
  SET status = $1, updated_at = CURRENT_TIMESTAMP
69
145
  WHERE operation_type = $2::int AND request_id = ANY($2)
70
146
  `, [status, operation_type, request_ids]);
71
- return;
72
- });
73
- this.batch_update_failed_jobs = (pool, request_ids, new_status, error_message, retryable) => __awaiter(this, void 0, void 0, function* () {
74
- yield pool.query(`
147
+ return;
148
+ });
149
+ ScheduleTransactionService.batch_update_failed_jobs = (pool, request_ids, new_status, error_message, retryable) => __awaiter(void 0, void 0, void 0, function* () {
150
+ yield pool.query(`
75
151
  UPDATE multisig.schedule_transaction_jobs
76
152
  SET
77
153
  status = $1,
@@ -87,18 +163,18 @@ class ScheduleTransactionService {
87
163
  END
88
164
  WHERE request_id = ANY($4)
89
165
  `, [
90
- new_status,
91
- error_message || null,
92
- retryable === true,
93
- request_ids
94
- ]);
95
- });
96
- this.batch_update_executed_jobs = (pool, data) => __awaiter(this, void 0, void 0, function* () {
97
- const requestIds = data.map(d => d.request_id);
98
- const operationTypes = data.map(d => d.operation_type);
99
- const txHashes = data.map(d => d.tx_hash);
100
- const sentAts = data.map(d => d.sent_at);
101
- yield pool.query(`
166
+ new_status,
167
+ error_message || null,
168
+ retryable === true,
169
+ request_ids
170
+ ]);
171
+ });
172
+ ScheduleTransactionService.batch_update_executed_jobs = (pool, data) => __awaiter(void 0, void 0, void 0, function* () {
173
+ const requestIds = data.map(d => d.request_id);
174
+ const operationTypes = data.map(d => d.operation_type);
175
+ const txHashes = data.map(d => d.tx_hash);
176
+ const sentAts = data.map(d => d.sent_at);
177
+ yield pool.query(`
102
178
  UPDATE multisig.schedule_transaction_jobs AS t
103
179
  SET
104
180
  tx_hash = c.tx_hash,
@@ -115,13 +191,13 @@ class ScheduleTransactionService {
115
191
  WHERE t.request_id = c.request_id
116
192
  AND t.operation_type = c.operation_type
117
193
  `, [operationTypes, requestIds, txHashes, sentAts]);
118
- });
119
- this.mark_complete = (pool, payloads) => __awaiter(this, void 0, void 0, function* () {
120
- if (payloads.length === 0)
121
- return;
122
- const requestIds = payloads.map(d => d.requestId);
123
- const operationTypes = payloads.map(d => d.operationType);
124
- yield pool.query(`
194
+ });
195
+ ScheduleTransactionService.mark_complete = (pool, payloads) => __awaiter(void 0, void 0, void 0, function* () {
196
+ if (payloads.length === 0)
197
+ return;
198
+ const requestIds = payloads.map(d => d.requestId);
199
+ const operationTypes = payloads.map(d => d.operationType);
200
+ yield pool.query(`
125
201
  UPDATE multisig.schedule_transaction_jobs AS t
126
202
  SET
127
203
  status = 'completed',
@@ -134,43 +210,5 @@ class ScheduleTransactionService {
134
210
  WHERE t.request_id = c.request_id
135
211
  AND t.operation_type = c.operation_type
136
212
  `, [requestIds, operationTypes]);
137
- });
138
- }
139
- }
140
- _a = ScheduleTransactionService;
141
- ScheduleTransactionService.get_available_jobs = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
142
- const ttlSeconds = job_ttl_s;
143
- const batchGroupId = (0, uuid_1.v4)();
144
- const res = yield pool.query(`
145
- WITH candidates AS (
146
- SELECT id
147
- FROM multisig.schedule_transaction_jobs
148
- WHERE status = 'queued'
149
- AND (lock_expires_at IS NULL OR lock_expires_at < now())
150
- ORDER BY blockchain, chain_id ASC
151
- LIMIT $1
152
- FOR UPDATE SKIP LOCKED
153
- )
154
- UPDATE multisig.schedule_transaction_jobs cj
155
- SET
156
- status = 'processing',
157
- locked_at = now(),
158
- lock_expires_at = now() + ($2 || ' seconds')::interval,
159
- batch_group_id = $3,
160
- metadata = jsonb_set(
161
- jsonb_set(
162
- coalesce(cj.metadata, '{}'::jsonb),
163
- '{lock_owner}',
164
- to_jsonb($4::text)
165
- ),
166
- '{lock_reason}',
167
- to_jsonb($5::text)
168
- ),
169
- updated_at = now()
170
- FROM candidates c
171
- WHERE cj.id = c.id
172
- RETURNING cj.*;
173
- `, [limit, ttlSeconds, batchGroupId, lock_metadata.lock_owner, lock_metadata.lock_reason]);
174
- return res.rows;
175
213
  });
176
214
  exports.default = ScheduleTransactionService;
@@ -19,7 +19,7 @@ export interface WithdrawRequestDetails {
19
19
  blockchain: BlockchainType;
20
20
  receiver: string;
21
21
  paymentType: PaymentType;
22
- destinationBlockchain?: BLOCKCHAINS.EVM | BLOCKCHAINS.SOLANA;
22
+ destinationBlockchain?: BLOCKCHAINS.EVM | BLOCKCHAINS.SOLANA | BLOCKCHAINS.TRON;
23
23
  destinationChainId?: number;
24
24
  destinationToken?: string;
25
25
  sigsExecutiveRequired?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/services/types/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAChC,UAAU,EAAE,cAAc,CAAC;IAC3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AC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,CAAC;CACrB"}
@@ -1,6 +1,11 @@
1
1
  import { OperationType } from "../../../contracts/types/escrow";
2
+ import { ScheduleTransactionJob } from "../../../entities/ScheduleTransactionJob";
3
+ import { WithdrawRequestDetails } from "../claim";
2
4
  export interface MarkCompleteScheduleJob {
3
5
  requestId: number;
4
6
  operationType: OperationType;
5
7
  }
8
+ export interface ScheduleTransactionJobWithDetails extends ScheduleTransactionJob {
9
+ withdrawal_details: WithdrawRequestDetails | null;
10
+ }
6
11
  //# sourceMappingURL=timelock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timelock.d.ts","sourceRoot":"","sources":["../../../../src/services/types/db/timelock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;CAChC"}
1
+ {"version":3,"file":"timelock.d.ts","sourceRoot":"","sources":["../../../../src/services/types/db/timelock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC7E,kBAAkB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACrD"}
@@ -14,5 +14,5 @@ export * from "./balance_service";
14
14
  export * from "./chain_manager";
15
15
  export * from './quicknode';
16
16
  export * from "./bo_withdrawal";
17
- export * from "./db/multisig_service";
17
+ export * from "./db/index";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -30,4 +30,4 @@ __exportStar(require("./balance_service"), exports);
30
30
  __exportStar(require("./chain_manager"), exports);
31
31
  __exportStar(require("./quicknode"), exports);
32
32
  __exportStar(require("./bo_withdrawal"), exports);
33
- __exportStar(require("./db/multisig_service"), exports);
33
+ __exportStar(require("./db/index"), exports);
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.23",
3
+ "version": "1.0.3-dev.3-PROJ-1296.25",
4
4
  "description": "Shared library for blockchain projects",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",