@compass-labs/api-sdk 2.2.29-rc.1 → 2.2.29
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/dist/commonjs/funcs/creditCreditBundle.d.ts +1 -1
- package/dist/commonjs/funcs/creditCreditBundle.js +1 -1
- package/dist/commonjs/models/components/approvetransferresponse.d.ts +2 -8
- package/dist/commonjs/models/components/approvetransferresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/approvetransferresponse.js +2 -2
- package/dist/commonjs/models/components/approvetransferresponse.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +10 -10
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js +3 -3
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +7 -7
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js +2 -2
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/credituseroperation.d.ts +4 -5
- package/dist/commonjs/models/components/credituseroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/credituseroperation.js +0 -3
- package/dist/commonjs/models/components/credituseroperation.js.map +1 -1
- package/dist/commonjs/models/components/depositforburnresponse.d.ts +2 -8
- package/dist/commonjs/models/components/depositforburnresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/depositforburnresponse.js +2 -3
- package/dist/commonjs/models/components/depositforburnresponse.js.map +1 -1
- package/dist/commonjs/models/components/earnmanageresponse.d.ts +2 -8
- package/dist/commonjs/models/components/earnmanageresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnmanageresponse.js +2 -3
- package/dist/commonjs/models/components/earnmanageresponse.js.map +1 -1
- package/dist/commonjs/models/components/earnswapresponse.d.ts +2 -11
- package/dist/commonjs/models/components/earnswapresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnswapresponse.js +2 -3
- package/dist/commonjs/models/components/earnswapresponse.js.map +1 -1
- package/dist/commonjs/models/components/earntransferresponse.d.ts +2 -11
- package/dist/commonjs/models/components/earntransferresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/earntransferresponse.js +2 -2
- package/dist/commonjs/models/components/earntransferresponse.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/sdk/credit.d.ts +1 -1
- package/dist/commonjs/sdk/credit.js +1 -1
- package/dist/esm/funcs/creditCreditBundle.d.ts +1 -1
- package/dist/esm/funcs/creditCreditBundle.js +1 -1
- package/dist/esm/models/components/approvetransferresponse.d.ts +2 -8
- package/dist/esm/models/components/approvetransferresponse.d.ts.map +1 -1
- package/dist/esm/models/components/approvetransferresponse.js +2 -2
- package/dist/esm/models/components/approvetransferresponse.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +10 -10
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js +3 -3
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +7 -7
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js +2 -2
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/credituseroperation.d.ts +4 -5
- package/dist/esm/models/components/credituseroperation.d.ts.map +1 -1
- package/dist/esm/models/components/credituseroperation.js +0 -3
- package/dist/esm/models/components/credituseroperation.js.map +1 -1
- package/dist/esm/models/components/depositforburnresponse.d.ts +2 -8
- package/dist/esm/models/components/depositforburnresponse.d.ts.map +1 -1
- package/dist/esm/models/components/depositforburnresponse.js +2 -3
- package/dist/esm/models/components/depositforburnresponse.js.map +1 -1
- package/dist/esm/models/components/earnmanageresponse.d.ts +2 -8
- package/dist/esm/models/components/earnmanageresponse.d.ts.map +1 -1
- package/dist/esm/models/components/earnmanageresponse.js +2 -3
- package/dist/esm/models/components/earnmanageresponse.js.map +1 -1
- package/dist/esm/models/components/earnswapresponse.d.ts +2 -11
- package/dist/esm/models/components/earnswapresponse.d.ts.map +1 -1
- package/dist/esm/models/components/earnswapresponse.js +2 -3
- package/dist/esm/models/components/earnswapresponse.js.map +1 -1
- package/dist/esm/models/components/earntransferresponse.d.ts +2 -11
- package/dist/esm/models/components/earntransferresponse.d.ts.map +1 -1
- package/dist/esm/models/components/earntransferresponse.js +2 -2
- package/dist/esm/models/components/earntransferresponse.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/sdk/credit.d.ts +1 -1
- package/dist/esm/sdk/credit.js +1 -1
- package/docs/models/components/approvetransferresponse.md +40 -3
- package/docs/models/components/creditborrowrequest.md +3 -3
- package/docs/models/components/creditborrowrequestamountin.md +1 -1
- package/docs/models/components/creditrepayrequest.md +2 -2
- package/docs/models/components/credituseroperationbody.md +0 -11
- package/docs/models/components/depositforburnresponse.md +37 -3
- package/docs/models/components/earnmanageresponse.md +16 -3
- package/docs/models/components/earnswapresponse.md +37 -3
- package/docs/models/components/earntransferresponse.md +15 -4
- package/docs/models/components/earntransferresponseeip712.md +0 -2
- package/docs/models/components/permittypeddataresponseoutput.md +2 -7
- package/docs/models/components/withdrawamount.md +1 -1
- package/docs/sdks/credit/README.md +1 -1
- package/package.json +1 -1
- package/src/funcs/creditCreditBundle.ts +1 -1
- package/src/models/components/approvetransferresponse.ts +4 -10
- package/src/models/components/creditborrowrequest.ts +13 -13
- package/src/models/components/creditrepayrequest.ts +9 -9
- package/src/models/components/credituseroperation.ts +0 -11
- package/src/models/components/depositforburnresponse.ts +4 -11
- package/src/models/components/earnmanageresponse.ts +4 -11
- package/src/models/components/earnswapresponse.ts +4 -14
- package/src/models/components/earntransferresponse.ts +4 -17
- package/src/models/components/index.ts +0 -1
- package/src/sdk/credit.ts +1 -1
- package/dist/commonjs/models/components/credittransfertoaddressparams.d.ts +0 -44
- package/dist/commonjs/models/components/credittransfertoaddressparams.d.ts.map +0 -1
- package/dist/commonjs/models/components/credittransfertoaddressparams.js +0 -63
- package/dist/commonjs/models/components/credittransfertoaddressparams.js.map +0 -1
- package/dist/esm/models/components/credittransfertoaddressparams.d.ts +0 -44
- package/dist/esm/models/components/credittransfertoaddressparams.d.ts.map +0 -1
- package/dist/esm/models/components/credittransfertoaddressparams.js +0 -25
- package/dist/esm/models/components/credittransfertoaddressparams.js.map +0 -1
- package/docs/models/components/credittransfertoaddressparams.md +0 -28
- package/docs/models/components/credittransfertoaddressparamsamount.md +0 -19
- package/src/models/components/credittransfertoaddressparams.ts +0 -89
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
export type RepayAmount = number | string;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Amount of collateral to withdraw (in token units, not wei).
|
|
19
|
+
* Amount of collateral to withdraw (in token units, not wei).
|
|
20
20
|
*/
|
|
21
21
|
export type WithdrawAmount = number | string;
|
|
22
22
|
|
|
@@ -51,13 +51,13 @@ export type CreditRepayRequest = {
|
|
|
51
51
|
*/
|
|
52
52
|
interestRateMode?: InterestRateMode | undefined;
|
|
53
53
|
/**
|
|
54
|
-
* Collateral token to withdraw from Aave after repaying debt.
|
|
54
|
+
* Collateral token to withdraw from Aave after repaying debt.
|
|
55
55
|
*/
|
|
56
|
-
withdrawToken
|
|
56
|
+
withdrawToken: string;
|
|
57
57
|
/**
|
|
58
|
-
* Amount of collateral to withdraw (in token units, not wei).
|
|
58
|
+
* Amount of collateral to withdraw (in token units, not wei).
|
|
59
59
|
*/
|
|
60
|
-
withdrawAmount
|
|
60
|
+
withdrawAmount: number | string;
|
|
61
61
|
/**
|
|
62
62
|
* Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is.
|
|
63
63
|
*/
|
|
@@ -137,8 +137,8 @@ export type CreditRepayRequest$Outbound = {
|
|
|
137
137
|
repay_token: string;
|
|
138
138
|
repay_amount: number | string;
|
|
139
139
|
interest_rate_mode?: string | undefined;
|
|
140
|
-
withdraw_token
|
|
141
|
-
withdraw_amount
|
|
140
|
+
withdraw_token: string;
|
|
141
|
+
withdraw_amount: number | string;
|
|
142
142
|
token_out?: string | null | undefined;
|
|
143
143
|
slippage?: number | string | undefined;
|
|
144
144
|
gas_sponsorship?: boolean | undefined;
|
|
@@ -158,8 +158,8 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
|
|
|
158
158
|
repayToken: z.string(),
|
|
159
159
|
repayAmount: z.union([z.number(), z.string()]),
|
|
160
160
|
interestRateMode: InterestRateMode$outboundSchema.optional(),
|
|
161
|
-
withdrawToken: z.
|
|
162
|
-
withdrawAmount: z.
|
|
161
|
+
withdrawToken: z.string(),
|
|
162
|
+
withdrawAmount: z.union([z.number(), z.string()]),
|
|
163
163
|
tokenOut: z.nullable(z.string()).optional(),
|
|
164
164
|
slippage: z.union([z.number(), z.string()]).optional(),
|
|
165
165
|
gasSponsorship: z.boolean().optional(),
|
|
@@ -23,11 +23,6 @@ import {
|
|
|
23
23
|
CreditSupplyParams$Outbound,
|
|
24
24
|
CreditSupplyParams$outboundSchema,
|
|
25
25
|
} from "./creditsupplyparams.js";
|
|
26
|
-
import {
|
|
27
|
-
CreditTransferToAddressParams,
|
|
28
|
-
CreditTransferToAddressParams$Outbound,
|
|
29
|
-
CreditTransferToAddressParams$outboundSchema,
|
|
30
|
-
} from "./credittransfertoaddressparams.js";
|
|
31
26
|
import {
|
|
32
27
|
CreditWithdrawParams,
|
|
33
28
|
CreditWithdrawParams$Outbound,
|
|
@@ -54,7 +49,6 @@ export type CreditUserOperationBody =
|
|
|
54
49
|
| CreditEnableCollateralParams
|
|
55
50
|
| CreditRepayParams
|
|
56
51
|
| CreditSupplyParams
|
|
57
|
-
| CreditTransferToAddressParams
|
|
58
52
|
| CreditWithdrawParams
|
|
59
53
|
| EarnSwapParams
|
|
60
54
|
| EarnTransferFromEOAParams
|
|
@@ -69,7 +63,6 @@ export type CreditUserOperation = {
|
|
|
69
63
|
| CreditEnableCollateralParams
|
|
70
64
|
| CreditRepayParams
|
|
71
65
|
| CreditSupplyParams
|
|
72
|
-
| CreditTransferToAddressParams
|
|
73
66
|
| CreditWithdrawParams
|
|
74
67
|
| EarnSwapParams
|
|
75
68
|
| EarnTransferFromEOAParams
|
|
@@ -82,7 +75,6 @@ export type CreditUserOperationBody$Outbound =
|
|
|
82
75
|
| CreditEnableCollateralParams$Outbound
|
|
83
76
|
| CreditRepayParams$Outbound
|
|
84
77
|
| CreditSupplyParams$Outbound
|
|
85
|
-
| CreditTransferToAddressParams$Outbound
|
|
86
78
|
| CreditWithdrawParams$Outbound
|
|
87
79
|
| EarnSwapParams$Outbound
|
|
88
80
|
| EarnTransferFromEOAParams$Outbound
|
|
@@ -98,7 +90,6 @@ export const CreditUserOperationBody$outboundSchema: z.ZodType<
|
|
|
98
90
|
CreditEnableCollateralParams$outboundSchema,
|
|
99
91
|
CreditRepayParams$outboundSchema,
|
|
100
92
|
CreditSupplyParams$outboundSchema,
|
|
101
|
-
CreditTransferToAddressParams$outboundSchema,
|
|
102
93
|
CreditWithdrawParams$outboundSchema,
|
|
103
94
|
EarnSwapParams$outboundSchema,
|
|
104
95
|
EarnTransferFromEOAParams$outboundSchema,
|
|
@@ -120,7 +111,6 @@ export type CreditUserOperation$Outbound = {
|
|
|
120
111
|
| CreditEnableCollateralParams$Outbound
|
|
121
112
|
| CreditRepayParams$Outbound
|
|
122
113
|
| CreditSupplyParams$Outbound
|
|
123
|
-
| CreditTransferToAddressParams$Outbound
|
|
124
114
|
| CreditWithdrawParams$Outbound
|
|
125
115
|
| EarnSwapParams$Outbound
|
|
126
116
|
| EarnTransferFromEOAParams$Outbound
|
|
@@ -138,7 +128,6 @@ export const CreditUserOperation$outboundSchema: z.ZodType<
|
|
|
138
128
|
CreditEnableCollateralParams$outboundSchema,
|
|
139
129
|
CreditRepayParams$outboundSchema,
|
|
140
130
|
CreditSupplyParams$outboundSchema,
|
|
141
|
-
CreditTransferToAddressParams$outboundSchema,
|
|
142
131
|
CreditWithdrawParams$outboundSchema,
|
|
143
132
|
EarnSwapParams$outboundSchema,
|
|
144
133
|
EarnTransferFromEOAParams$outboundSchema,
|
|
@@ -45,14 +45,8 @@ export type DepositForBurnResponse = {
|
|
|
45
45
|
* Unique bridge identifier for tracking this cross-chain transfer. Use this ID when calling /mint/prepare to complete the transfer. Only present when Redis is configured on the server.
|
|
46
46
|
*/
|
|
47
47
|
bridgeId?: string | null | undefined;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
54
|
-
*/
|
|
55
|
-
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
48
|
+
transaction: UnsignedTransaction | null;
|
|
49
|
+
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
56
50
|
/**
|
|
57
51
|
* The transfer speed mode used. 'fast' uses confirmed finality (~30s), 'standard' uses full finality (~15-19 min).
|
|
58
52
|
*/
|
|
@@ -79,9 +73,8 @@ export const DepositForBurnResponse$inboundSchema: z.ZodType<
|
|
|
79
73
|
unknown
|
|
80
74
|
> = z.object({
|
|
81
75
|
bridge_id: z.nullable(z.string()).optional(),
|
|
82
|
-
transaction: z.nullable(UnsignedTransaction$inboundSchema)
|
|
83
|
-
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
84
|
-
.optional(),
|
|
76
|
+
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
77
|
+
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
85
78
|
transfer_mode: DepositForBurnResponseTransferMode$inboundSchema,
|
|
86
79
|
fee: z.nullable(z.string()).optional(),
|
|
87
80
|
estimated_time_seconds: z.number().int(),
|
|
@@ -17,14 +17,8 @@ import {
|
|
|
17
17
|
} from "./unsignedtransaction.js";
|
|
18
18
|
|
|
19
19
|
export type EarnManageResponse = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
26
|
-
*/
|
|
27
|
-
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
20
|
+
transaction: UnsignedTransaction | null;
|
|
21
|
+
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
28
22
|
};
|
|
29
23
|
|
|
30
24
|
/** @internal */
|
|
@@ -33,9 +27,8 @@ export const EarnManageResponse$inboundSchema: z.ZodType<
|
|
|
33
27
|
z.ZodTypeDef,
|
|
34
28
|
unknown
|
|
35
29
|
> = z.object({
|
|
36
|
-
transaction: z.nullable(UnsignedTransaction$inboundSchema)
|
|
37
|
-
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
38
|
-
.optional(),
|
|
30
|
+
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
31
|
+
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
39
32
|
}).transform((v) => {
|
|
40
33
|
return remap$(v, {
|
|
41
34
|
"eip_712": "eip712",
|
|
@@ -17,17 +17,8 @@ import {
|
|
|
17
17
|
} from "./unsignedtransaction.js";
|
|
18
18
|
|
|
19
19
|
export type EarnSwapResponse = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
26
|
-
*/
|
|
27
|
-
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Estimated amount of output token received from the swap.
|
|
30
|
-
*/
|
|
20
|
+
transaction: UnsignedTransaction | null;
|
|
21
|
+
eip712: BatchedSafeOperationsResponseOutput | null;
|
|
31
22
|
estimatedAmountOut: string;
|
|
32
23
|
};
|
|
33
24
|
|
|
@@ -37,9 +28,8 @@ export const EarnSwapResponse$inboundSchema: z.ZodType<
|
|
|
37
28
|
z.ZodTypeDef,
|
|
38
29
|
unknown
|
|
39
30
|
> = z.object({
|
|
40
|
-
transaction: z.nullable(UnsignedTransaction$inboundSchema)
|
|
41
|
-
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
42
|
-
.optional(),
|
|
31
|
+
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
32
|
+
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema),
|
|
43
33
|
estimated_amount_out: z.string(),
|
|
44
34
|
}).transform((v) => {
|
|
45
35
|
return remap$(v, {
|
|
@@ -20,26 +20,13 @@ import {
|
|
|
20
20
|
UnsignedTransaction$inboundSchema,
|
|
21
21
|
} from "./unsignedtransaction.js";
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
25
|
-
*/
|
|
26
23
|
export type EarnTransferResponseEip712 =
|
|
27
24
|
| BatchedSafeOperationsResponseOutput
|
|
28
25
|
| Permit2TypedDataOutput;
|
|
29
26
|
|
|
30
27
|
export type EarnTransferResponse = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
transaction?: UnsignedTransaction | null | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
37
|
-
*/
|
|
38
|
-
eip712?:
|
|
39
|
-
| BatchedSafeOperationsResponseOutput
|
|
40
|
-
| Permit2TypedDataOutput
|
|
41
|
-
| null
|
|
42
|
-
| undefined;
|
|
28
|
+
transaction: UnsignedTransaction | null;
|
|
29
|
+
eip712: BatchedSafeOperationsResponseOutput | Permit2TypedDataOutput | null;
|
|
43
30
|
};
|
|
44
31
|
|
|
45
32
|
/** @internal */
|
|
@@ -68,13 +55,13 @@ export const EarnTransferResponse$inboundSchema: z.ZodType<
|
|
|
68
55
|
z.ZodTypeDef,
|
|
69
56
|
unknown
|
|
70
57
|
> = z.object({
|
|
71
|
-
transaction: z.nullable(UnsignedTransaction$inboundSchema)
|
|
58
|
+
transaction: z.nullable(UnsignedTransaction$inboundSchema),
|
|
72
59
|
eip_712: z.nullable(
|
|
73
60
|
z.union([
|
|
74
61
|
BatchedSafeOperationsResponseOutput$inboundSchema,
|
|
75
62
|
Permit2TypedDataOutput$inboundSchema,
|
|
76
63
|
]),
|
|
77
|
-
)
|
|
64
|
+
),
|
|
78
65
|
}).transform((v) => {
|
|
79
66
|
return remap$(v, {
|
|
80
67
|
"eip_712": "eip712",
|
|
@@ -99,7 +99,6 @@ export * from "./creditrepayresponse.js";
|
|
|
99
99
|
export * from "./creditsupplyparams.js";
|
|
100
100
|
export * from "./credittransferrequest.js";
|
|
101
101
|
export * from "./credittransferresponse.js";
|
|
102
|
-
export * from "./credittransfertoaddressparams.js";
|
|
103
102
|
export * from "./credituseroperation.js";
|
|
104
103
|
export * from "./creditwithdrawparams.js";
|
|
105
104
|
export * from "./debtposition.js";
|
package/src/sdk/credit.ts
CHANGED
|
@@ -136,7 +136,7 @@ export class Credit extends ClientSDK {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* Execute multiple credit actions
|
|
139
|
+
* Execute multiple credit actions atomically
|
|
140
140
|
*
|
|
141
141
|
* @remarks
|
|
142
142
|
* Compose individual credit operations (supply, withdraw, borrow, repay, swap, transfer)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
/**
|
|
3
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
4
|
-
*/
|
|
5
|
-
export type CreditTransferToAddressParamsAmount = number | string;
|
|
6
|
-
/**
|
|
7
|
-
* Transfer tokens from Credit Account to an arbitrary address.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
*
|
|
11
|
-
* Requires all debt positions to be fully repaid (totalDebtBase == 0)
|
|
12
|
-
* before the transfer is allowed.
|
|
13
|
-
*/
|
|
14
|
-
export type CreditTransferToAddressParams = {
|
|
15
|
-
actionType: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
16
|
-
/**
|
|
17
|
-
* The ERC20 token to transfer from the Credit Account.
|
|
18
|
-
*/
|
|
19
|
-
token: string;
|
|
20
|
-
/**
|
|
21
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
22
|
-
*/
|
|
23
|
-
amount: number | string;
|
|
24
|
-
/**
|
|
25
|
-
* The destination address to receive the tokens.
|
|
26
|
-
*/
|
|
27
|
-
recipient: string;
|
|
28
|
-
};
|
|
29
|
-
/** @internal */
|
|
30
|
-
export type CreditTransferToAddressParamsAmount$Outbound = number | string;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const CreditTransferToAddressParamsAmount$outboundSchema: z.ZodType<CreditTransferToAddressParamsAmount$Outbound, z.ZodTypeDef, CreditTransferToAddressParamsAmount>;
|
|
33
|
-
export declare function creditTransferToAddressParamsAmountToJSON(creditTransferToAddressParamsAmount: CreditTransferToAddressParamsAmount): string;
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type CreditTransferToAddressParams$Outbound = {
|
|
36
|
-
action_type: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
37
|
-
token: string;
|
|
38
|
-
amount: number | string;
|
|
39
|
-
recipient: string;
|
|
40
|
-
};
|
|
41
|
-
/** @internal */
|
|
42
|
-
export declare const CreditTransferToAddressParams$outboundSchema: z.ZodType<CreditTransferToAddressParams$Outbound, z.ZodTypeDef, CreditTransferToAddressParams>;
|
|
43
|
-
export declare function creditTransferToAddressParamsToJSON(creditTransferToAddressParams: CreditTransferToAddressParams): string;
|
|
44
|
-
//# sourceMappingURL=credittransfertoaddressparams.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credittransfertoaddressparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/credittransfertoaddressparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,4BAA4B,CAAC;IACzC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,4CAA4C,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3E,gBAAgB;AAChB,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAAO,CACxE,4CAA4C,EAC5C,CAAC,CAAC,UAAU,EACZ,mCAAmC,CACA,CAAC;AAEtC,wBAAgB,yCAAyC,CACvD,mCAAmC,EAAE,mCAAmC,GACvE,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,WAAW,EAAE,4BAA4B,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAU7B,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.CreditTransferToAddressParams$outboundSchema = exports.CreditTransferToAddressParamsAmount$outboundSchema = void 0;
|
|
40
|
-
exports.creditTransferToAddressParamsAmountToJSON = creditTransferToAddressParamsAmountToJSON;
|
|
41
|
-
exports.creditTransferToAddressParamsToJSON = creditTransferToAddressParamsToJSON;
|
|
42
|
-
const z = __importStar(require("zod/v3"));
|
|
43
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.CreditTransferToAddressParamsAmount$outboundSchema = z.union([z.number(), z.string()]);
|
|
46
|
-
function creditTransferToAddressParamsAmountToJSON(creditTransferToAddressParamsAmount) {
|
|
47
|
-
return JSON.stringify(exports.CreditTransferToAddressParamsAmount$outboundSchema.parse(creditTransferToAddressParamsAmount));
|
|
48
|
-
}
|
|
49
|
-
/** @internal */
|
|
50
|
-
exports.CreditTransferToAddressParams$outboundSchema = z.object({
|
|
51
|
-
actionType: z.literal("CREDIT_TRANSFER_TO_ADDRESS"),
|
|
52
|
-
token: z.string(),
|
|
53
|
-
amount: z.union([z.number(), z.string()]),
|
|
54
|
-
recipient: z.string(),
|
|
55
|
-
}).transform((v) => {
|
|
56
|
-
return (0, primitives_js_1.remap)(v, {
|
|
57
|
-
actionType: "action_type",
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
function creditTransferToAddressParamsToJSON(creditTransferToAddressParams) {
|
|
61
|
-
return JSON.stringify(exports.CreditTransferToAddressParams$outboundSchema.parse(creditTransferToAddressParams));
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=credittransfertoaddressparams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credittransfertoaddressparams.js","sourceRoot":"","sources":["../../../../src/models/components/credittransfertoaddressparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CH,8FAQC;AA0BD,kFAQC;AApFD,0CAA4B;AAC5B,2DAA0D;AAkC1D,gBAAgB;AACH,QAAA,kDAAkD,GAI3D,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,yCAAyC,CACvD,mCAAwE;IAExE,OAAO,IAAI,CAAC,SAAS,CACnB,0DAAkD,CAAC,KAAK,CACtD,mCAAmC,CACpC,CACF,CAAC;AACJ,CAAC;AAUD,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,oDAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
/**
|
|
3
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
4
|
-
*/
|
|
5
|
-
export type CreditTransferToAddressParamsAmount = number | string;
|
|
6
|
-
/**
|
|
7
|
-
* Transfer tokens from Credit Account to an arbitrary address.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
*
|
|
11
|
-
* Requires all debt positions to be fully repaid (totalDebtBase == 0)
|
|
12
|
-
* before the transfer is allowed.
|
|
13
|
-
*/
|
|
14
|
-
export type CreditTransferToAddressParams = {
|
|
15
|
-
actionType: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
16
|
-
/**
|
|
17
|
-
* The ERC20 token to transfer from the Credit Account.
|
|
18
|
-
*/
|
|
19
|
-
token: string;
|
|
20
|
-
/**
|
|
21
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
22
|
-
*/
|
|
23
|
-
amount: number | string;
|
|
24
|
-
/**
|
|
25
|
-
* The destination address to receive the tokens.
|
|
26
|
-
*/
|
|
27
|
-
recipient: string;
|
|
28
|
-
};
|
|
29
|
-
/** @internal */
|
|
30
|
-
export type CreditTransferToAddressParamsAmount$Outbound = number | string;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const CreditTransferToAddressParamsAmount$outboundSchema: z.ZodType<CreditTransferToAddressParamsAmount$Outbound, z.ZodTypeDef, CreditTransferToAddressParamsAmount>;
|
|
33
|
-
export declare function creditTransferToAddressParamsAmountToJSON(creditTransferToAddressParamsAmount: CreditTransferToAddressParamsAmount): string;
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type CreditTransferToAddressParams$Outbound = {
|
|
36
|
-
action_type: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
37
|
-
token: string;
|
|
38
|
-
amount: number | string;
|
|
39
|
-
recipient: string;
|
|
40
|
-
};
|
|
41
|
-
/** @internal */
|
|
42
|
-
export declare const CreditTransferToAddressParams$outboundSchema: z.ZodType<CreditTransferToAddressParams$Outbound, z.ZodTypeDef, CreditTransferToAddressParams>;
|
|
43
|
-
export declare function creditTransferToAddressParamsToJSON(creditTransferToAddressParams: CreditTransferToAddressParams): string;
|
|
44
|
-
//# sourceMappingURL=credittransfertoaddressparams.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credittransfertoaddressparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/credittransfertoaddressparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,4BAA4B,CAAC;IACzC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,4CAA4C,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3E,gBAAgB;AAChB,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAAO,CACxE,4CAA4C,EAC5C,CAAC,CAAC,UAAU,EACZ,mCAAmC,CACA,CAAC;AAEtC,wBAAgB,yCAAyC,CACvD,mCAAmC,EAAE,mCAAmC,GACvE,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,WAAW,EAAE,4BAA4B,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAU7B,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v3";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
/** @internal */
|
|
7
|
-
export const CreditTransferToAddressParamsAmount$outboundSchema = z.union([z.number(), z.string()]);
|
|
8
|
-
export function creditTransferToAddressParamsAmountToJSON(creditTransferToAddressParamsAmount) {
|
|
9
|
-
return JSON.stringify(CreditTransferToAddressParamsAmount$outboundSchema.parse(creditTransferToAddressParamsAmount));
|
|
10
|
-
}
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const CreditTransferToAddressParams$outboundSchema = z.object({
|
|
13
|
-
actionType: z.literal("CREDIT_TRANSFER_TO_ADDRESS"),
|
|
14
|
-
token: z.string(),
|
|
15
|
-
amount: z.union([z.number(), z.string()]),
|
|
16
|
-
recipient: z.string(),
|
|
17
|
-
}).transform((v) => {
|
|
18
|
-
return remap$(v, {
|
|
19
|
-
actionType: "action_type",
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
export function creditTransferToAddressParamsToJSON(creditTransferToAddressParams) {
|
|
23
|
-
return JSON.stringify(CreditTransferToAddressParams$outboundSchema.parse(creditTransferToAddressParams));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=credittransfertoaddressparams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credittransfertoaddressparams.js","sourceRoot":"","sources":["../../../../src/models/components/credittransfertoaddressparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAkC1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,kDAAkD,GAI3D,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,MAAM,UAAU,yCAAyC,CACvD,mCAAwE;IAExE,OAAO,IAAI,CAAC,SAAS,CACnB,kDAAkD,CAAC,KAAK,CACtD,mCAAmC,CACpC,CACF,CAAC;AACJ,CAAC;AAUD,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,4CAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# CreditTransferToAddressParams
|
|
2
|
-
|
|
3
|
-
Transfer tokens from Credit Account to an arbitrary address.
|
|
4
|
-
|
|
5
|
-
Requires all debt positions to be fully repaid (totalDebtBase == 0)
|
|
6
|
-
before the transfer is allowed.
|
|
7
|
-
|
|
8
|
-
## Example Usage
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
import { CreditTransferToAddressParams } from "@compass-labs/api-sdk/models/components";
|
|
12
|
-
|
|
13
|
-
let value: CreditTransferToAddressParams = {
|
|
14
|
-
actionType: "CREDIT_TRANSFER_TO_ADDRESS",
|
|
15
|
-
token: "<value>",
|
|
16
|
-
amount: "686.76",
|
|
17
|
-
recipient: "<value>",
|
|
18
|
-
};
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Fields
|
|
22
|
-
|
|
23
|
-
| Field | Type | Required | Description | Example |
|
|
24
|
-
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
|
25
|
-
| `actionType` | *"CREDIT_TRANSFER_TO_ADDRESS"* | :heavy_check_mark: | N/A | CREDIT_TRANSFER_TO_ADDRESS |
|
|
26
|
-
| `token` | *string* | :heavy_check_mark: | The ERC20 token to transfer from the Credit Account. | |
|
|
27
|
-
| `amount` | *components.CreditTransferToAddressParamsAmount* | :heavy_check_mark: | The amount of tokens to transfer (in token units, not wei). | |
|
|
28
|
-
| `recipient` | *string* | :heavy_check_mark: | The destination address to receive the tokens. | |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditTransferToAddressParamsAmount
|
|
2
|
-
|
|
3
|
-
The amount of tokens to transfer (in token units, not wei).
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
10
|
-
*/
|
|
11
|
-
export type CreditTransferToAddressParamsAmount = number | string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Transfer tokens from Credit Account to an arbitrary address.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
*
|
|
18
|
-
* Requires all debt positions to be fully repaid (totalDebtBase == 0)
|
|
19
|
-
* before the transfer is allowed.
|
|
20
|
-
*/
|
|
21
|
-
export type CreditTransferToAddressParams = {
|
|
22
|
-
actionType: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
23
|
-
/**
|
|
24
|
-
* The ERC20 token to transfer from the Credit Account.
|
|
25
|
-
*/
|
|
26
|
-
token: string;
|
|
27
|
-
/**
|
|
28
|
-
* The amount of tokens to transfer (in token units, not wei).
|
|
29
|
-
*/
|
|
30
|
-
amount: number | string;
|
|
31
|
-
/**
|
|
32
|
-
* The destination address to receive the tokens.
|
|
33
|
-
*/
|
|
34
|
-
recipient: string;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export type CreditTransferToAddressParamsAmount$Outbound = number | string;
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const CreditTransferToAddressParamsAmount$outboundSchema: z.ZodType<
|
|
42
|
-
CreditTransferToAddressParamsAmount$Outbound,
|
|
43
|
-
z.ZodTypeDef,
|
|
44
|
-
CreditTransferToAddressParamsAmount
|
|
45
|
-
> = z.union([z.number(), z.string()]);
|
|
46
|
-
|
|
47
|
-
export function creditTransferToAddressParamsAmountToJSON(
|
|
48
|
-
creditTransferToAddressParamsAmount: CreditTransferToAddressParamsAmount,
|
|
49
|
-
): string {
|
|
50
|
-
return JSON.stringify(
|
|
51
|
-
CreditTransferToAddressParamsAmount$outboundSchema.parse(
|
|
52
|
-
creditTransferToAddressParamsAmount,
|
|
53
|
-
),
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** @internal */
|
|
58
|
-
export type CreditTransferToAddressParams$Outbound = {
|
|
59
|
-
action_type: "CREDIT_TRANSFER_TO_ADDRESS";
|
|
60
|
-
token: string;
|
|
61
|
-
amount: number | string;
|
|
62
|
-
recipient: string;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/** @internal */
|
|
66
|
-
export const CreditTransferToAddressParams$outboundSchema: z.ZodType<
|
|
67
|
-
CreditTransferToAddressParams$Outbound,
|
|
68
|
-
z.ZodTypeDef,
|
|
69
|
-
CreditTransferToAddressParams
|
|
70
|
-
> = z.object({
|
|
71
|
-
actionType: z.literal("CREDIT_TRANSFER_TO_ADDRESS"),
|
|
72
|
-
token: z.string(),
|
|
73
|
-
amount: z.union([z.number(), z.string()]),
|
|
74
|
-
recipient: z.string(),
|
|
75
|
-
}).transform((v) => {
|
|
76
|
-
return remap$(v, {
|
|
77
|
-
actionType: "action_type",
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export function creditTransferToAddressParamsToJSON(
|
|
82
|
-
creditTransferToAddressParams: CreditTransferToAddressParams,
|
|
83
|
-
): string {
|
|
84
|
-
return JSON.stringify(
|
|
85
|
-
CreditTransferToAddressParams$outboundSchema.parse(
|
|
86
|
-
creditTransferToAddressParams,
|
|
87
|
-
),
|
|
88
|
-
);
|
|
89
|
-
}
|