@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.17 → 1.0.3-dev.3-PROJ-1296.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.
- package/build/contracts/Escrow.d.ts +4 -4
- package/build/contracts/EscrowErrors.d.ts +1 -1
- package/build/contracts/EscrowErrors.d.ts.map +1 -1
- package/build/contracts/artifacts/Escrow.json +0 -6
- package/build/errors/errors.d.ts +9 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +22 -2
- package/build/services/types/claim.d.ts +12 -0
- package/build/services/types/claim.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
44
44
|
transactionHash: null;
|
|
45
45
|
receipt: null;
|
|
46
46
|
error: {
|
|
47
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
47
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
48
48
|
message: string;
|
|
49
49
|
data?: any;
|
|
50
50
|
};
|
|
@@ -61,7 +61,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
61
61
|
transactionHash: null;
|
|
62
62
|
receipt: null;
|
|
63
63
|
error: {
|
|
64
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
64
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
65
65
|
message: string;
|
|
66
66
|
data?: any;
|
|
67
67
|
};
|
|
@@ -108,7 +108,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
108
108
|
receipt: null;
|
|
109
109
|
executed_at: Date;
|
|
110
110
|
error: {
|
|
111
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
111
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
112
112
|
message: string;
|
|
113
113
|
data?: any;
|
|
114
114
|
};
|
|
@@ -148,7 +148,7 @@ declare class EscrowInteraction extends Errors {
|
|
|
148
148
|
transactionHash: null;
|
|
149
149
|
receipt: null;
|
|
150
150
|
error: {
|
|
151
|
-
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
151
|
+
name: "ContractBusy" | "ContractPaused" | "InvalidSignature" | "SignatureAlreadyUsed" | "ZeroValue" | "ZeroAddress" | "RequestAlreadyFulfilled" | "EtherDirectTransferNotAllowed" | "DepositOnlyERC20" | "TokenNotAllowed" | "InsufficientBalance" | "InsufficientReserves" | "TransferError" | "NotAdmin" | "NotAuthorized" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
152
152
|
message: string;
|
|
153
153
|
data?: any;
|
|
154
154
|
};
|
|
@@ -59,7 +59,7 @@ export interface NotAuthorizedError {
|
|
|
59
59
|
name: "NotAuthorized";
|
|
60
60
|
args: [];
|
|
61
61
|
}
|
|
62
|
-
type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "ExceedsLimit" | "ExceedsMax" | "UnknownError";
|
|
62
|
+
type ErrorName = "NotAuthorized" | "NotAdmin" | "TransferError" | "InsufficientReserves" | "InsufficientBalance" | "TokenNotAllowed" | "DepositOnlyERC20" | "EtherDirectTransferNotAllowed" | "RequestAlreadyFulfilled" | "ZeroAddress" | "ZeroValue" | "SignatureAlreadyUsed" | "InvalidSignature" | "ContractPaused" | "ContractBusy" | "ExceedsLimit" | "ExceedsMax" | "UnknownError" | "InvalidNonce" | "TimelockConfigGroupNotSet" | "ConfigGroupNotSet" | "TimelockConfigNotSet" | "CommitmentNotFound" | "AlreadyCreatedTransaction" | "AccountAlreadyHasSignerRole" | "InvalidOperation" | "InvalidConfig" | "InvalidSignatures" | "AdminMultisigConfigNotSet" | "MultisigConfigNotSet" | "RequireTreasuryReceiverRole" | "InvalidMultiSig" | "RequireMultiSig" | "TimelockNotExpired" | "InsufficientExecutiveSigs" | "InsufficientManagerSigs";
|
|
63
63
|
export interface EscrowErrorMessage {
|
|
64
64
|
name: ErrorName;
|
|
65
65
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscrowErrors.d.ts","sourceRoot":"","sources":["../../src/contracts/EscrowErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,EAAE,CAAC;CACZ;AAED,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,IAAI,EAAE,EAAE,CAAC;C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E,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,EAAE,CAAC;CACZ;AAID,KAAK,SAAS,GACR,eAAe,GACf,UAAU,GACV,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,iBAAiB,GACjB,kBAAkB,GAClB,+BAA+B,GAC/B,yBAAyB,GACzB,aAAa,GACb,WAAW,GACX,sBAAsB,GACtB,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,cAAc,GACd,cAAc,GACd,2BAA2B,GAC3B,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,2BAA2B,GAC3B,6BAA6B,GAC7B,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,2BAA2B,GAC3B,sBAAsB,GACtB,6BAA6B,GAC7B,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,CAAA;AAE/B,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,gBAAgB,KAAG,kBAgDlE,CAAC"}
|
package/build/errors/errors.d.ts
CHANGED
|
@@ -65,6 +65,9 @@ export declare const ErrorMessages: {
|
|
|
65
65
|
readonly INSUFFICIENT_ENERGY_WALLET_BALANCE: "Rent energy wallet has insufficient balance";
|
|
66
66
|
readonly RENT_ENERGY_MIN_WITHDRAWAL_ERROR: "Minimum withdrawal of 50TRX required.";
|
|
67
67
|
readonly TELEGRAM_ALREADY_CONNECTED: "Telegram account is already connected";
|
|
68
|
+
readonly MAX_BATCH_SIZE_EXCEEDED: "Maximum batch size is exceeded";
|
|
69
|
+
readonly FAILED_SCHEDULE_WITHDRAWAL: "Scheduling withdrawal failed";
|
|
70
|
+
readonly FAILED_EXECUTE_WITHDRAWAL: "Failed to execute scheduled withdrawal";
|
|
68
71
|
};
|
|
69
72
|
export declare const ErrorCodes: {
|
|
70
73
|
readonly INTERNAL_SERVER: "error.internal_server_error";
|
|
@@ -126,6 +129,9 @@ export declare const ErrorCodes: {
|
|
|
126
129
|
readonly INSUFFICIENT_ENERGY_WALLET_BALANCE: "error.insufficient_energy_wallet_balance";
|
|
127
130
|
readonly RENT_ENERGY_MIN_WITHDRAWAL_ERROR: "error.rent_energy_min_withdrawal_error";
|
|
128
131
|
readonly TELEGRAM_ALREADY_CONNECTED: "error.telegram_already_connected";
|
|
132
|
+
readonly MAX_BATCH_SIZE_EXCEEDED: "error.max_batch_size_exceeded";
|
|
133
|
+
readonly FAILED_SCHEDULE_WITHDRAWAL: "error.failed_schedule_withdrawal";
|
|
134
|
+
readonly FAILED_EXECUTE_WITHDRAWAL: "error.failed_execute_withdrawal";
|
|
129
135
|
};
|
|
130
136
|
export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
|
|
131
137
|
export interface ErrorCodeEntry {
|
|
@@ -211,6 +217,9 @@ declare class BaseErrors {
|
|
|
211
217
|
InsufficientRentEnergyWalletBalance(): "Rent energy wallet has insufficient balance";
|
|
212
218
|
RentEnergyMinWithdrawalError(): "Minimum withdrawal of 50TRX required.";
|
|
213
219
|
TelegramAlreadyConnected(): "Telegram account is already connected";
|
|
220
|
+
MaxBatchSizeExceeded(): "Maximum batch size is exceeded";
|
|
221
|
+
FailedScheduleWithdrawal(): "Scheduling withdrawal failed";
|
|
222
|
+
FailedExecuteWithdrawal(): "Failed to execute scheduled withdrawal";
|
|
214
223
|
/** Handler methods */
|
|
215
224
|
handle_error: (error: any, source_method: string) => ErrorHandlerResponse;
|
|
216
225
|
get_error_code_base: (message: string) => ErrorCodeEntry | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors/errors.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFtB,2BAA2B;;;;IAK3B,sBAAsB
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors/errors.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFtB,2BAA2B;;;;IAK3B,sBAAsB;;;;;;;;;;;;;CAoBhB,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Eb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEnE,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;CACzB;AAED,UAAU,oBAAoB;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,cAAc;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,cAAM,UAAU;IACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQX;IAED,yDAAyD;IAClD,YAAY,CAAC,CAAC,CAAC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AAI,OAAO,GAAG,EAAE,eAAe,MAAM,KAAG,oBAAoB,CAuB9E;IAEM,mBAAmB,GAAI,SAAS,MAAM,KAAG,cAAc,GAAG,IAAI,CAuCpE;CACJ;AAED,eAAe,UAAU,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -102,7 +102,11 @@ exports.ErrorMessages = {
|
|
|
102
102
|
RENT_ENERGY_API_ERROR: `Encountered error when calling rent API`, // 500
|
|
103
103
|
INSUFFICIENT_ENERGY_WALLET_BALANCE: `Rent energy wallet has insufficient balance`,
|
|
104
104
|
RENT_ENERGY_MIN_WITHDRAWAL_ERROR: `Minimum withdrawal of 50TRX required.`,
|
|
105
|
-
TELEGRAM_ALREADY_CONNECTED: `Telegram account is already connected
|
|
105
|
+
TELEGRAM_ALREADY_CONNECTED: `Telegram account is already connected`, // 409
|
|
106
|
+
/// Multisig
|
|
107
|
+
MAX_BATCH_SIZE_EXCEEDED: `Maximum batch size is exceeded`,
|
|
108
|
+
FAILED_SCHEDULE_WITHDRAWAL: `Scheduling withdrawal failed`,
|
|
109
|
+
FAILED_EXECUTE_WITHDRAWAL: `Failed to execute scheduled withdrawal`,
|
|
106
110
|
};
|
|
107
111
|
exports.ErrorCodes = {
|
|
108
112
|
INTERNAL_SERVER: 'error.internal_server_error',
|
|
@@ -169,7 +173,11 @@ exports.ErrorCodes = {
|
|
|
169
173
|
RENT_ENERGY_API_ERROR: `error.rent_enegy_api_error`,
|
|
170
174
|
INSUFFICIENT_ENERGY_WALLET_BALANCE: `error.insufficient_energy_wallet_balance`,
|
|
171
175
|
RENT_ENERGY_MIN_WITHDRAWAL_ERROR: `error.rent_energy_min_withdrawal_error`,
|
|
172
|
-
TELEGRAM_ALREADY_CONNECTED: `error.telegram_already_connected
|
|
176
|
+
TELEGRAM_ALREADY_CONNECTED: `error.telegram_already_connected`,
|
|
177
|
+
/// Multisig
|
|
178
|
+
MAX_BATCH_SIZE_EXCEEDED: `error.max_batch_size_exceeded`,
|
|
179
|
+
FAILED_SCHEDULE_WITHDRAWAL: `error.failed_schedule_withdrawal`,
|
|
180
|
+
FAILED_EXECUTE_WITHDRAWAL: `error.failed_execute_withdrawal`,
|
|
173
181
|
};
|
|
174
182
|
class BaseErrors {
|
|
175
183
|
constructor() {
|
|
@@ -275,6 +283,12 @@ class BaseErrors {
|
|
|
275
283
|
return Object.assign(Object.assign({}, this.codes[400]), { error_code: exports.ErrorCodes.RENT_ENERGY_MIN_WITHDRAWAL_ERROR });
|
|
276
284
|
if (message.includes(exports.ErrorMessages.TELEGRAM_ALREADY_CONNECTED))
|
|
277
285
|
return Object.assign(Object.assign({}, this.codes[409]), { error_code: exports.ErrorCodes.TELEGRAM_ALREADY_CONNECTED });
|
|
286
|
+
if (message.includes(exports.ErrorMessages.MAX_BATCH_SIZE_EXCEEDED))
|
|
287
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.MAX_BATCH_SIZE_EXCEEDED });
|
|
288
|
+
if (message.includes(exports.ErrorMessages.FAILED_SCHEDULE_WITHDRAWAL))
|
|
289
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.FAILED_SCHEDULE_WITHDRAWAL });
|
|
290
|
+
if (message.includes(exports.ErrorMessages.FAILED_EXECUTE_WITHDRAWAL))
|
|
291
|
+
return Object.assign(Object.assign({}, this.codes[500]), { error_code: exports.ErrorCodes.FAILED_EXECUTE_WITHDRAWAL });
|
|
278
292
|
return null;
|
|
279
293
|
};
|
|
280
294
|
}
|
|
@@ -345,5 +359,11 @@ class BaseErrors {
|
|
|
345
359
|
;
|
|
346
360
|
TelegramAlreadyConnected() { return exports.ErrorMessages.TELEGRAM_ALREADY_CONNECTED; }
|
|
347
361
|
;
|
|
362
|
+
MaxBatchSizeExceeded() { return exports.ErrorMessages.MAX_BATCH_SIZE_EXCEEDED; }
|
|
363
|
+
;
|
|
364
|
+
FailedScheduleWithdrawal() { return exports.ErrorMessages.FAILED_SCHEDULE_WITHDRAWAL; }
|
|
365
|
+
;
|
|
366
|
+
FailedExecuteWithdrawal() { return exports.ErrorMessages.FAILED_EXECUTE_WITHDRAWAL; }
|
|
367
|
+
;
|
|
348
368
|
}
|
|
349
369
|
exports.default = BaseErrors;
|
|
@@ -22,6 +22,18 @@ export interface WithdrawRequestDetails {
|
|
|
22
22
|
destinationBlockchain?: BLOCKCHAINS.EVM | BLOCKCHAINS.SOLANA;
|
|
23
23
|
destinationChainId?: number;
|
|
24
24
|
destinationToken?: string;
|
|
25
|
+
sigsExecutiveRequired?: number;
|
|
26
|
+
sigsManagerRequired?: number;
|
|
27
|
+
multisigSignatures: MultisigSignatureEntry[];
|
|
28
|
+
receiverAddress: string;
|
|
29
|
+
}
|
|
30
|
+
export interface MultisigSignatureEntry {
|
|
31
|
+
name: string;
|
|
32
|
+
signerAddress: string;
|
|
33
|
+
contractAddress: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
operationType: number;
|
|
25
37
|
}
|
|
26
38
|
export interface ClaimJobSuccessResult extends ClaimJobs {
|
|
27
39
|
tx_hash: string;
|
|
@@ -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;IAC3B,YAAY,EAAE,WAAW,CAAC;CAC7B;AACD,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,YAAY,GACZ,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,aAAa,CAAC;AAEpB,MAAM,MAAM,SAAS,GACf,QAA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