@compass-labs/api-sdk 1.0.7 → 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/README.md +2 -2
- package/bin/mcp-server.js +85 -136
- package/bin/mcp-server.js.map +21 -21
- package/dist/commonjs/funcs/tokenTokenTransfer.d.ts +1 -1
- package/dist/commonjs/funcs/tokenTokenTransfer.js +1 -1
- 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/mcp-server/tools/tokenTokenTransfer.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 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -1
- 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/tokentransferparams.d.ts +31 -31
- package/dist/commonjs/models/components/tokentransferparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokentransferparams.js +28 -28
- package/dist/commonjs/models/components/tokentransferparams.js.map +1 -1
- package/dist/commonjs/models/components/tokentransferrequest.d.ts +31 -31
- package/dist/commonjs/models/components/tokentransferrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokentransferrequest.js +28 -28
- package/dist/commonjs/models/components/tokentransferrequest.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/components/useroperation.d.ts +0 -9
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +0 -5
- package/dist/commonjs/models/components/useroperation.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/token.d.ts +1 -1
- package/dist/commonjs/sdk/token.js +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/tokenTokenTransfer.d.ts +1 -1
- package/dist/esm/funcs/tokenTokenTransfer.js +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/mcp-server/tools/tokenTokenTransfer.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 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -1
- 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/tokentransferparams.d.ts +31 -31
- package/dist/esm/models/components/tokentransferparams.d.ts.map +1 -1
- package/dist/esm/models/components/tokentransferparams.js +25 -25
- package/dist/esm/models/components/tokentransferparams.js.map +1 -1
- package/dist/esm/models/components/tokentransferrequest.d.ts +31 -31
- package/dist/esm/models/components/tokentransferrequest.d.ts.map +1 -1
- package/dist/esm/models/components/tokentransferrequest.js +25 -25
- package/dist/esm/models/components/tokentransferrequest.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/components/useroperation.d.ts +0 -9
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +0 -5
- package/dist/esm/models/components/useroperation.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/token.d.ts +1 -1
- package/dist/esm/sdk/token.js +1 -1
- package/dist/esm/sdk/transactionbundler.d.ts +1 -1
- package/dist/esm/sdk/transactionbundler.d.ts.map +1 -1
- package/docs/sdks/token/README.md +5 -5
- package/docs/sdks/transactionbundler/README.md +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/tokenTokenTransfer.ts +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/mcp-server/tools/tokenTokenTransfer.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 -1
- package/src/models/components/pendletxresponse.ts +2 -20
- package/src/models/components/tokentransferparams.ts +59 -59
- package/src/models/components/tokentransferrequest.ts +59 -59
- 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/components/useroperation.ts +0 -34
- package/src/models/operations/v1transactionbundleraaveloop.ts +4 -4
- package/src/sdk/token.ts +1 -1
- package/src/sdk/transactionbundler.ts +1 -1
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts +0 -77
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts.map +0 -1
- package/dist/commonjs/models/components/tokentransfererc20params.js +0 -108
- package/dist/commonjs/models/components/tokentransfererc20params.js.map +0 -1
- package/dist/esm/models/components/tokentransfererc20params.d.ts +0 -77
- package/dist/esm/models/components/tokentransfererc20params.d.ts.map +0 -1
- package/dist/esm/models/components/tokentransfererc20params.js +0 -68
- package/dist/esm/models/components/tokentransfererc20params.js.map +0 -1
- package/src/models/components/tokentransfererc20params.ts +0 -168
|
@@ -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";
|
|
@@ -143,7 +144,6 @@ export * from "./tokenbalanceresponse.js";
|
|
|
143
144
|
export * from "./tokenenum.js";
|
|
144
145
|
export * from "./tokeninfo.js";
|
|
145
146
|
export * from "./tokenpriceresponse.js";
|
|
146
|
-
export * from "./tokentransfererc20params.js";
|
|
147
147
|
export * from "./tokentransferparams.js";
|
|
148
148
|
export * from "./tokentransferrequest.js";
|
|
149
149
|
export * from "./transactionresponse.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(),
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
} from "./tokenenum.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* The symbol or address of the token to transfer.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type TokenTransferParamsToken = TokenEnum | string;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Amount of token to transfer
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type TokenTransferParamsAmount = number | string;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Parameters model for transferring ETH or ERC20 tokens.
|
|
@@ -29,112 +29,112 @@ export type TokenTransferParamsToken = TokenEnum | string;
|
|
|
29
29
|
export type TokenTransferParams = {
|
|
30
30
|
actionType?: "TOKEN_TRANSFER" | undefined;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* The recipient of the tokens.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
to: string;
|
|
35
35
|
/**
|
|
36
|
-
* The symbol of the token to transfer
|
|
36
|
+
* The symbol or address of the token to transfer.
|
|
37
37
|
*/
|
|
38
38
|
token: TokenEnum | string;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Amount of token to transfer
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
amount: number | string;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
|
-
export const
|
|
47
|
-
|
|
46
|
+
export const TokenTransferParamsToken$inboundSchema: z.ZodType<
|
|
47
|
+
TokenTransferParamsToken,
|
|
48
48
|
z.ZodTypeDef,
|
|
49
49
|
unknown
|
|
50
|
-
> = z.union([
|
|
50
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
53
|
-
export type
|
|
53
|
+
export type TokenTransferParamsToken$Outbound = string | string;
|
|
54
54
|
|
|
55
55
|
/** @internal */
|
|
56
|
-
export const
|
|
57
|
-
|
|
56
|
+
export const TokenTransferParamsToken$outboundSchema: z.ZodType<
|
|
57
|
+
TokenTransferParamsToken$Outbound,
|
|
58
58
|
z.ZodTypeDef,
|
|
59
|
-
|
|
60
|
-
> = z.union([
|
|
59
|
+
TokenTransferParamsToken
|
|
60
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* @internal
|
|
64
64
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
65
|
*/
|
|
66
|
-
export namespace
|
|
67
|
-
/** @deprecated use `
|
|
68
|
-
export const inboundSchema =
|
|
69
|
-
/** @deprecated use `
|
|
70
|
-
export const outboundSchema =
|
|
71
|
-
/** @deprecated use `
|
|
72
|
-
export type Outbound =
|
|
66
|
+
export namespace TokenTransferParamsToken$ {
|
|
67
|
+
/** @deprecated use `TokenTransferParamsToken$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = TokenTransferParamsToken$inboundSchema;
|
|
69
|
+
/** @deprecated use `TokenTransferParamsToken$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = TokenTransferParamsToken$outboundSchema;
|
|
71
|
+
/** @deprecated use `TokenTransferParamsToken$Outbound` instead. */
|
|
72
|
+
export type Outbound = TokenTransferParamsToken$Outbound;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export function
|
|
76
|
-
|
|
75
|
+
export function tokenTransferParamsTokenToJSON(
|
|
76
|
+
tokenTransferParamsToken: TokenTransferParamsToken,
|
|
77
77
|
): string {
|
|
78
78
|
return JSON.stringify(
|
|
79
|
-
|
|
79
|
+
TokenTransferParamsToken$outboundSchema.parse(tokenTransferParamsToken),
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export function
|
|
83
|
+
export function tokenTransferParamsTokenFromJSON(
|
|
84
84
|
jsonString: string,
|
|
85
|
-
): SafeParseResult<
|
|
85
|
+
): SafeParseResult<TokenTransferParamsToken, SDKValidationError> {
|
|
86
86
|
return safeParse(
|
|
87
87
|
jsonString,
|
|
88
|
-
(x) =>
|
|
89
|
-
`Failed to parse '
|
|
88
|
+
(x) => TokenTransferParamsToken$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'TokenTransferParamsToken' from JSON`,
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/** @internal */
|
|
94
|
-
export const
|
|
95
|
-
|
|
94
|
+
export const TokenTransferParamsAmount$inboundSchema: z.ZodType<
|
|
95
|
+
TokenTransferParamsAmount,
|
|
96
96
|
z.ZodTypeDef,
|
|
97
97
|
unknown
|
|
98
|
-
> = z.union([
|
|
98
|
+
> = z.union([z.number(), z.string()]);
|
|
99
99
|
|
|
100
100
|
/** @internal */
|
|
101
|
-
export type
|
|
101
|
+
export type TokenTransferParamsAmount$Outbound = number | string;
|
|
102
102
|
|
|
103
103
|
/** @internal */
|
|
104
|
-
export const
|
|
105
|
-
|
|
104
|
+
export const TokenTransferParamsAmount$outboundSchema: z.ZodType<
|
|
105
|
+
TokenTransferParamsAmount$Outbound,
|
|
106
106
|
z.ZodTypeDef,
|
|
107
|
-
|
|
108
|
-
> = z.union([
|
|
107
|
+
TokenTransferParamsAmount
|
|
108
|
+
> = z.union([z.number(), z.string()]);
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* @internal
|
|
112
112
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
113
|
*/
|
|
114
|
-
export namespace
|
|
115
|
-
/** @deprecated use `
|
|
116
|
-
export const inboundSchema =
|
|
117
|
-
/** @deprecated use `
|
|
118
|
-
export const outboundSchema =
|
|
119
|
-
/** @deprecated use `
|
|
120
|
-
export type Outbound =
|
|
114
|
+
export namespace TokenTransferParamsAmount$ {
|
|
115
|
+
/** @deprecated use `TokenTransferParamsAmount$inboundSchema` instead. */
|
|
116
|
+
export const inboundSchema = TokenTransferParamsAmount$inboundSchema;
|
|
117
|
+
/** @deprecated use `TokenTransferParamsAmount$outboundSchema` instead. */
|
|
118
|
+
export const outboundSchema = TokenTransferParamsAmount$outboundSchema;
|
|
119
|
+
/** @deprecated use `TokenTransferParamsAmount$Outbound` instead. */
|
|
120
|
+
export type Outbound = TokenTransferParamsAmount$Outbound;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export function
|
|
124
|
-
|
|
123
|
+
export function tokenTransferParamsAmountToJSON(
|
|
124
|
+
tokenTransferParamsAmount: TokenTransferParamsAmount,
|
|
125
125
|
): string {
|
|
126
126
|
return JSON.stringify(
|
|
127
|
-
|
|
127
|
+
TokenTransferParamsAmount$outboundSchema.parse(tokenTransferParamsAmount),
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export function
|
|
131
|
+
export function tokenTransferParamsAmountFromJSON(
|
|
132
132
|
jsonString: string,
|
|
133
|
-
): SafeParseResult<
|
|
133
|
+
): SafeParseResult<TokenTransferParamsAmount, SDKValidationError> {
|
|
134
134
|
return safeParse(
|
|
135
135
|
jsonString,
|
|
136
|
-
(x) =>
|
|
137
|
-
`Failed to parse '
|
|
136
|
+
(x) => TokenTransferParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'TokenTransferParamsAmount' from JSON`,
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -145,9 +145,9 @@ export const TokenTransferParams$inboundSchema: z.ZodType<
|
|
|
145
145
|
unknown
|
|
146
146
|
> = z.object({
|
|
147
147
|
action_type: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER"),
|
|
148
|
-
amount: z.union([z.number(), z.string()]),
|
|
149
|
-
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
150
148
|
to: z.string(),
|
|
149
|
+
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
150
|
+
amount: z.union([z.number(), z.string()]),
|
|
151
151
|
}).transform((v) => {
|
|
152
152
|
return remap$(v, {
|
|
153
153
|
"action_type": "actionType",
|
|
@@ -157,9 +157,9 @@ export const TokenTransferParams$inboundSchema: z.ZodType<
|
|
|
157
157
|
/** @internal */
|
|
158
158
|
export type TokenTransferParams$Outbound = {
|
|
159
159
|
action_type: "TOKEN_TRANSFER";
|
|
160
|
-
amount: number | string;
|
|
161
|
-
token: string | string;
|
|
162
160
|
to: string;
|
|
161
|
+
token: string | string;
|
|
162
|
+
amount: number | string;
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
/** @internal */
|
|
@@ -169,9 +169,9 @@ export const TokenTransferParams$outboundSchema: z.ZodType<
|
|
|
169
169
|
TokenTransferParams
|
|
170
170
|
> = z.object({
|
|
171
171
|
actionType: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER" as const),
|
|
172
|
-
amount: z.union([z.number(), z.string()]),
|
|
173
|
-
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
174
172
|
to: z.string(),
|
|
173
|
+
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
174
|
+
amount: z.union([z.number(), z.string()]),
|
|
175
175
|
}).transform((v) => {
|
|
176
176
|
return remap$(v, {
|
|
177
177
|
actionType: "action_type",
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "./tokenenum.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* The symbol or address of the token to transfer.
|
|
19
19
|
*/
|
|
20
|
-
export type
|
|
20
|
+
export type TokenTransferRequestToken = TokenEnum | string;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Amount of token to transfer
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
export type TokenTransferRequestAmount = number | string;
|
|
26
26
|
|
|
27
27
|
export const TokenTransferRequestChain = {
|
|
28
28
|
Arbitrum: "arbitrum",
|
|
@@ -39,17 +39,17 @@ export type TokenTransferRequestChain = ClosedEnum<
|
|
|
39
39
|
export type TokenTransferRequest = {
|
|
40
40
|
actionType?: "TOKEN_TRANSFER" | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The recipient of the tokens.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
to: string;
|
|
45
45
|
/**
|
|
46
|
-
* The symbol of the token to transfer
|
|
46
|
+
* The symbol or address of the token to transfer.
|
|
47
47
|
*/
|
|
48
48
|
token: TokenEnum | string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Amount of token to transfer
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
amount: number | string;
|
|
53
53
|
chain: TokenTransferRequestChain;
|
|
54
54
|
/**
|
|
55
55
|
* The address of the transaction sender.
|
|
@@ -58,98 +58,98 @@ export type TokenTransferRequest = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/** @internal */
|
|
61
|
-
export const
|
|
62
|
-
|
|
61
|
+
export const TokenTransferRequestToken$inboundSchema: z.ZodType<
|
|
62
|
+
TokenTransferRequestToken,
|
|
63
63
|
z.ZodTypeDef,
|
|
64
64
|
unknown
|
|
65
|
-
> = z.union([
|
|
65
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
|
-
export type
|
|
68
|
+
export type TokenTransferRequestToken$Outbound = string | string;
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
|
-
export const
|
|
72
|
-
|
|
71
|
+
export const TokenTransferRequestToken$outboundSchema: z.ZodType<
|
|
72
|
+
TokenTransferRequestToken$Outbound,
|
|
73
73
|
z.ZodTypeDef,
|
|
74
|
-
|
|
75
|
-
> = z.union([
|
|
74
|
+
TokenTransferRequestToken
|
|
75
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @internal
|
|
79
79
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
80
|
*/
|
|
81
|
-
export namespace
|
|
82
|
-
/** @deprecated use `
|
|
83
|
-
export const inboundSchema =
|
|
84
|
-
/** @deprecated use `
|
|
85
|
-
export const outboundSchema =
|
|
86
|
-
/** @deprecated use `
|
|
87
|
-
export type Outbound =
|
|
81
|
+
export namespace TokenTransferRequestToken$ {
|
|
82
|
+
/** @deprecated use `TokenTransferRequestToken$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = TokenTransferRequestToken$inboundSchema;
|
|
84
|
+
/** @deprecated use `TokenTransferRequestToken$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = TokenTransferRequestToken$outboundSchema;
|
|
86
|
+
/** @deprecated use `TokenTransferRequestToken$Outbound` instead. */
|
|
87
|
+
export type Outbound = TokenTransferRequestToken$Outbound;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export function
|
|
91
|
-
|
|
90
|
+
export function tokenTransferRequestTokenToJSON(
|
|
91
|
+
tokenTransferRequestToken: TokenTransferRequestToken,
|
|
92
92
|
): string {
|
|
93
93
|
return JSON.stringify(
|
|
94
|
-
|
|
94
|
+
TokenTransferRequestToken$outboundSchema.parse(tokenTransferRequestToken),
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export function
|
|
98
|
+
export function tokenTransferRequestTokenFromJSON(
|
|
99
99
|
jsonString: string,
|
|
100
|
-
): SafeParseResult<
|
|
100
|
+
): SafeParseResult<TokenTransferRequestToken, SDKValidationError> {
|
|
101
101
|
return safeParse(
|
|
102
102
|
jsonString,
|
|
103
|
-
(x) =>
|
|
104
|
-
`Failed to parse '
|
|
103
|
+
(x) => TokenTransferRequestToken$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'TokenTransferRequestToken' from JSON`,
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/** @internal */
|
|
109
|
-
export const
|
|
110
|
-
|
|
109
|
+
export const TokenTransferRequestAmount$inboundSchema: z.ZodType<
|
|
110
|
+
TokenTransferRequestAmount,
|
|
111
111
|
z.ZodTypeDef,
|
|
112
112
|
unknown
|
|
113
|
-
> = z.union([
|
|
113
|
+
> = z.union([z.number(), z.string()]);
|
|
114
114
|
|
|
115
115
|
/** @internal */
|
|
116
|
-
export type
|
|
116
|
+
export type TokenTransferRequestAmount$Outbound = number | string;
|
|
117
117
|
|
|
118
118
|
/** @internal */
|
|
119
|
-
export const
|
|
120
|
-
|
|
119
|
+
export const TokenTransferRequestAmount$outboundSchema: z.ZodType<
|
|
120
|
+
TokenTransferRequestAmount$Outbound,
|
|
121
121
|
z.ZodTypeDef,
|
|
122
|
-
|
|
123
|
-
> = z.union([
|
|
122
|
+
TokenTransferRequestAmount
|
|
123
|
+
> = z.union([z.number(), z.string()]);
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* @internal
|
|
127
127
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
128
|
*/
|
|
129
|
-
export namespace
|
|
130
|
-
/** @deprecated use `
|
|
131
|
-
export const inboundSchema =
|
|
132
|
-
/** @deprecated use `
|
|
133
|
-
export const outboundSchema =
|
|
134
|
-
/** @deprecated use `
|
|
135
|
-
export type Outbound =
|
|
129
|
+
export namespace TokenTransferRequestAmount$ {
|
|
130
|
+
/** @deprecated use `TokenTransferRequestAmount$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = TokenTransferRequestAmount$inboundSchema;
|
|
132
|
+
/** @deprecated use `TokenTransferRequestAmount$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = TokenTransferRequestAmount$outboundSchema;
|
|
134
|
+
/** @deprecated use `TokenTransferRequestAmount$Outbound` instead. */
|
|
135
|
+
export type Outbound = TokenTransferRequestAmount$Outbound;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
export function
|
|
139
|
-
|
|
138
|
+
export function tokenTransferRequestAmountToJSON(
|
|
139
|
+
tokenTransferRequestAmount: TokenTransferRequestAmount,
|
|
140
140
|
): string {
|
|
141
141
|
return JSON.stringify(
|
|
142
|
-
|
|
142
|
+
TokenTransferRequestAmount$outboundSchema.parse(tokenTransferRequestAmount),
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export function
|
|
146
|
+
export function tokenTransferRequestAmountFromJSON(
|
|
147
147
|
jsonString: string,
|
|
148
|
-
): SafeParseResult<
|
|
148
|
+
): SafeParseResult<TokenTransferRequestAmount, SDKValidationError> {
|
|
149
149
|
return safeParse(
|
|
150
150
|
jsonString,
|
|
151
|
-
(x) =>
|
|
152
|
-
`Failed to parse '
|
|
151
|
+
(x) => TokenTransferRequestAmount$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'TokenTransferRequestAmount' from JSON`,
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -181,9 +181,9 @@ export const TokenTransferRequest$inboundSchema: z.ZodType<
|
|
|
181
181
|
unknown
|
|
182
182
|
> = z.object({
|
|
183
183
|
action_type: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER"),
|
|
184
|
-
amount: z.union([z.number(), z.string()]),
|
|
185
|
-
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
186
184
|
to: z.string(),
|
|
185
|
+
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
186
|
+
amount: z.union([z.number(), z.string()]),
|
|
187
187
|
chain: TokenTransferRequestChain$inboundSchema,
|
|
188
188
|
sender: z.string(),
|
|
189
189
|
}).transform((v) => {
|
|
@@ -195,9 +195,9 @@ export const TokenTransferRequest$inboundSchema: z.ZodType<
|
|
|
195
195
|
/** @internal */
|
|
196
196
|
export type TokenTransferRequest$Outbound = {
|
|
197
197
|
action_type: "TOKEN_TRANSFER";
|
|
198
|
-
amount: number | string;
|
|
199
|
-
token: string | string;
|
|
200
198
|
to: string;
|
|
199
|
+
token: string | string;
|
|
200
|
+
amount: number | string;
|
|
201
201
|
chain: string;
|
|
202
202
|
sender: string;
|
|
203
203
|
};
|
|
@@ -209,9 +209,9 @@ export const TokenTransferRequest$outboundSchema: z.ZodType<
|
|
|
209
209
|
TokenTransferRequest
|
|
210
210
|
> = z.object({
|
|
211
211
|
actionType: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER" as const),
|
|
212
|
-
amount: z.union([z.number(), z.string()]),
|
|
213
|
-
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
214
212
|
to: z.string(),
|
|
213
|
+
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
214
|
+
amount: z.union([z.number(), z.string()]),
|
|
215
215
|
chain: TokenTransferRequestChain$outboundSchema,
|
|
216
216
|
sender: z.string(),
|
|
217
217
|
}).transform((v) => {
|