@portal-hq/web 3.7.0 → 3.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.
- package/hypernative.d.ts +39 -336
- package/lib/commonjs/mpc/index.js +188 -810
- package/lib/commonjs/shared/types/api.js +5 -0
- package/lib/commonjs/shared/types/common.js +5 -0
- package/lib/commonjs/shared/types/hypernative.js +2 -0
- package/lib/commonjs/shared/types/index.js +30 -0
- package/lib/commonjs/shared/types/lifi.js +5 -0
- package/lib/commonjs/shared/types/yieldxyz.js +2 -0
- package/lib/commonjs/shared/types/zero-x.js +2 -0
- package/lib/esm/mpc/index.js +188 -810
- package/lib/esm/shared/types/api.js +4 -0
- package/lib/esm/shared/types/common.js +4 -0
- package/lib/esm/shared/types/hypernative.js +1 -0
- package/lib/esm/shared/types/index.js +14 -0
- package/lib/esm/shared/types/lifi.js +4 -0
- package/lib/esm/shared/types/yieldxyz.js +1 -0
- package/lib/esm/shared/types/zero-x.js +1 -0
- package/lifi-types.d.ts +54 -1235
- package/package.json +10 -6
- package/src/index.ts +15 -12
- package/src/integrations/trading/lifi/index.ts +1 -1
- package/src/integrations/trading/zero-x/index.ts +1 -1
- package/src/integrations/yield/yieldxyz.ts +1 -1
- package/src/mpc/index.ts +202 -970
- package/src/shared/types/api.ts +171 -0
- package/src/shared/types/common.ts +681 -0
- package/src/shared/types/hypernative.ts +337 -0
- package/src/shared/types/index.ts +17 -0
- package/src/shared/types/lifi.ts +1236 -0
- package/src/shared/types/yieldxyz.ts +778 -0
- package/src/shared/types/zero-x.ts +204 -0
- package/types.d.ts +117 -704
- package/yieldxyz-types.d.ts +77 -777
- package/zero-x.d.ts +12 -204
package/zero-x.d.ts
CHANGED
|
@@ -1,204 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
excludedSources?: string
|
|
14
|
-
sellEntireBalance?: 'true' | 'false'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface ZeroExQuoteResponse {
|
|
18
|
-
data: {
|
|
19
|
-
rawResponse: {
|
|
20
|
-
message?: string
|
|
21
|
-
blockNumber: string
|
|
22
|
-
buyAmount: string
|
|
23
|
-
buyToken: string
|
|
24
|
-
fees: {
|
|
25
|
-
integratorFee: {
|
|
26
|
-
amount: string
|
|
27
|
-
token: string
|
|
28
|
-
type: string
|
|
29
|
-
} | null
|
|
30
|
-
zeroExFee: {
|
|
31
|
-
amount: string
|
|
32
|
-
token: string
|
|
33
|
-
type: string
|
|
34
|
-
} | null
|
|
35
|
-
gasFee: {
|
|
36
|
-
amount: string
|
|
37
|
-
token: string
|
|
38
|
-
type: string
|
|
39
|
-
} | null
|
|
40
|
-
}
|
|
41
|
-
issues: {
|
|
42
|
-
allowance: {
|
|
43
|
-
actual: string
|
|
44
|
-
spender: string
|
|
45
|
-
}
|
|
46
|
-
balance: {
|
|
47
|
-
token: string
|
|
48
|
-
actual: string
|
|
49
|
-
expected: string
|
|
50
|
-
}
|
|
51
|
-
simulationIncomplete: boolean
|
|
52
|
-
invalidSourcesPassed: any[]
|
|
53
|
-
}
|
|
54
|
-
liquidityAvailable: boolean
|
|
55
|
-
minBuyAmount: string
|
|
56
|
-
route: {
|
|
57
|
-
fills: {
|
|
58
|
-
from: string
|
|
59
|
-
to: string
|
|
60
|
-
source: string
|
|
61
|
-
proportionBps: string
|
|
62
|
-
}[]
|
|
63
|
-
tokens: { address: string; symbol: string }[]
|
|
64
|
-
}
|
|
65
|
-
sellAmount: string
|
|
66
|
-
sellToken: string
|
|
67
|
-
tokenMetadata: {
|
|
68
|
-
buyToken: {
|
|
69
|
-
buyTaxBps: string
|
|
70
|
-
sellTaxBps: string
|
|
71
|
-
}
|
|
72
|
-
sellToken: {
|
|
73
|
-
buyTaxBps: string
|
|
74
|
-
sellTaxBps: string
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
totalNetworkFee: string
|
|
78
|
-
transaction: {
|
|
79
|
-
to: string
|
|
80
|
-
data: string
|
|
81
|
-
gas: string
|
|
82
|
-
gasPrice: string
|
|
83
|
-
value: string
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
metadata: {
|
|
88
|
-
buyToken: string
|
|
89
|
-
sellToken: string
|
|
90
|
-
sellAmount: string
|
|
91
|
-
chainId: string
|
|
92
|
-
clientId: string
|
|
93
|
-
clientEip155Address: string
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface ZeroExSourcesRequest {
|
|
98
|
-
chainId: string
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface ZeroExSourcesResponse {
|
|
102
|
-
metadata: {
|
|
103
|
-
chainId: string
|
|
104
|
-
clientId: string
|
|
105
|
-
}
|
|
106
|
-
data: {
|
|
107
|
-
rawResponse: { sources: string[]; zid: string }
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface ZeroExPriceRequest {
|
|
112
|
-
chainId: string
|
|
113
|
-
buyToken: string
|
|
114
|
-
sellToken: string
|
|
115
|
-
sellAmount: string
|
|
116
|
-
txOrigin?: string
|
|
117
|
-
swapFeeRecipient?: string
|
|
118
|
-
swapFeeBps?: number
|
|
119
|
-
swapFeeToken?: string
|
|
120
|
-
tradeSurplusRecipient?: string
|
|
121
|
-
gasPrice?: string
|
|
122
|
-
slippageBps?: number
|
|
123
|
-
excludedSources?: string
|
|
124
|
-
sellEntireBalance?: 'true' | 'false'
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface ZeroExPriceResponse {
|
|
128
|
-
data: {
|
|
129
|
-
rawResponse: {
|
|
130
|
-
message?: string
|
|
131
|
-
blockNumber: string
|
|
132
|
-
buyAmount: string
|
|
133
|
-
buyToken: string
|
|
134
|
-
fees: {
|
|
135
|
-
integratorFee: {
|
|
136
|
-
amount: string
|
|
137
|
-
token: string
|
|
138
|
-
type: string
|
|
139
|
-
} | null
|
|
140
|
-
zeroExFee: {
|
|
141
|
-
amount: string
|
|
142
|
-
token: string
|
|
143
|
-
type: string
|
|
144
|
-
} | null
|
|
145
|
-
gasFee: {
|
|
146
|
-
amount: string
|
|
147
|
-
token: string
|
|
148
|
-
type: string
|
|
149
|
-
} | null
|
|
150
|
-
}
|
|
151
|
-
gas: string
|
|
152
|
-
gasPrice: string
|
|
153
|
-
issues: {
|
|
154
|
-
allowance: {
|
|
155
|
-
actual: string
|
|
156
|
-
spender: string
|
|
157
|
-
}
|
|
158
|
-
balance: {
|
|
159
|
-
token: string
|
|
160
|
-
actual: string
|
|
161
|
-
expected: string
|
|
162
|
-
}
|
|
163
|
-
simulationIncomplete: boolean
|
|
164
|
-
invalidSourcesPassed: any[]
|
|
165
|
-
}
|
|
166
|
-
liquidityAvailable: boolean
|
|
167
|
-
minBuyAmount: string
|
|
168
|
-
route: {
|
|
169
|
-
fills: {
|
|
170
|
-
from: string
|
|
171
|
-
to: string
|
|
172
|
-
source: string
|
|
173
|
-
proportionBps: string
|
|
174
|
-
}[]
|
|
175
|
-
tokens: { address: string; symbol: string }[]
|
|
176
|
-
}
|
|
177
|
-
sellAmount: string
|
|
178
|
-
sellToken: string
|
|
179
|
-
tokenMetadata: {
|
|
180
|
-
buyToken: {
|
|
181
|
-
buyTaxBps: string
|
|
182
|
-
sellTaxBps: string
|
|
183
|
-
}
|
|
184
|
-
sellToken: {
|
|
185
|
-
buyTaxBps: string
|
|
186
|
-
sellTaxBps: string
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
totalNetworkFee: string
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
metadata: {
|
|
193
|
-
buyToken: string
|
|
194
|
-
sellToken: string
|
|
195
|
-
sellAmount: string
|
|
196
|
-
chainId: string
|
|
197
|
-
clientId: string
|
|
198
|
-
clientEip155Address: string
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export interface ZeroExOptions {
|
|
203
|
-
zeroXApiKey?: string
|
|
204
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Re-export all ZeroEx types from shared types
|
|
3
|
+
*/
|
|
4
|
+
export type {
|
|
5
|
+
ZeroExQuoteRequest,
|
|
6
|
+
ZeroExQuoteResponse,
|
|
7
|
+
ZeroExSourcesRequest,
|
|
8
|
+
ZeroExSourcesResponse,
|
|
9
|
+
ZeroExPriceRequest,
|
|
10
|
+
ZeroExPriceResponse,
|
|
11
|
+
ZeroExOptions,
|
|
12
|
+
} from './src/shared/types/zero-x'
|