@berachain/graphql 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +17 -5
- package/dist/bend/whisk.codegen.cjs +424 -0
- package/dist/bend/whisk.codegen.d.cts +1798 -0
- package/dist/bend/whisk.codegen.d.ts +93 -1
- package/dist/bend/whisk.codegen.js +8 -8
- package/dist/chain/chain.codegen.cjs +12 -0
- package/dist/chain/chain.codegen.d.cts +376 -0
- package/dist/dex/api.codegen.cjs +199 -0
- package/dist/dex/api.codegen.d.cts +3836 -0
- package/dist/dex/subgraph.codegen.cjs +88 -0
- package/dist/dex/subgraph.codegen.d.cts +5887 -0
- package/dist/governance/governance.codegen.cjs +116 -0
- package/dist/governance/governance.codegen.d.cts +1622 -0
- package/dist/honey/honey.codegen.cjs +104 -0
- package/dist/honey/honey.codegen.d.cts +936 -0
- package/dist/pol/api.codegen.cjs +301 -0
- package/dist/pol/api.codegen.d.cts +3622 -0
- package/dist/pol/subgraph.codegen.cjs +197 -0
- package/dist/pol/subgraph.codegen.d.cts +4671 -0
- package/package.json +27 -23
package/README.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@berachain/graphql`
|
|
2
2
|
|
|
3
|
-
This package contains
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
3
|
+
This package contains queries and types for Berachain Native Dapps.
|
|
6
4
|
|
|
7
5
|
> This package is still unstable and might include breaking changes in minor and patch release.
|
|
8
6
|
|
|
9
|
-
Don't use this package unless you're from the Berachain team. API is unstable and will change till we reach version 1.0.
|
|
7
|
+
Don't use this package unless you're from the Berachain team. API is unstable and will change till we reach version 1.0.
|
|
8
|
+
|
|
9
|
+
## Development
|
|
10
|
+
|
|
11
|
+
The package is published as `@berachain/graphql`, however you'll find the package name locally as `@berachain/graphql-local`. This is because `pnpm` always prefers local packages if they match the version required by consumers, however we don't want this package to build on every dapp build. In order to publish the package with the public name, `prepublishOnly` and `postpublish` scripts take care of publishing the package without the `-local` suffix.
|
|
12
|
+
|
|
13
|
+
If you want to test locally (and without publishing) how changes to this package affect dapps, you can:
|
|
14
|
+
- rename the package without the `-local` suffix
|
|
15
|
+
- run `pnpm i` and build the package
|
|
16
|
+
- test your changes
|
|
17
|
+
- publish the package and update the version in `pnpm-workspace.yaml`
|
|
18
|
+
- add the `-local` suffix back to the package. A CI check will make sure we don't merge this otherwise.
|
|
19
|
+
|
|
20
|
+
This needs to be consumed as npm package from dapps and CI because the codegen script might fail due to request
|
|
21
|
+
errors on external APIs.
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _client = require('@apollo/client');var y=(n=>(n.Borrow="Borrow",n.Supply="Supply",n))(y||{}),m= exports.IdentityResolver =(r=>(r.Base="base",r.Ens="ens",r.Farcaster="farcaster",r.Lens="lens",r.Nns="nns",r.Uni="uni",r.World="world",r))(m||{}),d= exports.MerklAction =(n=>(n.Borrow="Borrow",n.Lend="Lend",n))(d||{}),c= exports.TokenCategory =(a=>(a.Btc="Btc",a.Eth="Eth",a.Stable="Stable",a))(c||{}),g= exports.VaultProtocol =(e=>(e.Enzyme="enzyme",e.EulerV2="euler_v2",e.Gearbox="gearbox",e.Lista="lista",e.Mellow="mellow",e.Midas="midas",e.Morpho="morpho",e.Napier="napier",e.Pendle="pendle",e.Reserve="reserve",e.Silo="silo",e.TurtleClub="turtle_club",e))(g||{}),A= exports.VaultType =(a=>(a.Index="index",a.Lending="lending",a.Staking="staking",a))(A||{}),s= exports.ChainInfoFragment =_client.gql`
|
|
2
|
+
fragment ChainInfoFragment on Chain {
|
|
3
|
+
id
|
|
4
|
+
name
|
|
5
|
+
icon
|
|
6
|
+
}
|
|
7
|
+
`,o= exports.TokenInfoFragment =_client.gql`
|
|
8
|
+
fragment TokenInfoFragment on Token {
|
|
9
|
+
address
|
|
10
|
+
symbol
|
|
11
|
+
decimals
|
|
12
|
+
icon
|
|
13
|
+
category
|
|
14
|
+
}
|
|
15
|
+
`,u= exports.CuratorInfoFragment =_client.gql`
|
|
16
|
+
fragment CuratorInfoFragment on Curator {
|
|
17
|
+
name
|
|
18
|
+
image
|
|
19
|
+
url
|
|
20
|
+
}
|
|
21
|
+
`,i= exports.ApyFragment =_client.gql`
|
|
22
|
+
fragment ApyFragment on Apy {
|
|
23
|
+
base
|
|
24
|
+
rewards {
|
|
25
|
+
asset {
|
|
26
|
+
...TokenInfoFragment
|
|
27
|
+
}
|
|
28
|
+
apr
|
|
29
|
+
}
|
|
30
|
+
total
|
|
31
|
+
fee
|
|
32
|
+
}
|
|
33
|
+
${o}`,p= exports.VaultSummaryFragment =_client.gql`
|
|
34
|
+
fragment VaultSummaryFragment on MorphoVault {
|
|
35
|
+
chain {
|
|
36
|
+
...ChainInfoFragment
|
|
37
|
+
}
|
|
38
|
+
vaultAddress
|
|
39
|
+
name
|
|
40
|
+
asset {
|
|
41
|
+
...TokenInfoFragment
|
|
42
|
+
priceUsd
|
|
43
|
+
}
|
|
44
|
+
metadata {
|
|
45
|
+
curators {
|
|
46
|
+
...CuratorInfoFragment
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
totalSupplied {
|
|
50
|
+
raw
|
|
51
|
+
formatted
|
|
52
|
+
usd
|
|
53
|
+
}
|
|
54
|
+
totalLiquidity {
|
|
55
|
+
raw
|
|
56
|
+
formatted
|
|
57
|
+
usd
|
|
58
|
+
}
|
|
59
|
+
supplyApy {
|
|
60
|
+
...ApyFragment
|
|
61
|
+
}
|
|
62
|
+
marketAllocations {
|
|
63
|
+
market {
|
|
64
|
+
collateralAsset {
|
|
65
|
+
...TokenInfoFragment
|
|
66
|
+
}
|
|
67
|
+
supplyApy {
|
|
68
|
+
...ApyFragment
|
|
69
|
+
}
|
|
70
|
+
fee {
|
|
71
|
+
raw
|
|
72
|
+
formatted
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
vaultSupplyShare
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
${s}
|
|
79
|
+
${o}
|
|
80
|
+
${u}
|
|
81
|
+
${i}`,l= exports.MarketSummaryFragment =_client.gql`
|
|
82
|
+
fragment MarketSummaryFragment on MorphoMarket {
|
|
83
|
+
chain {
|
|
84
|
+
...ChainInfoFragment
|
|
85
|
+
}
|
|
86
|
+
name
|
|
87
|
+
marketId
|
|
88
|
+
totalBorrowed {
|
|
89
|
+
raw
|
|
90
|
+
formatted
|
|
91
|
+
usd
|
|
92
|
+
}
|
|
93
|
+
totalSupplied {
|
|
94
|
+
raw
|
|
95
|
+
formatted
|
|
96
|
+
usd
|
|
97
|
+
}
|
|
98
|
+
liquidityInMarket {
|
|
99
|
+
raw
|
|
100
|
+
formatted
|
|
101
|
+
usd
|
|
102
|
+
}
|
|
103
|
+
publicAllocatorSharedLiquidity {
|
|
104
|
+
raw
|
|
105
|
+
formatted
|
|
106
|
+
usd
|
|
107
|
+
}
|
|
108
|
+
collateralAsset {
|
|
109
|
+
...TokenInfoFragment
|
|
110
|
+
}
|
|
111
|
+
loanAsset {
|
|
112
|
+
...TokenInfoFragment
|
|
113
|
+
}
|
|
114
|
+
lltv {
|
|
115
|
+
raw
|
|
116
|
+
formatted
|
|
117
|
+
}
|
|
118
|
+
borrowApy {
|
|
119
|
+
...ApyFragment
|
|
120
|
+
}
|
|
121
|
+
vaultAllocations {
|
|
122
|
+
vault {
|
|
123
|
+
vaultAddress
|
|
124
|
+
}
|
|
125
|
+
position {
|
|
126
|
+
supplyAmount {
|
|
127
|
+
usd
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
supplyCap {
|
|
131
|
+
usd
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
${s}
|
|
136
|
+
${o}
|
|
137
|
+
${i}`,h= exports.VaultSummaries =_client.gql`
|
|
138
|
+
query VaultSummaries($chainIds: [ChainId!]!, $vaultAddresses: [Address!]!) {
|
|
139
|
+
morphoVaults(
|
|
140
|
+
where: {chainId_in: $chainIds, vaultAddress_in: $vaultAddresses}
|
|
141
|
+
limit: 250
|
|
142
|
+
) {
|
|
143
|
+
pageInfo {
|
|
144
|
+
hasNextPage
|
|
145
|
+
}
|
|
146
|
+
items {
|
|
147
|
+
...VaultSummaryFragment
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
${p}`,k= exports.MarketSummaries =_client.gql`
|
|
152
|
+
query MarketSummaries($chainIds: [ChainId!]!, $marketIds: [Hex!]!) {
|
|
153
|
+
morphoMarkets(
|
|
154
|
+
where: {chainId_in: $chainIds, marketId_in: $marketIds}
|
|
155
|
+
limit: 250
|
|
156
|
+
) {
|
|
157
|
+
pageInfo {
|
|
158
|
+
hasNextPage
|
|
159
|
+
}
|
|
160
|
+
items {
|
|
161
|
+
...MarketSummaryFragment
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
${l}`,M= exports.Vault =_client.gql`
|
|
166
|
+
query Vault($chainId: ChainId!, $vaultAddress: Address!) {
|
|
167
|
+
morphoVaults(where: {chainId_in: [$chainId], vaultAddress_in: [$vaultAddress]}) {
|
|
168
|
+
items {
|
|
169
|
+
...VaultSummaryFragment
|
|
170
|
+
supplyApy1d {
|
|
171
|
+
total
|
|
172
|
+
}
|
|
173
|
+
supplyApy7d {
|
|
174
|
+
total
|
|
175
|
+
}
|
|
176
|
+
supplyApy30d {
|
|
177
|
+
total
|
|
178
|
+
}
|
|
179
|
+
asset {
|
|
180
|
+
priceUsd
|
|
181
|
+
}
|
|
182
|
+
totalSupplied {
|
|
183
|
+
raw
|
|
184
|
+
formatted
|
|
185
|
+
usd
|
|
186
|
+
}
|
|
187
|
+
totalLiquidity {
|
|
188
|
+
raw
|
|
189
|
+
formatted
|
|
190
|
+
usd
|
|
191
|
+
}
|
|
192
|
+
performanceFee
|
|
193
|
+
feeRecipientAddress
|
|
194
|
+
ownerAddress
|
|
195
|
+
curatorAddress
|
|
196
|
+
guardianAddress
|
|
197
|
+
marketAllocations {
|
|
198
|
+
market {
|
|
199
|
+
marketId
|
|
200
|
+
chain {
|
|
201
|
+
...ChainInfoFragment
|
|
202
|
+
}
|
|
203
|
+
isIdle
|
|
204
|
+
name
|
|
205
|
+
lltv {
|
|
206
|
+
raw
|
|
207
|
+
formatted
|
|
208
|
+
}
|
|
209
|
+
collateralAsset {
|
|
210
|
+
...TokenInfoFragment
|
|
211
|
+
}
|
|
212
|
+
loanAsset {
|
|
213
|
+
...TokenInfoFragment
|
|
214
|
+
}
|
|
215
|
+
supplyApy {
|
|
216
|
+
...ApyFragment
|
|
217
|
+
}
|
|
218
|
+
fee {
|
|
219
|
+
raw
|
|
220
|
+
formatted
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
enabled
|
|
224
|
+
position {
|
|
225
|
+
supplyAmount {
|
|
226
|
+
raw
|
|
227
|
+
formatted
|
|
228
|
+
usd
|
|
229
|
+
}
|
|
230
|
+
supplyShares
|
|
231
|
+
}
|
|
232
|
+
supplyCap {
|
|
233
|
+
raw
|
|
234
|
+
formatted
|
|
235
|
+
usd
|
|
236
|
+
}
|
|
237
|
+
vaultSupplyShare
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
${p}
|
|
243
|
+
${s}
|
|
244
|
+
${o}
|
|
245
|
+
${i}`,S= exports.Market =_client.gql`
|
|
246
|
+
query Market($chainId: ChainId!, $marketId: Hex!) {
|
|
247
|
+
morphoMarkets(where: {chainId_in: [$chainId], marketId_in: [$marketId]}) {
|
|
248
|
+
items {
|
|
249
|
+
...MarketSummaryFragment
|
|
250
|
+
isIdle
|
|
251
|
+
totalSupplied {
|
|
252
|
+
raw
|
|
253
|
+
formatted
|
|
254
|
+
usd
|
|
255
|
+
}
|
|
256
|
+
totalBorrowed {
|
|
257
|
+
raw
|
|
258
|
+
formatted
|
|
259
|
+
usd
|
|
260
|
+
}
|
|
261
|
+
liquidityInMarket {
|
|
262
|
+
raw
|
|
263
|
+
formatted
|
|
264
|
+
usd
|
|
265
|
+
}
|
|
266
|
+
publicAllocatorSharedLiquidity {
|
|
267
|
+
raw
|
|
268
|
+
formatted
|
|
269
|
+
usd
|
|
270
|
+
}
|
|
271
|
+
collateralAsset {
|
|
272
|
+
priceUsd
|
|
273
|
+
}
|
|
274
|
+
loanAsset {
|
|
275
|
+
priceUsd
|
|
276
|
+
}
|
|
277
|
+
vaultAllocations {
|
|
278
|
+
vault {
|
|
279
|
+
vaultAddress
|
|
280
|
+
name
|
|
281
|
+
curatorAddress
|
|
282
|
+
asset {
|
|
283
|
+
...TokenInfoFragment
|
|
284
|
+
}
|
|
285
|
+
chain {
|
|
286
|
+
...ChainInfoFragment
|
|
287
|
+
}
|
|
288
|
+
metadata {
|
|
289
|
+
curators {
|
|
290
|
+
...CuratorInfoFragment
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
enabled
|
|
295
|
+
position {
|
|
296
|
+
supplyAmount {
|
|
297
|
+
raw
|
|
298
|
+
formatted
|
|
299
|
+
usd
|
|
300
|
+
}
|
|
301
|
+
supplyShares
|
|
302
|
+
}
|
|
303
|
+
supplyCap {
|
|
304
|
+
raw
|
|
305
|
+
formatted
|
|
306
|
+
usd
|
|
307
|
+
}
|
|
308
|
+
marketSupplyShare
|
|
309
|
+
}
|
|
310
|
+
utilization
|
|
311
|
+
irm {
|
|
312
|
+
address
|
|
313
|
+
targetUtilization
|
|
314
|
+
curve {
|
|
315
|
+
utilization
|
|
316
|
+
supplyApy
|
|
317
|
+
borrowApy
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
liquidationPenalty
|
|
321
|
+
oracleAddress
|
|
322
|
+
collateralPriceInLoanAsset {
|
|
323
|
+
raw
|
|
324
|
+
formatted
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
${l}
|
|
330
|
+
${o}
|
|
331
|
+
${s}
|
|
332
|
+
${u}`,I= exports.VaultPositions =_client.gql`
|
|
333
|
+
query VaultPositions($chainIds: [ChainId!]!, $vaultAddresses: [Address!]!, $accountAddress: Address!) {
|
|
334
|
+
morphoVaultPositions(
|
|
335
|
+
where: {chainId_in: $chainIds, vaultAddress_in: $vaultAddresses, accountAddress_in: [$accountAddress]}
|
|
336
|
+
limit: 250
|
|
337
|
+
) {
|
|
338
|
+
items {
|
|
339
|
+
vault {
|
|
340
|
+
chain {
|
|
341
|
+
id
|
|
342
|
+
}
|
|
343
|
+
vaultAddress
|
|
344
|
+
}
|
|
345
|
+
supplyAmount {
|
|
346
|
+
raw
|
|
347
|
+
formatted
|
|
348
|
+
usd
|
|
349
|
+
}
|
|
350
|
+
walletUnderlyingAssetHolding {
|
|
351
|
+
balance {
|
|
352
|
+
raw
|
|
353
|
+
formatted
|
|
354
|
+
usd
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
`,x= exports.MarketPositions =_client.gql`
|
|
361
|
+
query MarketPositions($chainIds: [ChainId!]!, $marketIds: [Hex!]!, $accountAddress: Address!) {
|
|
362
|
+
morphoMarketPositions(
|
|
363
|
+
where: {chainId_in: $chainIds, marketId_in: $marketIds, accountAddress_in: [$accountAddress]}
|
|
364
|
+
limit: 250
|
|
365
|
+
) {
|
|
366
|
+
items {
|
|
367
|
+
market {
|
|
368
|
+
chain {
|
|
369
|
+
id
|
|
370
|
+
}
|
|
371
|
+
marketId
|
|
372
|
+
}
|
|
373
|
+
collateralAmount {
|
|
374
|
+
raw
|
|
375
|
+
formatted
|
|
376
|
+
usd
|
|
377
|
+
}
|
|
378
|
+
borrowAmount {
|
|
379
|
+
raw
|
|
380
|
+
formatted
|
|
381
|
+
usd
|
|
382
|
+
}
|
|
383
|
+
ltv {
|
|
384
|
+
formatted
|
|
385
|
+
}
|
|
386
|
+
walletLoanAssetHolding {
|
|
387
|
+
balance {
|
|
388
|
+
raw
|
|
389
|
+
formatted
|
|
390
|
+
usd
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
walletCollateralAssetHolding {
|
|
394
|
+
balance {
|
|
395
|
+
raw
|
|
396
|
+
formatted
|
|
397
|
+
usd
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
`,T= exports.SupportedMarketIds =_client.gql`
|
|
404
|
+
query SupportedMarketIds($chainIds: [ChainId!]!, $vaultAddresses: [Address!]!) {
|
|
405
|
+
morphoVaults(where: {chainId_in: $chainIds, vaultAddress_in: $vaultAddresses}) {
|
|
406
|
+
items {
|
|
407
|
+
chain {
|
|
408
|
+
id
|
|
409
|
+
}
|
|
410
|
+
marketAllocations {
|
|
411
|
+
market {
|
|
412
|
+
marketId
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
`,f= exports.GetAccountIsOfacSanctioned =_client.gql`
|
|
419
|
+
query getAccountIsOfacSanctioned($address: Address!) {
|
|
420
|
+
identity(address: $address) {
|
|
421
|
+
isOfacSanctioned
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
`,_={possibleTypes:{}},w= exports.default =_;exports.ApyFragment = i; exports.ApySide = y; exports.ChainInfoFragment = s; exports.CuratorInfoFragment = u; exports.GetAccountIsOfacSanctioned = f; exports.IdentityResolver = m; exports.Market = S; exports.MarketPositions = x; exports.MarketSummaries = k; exports.MarketSummaryFragment = l; exports.MerklAction = d; exports.SupportedMarketIds = T; exports.TokenCategory = c; exports.TokenInfoFragment = o; exports.Vault = M; exports.VaultPositions = I; exports.VaultProtocol = g; exports.VaultSummaries = h; exports.VaultSummaryFragment = p; exports.VaultType = A; exports.default = w;
|