@compass-labs/widgets 0.1.42 → 0.1.44

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.
@@ -0,0 +1,254 @@
1
+ import { DynamicModule, ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
+ import { C as CompassHandlerConfig } from '../../types-BOSq6TbU.mjs';
3
+ import { C as CompassCoreService } from '../../compass-service-CpGcD-yK.mjs';
4
+ import * as _compass_labs_api_sdk_models_components from '@compass-labs/api-sdk/models/components';
5
+ import 'viem';
6
+ import '@compass-labs/api-sdk';
7
+
8
+ declare class CompassModule {
9
+ static register(config: CompassHandlerConfig): DynamicModule;
10
+ static registerAsync(options: {
11
+ imports?: any[];
12
+ useFactory: (...args: any[]) => CompassHandlerConfig | Promise<CompassHandlerConfig>;
13
+ inject?: any[];
14
+ }): DynamicModule;
15
+ }
16
+
17
+ declare const COMPASS_CONFIG: unique symbol;
18
+ declare class CompassService extends CompassCoreService {
19
+ constructor(config: CompassHandlerConfig);
20
+ }
21
+
22
+ declare class CompassExceptionFilter implements ExceptionFilter {
23
+ catch(exception: unknown, host: ArgumentsHost): void;
24
+ }
25
+
26
+ declare class EarnController {
27
+ private readonly compass;
28
+ constructor(compass: CompassService);
29
+ earnAccountCheck(params: Record<string, string>): Promise<{
30
+ earnAccountAddress: string;
31
+ isDeployed: boolean;
32
+ needsCreation: boolean;
33
+ }>;
34
+ earnAccountBalances(params: Record<string, string>): Promise<{
35
+ earnAccountAddress: any;
36
+ balances: Record<string, {
37
+ balance: string;
38
+ usdValue: string;
39
+ }>;
40
+ totalUsdValue: any;
41
+ }>;
42
+ createAccount(body: any): Promise<{
43
+ earnAccountAddress: string;
44
+ success: boolean;
45
+ alreadyExists: boolean;
46
+ txHash?: undefined;
47
+ } | {
48
+ earnAccountAddress: string;
49
+ txHash: `0x${string}`;
50
+ success: boolean;
51
+ alreadyExists?: undefined;
52
+ }>;
53
+ depositPrepare(body: any): Promise<{
54
+ eip712: any;
55
+ normalizedTypes: {
56
+ EIP712Domain: any;
57
+ SafeTx: any;
58
+ };
59
+ domain: any;
60
+ message: any;
61
+ }>;
62
+ depositExecute(body: any): Promise<{
63
+ txHash: `0x${string}`;
64
+ success: boolean;
65
+ }>;
66
+ withdrawPrepare(body: any): Promise<{
67
+ eip712: any;
68
+ normalizedTypes: {
69
+ EIP712Domain: any;
70
+ SafeTx: any;
71
+ };
72
+ domain: any;
73
+ message: any;
74
+ }>;
75
+ withdrawExecute(body: any): Promise<{
76
+ txHash: `0x${string}`;
77
+ success: boolean;
78
+ }>;
79
+ positions(params: Record<string, string>): Promise<{
80
+ positions: any[];
81
+ }>;
82
+ vaults(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.VaultsResponse>;
83
+ aaveMarkets(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.ListAaveMarketsResponse>;
84
+ pendleMarkets(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.PendleMarketsResponse>;
85
+ }
86
+
87
+ declare class CreditController {
88
+ private readonly compass;
89
+ constructor(compass: CompassService);
90
+ creditAccountCheck(params: Record<string, string>): Promise<{
91
+ creditAccountAddress: string;
92
+ isDeployed: boolean;
93
+ needsCreation: boolean;
94
+ }>;
95
+ creditCreateAccount(body: any): Promise<{
96
+ creditAccountAddress: string;
97
+ success: boolean;
98
+ alreadyExists: boolean;
99
+ txHash?: undefined;
100
+ } | {
101
+ creditAccountAddress: string;
102
+ txHash: `0x${string}`;
103
+ success: boolean;
104
+ alreadyExists?: undefined;
105
+ }>;
106
+ creditPositions(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.CreditPositionsResponse>;
107
+ creditBalances(params: Record<string, string>): Promise<any[]>;
108
+ creditBundlePrepare(body: any): Promise<{
109
+ eip712: any;
110
+ normalizedTypes: {
111
+ EIP712Domain: any;
112
+ SafeTx: any;
113
+ };
114
+ domain: any;
115
+ message: any;
116
+ actionsCount: any;
117
+ }>;
118
+ creditExecute(body: any): Promise<{
119
+ txHash: `0x${string}`;
120
+ success: boolean;
121
+ }>;
122
+ creditTransfer(body: any): Promise<{
123
+ eip712: any;
124
+ normalizedTypes: Record<string, any>;
125
+ domain: any;
126
+ message: any;
127
+ primaryType: any;
128
+ }>;
129
+ }
130
+
131
+ declare class TokenController {
132
+ private readonly compass;
133
+ constructor(compass: CompassService);
134
+ tokenBalance(params: Record<string, string>): Promise<{
135
+ token: string;
136
+ address: string;
137
+ balance: any;
138
+ balanceRaw: any;
139
+ }>;
140
+ tokenPrices(params: Record<string, string>): Promise<{
141
+ prices: Record<string, number>;
142
+ }>;
143
+ swapQuote(params: Record<string, string>): Promise<{
144
+ tokenIn: string;
145
+ tokenOut: string;
146
+ amountIn: string;
147
+ estimatedAmountOut: any;
148
+ }>;
149
+ swapPrepare(body: any): Promise<{
150
+ eip712: any;
151
+ normalizedTypes: {
152
+ EIP712Domain: any;
153
+ SafeTx: any;
154
+ };
155
+ domain: any;
156
+ message: any;
157
+ estimatedAmountOut: any;
158
+ }>;
159
+ swapExecute(body: any): Promise<{
160
+ txHash: `0x${string}`;
161
+ success: boolean;
162
+ }>;
163
+ txReceipt(params: Record<string, string>): Promise<{
164
+ status: "success" | "reverted";
165
+ blockNumber: string;
166
+ } | {
167
+ status: string;
168
+ blockNumber?: undefined;
169
+ }>;
170
+ }
171
+
172
+ declare class BundleController {
173
+ private readonly compass;
174
+ constructor(compass: CompassService);
175
+ bundlePrepare(body: any): Promise<{
176
+ eip712: any;
177
+ normalizedTypes: {
178
+ EIP712Domain: any;
179
+ SafeTx: any;
180
+ };
181
+ domain: any;
182
+ message: any;
183
+ actionsCount: any;
184
+ }>;
185
+ bundleExecute(body: any): Promise<{
186
+ txHash: `0x${string}`;
187
+ success: boolean;
188
+ }>;
189
+ rebalancePreview(body: any): Promise<{
190
+ actions: never[];
191
+ actionsCount: number;
192
+ warnings: string[];
193
+ eip712?: undefined;
194
+ normalizedTypes?: undefined;
195
+ domain?: undefined;
196
+ message?: undefined;
197
+ } | {
198
+ eip712: any;
199
+ normalizedTypes: {
200
+ EIP712Domain: any;
201
+ SafeTx: any;
202
+ };
203
+ domain: any;
204
+ message: any;
205
+ actions: any[];
206
+ actionsCount: number;
207
+ warnings: string[];
208
+ }>;
209
+ transferApprove(body: any): Promise<{
210
+ approved: boolean;
211
+ message: string;
212
+ eip712?: undefined;
213
+ normalizedTypes?: undefined;
214
+ domain?: undefined;
215
+ transaction?: undefined;
216
+ requiresTransaction?: undefined;
217
+ } | {
218
+ approved: boolean;
219
+ eip712: any;
220
+ normalizedTypes: {
221
+ EIP712Domain: any;
222
+ Permit: any;
223
+ };
224
+ domain: any;
225
+ message: any;
226
+ transaction?: undefined;
227
+ requiresTransaction?: undefined;
228
+ } | {
229
+ approved: boolean;
230
+ transaction: any;
231
+ requiresTransaction: boolean;
232
+ message?: undefined;
233
+ eip712?: undefined;
234
+ normalizedTypes?: undefined;
235
+ domain?: undefined;
236
+ }>;
237
+ transferPrepare(body: any): Promise<{
238
+ eip712: any;
239
+ normalizedTypes: Record<string, any>;
240
+ domain: any;
241
+ message: any;
242
+ primaryType: any;
243
+ }>;
244
+ transferExecute(body: any): Promise<{
245
+ txHash: `0x${string}`;
246
+ success: boolean;
247
+ }>;
248
+ approvalExecute(body: any): Promise<{
249
+ txHash: `0x${string}`;
250
+ status: string;
251
+ }>;
252
+ }
253
+
254
+ export { BundleController, COMPASS_CONFIG, CompassExceptionFilter, CompassModule, CompassService, CreditController, EarnController, TokenController };
@@ -0,0 +1,254 @@
1
+ import { DynamicModule, ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
+ import { C as CompassHandlerConfig } from '../../types-BOSq6TbU.js';
3
+ import { C as CompassCoreService } from '../../compass-service-DilASlAA.js';
4
+ import * as _compass_labs_api_sdk_models_components from '@compass-labs/api-sdk/models/components';
5
+ import 'viem';
6
+ import '@compass-labs/api-sdk';
7
+
8
+ declare class CompassModule {
9
+ static register(config: CompassHandlerConfig): DynamicModule;
10
+ static registerAsync(options: {
11
+ imports?: any[];
12
+ useFactory: (...args: any[]) => CompassHandlerConfig | Promise<CompassHandlerConfig>;
13
+ inject?: any[];
14
+ }): DynamicModule;
15
+ }
16
+
17
+ declare const COMPASS_CONFIG: unique symbol;
18
+ declare class CompassService extends CompassCoreService {
19
+ constructor(config: CompassHandlerConfig);
20
+ }
21
+
22
+ declare class CompassExceptionFilter implements ExceptionFilter {
23
+ catch(exception: unknown, host: ArgumentsHost): void;
24
+ }
25
+
26
+ declare class EarnController {
27
+ private readonly compass;
28
+ constructor(compass: CompassService);
29
+ earnAccountCheck(params: Record<string, string>): Promise<{
30
+ earnAccountAddress: string;
31
+ isDeployed: boolean;
32
+ needsCreation: boolean;
33
+ }>;
34
+ earnAccountBalances(params: Record<string, string>): Promise<{
35
+ earnAccountAddress: any;
36
+ balances: Record<string, {
37
+ balance: string;
38
+ usdValue: string;
39
+ }>;
40
+ totalUsdValue: any;
41
+ }>;
42
+ createAccount(body: any): Promise<{
43
+ earnAccountAddress: string;
44
+ success: boolean;
45
+ alreadyExists: boolean;
46
+ txHash?: undefined;
47
+ } | {
48
+ earnAccountAddress: string;
49
+ txHash: `0x${string}`;
50
+ success: boolean;
51
+ alreadyExists?: undefined;
52
+ }>;
53
+ depositPrepare(body: any): Promise<{
54
+ eip712: any;
55
+ normalizedTypes: {
56
+ EIP712Domain: any;
57
+ SafeTx: any;
58
+ };
59
+ domain: any;
60
+ message: any;
61
+ }>;
62
+ depositExecute(body: any): Promise<{
63
+ txHash: `0x${string}`;
64
+ success: boolean;
65
+ }>;
66
+ withdrawPrepare(body: any): Promise<{
67
+ eip712: any;
68
+ normalizedTypes: {
69
+ EIP712Domain: any;
70
+ SafeTx: any;
71
+ };
72
+ domain: any;
73
+ message: any;
74
+ }>;
75
+ withdrawExecute(body: any): Promise<{
76
+ txHash: `0x${string}`;
77
+ success: boolean;
78
+ }>;
79
+ positions(params: Record<string, string>): Promise<{
80
+ positions: any[];
81
+ }>;
82
+ vaults(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.VaultsResponse>;
83
+ aaveMarkets(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.ListAaveMarketsResponse>;
84
+ pendleMarkets(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.PendleMarketsResponse>;
85
+ }
86
+
87
+ declare class CreditController {
88
+ private readonly compass;
89
+ constructor(compass: CompassService);
90
+ creditAccountCheck(params: Record<string, string>): Promise<{
91
+ creditAccountAddress: string;
92
+ isDeployed: boolean;
93
+ needsCreation: boolean;
94
+ }>;
95
+ creditCreateAccount(body: any): Promise<{
96
+ creditAccountAddress: string;
97
+ success: boolean;
98
+ alreadyExists: boolean;
99
+ txHash?: undefined;
100
+ } | {
101
+ creditAccountAddress: string;
102
+ txHash: `0x${string}`;
103
+ success: boolean;
104
+ alreadyExists?: undefined;
105
+ }>;
106
+ creditPositions(params: Record<string, string>): Promise<_compass_labs_api_sdk_models_components.CreditPositionsResponse>;
107
+ creditBalances(params: Record<string, string>): Promise<any[]>;
108
+ creditBundlePrepare(body: any): Promise<{
109
+ eip712: any;
110
+ normalizedTypes: {
111
+ EIP712Domain: any;
112
+ SafeTx: any;
113
+ };
114
+ domain: any;
115
+ message: any;
116
+ actionsCount: any;
117
+ }>;
118
+ creditExecute(body: any): Promise<{
119
+ txHash: `0x${string}`;
120
+ success: boolean;
121
+ }>;
122
+ creditTransfer(body: any): Promise<{
123
+ eip712: any;
124
+ normalizedTypes: Record<string, any>;
125
+ domain: any;
126
+ message: any;
127
+ primaryType: any;
128
+ }>;
129
+ }
130
+
131
+ declare class TokenController {
132
+ private readonly compass;
133
+ constructor(compass: CompassService);
134
+ tokenBalance(params: Record<string, string>): Promise<{
135
+ token: string;
136
+ address: string;
137
+ balance: any;
138
+ balanceRaw: any;
139
+ }>;
140
+ tokenPrices(params: Record<string, string>): Promise<{
141
+ prices: Record<string, number>;
142
+ }>;
143
+ swapQuote(params: Record<string, string>): Promise<{
144
+ tokenIn: string;
145
+ tokenOut: string;
146
+ amountIn: string;
147
+ estimatedAmountOut: any;
148
+ }>;
149
+ swapPrepare(body: any): Promise<{
150
+ eip712: any;
151
+ normalizedTypes: {
152
+ EIP712Domain: any;
153
+ SafeTx: any;
154
+ };
155
+ domain: any;
156
+ message: any;
157
+ estimatedAmountOut: any;
158
+ }>;
159
+ swapExecute(body: any): Promise<{
160
+ txHash: `0x${string}`;
161
+ success: boolean;
162
+ }>;
163
+ txReceipt(params: Record<string, string>): Promise<{
164
+ status: "success" | "reverted";
165
+ blockNumber: string;
166
+ } | {
167
+ status: string;
168
+ blockNumber?: undefined;
169
+ }>;
170
+ }
171
+
172
+ declare class BundleController {
173
+ private readonly compass;
174
+ constructor(compass: CompassService);
175
+ bundlePrepare(body: any): Promise<{
176
+ eip712: any;
177
+ normalizedTypes: {
178
+ EIP712Domain: any;
179
+ SafeTx: any;
180
+ };
181
+ domain: any;
182
+ message: any;
183
+ actionsCount: any;
184
+ }>;
185
+ bundleExecute(body: any): Promise<{
186
+ txHash: `0x${string}`;
187
+ success: boolean;
188
+ }>;
189
+ rebalancePreview(body: any): Promise<{
190
+ actions: never[];
191
+ actionsCount: number;
192
+ warnings: string[];
193
+ eip712?: undefined;
194
+ normalizedTypes?: undefined;
195
+ domain?: undefined;
196
+ message?: undefined;
197
+ } | {
198
+ eip712: any;
199
+ normalizedTypes: {
200
+ EIP712Domain: any;
201
+ SafeTx: any;
202
+ };
203
+ domain: any;
204
+ message: any;
205
+ actions: any[];
206
+ actionsCount: number;
207
+ warnings: string[];
208
+ }>;
209
+ transferApprove(body: any): Promise<{
210
+ approved: boolean;
211
+ message: string;
212
+ eip712?: undefined;
213
+ normalizedTypes?: undefined;
214
+ domain?: undefined;
215
+ transaction?: undefined;
216
+ requiresTransaction?: undefined;
217
+ } | {
218
+ approved: boolean;
219
+ eip712: any;
220
+ normalizedTypes: {
221
+ EIP712Domain: any;
222
+ Permit: any;
223
+ };
224
+ domain: any;
225
+ message: any;
226
+ transaction?: undefined;
227
+ requiresTransaction?: undefined;
228
+ } | {
229
+ approved: boolean;
230
+ transaction: any;
231
+ requiresTransaction: boolean;
232
+ message?: undefined;
233
+ eip712?: undefined;
234
+ normalizedTypes?: undefined;
235
+ domain?: undefined;
236
+ }>;
237
+ transferPrepare(body: any): Promise<{
238
+ eip712: any;
239
+ normalizedTypes: Record<string, any>;
240
+ domain: any;
241
+ message: any;
242
+ primaryType: any;
243
+ }>;
244
+ transferExecute(body: any): Promise<{
245
+ txHash: `0x${string}`;
246
+ success: boolean;
247
+ }>;
248
+ approvalExecute(body: any): Promise<{
249
+ txHash: `0x${string}`;
250
+ status: string;
251
+ }>;
252
+ }
253
+
254
+ export { BundleController, COMPASS_CONFIG, CompassExceptionFilter, CompassModule, CompassService, CreditController, EarnController, TokenController };