@compass-labs/api-sdk 1.0.8 → 1.0.9
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/bin/mcp-server.js +62 -69
- package/bin/mcp-server.js.map +16 -15
- package/dist/commonjs/funcs/transactionBundlerTransactionBundlerExecute.d.ts +1 -1
- package/dist/commonjs/funcs/transactionBundlerTransactionBundlerExecute.d.ts.map +1 -1
- package/dist/commonjs/funcs/transactionBundlerTransactionBundlerExecute.js +1 -1
- package/dist/commonjs/funcs/transactionBundlerTransactionBundlerExecute.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/bundlertransactionresponse.d.ts +30 -0
- package/dist/commonjs/models/components/bundlertransactionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/bundlertransactionresponse.js +70 -0
- package/dist/commonjs/models/components/bundlertransactionresponse.js.map +1 -0
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +4 -5
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js +0 -5
- package/dist/commonjs/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/pendletxresponse.d.ts +4 -5
- package/dist/commonjs/models/components/pendletxresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/pendletxresponse.js +0 -5
- package/dist/commonjs/models/components/pendletxresponse.js.map +1 -1
- package/dist/commonjs/models/components/transactionresponse.d.ts +4 -5
- package/dist/commonjs/models/components/transactionresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/transactionresponse.js +0 -5
- package/dist/commonjs/models/components/transactionresponse.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlytransactionresponse.d.ts +4 -5
- package/dist/commonjs/models/components/uniswapbuyexactlytransactionresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlytransactionresponse.js +0 -5
- package/dist/commonjs/models/components/uniswapbuyexactlytransactionresponse.js.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlytransactionresponse.d.ts +4 -5
- package/dist/commonjs/models/components/uniswapsellexactlytransactionresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlytransactionresponse.js +0 -5
- package/dist/commonjs/models/components/uniswapsellexactlytransactionresponse.js.map +1 -1
- package/dist/commonjs/models/operations/v1transactionbundleraaveloop.d.ts +2 -2
- package/dist/commonjs/models/operations/v1transactionbundleraaveloop.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v1transactionbundleraaveloop.js +2 -2
- package/dist/commonjs/models/operations/v1transactionbundleraaveloop.js.map +1 -1
- package/dist/commonjs/sdk/transactionbundler.d.ts +1 -1
- package/dist/commonjs/sdk/transactionbundler.d.ts.map +1 -1
- package/dist/esm/funcs/transactionBundlerTransactionBundlerExecute.d.ts +1 -1
- package/dist/esm/funcs/transactionBundlerTransactionBundlerExecute.d.ts.map +1 -1
- package/dist/esm/funcs/transactionBundlerTransactionBundlerExecute.js +1 -1
- package/dist/esm/funcs/transactionBundlerTransactionBundlerExecute.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/bundlertransactionresponse.d.ts +30 -0
- package/dist/esm/models/components/bundlertransactionresponse.d.ts.map +1 -0
- package/dist/esm/models/components/bundlertransactionresponse.js +32 -0
- package/dist/esm/models/components/bundlertransactionresponse.js.map +1 -0
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts +4 -5
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.d.ts.map +1 -1
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js +0 -5
- package/dist/esm/models/components/ethenarequesttowithdrawtransactionresponse.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/pendletxresponse.d.ts +4 -5
- package/dist/esm/models/components/pendletxresponse.d.ts.map +1 -1
- package/dist/esm/models/components/pendletxresponse.js +0 -5
- package/dist/esm/models/components/pendletxresponse.js.map +1 -1
- package/dist/esm/models/components/transactionresponse.d.ts +4 -5
- package/dist/esm/models/components/transactionresponse.d.ts.map +1 -1
- package/dist/esm/models/components/transactionresponse.js +0 -5
- package/dist/esm/models/components/transactionresponse.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlytransactionresponse.d.ts +4 -5
- package/dist/esm/models/components/uniswapbuyexactlytransactionresponse.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlytransactionresponse.js +0 -5
- package/dist/esm/models/components/uniswapbuyexactlytransactionresponse.js.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlytransactionresponse.d.ts +4 -5
- package/dist/esm/models/components/uniswapsellexactlytransactionresponse.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlytransactionresponse.js +0 -5
- package/dist/esm/models/components/uniswapsellexactlytransactionresponse.js.map +1 -1
- package/dist/esm/models/operations/v1transactionbundleraaveloop.d.ts +2 -2
- package/dist/esm/models/operations/v1transactionbundleraaveloop.d.ts.map +1 -1
- package/dist/esm/models/operations/v1transactionbundleraaveloop.js +2 -2
- package/dist/esm/models/operations/v1transactionbundleraaveloop.js.map +1 -1
- package/dist/esm/sdk/transactionbundler.d.ts +1 -1
- package/dist/esm/sdk/transactionbundler.d.ts.map +1 -1
- package/docs/sdks/transactionbundler/README.md +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/transactionBundlerTransactionBundlerExecute.ts +4 -4
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/bundlertransactionresponse.ts +72 -0
- package/src/models/components/ethenarequesttowithdrawtransactionresponse.ts +2 -20
- package/src/models/components/index.ts +1 -0
- package/src/models/components/pendletxresponse.ts +2 -20
- package/src/models/components/transactionresponse.ts +2 -20
- package/src/models/components/uniswapbuyexactlytransactionresponse.ts +2 -20
- package/src/models/components/uniswapsellexactlytransactionresponse.ts +2 -20
- package/src/models/operations/v1transactionbundleraaveloop.ts +4 -4
- package/src/sdk/transactionbundler.ts +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
UnsignedMulticallTransaction,
|
|
11
|
+
UnsignedMulticallTransaction$inboundSchema,
|
|
12
|
+
UnsignedMulticallTransaction$Outbound,
|
|
13
|
+
UnsignedMulticallTransaction$outboundSchema,
|
|
14
|
+
} from "./unsignedmulticalltransaction.js";
|
|
15
|
+
|
|
16
|
+
export type BundlerTransactionResponse = {
|
|
17
|
+
transaction: UnsignedMulticallTransaction;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const BundlerTransactionResponse$inboundSchema: z.ZodType<
|
|
22
|
+
BundlerTransactionResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
transaction: UnsignedMulticallTransaction$inboundSchema,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type BundlerTransactionResponse$Outbound = {
|
|
31
|
+
transaction: UnsignedMulticallTransaction$Outbound;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const BundlerTransactionResponse$outboundSchema: z.ZodType<
|
|
36
|
+
BundlerTransactionResponse$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
BundlerTransactionResponse
|
|
39
|
+
> = z.object({
|
|
40
|
+
transaction: UnsignedMulticallTransaction$outboundSchema,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace BundlerTransactionResponse$ {
|
|
48
|
+
/** @deprecated use `BundlerTransactionResponse$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = BundlerTransactionResponse$inboundSchema;
|
|
50
|
+
/** @deprecated use `BundlerTransactionResponse$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = BundlerTransactionResponse$outboundSchema;
|
|
52
|
+
/** @deprecated use `BundlerTransactionResponse$Outbound` instead. */
|
|
53
|
+
export type Outbound = BundlerTransactionResponse$Outbound;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function bundlerTransactionResponseToJSON(
|
|
57
|
+
bundlerTransactionResponse: BundlerTransactionResponse,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
BundlerTransactionResponse$outboundSchema.parse(bundlerTransactionResponse),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function bundlerTransactionResponseFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<BundlerTransactionResponse, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => BundlerTransactionResponse$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'BundlerTransactionResponse' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
UnsignedMulticallTransaction,
|
|
12
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
13
|
-
UnsignedMulticallTransaction$Outbound,
|
|
14
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
15
|
-
} from "./unsignedmulticalltransaction.js";
|
|
16
10
|
import {
|
|
17
11
|
UnsignedTransaction,
|
|
18
12
|
UnsignedTransaction$inboundSchema,
|
|
@@ -31,17 +25,13 @@ import {
|
|
|
31
25
|
*/
|
|
32
26
|
export type EthenaRequestToWithdrawTransactionResponseTransaction =
|
|
33
27
|
| UnsignedTransaction
|
|
34
|
-
| UnsignedMulticallTransaction
|
|
35
28
|
| UserOperationResponse;
|
|
36
29
|
|
|
37
30
|
export type EthenaRequestToWithdrawTransactionResponse = {
|
|
38
31
|
/**
|
|
39
32
|
* The unsigned transaction data. User must sign and broadcast to network.
|
|
40
33
|
*/
|
|
41
|
-
transaction:
|
|
42
|
-
| UnsignedTransaction
|
|
43
|
-
| UnsignedMulticallTransaction
|
|
44
|
-
| UserOperationResponse;
|
|
34
|
+
transaction: UnsignedTransaction | UserOperationResponse;
|
|
45
35
|
/**
|
|
46
36
|
* The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made.
|
|
47
37
|
*/
|
|
@@ -56,14 +46,12 @@ export const EthenaRequestToWithdrawTransactionResponseTransaction$inboundSchema
|
|
|
56
46
|
unknown
|
|
57
47
|
> = z.union([
|
|
58
48
|
UnsignedTransaction$inboundSchema,
|
|
59
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
60
49
|
UserOperationResponse$inboundSchema,
|
|
61
50
|
]);
|
|
62
51
|
|
|
63
52
|
/** @internal */
|
|
64
53
|
export type EthenaRequestToWithdrawTransactionResponseTransaction$Outbound =
|
|
65
54
|
| UnsignedTransaction$Outbound
|
|
66
|
-
| UnsignedMulticallTransaction$Outbound
|
|
67
55
|
| UserOperationResponse$Outbound;
|
|
68
56
|
|
|
69
57
|
/** @internal */
|
|
@@ -74,7 +62,6 @@ export const EthenaRequestToWithdrawTransactionResponseTransaction$outboundSchem
|
|
|
74
62
|
EthenaRequestToWithdrawTransactionResponseTransaction
|
|
75
63
|
> = z.union([
|
|
76
64
|
UnsignedTransaction$outboundSchema,
|
|
77
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
78
65
|
UserOperationResponse$outboundSchema,
|
|
79
66
|
]);
|
|
80
67
|
|
|
@@ -127,7 +114,6 @@ export const EthenaRequestToWithdrawTransactionResponse$inboundSchema:
|
|
|
127
114
|
z.object({
|
|
128
115
|
transaction: z.union([
|
|
129
116
|
UnsignedTransaction$inboundSchema,
|
|
130
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
131
117
|
UserOperationResponse$inboundSchema,
|
|
132
118
|
]),
|
|
133
119
|
cooldown_duration_days: z.number().int(),
|
|
@@ -139,10 +125,7 @@ export const EthenaRequestToWithdrawTransactionResponse$inboundSchema:
|
|
|
139
125
|
|
|
140
126
|
/** @internal */
|
|
141
127
|
export type EthenaRequestToWithdrawTransactionResponse$Outbound = {
|
|
142
|
-
transaction:
|
|
143
|
-
| UnsignedTransaction$Outbound
|
|
144
|
-
| UnsignedMulticallTransaction$Outbound
|
|
145
|
-
| UserOperationResponse$Outbound;
|
|
128
|
+
transaction: UnsignedTransaction$Outbound | UserOperationResponse$Outbound;
|
|
146
129
|
cooldown_duration_days: number;
|
|
147
130
|
};
|
|
148
131
|
|
|
@@ -155,7 +138,6 @@ export const EthenaRequestToWithdrawTransactionResponse$outboundSchema:
|
|
|
155
138
|
> = z.object({
|
|
156
139
|
transaction: z.union([
|
|
157
140
|
UnsignedTransaction$outboundSchema,
|
|
158
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
159
141
|
UserOperationResponse$outboundSchema,
|
|
160
142
|
]),
|
|
161
143
|
cooldownDurationDays: z.number().int(),
|
|
@@ -40,6 +40,7 @@ export * from "./apy.js";
|
|
|
40
40
|
export * from "./batcheduseroperationsrequest.js";
|
|
41
41
|
export * from "./batcheduseroperationsresponse.js";
|
|
42
42
|
export * from "./borrow.js";
|
|
43
|
+
export * from "./bundlertransactionresponse.js";
|
|
43
44
|
export * from "./chain.js";
|
|
44
45
|
export * from "./chaininfo.js";
|
|
45
46
|
export * from "./compassapibackendmodelsgenericreadresponseportfoliotokenbalance.js";
|
|
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
UnsignedMulticallTransaction,
|
|
12
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
13
|
-
UnsignedMulticallTransaction$Outbound,
|
|
14
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
15
|
-
} from "./unsignedmulticalltransaction.js";
|
|
16
10
|
import {
|
|
17
11
|
UnsignedTransaction,
|
|
18
12
|
UnsignedTransaction$inboundSchema,
|
|
@@ -31,17 +25,13 @@ import {
|
|
|
31
25
|
*/
|
|
32
26
|
export type PendleTxResponseTransaction =
|
|
33
27
|
| UnsignedTransaction
|
|
34
|
-
| UnsignedMulticallTransaction
|
|
35
28
|
| UserOperationResponse;
|
|
36
29
|
|
|
37
30
|
export type PendleTxResponse = {
|
|
38
31
|
/**
|
|
39
32
|
* The unsigned transaction data. User must sign and broadcast to network.
|
|
40
33
|
*/
|
|
41
|
-
transaction:
|
|
42
|
-
| UnsignedTransaction
|
|
43
|
-
| UnsignedMulticallTransaction
|
|
44
|
-
| UserOperationResponse;
|
|
34
|
+
transaction: UnsignedTransaction | UserOperationResponse;
|
|
45
35
|
/**
|
|
46
36
|
* The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote.
|
|
47
37
|
*/
|
|
@@ -55,14 +45,12 @@ export const PendleTxResponseTransaction$inboundSchema: z.ZodType<
|
|
|
55
45
|
unknown
|
|
56
46
|
> = z.union([
|
|
57
47
|
UnsignedTransaction$inboundSchema,
|
|
58
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
59
48
|
UserOperationResponse$inboundSchema,
|
|
60
49
|
]);
|
|
61
50
|
|
|
62
51
|
/** @internal */
|
|
63
52
|
export type PendleTxResponseTransaction$Outbound =
|
|
64
53
|
| UnsignedTransaction$Outbound
|
|
65
|
-
| UnsignedMulticallTransaction$Outbound
|
|
66
54
|
| UserOperationResponse$Outbound;
|
|
67
55
|
|
|
68
56
|
/** @internal */
|
|
@@ -72,7 +60,6 @@ export const PendleTxResponseTransaction$outboundSchema: z.ZodType<
|
|
|
72
60
|
PendleTxResponseTransaction
|
|
73
61
|
> = z.union([
|
|
74
62
|
UnsignedTransaction$outboundSchema,
|
|
75
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
76
63
|
UserOperationResponse$outboundSchema,
|
|
77
64
|
]);
|
|
78
65
|
|
|
@@ -117,7 +104,6 @@ export const PendleTxResponse$inboundSchema: z.ZodType<
|
|
|
117
104
|
> = z.object({
|
|
118
105
|
transaction: z.union([
|
|
119
106
|
UnsignedTransaction$inboundSchema,
|
|
120
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
121
107
|
UserOperationResponse$inboundSchema,
|
|
122
108
|
]),
|
|
123
109
|
amount_out_quote: z.string(),
|
|
@@ -129,10 +115,7 @@ export const PendleTxResponse$inboundSchema: z.ZodType<
|
|
|
129
115
|
|
|
130
116
|
/** @internal */
|
|
131
117
|
export type PendleTxResponse$Outbound = {
|
|
132
|
-
transaction:
|
|
133
|
-
| UnsignedTransaction$Outbound
|
|
134
|
-
| UnsignedMulticallTransaction$Outbound
|
|
135
|
-
| UserOperationResponse$Outbound;
|
|
118
|
+
transaction: UnsignedTransaction$Outbound | UserOperationResponse$Outbound;
|
|
136
119
|
amount_out_quote: string;
|
|
137
120
|
};
|
|
138
121
|
|
|
@@ -144,7 +127,6 @@ export const PendleTxResponse$outboundSchema: z.ZodType<
|
|
|
144
127
|
> = z.object({
|
|
145
128
|
transaction: z.union([
|
|
146
129
|
UnsignedTransaction$outboundSchema,
|
|
147
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
148
130
|
UserOperationResponse$outboundSchema,
|
|
149
131
|
]),
|
|
150
132
|
amountOutQuote: z.string(),
|
|
@@ -6,12 +6,6 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
import {
|
|
10
|
-
UnsignedMulticallTransaction,
|
|
11
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
12
|
-
UnsignedMulticallTransaction$Outbound,
|
|
13
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
14
|
-
} from "./unsignedmulticalltransaction.js";
|
|
15
9
|
import {
|
|
16
10
|
UnsignedTransaction,
|
|
17
11
|
UnsignedTransaction$inboundSchema,
|
|
@@ -30,17 +24,13 @@ import {
|
|
|
30
24
|
*/
|
|
31
25
|
export type TransactionResponseTransaction =
|
|
32
26
|
| UnsignedTransaction
|
|
33
|
-
| UnsignedMulticallTransaction
|
|
34
27
|
| UserOperationResponse;
|
|
35
28
|
|
|
36
29
|
export type TransactionResponse = {
|
|
37
30
|
/**
|
|
38
31
|
* The unsigned transaction data. User must sign and broadcast to network.
|
|
39
32
|
*/
|
|
40
|
-
transaction:
|
|
41
|
-
| UnsignedTransaction
|
|
42
|
-
| UnsignedMulticallTransaction
|
|
43
|
-
| UserOperationResponse;
|
|
33
|
+
transaction: UnsignedTransaction | UserOperationResponse;
|
|
44
34
|
};
|
|
45
35
|
|
|
46
36
|
/** @internal */
|
|
@@ -50,14 +40,12 @@ export const TransactionResponseTransaction$inboundSchema: z.ZodType<
|
|
|
50
40
|
unknown
|
|
51
41
|
> = z.union([
|
|
52
42
|
UnsignedTransaction$inboundSchema,
|
|
53
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
54
43
|
UserOperationResponse$inboundSchema,
|
|
55
44
|
]);
|
|
56
45
|
|
|
57
46
|
/** @internal */
|
|
58
47
|
export type TransactionResponseTransaction$Outbound =
|
|
59
48
|
| UnsignedTransaction$Outbound
|
|
60
|
-
| UnsignedMulticallTransaction$Outbound
|
|
61
49
|
| UserOperationResponse$Outbound;
|
|
62
50
|
|
|
63
51
|
/** @internal */
|
|
@@ -67,7 +55,6 @@ export const TransactionResponseTransaction$outboundSchema: z.ZodType<
|
|
|
67
55
|
TransactionResponseTransaction
|
|
68
56
|
> = z.union([
|
|
69
57
|
UnsignedTransaction$outboundSchema,
|
|
70
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
71
58
|
UserOperationResponse$outboundSchema,
|
|
72
59
|
]);
|
|
73
60
|
|
|
@@ -112,17 +99,13 @@ export const TransactionResponse$inboundSchema: z.ZodType<
|
|
|
112
99
|
> = z.object({
|
|
113
100
|
transaction: z.union([
|
|
114
101
|
UnsignedTransaction$inboundSchema,
|
|
115
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
116
102
|
UserOperationResponse$inboundSchema,
|
|
117
103
|
]),
|
|
118
104
|
});
|
|
119
105
|
|
|
120
106
|
/** @internal */
|
|
121
107
|
export type TransactionResponse$Outbound = {
|
|
122
|
-
transaction:
|
|
123
|
-
| UnsignedTransaction$Outbound
|
|
124
|
-
| UnsignedMulticallTransaction$Outbound
|
|
125
|
-
| UserOperationResponse$Outbound;
|
|
108
|
+
transaction: UnsignedTransaction$Outbound | UserOperationResponse$Outbound;
|
|
126
109
|
};
|
|
127
110
|
|
|
128
111
|
/** @internal */
|
|
@@ -133,7 +116,6 @@ export const TransactionResponse$outboundSchema: z.ZodType<
|
|
|
133
116
|
> = z.object({
|
|
134
117
|
transaction: z.union([
|
|
135
118
|
UnsignedTransaction$outboundSchema,
|
|
136
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
137
119
|
UserOperationResponse$outboundSchema,
|
|
138
120
|
]),
|
|
139
121
|
});
|
|
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
UnsignedMulticallTransaction,
|
|
12
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
13
|
-
UnsignedMulticallTransaction$Outbound,
|
|
14
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
15
|
-
} from "./unsignedmulticalltransaction.js";
|
|
16
10
|
import {
|
|
17
11
|
UnsignedTransaction,
|
|
18
12
|
UnsignedTransaction$inboundSchema,
|
|
@@ -31,17 +25,13 @@ import {
|
|
|
31
25
|
*/
|
|
32
26
|
export type UniswapBuyExactlyTransactionResponseTransaction =
|
|
33
27
|
| UnsignedTransaction
|
|
34
|
-
| UnsignedMulticallTransaction
|
|
35
28
|
| UserOperationResponse;
|
|
36
29
|
|
|
37
30
|
export type UniswapBuyExactlyTransactionResponse = {
|
|
38
31
|
/**
|
|
39
32
|
* The unsigned transaction data. User must sign and broadcast to network.
|
|
40
33
|
*/
|
|
41
|
-
transaction:
|
|
42
|
-
| UnsignedTransaction
|
|
43
|
-
| UnsignedMulticallTransaction
|
|
44
|
-
| UserOperationResponse;
|
|
34
|
+
transaction: UnsignedTransaction | UserOperationResponse;
|
|
45
35
|
/**
|
|
46
36
|
* The estimated amount in for the transaction. The actual input amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote.
|
|
47
37
|
*/
|
|
@@ -56,14 +46,12 @@ export const UniswapBuyExactlyTransactionResponseTransaction$inboundSchema:
|
|
|
56
46
|
unknown
|
|
57
47
|
> = z.union([
|
|
58
48
|
UnsignedTransaction$inboundSchema,
|
|
59
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
60
49
|
UserOperationResponse$inboundSchema,
|
|
61
50
|
]);
|
|
62
51
|
|
|
63
52
|
/** @internal */
|
|
64
53
|
export type UniswapBuyExactlyTransactionResponseTransaction$Outbound =
|
|
65
54
|
| UnsignedTransaction$Outbound
|
|
66
|
-
| UnsignedMulticallTransaction$Outbound
|
|
67
55
|
| UserOperationResponse$Outbound;
|
|
68
56
|
|
|
69
57
|
/** @internal */
|
|
@@ -74,7 +62,6 @@ export const UniswapBuyExactlyTransactionResponseTransaction$outboundSchema:
|
|
|
74
62
|
UniswapBuyExactlyTransactionResponseTransaction
|
|
75
63
|
> = z.union([
|
|
76
64
|
UnsignedTransaction$outboundSchema,
|
|
77
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
78
65
|
UserOperationResponse$outboundSchema,
|
|
79
66
|
]);
|
|
80
67
|
|
|
@@ -129,7 +116,6 @@ export const UniswapBuyExactlyTransactionResponse$inboundSchema: z.ZodType<
|
|
|
129
116
|
> = z.object({
|
|
130
117
|
transaction: z.union([
|
|
131
118
|
UnsignedTransaction$inboundSchema,
|
|
132
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
133
119
|
UserOperationResponse$inboundSchema,
|
|
134
120
|
]),
|
|
135
121
|
amount_in_quote: z.string(),
|
|
@@ -141,10 +127,7 @@ export const UniswapBuyExactlyTransactionResponse$inboundSchema: z.ZodType<
|
|
|
141
127
|
|
|
142
128
|
/** @internal */
|
|
143
129
|
export type UniswapBuyExactlyTransactionResponse$Outbound = {
|
|
144
|
-
transaction:
|
|
145
|
-
| UnsignedTransaction$Outbound
|
|
146
|
-
| UnsignedMulticallTransaction$Outbound
|
|
147
|
-
| UserOperationResponse$Outbound;
|
|
130
|
+
transaction: UnsignedTransaction$Outbound | UserOperationResponse$Outbound;
|
|
148
131
|
amount_in_quote: string;
|
|
149
132
|
};
|
|
150
133
|
|
|
@@ -156,7 +139,6 @@ export const UniswapBuyExactlyTransactionResponse$outboundSchema: z.ZodType<
|
|
|
156
139
|
> = z.object({
|
|
157
140
|
transaction: z.union([
|
|
158
141
|
UnsignedTransaction$outboundSchema,
|
|
159
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
160
142
|
UserOperationResponse$outboundSchema,
|
|
161
143
|
]),
|
|
162
144
|
amountInQuote: z.string(),
|
|
@@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
UnsignedMulticallTransaction,
|
|
12
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
13
|
-
UnsignedMulticallTransaction$Outbound,
|
|
14
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
15
|
-
} from "./unsignedmulticalltransaction.js";
|
|
16
10
|
import {
|
|
17
11
|
UnsignedTransaction,
|
|
18
12
|
UnsignedTransaction$inboundSchema,
|
|
@@ -31,17 +25,13 @@ import {
|
|
|
31
25
|
*/
|
|
32
26
|
export type UniswapSellExactlyTransactionResponseTransaction =
|
|
33
27
|
| UnsignedTransaction
|
|
34
|
-
| UnsignedMulticallTransaction
|
|
35
28
|
| UserOperationResponse;
|
|
36
29
|
|
|
37
30
|
export type UniswapSellExactlyTransactionResponse = {
|
|
38
31
|
/**
|
|
39
32
|
* The unsigned transaction data. User must sign and broadcast to network.
|
|
40
33
|
*/
|
|
41
|
-
transaction:
|
|
42
|
-
| UnsignedTransaction
|
|
43
|
-
| UnsignedMulticallTransaction
|
|
44
|
-
| UserOperationResponse;
|
|
34
|
+
transaction: UnsignedTransaction | UserOperationResponse;
|
|
45
35
|
/**
|
|
46
36
|
* The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote.
|
|
47
37
|
*/
|
|
@@ -56,14 +46,12 @@ export const UniswapSellExactlyTransactionResponseTransaction$inboundSchema:
|
|
|
56
46
|
unknown
|
|
57
47
|
> = z.union([
|
|
58
48
|
UnsignedTransaction$inboundSchema,
|
|
59
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
60
49
|
UserOperationResponse$inboundSchema,
|
|
61
50
|
]);
|
|
62
51
|
|
|
63
52
|
/** @internal */
|
|
64
53
|
export type UniswapSellExactlyTransactionResponseTransaction$Outbound =
|
|
65
54
|
| UnsignedTransaction$Outbound
|
|
66
|
-
| UnsignedMulticallTransaction$Outbound
|
|
67
55
|
| UserOperationResponse$Outbound;
|
|
68
56
|
|
|
69
57
|
/** @internal */
|
|
@@ -74,7 +62,6 @@ export const UniswapSellExactlyTransactionResponseTransaction$outboundSchema:
|
|
|
74
62
|
UniswapSellExactlyTransactionResponseTransaction
|
|
75
63
|
> = z.union([
|
|
76
64
|
UnsignedTransaction$outboundSchema,
|
|
77
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
78
65
|
UserOperationResponse$outboundSchema,
|
|
79
66
|
]);
|
|
80
67
|
|
|
@@ -129,7 +116,6 @@ export const UniswapSellExactlyTransactionResponse$inboundSchema: z.ZodType<
|
|
|
129
116
|
> = z.object({
|
|
130
117
|
transaction: z.union([
|
|
131
118
|
UnsignedTransaction$inboundSchema,
|
|
132
|
-
UnsignedMulticallTransaction$inboundSchema,
|
|
133
119
|
UserOperationResponse$inboundSchema,
|
|
134
120
|
]),
|
|
135
121
|
amount_out_quote: z.string(),
|
|
@@ -141,10 +127,7 @@ export const UniswapSellExactlyTransactionResponse$inboundSchema: z.ZodType<
|
|
|
141
127
|
|
|
142
128
|
/** @internal */
|
|
143
129
|
export type UniswapSellExactlyTransactionResponse$Outbound = {
|
|
144
|
-
transaction:
|
|
145
|
-
| UnsignedTransaction$Outbound
|
|
146
|
-
| UnsignedMulticallTransaction$Outbound
|
|
147
|
-
| UserOperationResponse$Outbound;
|
|
130
|
+
transaction: UnsignedTransaction$Outbound | UserOperationResponse$Outbound;
|
|
148
131
|
amount_out_quote: string;
|
|
149
132
|
};
|
|
150
133
|
|
|
@@ -156,7 +139,6 @@ export const UniswapSellExactlyTransactionResponse$outboundSchema: z.ZodType<
|
|
|
156
139
|
> = z.object({
|
|
157
140
|
transaction: z.union([
|
|
158
141
|
UnsignedTransaction$outboundSchema,
|
|
159
|
-
UnsignedMulticallTransaction$outboundSchema,
|
|
160
142
|
UserOperationResponse$outboundSchema,
|
|
161
143
|
]),
|
|
162
144
|
amountOutQuote: z.string(),
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
* Successful Response
|
|
13
13
|
*/
|
|
14
14
|
export type ResponseV1TransactionBundlerAaveLoop =
|
|
15
|
-
| components.
|
|
15
|
+
| components.BundlerTransactionResponse
|
|
16
16
|
| components.BatchedUserOperationsResponse;
|
|
17
17
|
|
|
18
18
|
/** @internal */
|
|
@@ -21,13 +21,13 @@ export const ResponseV1TransactionBundlerAaveLoop$inboundSchema: z.ZodType<
|
|
|
21
21
|
z.ZodTypeDef,
|
|
22
22
|
unknown
|
|
23
23
|
> = z.union([
|
|
24
|
-
components.
|
|
24
|
+
components.BundlerTransactionResponse$inboundSchema,
|
|
25
25
|
components.BatchedUserOperationsResponse$inboundSchema,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
28
|
/** @internal */
|
|
29
29
|
export type ResponseV1TransactionBundlerAaveLoop$Outbound =
|
|
30
|
-
| components.
|
|
30
|
+
| components.BundlerTransactionResponse$Outbound
|
|
31
31
|
| components.BatchedUserOperationsResponse$Outbound;
|
|
32
32
|
|
|
33
33
|
/** @internal */
|
|
@@ -36,7 +36,7 @@ export const ResponseV1TransactionBundlerAaveLoop$outboundSchema: z.ZodType<
|
|
|
36
36
|
z.ZodTypeDef,
|
|
37
37
|
ResponseV1TransactionBundlerAaveLoop
|
|
38
38
|
> = z.union([
|
|
39
|
-
components.
|
|
39
|
+
components.BundlerTransactionResponse$outboundSchema,
|
|
40
40
|
components.BatchedUserOperationsResponse$outboundSchema,
|
|
41
41
|
]);
|
|
42
42
|
|
|
@@ -48,7 +48,7 @@ export class TransactionBundler extends ClientSDK {
|
|
|
48
48
|
async transactionBundlerExecute(
|
|
49
49
|
request: components.MulticallExecuteRequest,
|
|
50
50
|
options?: RequestOptions,
|
|
51
|
-
): Promise<components.
|
|
51
|
+
): Promise<components.BundlerTransactionResponse> {
|
|
52
52
|
return unwrapAsync(transactionBundlerTransactionBundlerExecute(
|
|
53
53
|
this,
|
|
54
54
|
request,
|