@0xmonaco/core 0.2.4 → 0.2.6
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/dist/api/applications/api.d.ts.map +1 -1
- package/dist/api/applications/api.js +10 -16
- package/dist/api/applications/api.js.map +1 -1
- package/dist/api/auth/api.d.ts.map +1 -1
- package/dist/api/auth/api.js +83 -160
- package/dist/api/auth/api.js.map +1 -1
- package/dist/api/auth/index.d.ts +1 -1
- package/dist/api/auth/index.d.ts.map +1 -1
- package/dist/api/auth/index.js.map +1 -1
- package/dist/api/base.d.ts.map +1 -1
- package/dist/api/base.js +37 -19
- package/dist/api/base.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/market/api.d.ts +1 -1
- package/dist/api/market/api.d.ts.map +1 -1
- package/dist/api/market/api.js +11 -31
- package/dist/api/market/api.js.map +1 -1
- package/dist/api/market/index.d.ts +1 -1
- package/dist/api/market/index.d.ts.map +1 -1
- package/dist/api/market/index.js.map +1 -1
- package/dist/api/profile/api.d.ts.map +1 -1
- package/dist/api/profile/api.js +12 -21
- package/dist/api/profile/api.js.map +1 -1
- package/dist/api/trading/api.d.ts +1 -1
- package/dist/api/trading/api.d.ts.map +1 -1
- package/dist/api/trading/api.js +74 -104
- package/dist/api/trading/api.js.map +1 -1
- package/dist/api/trading/index.d.ts +1 -1
- package/dist/api/trading/index.d.ts.map +1 -1
- package/dist/api/trading/index.js.map +1 -1
- package/dist/api/vault/api.d.ts.map +1 -1
- package/dist/api/vault/api.js +146 -191
- package/dist/api/vault/api.js.map +1 -1
- package/dist/api/vault/index.d.ts +1 -1
- package/dist/api/vault/index.d.ts.map +1 -1
- package/dist/api/vault/index.js.map +1 -1
- package/dist/errors.d.ts +16 -45
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -77
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1 -1
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/api/vault/api.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import { CONTRACT_ABIS } from "@0xmonaco/contracts";
|
|
31
31
|
import { erc20Abi, formatUnits, getContract } from "viem";
|
|
32
|
-
import {
|
|
32
|
+
import { ContractError, InvalidConfigError } from "../../errors";
|
|
33
33
|
import { BaseAPI } from "../base";
|
|
34
34
|
export class VaultAPIImpl extends BaseAPI {
|
|
35
35
|
/**
|
|
@@ -58,13 +58,8 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
58
58
|
* @private
|
|
59
59
|
*/
|
|
60
60
|
async getVaultAddress() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return config.vaultContractAddress;
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
throw new APIError("Failed to get vault contract address from applications API", "/api/v1/applications/config", undefined);
|
|
67
|
-
}
|
|
61
|
+
const config = await this.applicationsAPI.getApplicationConfig();
|
|
62
|
+
return config.vaultContractAddress;
|
|
68
63
|
}
|
|
69
64
|
/**
|
|
70
65
|
* Approves the vault contract to spend tokens on behalf of the user.
|
|
@@ -102,33 +97,28 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
102
97
|
* ```
|
|
103
98
|
*/
|
|
104
99
|
async approve(tokenAddress, amount, autoWait = true) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
110
|
-
}
|
|
111
|
-
const nonce = account.getNonce ? await account.getNonce() : 0n;
|
|
112
|
-
// Use writeContract - handles nonce, gas estimation, signing, and sending automatically
|
|
113
|
-
const hash = await this.walletClient.writeContract({
|
|
114
|
-
address: tokenAddress,
|
|
115
|
-
abi: erc20Abi,
|
|
116
|
-
functionName: "approve",
|
|
117
|
-
args: [vaultAddress, amount],
|
|
118
|
-
chain: this.chain,
|
|
119
|
-
account,
|
|
120
|
-
});
|
|
121
|
-
const txResult = {
|
|
122
|
-
nonce,
|
|
123
|
-
hash,
|
|
124
|
-
status: "pending",
|
|
125
|
-
};
|
|
126
|
-
// Handle auto-waiting for transaction confirmation
|
|
127
|
-
return await this.waitForTransaction(txResult, autoWait);
|
|
128
|
-
}
|
|
129
|
-
catch (error) {
|
|
130
|
-
throw new ContractError(`Failed to approve token ${tokenAddress}`, error instanceof Error ? error.message : "Unknown error", undefined);
|
|
100
|
+
const vaultAddress = await this.getVaultAddress();
|
|
101
|
+
const account = this.walletClient.account;
|
|
102
|
+
if (!account) {
|
|
103
|
+
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
131
104
|
}
|
|
105
|
+
const nonce = account.getNonce ? await account.getNonce() : 0n;
|
|
106
|
+
// Use writeContract - handles nonce, gas estimation, signing, and sending automatically
|
|
107
|
+
const hash = await this.walletClient.writeContract({
|
|
108
|
+
address: tokenAddress,
|
|
109
|
+
abi: erc20Abi,
|
|
110
|
+
functionName: "approve",
|
|
111
|
+
args: [vaultAddress, amount],
|
|
112
|
+
chain: this.chain,
|
|
113
|
+
account,
|
|
114
|
+
});
|
|
115
|
+
const txResult = {
|
|
116
|
+
nonce,
|
|
117
|
+
hash,
|
|
118
|
+
status: "pending",
|
|
119
|
+
};
|
|
120
|
+
// Handle auto-waiting for transaction confirmation
|
|
121
|
+
return await this.waitForTransaction(txResult, autoWait);
|
|
132
122
|
}
|
|
133
123
|
/**
|
|
134
124
|
* Deposits tokens into the Monaco vault.
|
|
@@ -168,40 +158,35 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
168
158
|
* ```
|
|
169
159
|
*/
|
|
170
160
|
async deposit(tokenAddress, amount, autoWait = true) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
throw new ContractError(`Approval required before deposit. Please invoke approve() first for token ${tokenAddress}`, "APPROVAL_REQUIRED", undefined);
|
|
177
|
-
}
|
|
178
|
-
// Get account address
|
|
179
|
-
const [account] = await this.walletClient.getAddresses();
|
|
180
|
-
// Get signature from backend API
|
|
181
|
-
const { seed, signature } = await this.getDepositSignature(tokenAddress, amount, account);
|
|
182
|
-
const walletAccount = this.walletClient.account;
|
|
183
|
-
if (!walletAccount) {
|
|
184
|
-
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
185
|
-
}
|
|
186
|
-
const hash = await this.walletClient.writeContract({
|
|
187
|
-
address: vaultAddress,
|
|
188
|
-
abi: CONTRACT_ABIS.vault,
|
|
189
|
-
functionName: "deposit",
|
|
190
|
-
args: [tokenAddress, amount, seed, signature],
|
|
191
|
-
account: walletAccount,
|
|
192
|
-
chain: this.chain,
|
|
193
|
-
});
|
|
194
|
-
const nonce = walletAccount.getNonce ? await walletAccount.getNonce() : 0n;
|
|
195
|
-
const txResult = {
|
|
196
|
-
hash,
|
|
197
|
-
status: "pending",
|
|
198
|
-
nonce,
|
|
199
|
-
};
|
|
200
|
-
return await this.waitForTransaction(txResult, autoWait);
|
|
161
|
+
const vaultAddress = await this.getVaultAddress();
|
|
162
|
+
// Check if approval is needed before proceeding
|
|
163
|
+
const needsApproval = await this.needsApproval(tokenAddress, amount);
|
|
164
|
+
if (needsApproval) {
|
|
165
|
+
throw new ContractError(`Approval required before deposit. Please invoke approve() first for token ${tokenAddress}`, "APPROVAL_REQUIRED", undefined);
|
|
201
166
|
}
|
|
202
|
-
|
|
203
|
-
|
|
167
|
+
// Get account address
|
|
168
|
+
const [account] = await this.walletClient.getAddresses();
|
|
169
|
+
// Get signature from backend API
|
|
170
|
+
const { seed, signature } = await this.getDepositSignature(tokenAddress, amount, account);
|
|
171
|
+
const walletAccount = this.walletClient.account;
|
|
172
|
+
if (!walletAccount) {
|
|
173
|
+
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
204
174
|
}
|
|
175
|
+
const hash = await this.walletClient.writeContract({
|
|
176
|
+
address: vaultAddress,
|
|
177
|
+
abi: CONTRACT_ABIS.vault,
|
|
178
|
+
functionName: "deposit",
|
|
179
|
+
args: [tokenAddress, amount, seed, signature],
|
|
180
|
+
account: walletAccount,
|
|
181
|
+
chain: this.chain,
|
|
182
|
+
});
|
|
183
|
+
const nonce = walletAccount.getNonce ? await walletAccount.getNonce() : 0n;
|
|
184
|
+
const txResult = {
|
|
185
|
+
hash,
|
|
186
|
+
status: "pending",
|
|
187
|
+
nonce,
|
|
188
|
+
};
|
|
189
|
+
return await this.waitForTransaction(txResult, autoWait);
|
|
205
190
|
}
|
|
206
191
|
/**
|
|
207
192
|
* Withdraws tokens from the Monaco vault.
|
|
@@ -240,36 +225,31 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
240
225
|
* ```
|
|
241
226
|
*/
|
|
242
227
|
async withdraw(tokenAddress, amount, autoWait = true) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
251
|
-
}
|
|
252
|
-
// Use writeContract - handles nonce, gas estimation, signing, and sending automatically
|
|
253
|
-
const hash = await this.walletClient.writeContract({
|
|
254
|
-
address: vaultAddress,
|
|
255
|
-
abi: CONTRACT_ABIS.vault,
|
|
256
|
-
functionName: "withdraw",
|
|
257
|
-
args: [tokenAddress, amount, seed, signature],
|
|
258
|
-
account: walletAccount,
|
|
259
|
-
chain: this.chain,
|
|
260
|
-
});
|
|
261
|
-
const nonce = walletAccount.getNonce ? await walletAccount.getNonce() : 0n;
|
|
262
|
-
const txResult = {
|
|
263
|
-
hash,
|
|
264
|
-
status: "pending",
|
|
265
|
-
nonce,
|
|
266
|
-
};
|
|
267
|
-
// Handle auto-waiting for transaction confirmation
|
|
268
|
-
return await this.waitForTransaction(txResult, autoWait);
|
|
269
|
-
}
|
|
270
|
-
catch (error) {
|
|
271
|
-
throw new ContractError(`Failed to withdraw ${amount} of token ${tokenAddress}`, error instanceof Error ? error.message : "Unknown error", undefined);
|
|
228
|
+
const vaultAddress = await this.getVaultAddress();
|
|
229
|
+
const [account] = await this.walletClient.getAddresses();
|
|
230
|
+
// Get signature from backend API
|
|
231
|
+
const { seed, signature } = await this.getWithdrawSignature(tokenAddress, amount, account);
|
|
232
|
+
const walletAccount = this.walletClient.account;
|
|
233
|
+
if (!walletAccount) {
|
|
234
|
+
throw new InvalidConfigError("No account available in wallet client", "account");
|
|
272
235
|
}
|
|
236
|
+
// Use writeContract - handles nonce, gas estimation, signing, and sending automatically
|
|
237
|
+
const hash = await this.walletClient.writeContract({
|
|
238
|
+
address: vaultAddress,
|
|
239
|
+
abi: CONTRACT_ABIS.vault,
|
|
240
|
+
functionName: "withdraw",
|
|
241
|
+
args: [tokenAddress, amount, seed, signature],
|
|
242
|
+
account: walletAccount,
|
|
243
|
+
chain: this.chain,
|
|
244
|
+
});
|
|
245
|
+
const nonce = walletAccount.getNonce ? await walletAccount.getNonce() : 0n;
|
|
246
|
+
const txResult = {
|
|
247
|
+
hash,
|
|
248
|
+
status: "pending",
|
|
249
|
+
nonce,
|
|
250
|
+
};
|
|
251
|
+
// Handle auto-waiting for transaction confirmation
|
|
252
|
+
return await this.waitForTransaction(txResult, autoWait);
|
|
273
253
|
}
|
|
274
254
|
/**
|
|
275
255
|
* Retrieves the user's token balance in the vault.
|
|
@@ -289,34 +269,29 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
289
269
|
* ```
|
|
290
270
|
*/
|
|
291
271
|
async getBalance(tokenAddress) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
catch (error) {
|
|
318
|
-
throw new ContractError(`Failed to get balance for token ${tokenAddress}`, error instanceof Error ? error.message : "Unknown error", undefined);
|
|
319
|
-
}
|
|
272
|
+
const vaultAddress = await this.getVaultAddress();
|
|
273
|
+
const [account] = await this.walletClient.getAddresses();
|
|
274
|
+
// Get balance from vault contract
|
|
275
|
+
const balance = (await this.publicClient.readContract({
|
|
276
|
+
address: vaultAddress,
|
|
277
|
+
abi: CONTRACT_ABIS.vault,
|
|
278
|
+
functionName: "balanceOf",
|
|
279
|
+
args: [account, tokenAddress],
|
|
280
|
+
}));
|
|
281
|
+
// Get token metadata
|
|
282
|
+
const tokenContract = getContract({
|
|
283
|
+
address: tokenAddress,
|
|
284
|
+
abi: erc20Abi,
|
|
285
|
+
client: this.publicClient,
|
|
286
|
+
});
|
|
287
|
+
const [symbol, decimals] = await Promise.all([tokenContract.read.symbol(), tokenContract.read.decimals()]);
|
|
288
|
+
return {
|
|
289
|
+
token: tokenAddress,
|
|
290
|
+
amount: balance,
|
|
291
|
+
formatted: formatUnits(balance, decimals),
|
|
292
|
+
symbol: symbol,
|
|
293
|
+
decimals: decimals,
|
|
294
|
+
};
|
|
320
295
|
}
|
|
321
296
|
/**
|
|
322
297
|
* Retrieves the current allowance for a token.
|
|
@@ -335,19 +310,14 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
335
310
|
* ```
|
|
336
311
|
*/
|
|
337
312
|
async getAllowance(tokenAddress) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}));
|
|
347
|
-
}
|
|
348
|
-
catch (error) {
|
|
349
|
-
throw new ContractError(`Failed to get allowance for token ${tokenAddress}`, error instanceof Error ? error.message : "Unknown error", undefined);
|
|
350
|
-
}
|
|
313
|
+
const vaultAddress = await this.getVaultAddress();
|
|
314
|
+
const [account] = await this.walletClient.getAddresses();
|
|
315
|
+
return (await this.publicClient.readContract({
|
|
316
|
+
address: tokenAddress,
|
|
317
|
+
abi: erc20Abi,
|
|
318
|
+
functionName: "allowance",
|
|
319
|
+
args: [account, vaultAddress],
|
|
320
|
+
}));
|
|
351
321
|
}
|
|
352
322
|
/**
|
|
353
323
|
* Checks if approval is needed for a specific amount.
|
|
@@ -374,13 +344,8 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
374
344
|
* ```
|
|
375
345
|
*/
|
|
376
346
|
async needsApproval(tokenAddress, amount) {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return allowance < amount;
|
|
380
|
-
}
|
|
381
|
-
catch (error) {
|
|
382
|
-
throw new ContractError(`Failed to check approval for token ${tokenAddress}`, error instanceof Error ? error.message : "Unknown error", undefined);
|
|
383
|
-
}
|
|
347
|
+
const allowance = await this.getAllowance(tokenAddress);
|
|
348
|
+
return allowance < amount;
|
|
384
349
|
}
|
|
385
350
|
/**
|
|
386
351
|
* Retrieves a deposit signature from the API Gateway.
|
|
@@ -397,31 +362,26 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
397
362
|
* @private
|
|
398
363
|
*/
|
|
399
364
|
async getDepositSignature(tokenAddress, amount, userAddress) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
catch (error) {
|
|
423
|
-
throw new APIError("Failed to get deposit signature from API", "/api/v1/deposit/signature", undefined);
|
|
424
|
-
}
|
|
365
|
+
const vaultAddress = await this.getVaultAddress();
|
|
366
|
+
// Generate a unique nonce and expiry for this transaction
|
|
367
|
+
const nonce = Math.floor(Date.now() / 1000); // Current timestamp as nonce
|
|
368
|
+
const expiry = Math.floor(Date.now() / 1000) + 3600; // 1 hour from now
|
|
369
|
+
const data = await this.makeAuthenticatedRequest("/api/v1/deposit/signature", {
|
|
370
|
+
method: "POST",
|
|
371
|
+
body: JSON.stringify({
|
|
372
|
+
contract_address: vaultAddress, // Use vault address for seed validation
|
|
373
|
+
token_address: tokenAddress, // Include token address separately
|
|
374
|
+
chain_id: this.chain.id,
|
|
375
|
+
amount: amount.toString(),
|
|
376
|
+
user_address: userAddress,
|
|
377
|
+
nonce,
|
|
378
|
+
expiry,
|
|
379
|
+
}),
|
|
380
|
+
});
|
|
381
|
+
return {
|
|
382
|
+
seed: data.seed,
|
|
383
|
+
signature: data.signature,
|
|
384
|
+
};
|
|
425
385
|
}
|
|
426
386
|
/**
|
|
427
387
|
* Retrieves a withdrawal signature from the API Gateway.
|
|
@@ -438,28 +398,23 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
438
398
|
* @private
|
|
439
399
|
*/
|
|
440
400
|
async getWithdrawSignature(tokenAddress, amount, userAddress) {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
catch (error) {
|
|
461
|
-
throw new APIError("Failed to get withdraw signature from API", "/api/v1/withdraw/signature", undefined);
|
|
462
|
-
}
|
|
401
|
+
const vaultAddress = await this.getVaultAddress();
|
|
402
|
+
const data = await this.makeAuthenticatedRequest("/api/v1/withdraw/signature", {
|
|
403
|
+
method: "POST",
|
|
404
|
+
body: JSON.stringify({
|
|
405
|
+
contract_address: vaultAddress, // Use vault address for seed validation
|
|
406
|
+
token_address: tokenAddress, // Include token address separately
|
|
407
|
+
chain_id: this.chain.id,
|
|
408
|
+
amount: amount.toString(),
|
|
409
|
+
user_address: userAddress,
|
|
410
|
+
nonce: Math.floor(Date.now() / 1000),
|
|
411
|
+
expiry: Math.floor(Date.now() / 1000) + 3600,
|
|
412
|
+
}),
|
|
413
|
+
});
|
|
414
|
+
return {
|
|
415
|
+
seed: data.seed,
|
|
416
|
+
signature: data.signature,
|
|
417
|
+
};
|
|
463
418
|
}
|
|
464
419
|
async waitForTransaction(txResult, autoWait = true, options = {}) {
|
|
465
420
|
if (!autoWait) {
|
|
@@ -478,7 +433,7 @@ export class VaultAPIImpl extends BaseAPI {
|
|
|
478
433
|
receipt,
|
|
479
434
|
};
|
|
480
435
|
}
|
|
481
|
-
catch
|
|
436
|
+
catch {
|
|
482
437
|
return {
|
|
483
438
|
...txResult,
|
|
484
439
|
status: "failed",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/vault/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAA4B,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAkD,MAAM,MAAM,CAAC;AACpI,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/vault/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAA4B,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAkD,MAAM,MAAM,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cA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,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAC9B,QAA2B,EAC3B,WAAoB,IAAI,EACxB,UAAwD,EAAE;QAE1D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,EAAE,aAAa,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;QAEvD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC;gBAChE,IAAI,EAAE,QAAQ,CAAC,IAAW;gBAC1B,aAAa;gBACb,OAAO;aACR,CAAC,CAAC;YAEH,OAAO;gBACL,GAAG,QAAQ;gBACX,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;gBAC7D,OAAO;aACR,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,OAAO;gBACL,GAAG,QAAQ;gBACX,MAAM,EAAE,QAAQ;aACjB,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/vault/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/vault/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/vault/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/vault/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -54,79 +54,50 @@ export declare const ERROR_CODES: {
|
|
|
54
54
|
export type MonacoErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
|
|
55
55
|
export declare abstract class MonacoCoreError extends Error {
|
|
56
56
|
abstract code: MonacoErrorCode;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
cause?: unknown;
|
|
58
|
+
protected constructor(message: string, options?: {
|
|
59
|
+
cause?: unknown;
|
|
60
|
+
});
|
|
61
61
|
}
|
|
62
62
|
export declare class InvalidConfigError extends MonacoCoreError {
|
|
63
63
|
code: "INVALID_CONFIG";
|
|
64
64
|
field?: string;
|
|
65
|
-
value?:
|
|
66
|
-
constructor(message: string, field?: string, value?:
|
|
65
|
+
value?: unknown;
|
|
66
|
+
constructor(message: string, field?: string, value?: unknown, cause?: Error);
|
|
67
67
|
}
|
|
68
68
|
export declare class InvalidStateError extends MonacoCoreError {
|
|
69
69
|
code: "INVALID_STATE";
|
|
70
70
|
currentState?: string;
|
|
71
71
|
expectedState?: string;
|
|
72
|
-
constructor(message: string, currentState?: string, expectedState?: string);
|
|
73
|
-
}
|
|
74
|
-
export declare class UnsupportedNetworkError extends MonacoCoreError {
|
|
75
|
-
code: "UNSUPPORTED_NETWORK";
|
|
76
|
-
networkId?: number;
|
|
77
|
-
supportedNetworks?: number[];
|
|
78
|
-
constructor(message: string, networkId?: number, supportedNetworks?: number[]);
|
|
72
|
+
constructor(message: string, currentState?: string, expectedState?: string, cause?: Error);
|
|
79
73
|
}
|
|
80
74
|
export declare class APIError extends MonacoCoreError {
|
|
81
75
|
code: "API_ERROR";
|
|
82
76
|
endpoint?: string;
|
|
83
77
|
statusCode?: number;
|
|
84
|
-
|
|
78
|
+
responseBody?: unknown;
|
|
79
|
+
constructor(message: string, endpoint?: string, statusCode?: number, responseBody?: unknown, cause?: Error);
|
|
85
80
|
}
|
|
86
81
|
export declare class ContractError extends MonacoCoreError {
|
|
87
82
|
code: "CONTRACT_ERROR";
|
|
88
83
|
revertReason?: string;
|
|
89
84
|
transactionHash?: string;
|
|
90
|
-
constructor(message: string, revertReason?: string, transactionHash?: string);
|
|
85
|
+
constructor(message: string, revertReason?: string, transactionHash?: string, cause?: Error);
|
|
91
86
|
}
|
|
92
87
|
export declare class TransactionError extends MonacoCoreError {
|
|
93
88
|
code: "TRANSACTION_ERROR";
|
|
94
89
|
transactionHash?: string;
|
|
95
90
|
gasUsed?: bigint;
|
|
96
|
-
constructor(message: string, transactionHash?: string, gasUsed?: bigint);
|
|
91
|
+
constructor(message: string, transactionHash?: string, gasUsed?: bigint, cause?: Error);
|
|
97
92
|
}
|
|
98
93
|
export declare class OrderError extends MonacoCoreError {
|
|
99
94
|
code: "ORDER_ERROR";
|
|
100
95
|
orderId?: string;
|
|
101
96
|
market?: string;
|
|
102
|
-
constructor(message: string,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
value?: any;
|
|
108
|
-
constructor(message: string, field?: string, value?: any);
|
|
109
|
-
}
|
|
110
|
-
export declare class OrderNotFoundError extends MonacoCoreError {
|
|
111
|
-
code: "ORDER_NOT_FOUND";
|
|
112
|
-
orderId?: string;
|
|
113
|
-
constructor(message: string, orderId?: string);
|
|
114
|
-
}
|
|
115
|
-
export declare class InsufficientBalanceError extends MonacoCoreError {
|
|
116
|
-
code: "INSUFFICIENT_BALANCE";
|
|
117
|
-
token?: string;
|
|
118
|
-
required?: bigint;
|
|
119
|
-
available?: bigint;
|
|
120
|
-
constructor(message: string, token?: string, required?: bigint, available?: bigint);
|
|
121
|
-
}
|
|
122
|
-
export declare class EventError extends MonacoCoreError {
|
|
123
|
-
code: "EVENT_ERROR";
|
|
124
|
-
eventType?: string;
|
|
125
|
-
constructor(message: string, eventType?: string);
|
|
126
|
-
}
|
|
127
|
-
export declare class SubscriptionError extends MonacoCoreError {
|
|
128
|
-
code: "SUBSCRIPTION_ERROR";
|
|
129
|
-
subscriptionId?: string;
|
|
130
|
-
constructor(message: string, subscriptionId?: string);
|
|
97
|
+
constructor(message: string, options?: {
|
|
98
|
+
orderId?: string;
|
|
99
|
+
market?: string;
|
|
100
|
+
cause?: Error;
|
|
101
|
+
});
|
|
131
102
|
}
|
|
132
103
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW;IACtB,4BAA4B;;;;;IAM5B,iBAAiB;;;;IAKjB,mBAAmB;;;;;IAMnB,mBAAmB;;;CAGX,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE7E,8BAAsB,eAAgB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW;IACtB,4BAA4B;;;;;IAM5B,iBAAiB;;;;IAKjB,mBAAmB;;;;;IAMnB,mBAAmB;;;CAGX,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE7E,8BAAsB,eAAgB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,e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