@compass-labs/widgets 0.1.46 → 0.1.48
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/{compass-service-D0Xf69NR.d.ts → compass-service-BzYob9QR.d.ts} +1 -2
- package/dist/{compass-service-B0UscWqQ.d.mts → compass-service-Dz4PTtzj.d.mts} +1 -2
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/dist/server/core/index.d.mts +1 -1
- package/dist/server/core/index.d.ts +1 -1
- package/dist/server/core/index.js +7 -8
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/core/index.mjs +7 -8
- package/dist/server/core/index.mjs.map +1 -1
- package/dist/server/index.js +7 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +7 -8
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/nestjs/index.d.mts +1 -1
- package/dist/server/nestjs/index.d.ts +1 -1
- package/dist/server/nestjs/index.js +7 -8
- package/dist/server/nestjs/index.js.map +1 -1
- package/dist/server/nestjs/index.mjs +7 -8
- package/dist/server/nestjs/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as CHAIN_MAP, b as CREDIT_TOKENS, C as CompassHandlerConfig } from '../../types-BOSq6TbU.mjs';
|
|
2
|
-
export { C as CompassCoreService, a as CompassServiceError } from '../../compass-service-
|
|
2
|
+
export { C as CompassCoreService, a as CompassServiceError } from '../../compass-service-Dz4PTtzj.mjs';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '@compass-labs/api-sdk/models/components';
|
|
5
5
|
import '@compass-labs/api-sdk';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as CHAIN_MAP, b as CREDIT_TOKENS, C as CompassHandlerConfig } from '../../types-BOSq6TbU.js';
|
|
2
|
-
export { C as CompassCoreService, a as CompassServiceError } from '../../compass-service-
|
|
2
|
+
export { C as CompassCoreService, a as CompassServiceError } from '../../compass-service-BzYob9QR.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import '@compass-labs/api-sdk/models/components';
|
|
5
5
|
import '@compass-labs/api-sdk';
|
|
@@ -201,7 +201,7 @@ var CompassCoreService = class {
|
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
async managePrepare(body, action) {
|
|
204
|
-
const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent
|
|
204
|
+
const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent } = body;
|
|
205
205
|
let venue;
|
|
206
206
|
if (venueType === "VAULT" && vaultAddress) {
|
|
207
207
|
venue = {
|
|
@@ -229,8 +229,7 @@ var CompassCoreService = class {
|
|
|
229
229
|
venue,
|
|
230
230
|
action,
|
|
231
231
|
amount,
|
|
232
|
-
gasSponsorship: true
|
|
233
|
-
...recipient && { recipient }
|
|
232
|
+
gasSponsorship: true
|
|
234
233
|
});
|
|
235
234
|
const eip712 = response.eip712;
|
|
236
235
|
if (!eip712) {
|
|
@@ -345,7 +344,7 @@ var CompassCoreService = class {
|
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
346
|
async transferPrepare(body) {
|
|
348
|
-
const { owner, chain = "base", token, amount, action, product } = body;
|
|
347
|
+
const { owner, chain = "base", token, amount, action, product, recipient } = body;
|
|
349
348
|
const { gasSponsorPrivateKey } = this.config;
|
|
350
349
|
if (!owner || !token || !amount || !action) {
|
|
351
350
|
throw new CompassServiceError("Missing required parameters", 400);
|
|
@@ -374,7 +373,8 @@ var CompassCoreService = class {
|
|
|
374
373
|
amount,
|
|
375
374
|
action,
|
|
376
375
|
gasSponsorship: true,
|
|
377
|
-
...spender && { spender }
|
|
376
|
+
...spender && { spender },
|
|
377
|
+
...recipient && action === "WITHDRAW" && { recipient }
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
const eip712 = response.eip712;
|
|
@@ -676,7 +676,7 @@ var CompassCoreService = class {
|
|
|
676
676
|
}
|
|
677
677
|
// --- Bundle ---
|
|
678
678
|
async bundlePrepare(body) {
|
|
679
|
-
const { owner, chain = "base", actions
|
|
679
|
+
const { owner, chain = "base", actions } = body;
|
|
680
680
|
if (!owner || !actions || actions.length === 0) {
|
|
681
681
|
throw new CompassServiceError("Missing owner or actions", 400);
|
|
682
682
|
}
|
|
@@ -684,8 +684,7 @@ var CompassCoreService = class {
|
|
|
684
684
|
owner,
|
|
685
685
|
chain,
|
|
686
686
|
gasSponsorship: true,
|
|
687
|
-
actions
|
|
688
|
-
...recipient && { recipient }
|
|
687
|
+
actions
|
|
689
688
|
});
|
|
690
689
|
const eip712 = response.eip712;
|
|
691
690
|
if (!eip712) {
|