@cowprotocol/cow-sdk 5.8.0-RC.9 → 5.8.0

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.
Files changed (56) hide show
  1. package/dist/common/consts.d.ts +1 -11
  2. package/dist/common/generated/factories/index.d.ts +0 -2
  3. package/dist/common/generated/index.d.ts +0 -4
  4. package/dist/composable/ConditionalOrderFactory.d.ts +10 -0
  5. package/dist/index-c004f2c4.js +29 -0
  6. package/dist/index-c004f2c4.js.map +1 -0
  7. package/dist/index.d.ts +0 -1
  8. package/dist/index.js +4 -4
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.modern.mjs +1 -1
  11. package/dist/index.module.js +4 -4
  12. package/dist/index.module.js.map +1 -1
  13. package/dist/order-signing/orderSigningUtils.d.ts +8 -18
  14. package/dist/order-signing/utils.d.ts +1 -11
  15. package/dist/package.json +5 -8
  16. package/dist/utils-2718e59e.js +2 -0
  17. package/dist/utils-2718e59e.js.map +1 -0
  18. package/dist/utils-353bb58e.js +2 -0
  19. package/dist/utils-353bb58e.js.map +1 -0
  20. package/dist/utils-61509987.js +2 -0
  21. package/dist/utils-61509987.js.map +1 -0
  22. package/package.json +5 -8
  23. package/dist/common/generated/EthFlow.d.ts +0 -117
  24. package/dist/common/generated/GPv2Settlement.d.ts +0 -107
  25. package/dist/common/generated/factories/EthFlow__factory.d.ts +0 -124
  26. package/dist/common/generated/factories/GPv2Settlement__factory.d.ts +0 -81
  27. package/dist/index-74c14a9c.js +0 -29
  28. package/dist/index-74c14a9c.js.map +0 -1
  29. package/dist/schemas/trading/LimitOrderAdvancedSettings.ts +0 -228
  30. package/dist/schemas/trading/LimitTradeParameters.ts +0 -106
  31. package/dist/schemas/trading/QuoteResultsSerialized.ts +0 -848
  32. package/dist/schemas/trading/QuoterParameters.ts +0 -31
  33. package/dist/schemas/trading/SwapAdvancedSettings.ts +0 -334
  34. package/dist/schemas/trading/TradeParameters.ts +0 -93
  35. package/dist/trading/appDataUtils.d.ts +0 -4
  36. package/dist/trading/calculateUniqueOrderId.d.ts +0 -6
  37. package/dist/trading/consts.d.ts +0 -8
  38. package/dist/trading/getEthFlowTransaction.d.ts +0 -7
  39. package/dist/trading/getOrderToSign.d.ts +0 -8
  40. package/dist/trading/getOrderTypedData.d.ts +0 -4
  41. package/dist/trading/getPreSignTransaction.d.ts +0 -4
  42. package/dist/trading/getQuote.d.ts +0 -14
  43. package/dist/trading/index.d.ts +0 -19
  44. package/dist/trading/postCoWProtocolTrade.d.ts +0 -4
  45. package/dist/trading/postLimitOrder.d.ts +0 -3
  46. package/dist/trading/postOnChainTrade.d.ts +0 -8
  47. package/dist/trading/postSwapOrder.d.ts +0 -4
  48. package/dist/trading/tradingSdk.d.ts +0 -11
  49. package/dist/trading/types.d.ts +0 -135
  50. package/dist/trading/utils.d.ts +0 -16
  51. package/dist/utils-04e08646.js +0 -2
  52. package/dist/utils-04e08646.js.map +0 -1
  53. package/dist/utils-2580613b.js +0 -2
  54. package/dist/utils-2580613b.js.map +0 -1
  55. package/dist/utils-402de186.js +0 -2
  56. package/dist/utils-402de186.js.map +0 -1
@@ -1,228 +0,0 @@
1
- export default {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "appData": {
6
- "type": "object",
7
- "properties": {
8
- "appCode": {
9
- "type": "string",
10
- "description": "The code identifying the CLI, UI, service generating the order."
11
- },
12
- "environment": {
13
- "type": "string",
14
- "description": "Environment from which the order came from."
15
- },
16
- "metadata": {
17
- "type": "object",
18
- "properties": {
19
- "signer": {
20
- "type": "string",
21
- "description": "The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures."
22
- },
23
- "referrer": {
24
- "type": "object",
25
- "properties": {
26
- "address": {
27
- "type": "string"
28
- }
29
- },
30
- "required": [
31
- "address"
32
- ],
33
- "additionalProperties": false
34
- },
35
- "utm": {
36
- "type": "object",
37
- "properties": {
38
- "utmSource": {
39
- "type": "string",
40
- "description": "Tracks in which medium the traffic originated from (twitter, facebook, etc.)"
41
- },
42
- "utmMedium": {
43
- "type": "string",
44
- "description": "Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"
45
- },
46
- "utmCampaign": {
47
- "type": "string",
48
- "description": "Track the performance of a specific campaign"
49
- },
50
- "utmContent": {
51
- "type": "string",
52
- "description": "Track which link was clicked"
53
- },
54
- "utmTerm": {
55
- "type": "string",
56
- "description": "Track which keyword term a website visitor came from"
57
- }
58
- },
59
- "additionalProperties": false
60
- },
61
- "quote": {
62
- "type": "object",
63
- "properties": {
64
- "slippageBips": {
65
- "type": "number",
66
- "description": "Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)"
67
- },
68
- "smartSlippage": {
69
- "type": "boolean",
70
- "description": "Whether the given slippageBips used is originated from a Smart slippage suggestion"
71
- }
72
- },
73
- "required": [
74
- "slippageBips"
75
- ],
76
- "additionalProperties": false
77
- },
78
- "orderClass": {
79
- "type": "object",
80
- "properties": {
81
- "orderClass": {
82
- "type": "string",
83
- "enum": [
84
- "market",
85
- "limit",
86
- "liquidity",
87
- "twap"
88
- ],
89
- "description": "Indicator of the order class."
90
- }
91
- },
92
- "required": [
93
- "orderClass"
94
- ],
95
- "additionalProperties": false
96
- },
97
- "hooks": {
98
- "type": "object",
99
- "properties": {
100
- "version": {
101
- "type": "string",
102
- "description": "Semantic versioning of document."
103
- },
104
- "pre": {
105
- "type": "array",
106
- "items": {
107
- "type": "object",
108
- "properties": {
109
- "target": {
110
- "type": "string",
111
- "description": "The contract to call for the hook"
112
- },
113
- "callData": {
114
- "type": "string",
115
- "description": "The calldata to use when calling the hook"
116
- },
117
- "gasLimit": {
118
- "type": "string",
119
- "description": "The gas limit (in gas units) for the hook"
120
- },
121
- "dappId": {
122
- "type": "string",
123
- "description": "CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."
124
- }
125
- },
126
- "required": [
127
- "target",
128
- "callData",
129
- "gasLimit"
130
- ],
131
- "additionalProperties": false
132
- },
133
- "description": "CoW Hooks to call before an order executes"
134
- },
135
- "post": {
136
- "type": "array",
137
- "items": {
138
- "type": "object",
139
- "properties": {
140
- "target": {
141
- "type": "string",
142
- "description": "The contract to call for the hook"
143
- },
144
- "callData": {
145
- "type": "string",
146
- "description": "The calldata to use when calling the hook"
147
- },
148
- "gasLimit": {
149
- "type": "string",
150
- "description": "The gas limit (in gas units) for the hook"
151
- },
152
- "dappId": {
153
- "type": "string",
154
- "description": "CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."
155
- }
156
- },
157
- "required": [
158
- "target",
159
- "callData",
160
- "gasLimit"
161
- ],
162
- "additionalProperties": false
163
- },
164
- "description": "CoW Hooks to call after an order executes"
165
- }
166
- },
167
- "additionalProperties": false,
168
- "description": "Optional Pre and Post order interaction hooks attached to a single order"
169
- },
170
- "widget": {
171
- "type": "object",
172
- "properties": {
173
- "appCode": {
174
- "type": "string",
175
- "description": "The code identifying the UI powering the widget"
176
- },
177
- "environment": {
178
- "type": "string",
179
- "description": "Environment from which the order came from."
180
- }
181
- },
182
- "required": [
183
- "appCode"
184
- ],
185
- "additionalProperties": false
186
- },
187
- "partnerFee": {
188
- "type": "object",
189
- "properties": {
190
- "bps": {
191
- "type": "number",
192
- "description": "The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)"
193
- },
194
- "recipient": {
195
- "type": "string",
196
- "description": "The Ethereum address of the partner to receive the fee."
197
- }
198
- },
199
- "required": [
200
- "bps",
201
- "recipient"
202
- ],
203
- "additionalProperties": false
204
- },
205
- "replacedOrder": {
206
- "type": "object",
207
- "properties": {
208
- "uid": {
209
- "type": "string",
210
- "description": "The replaced order UID."
211
- }
212
- },
213
- "required": [
214
- "uid"
215
- ],
216
- "additionalProperties": false
217
- }
218
- },
219
- "additionalProperties": false,
220
- "description": "Each metadata will specify one aspect of the order."
221
- }
222
- },
223
- "additionalProperties": false
224
- }
225
- },
226
- "additionalProperties": false,
227
- "definitions": {}
228
- } as const
@@ -1,106 +0,0 @@
1
- export default {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "kind": {
6
- "type": "string",
7
- "enum": [
8
- "buy",
9
- "sell"
10
- ],
11
- "description": "Is this order a buy or sell?"
12
- },
13
- "sellToken": {
14
- "type": "string",
15
- "description": "ERC-20 token to be sold."
16
- },
17
- "sellTokenDecimals": {
18
- "type": "number"
19
- },
20
- "buyToken": {
21
- "type": "string",
22
- "description": "ERC-20 token to be bought."
23
- },
24
- "buyTokenDecimals": {
25
- "type": "number"
26
- },
27
- "env": {
28
- "type": "string",
29
- "enum": [
30
- "prod",
31
- "staging"
32
- ],
33
- "description": "The environment to use for the Cow API."
34
- },
35
- "partiallyFillable": {
36
- "type": "boolean",
37
- "description": "Is the order fill-or-kill or partially fillable?"
38
- },
39
- "slippageBps": {
40
- "type": "number",
41
- "description": "Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)"
42
- },
43
- "receiver": {
44
- "anyOf": [
45
- {
46
- "type": "string",
47
- "description": "20 byte Ethereum address encoded as a hex with `0x` prefix."
48
- },
49
- {
50
- "type": "null"
51
- }
52
- ],
53
- "description": "An optional Ethereum address to receive the proceeds of the trade instead of the owner (i.e. the order signer)."
54
- },
55
- "validFor": {
56
- "type": "number",
57
- "description": "Unix timestamp (`uint32`) until which the order is valid."
58
- },
59
- "partnerFee": {
60
- "type": "object",
61
- "properties": {
62
- "bps": {
63
- "type": "number",
64
- "description": "The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)"
65
- },
66
- "recipient": {
67
- "type": "string",
68
- "description": "The Ethereum address of the partner to receive the fee."
69
- }
70
- },
71
- "required": [
72
- "bps",
73
- "recipient"
74
- ],
75
- "additionalProperties": false
76
- },
77
- "sellAmount": {
78
- "type": "string",
79
- "description": "Amount of `sellToken` to be sold in atoms."
80
- },
81
- "buyAmount": {
82
- "type": "string",
83
- "description": "Amount of `buyToken` to be bought in atoms."
84
- },
85
- "quoteId": {
86
- "type": "number",
87
- "description": "Id of the quote to be used for the limit order."
88
- },
89
- "validTo": {
90
- "type": "number",
91
- "description": "Unix timestamp (`uint32`) until which the order is valid."
92
- }
93
- },
94
- "required": [
95
- "buyAmount",
96
- "buyToken",
97
- "buyTokenDecimals",
98
- "kind",
99
- "quoteId",
100
- "sellAmount",
101
- "sellToken",
102
- "sellTokenDecimals"
103
- ],
104
- "additionalProperties": false,
105
- "definitions": {}
106
- } as const