@oddmaki-protocol/sdk 1.6.0 → 1.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/dist/index.d.mts +67 -3
- package/dist/index.d.ts +67 -3
- package/dist/index.js +423 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +412 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseEther, formatEther, stringToHex, erc20Abi, custom, http, createPublicClient, createWalletClient } from 'viem';
|
|
2
2
|
import { base, baseSepolia } from 'viem/chains';
|
|
3
3
|
import { gql, GraphQLClient } from 'graphql-request';
|
|
4
|
+
export { ClientError, GraphQLClient, gql } from 'graphql-request';
|
|
4
5
|
|
|
5
6
|
// src/client.ts
|
|
6
7
|
var CONTRACT_ADDRESSES = {
|
|
@@ -9288,9 +9289,14 @@ var GET_UNIFIED_MARKET_FEED = gql`
|
|
|
9288
9289
|
$first: Int = 50
|
|
9289
9290
|
$skip: Int = 0
|
|
9290
9291
|
) {
|
|
9291
|
-
# Standalone binary markets (not in groups)
|
|
9292
|
+
# Standalone binary markets (not in groups, not part of a price series)
|
|
9292
9293
|
standaloneMarkets: markets(
|
|
9293
|
-
where: {
|
|
9294
|
+
where: {
|
|
9295
|
+
groupId: "0"
|
|
9296
|
+
venue_: { venueId: $venueId }
|
|
9297
|
+
status_not: "Draft"
|
|
9298
|
+
priceSeries: null
|
|
9299
|
+
}
|
|
9294
9300
|
first: $first
|
|
9295
9301
|
skip: $skip
|
|
9296
9302
|
orderBy: createdAt
|
|
@@ -9385,6 +9391,62 @@ var GET_UNIFIED_MARKET_FEED = gql`
|
|
|
9385
9391
|
}
|
|
9386
9392
|
}
|
|
9387
9393
|
}
|
|
9394
|
+
|
|
9395
|
+
# Price market series — one row per (venue, seriesKey)
|
|
9396
|
+
priceMarketSeries(
|
|
9397
|
+
where: { venue_: { venueId: $venueId }, status_not: "Resolved" }
|
|
9398
|
+
first: $first
|
|
9399
|
+
skip: $skip
|
|
9400
|
+
orderBy: updatedAt
|
|
9401
|
+
orderDirection: desc
|
|
9402
|
+
) {
|
|
9403
|
+
id
|
|
9404
|
+
seriesKey
|
|
9405
|
+
asset
|
|
9406
|
+
kind
|
|
9407
|
+
interval
|
|
9408
|
+
intervalSeconds
|
|
9409
|
+
status
|
|
9410
|
+
tags
|
|
9411
|
+
createdAt
|
|
9412
|
+
updatedAt
|
|
9413
|
+
currentMarket {
|
|
9414
|
+
id
|
|
9415
|
+
marketId
|
|
9416
|
+
question
|
|
9417
|
+
outcomes
|
|
9418
|
+
status
|
|
9419
|
+
collateralToken
|
|
9420
|
+
conditionId
|
|
9421
|
+
tickSize
|
|
9422
|
+
lastPriceTick_0
|
|
9423
|
+
lastPriceTick_1
|
|
9424
|
+
lastTradeTimestamp
|
|
9425
|
+
lastTradeTimestamp_0
|
|
9426
|
+
lastTradeTimestamp_1
|
|
9427
|
+
topOfBook {
|
|
9428
|
+
outcome
|
|
9429
|
+
side
|
|
9430
|
+
topTick
|
|
9431
|
+
}
|
|
9432
|
+
totalVolume
|
|
9433
|
+
metadataURI
|
|
9434
|
+
createdAt
|
|
9435
|
+
priceMarket {
|
|
9436
|
+
provider
|
|
9437
|
+
feedId
|
|
9438
|
+
strikePrice
|
|
9439
|
+
priceExpo
|
|
9440
|
+
openTime
|
|
9441
|
+
closeTime
|
|
9442
|
+
}
|
|
9443
|
+
}
|
|
9444
|
+
venue {
|
|
9445
|
+
id
|
|
9446
|
+
venueId
|
|
9447
|
+
name
|
|
9448
|
+
}
|
|
9449
|
+
}
|
|
9388
9450
|
}
|
|
9389
9451
|
`;
|
|
9390
9452
|
var GET_UNIFIED_MARKET_FEED_BY_VOLUME = gql`
|
|
@@ -9393,9 +9455,14 @@ var GET_UNIFIED_MARKET_FEED_BY_VOLUME = gql`
|
|
|
9393
9455
|
$first: Int = 50
|
|
9394
9456
|
$skip: Int = 0
|
|
9395
9457
|
) {
|
|
9396
|
-
# Standalone binary markets sorted by volume
|
|
9458
|
+
# Standalone binary markets sorted by volume (excluding price series members)
|
|
9397
9459
|
standaloneMarkets: markets(
|
|
9398
|
-
where: {
|
|
9460
|
+
where: {
|
|
9461
|
+
groupId: "0"
|
|
9462
|
+
venue_: { venueId: $venueId }
|
|
9463
|
+
status_not: "Draft"
|
|
9464
|
+
priceSeries: null
|
|
9465
|
+
}
|
|
9399
9466
|
first: $first
|
|
9400
9467
|
skip: $skip
|
|
9401
9468
|
orderBy: totalVolume
|
|
@@ -9477,13 +9544,68 @@ var GET_UNIFIED_MARKET_FEED_BY_VOLUME = gql`
|
|
|
9477
9544
|
}
|
|
9478
9545
|
}
|
|
9479
9546
|
}
|
|
9547
|
+
|
|
9548
|
+
# Price market series — venue-scoped, only those with an active current market
|
|
9549
|
+
priceMarketSeries(
|
|
9550
|
+
where: { venue_: { venueId: $venueId }, status_not: "Resolved" }
|
|
9551
|
+
first: $first
|
|
9552
|
+
skip: $skip
|
|
9553
|
+
orderBy: updatedAt
|
|
9554
|
+
orderDirection: desc
|
|
9555
|
+
) {
|
|
9556
|
+
id
|
|
9557
|
+
seriesKey
|
|
9558
|
+
asset
|
|
9559
|
+
kind
|
|
9560
|
+
interval
|
|
9561
|
+
intervalSeconds
|
|
9562
|
+
status
|
|
9563
|
+
tags
|
|
9564
|
+
createdAt
|
|
9565
|
+
updatedAt
|
|
9566
|
+
currentMarket {
|
|
9567
|
+
id
|
|
9568
|
+
marketId
|
|
9569
|
+
question
|
|
9570
|
+
outcomes
|
|
9571
|
+
status
|
|
9572
|
+
collateralToken
|
|
9573
|
+
tickSize
|
|
9574
|
+
lastPriceTick_0
|
|
9575
|
+
lastPriceTick_1
|
|
9576
|
+
lastTradeTimestamp
|
|
9577
|
+
lastTradeTimestamp_0
|
|
9578
|
+
lastTradeTimestamp_1
|
|
9579
|
+
topOfBook {
|
|
9580
|
+
outcome
|
|
9581
|
+
side
|
|
9582
|
+
topTick
|
|
9583
|
+
}
|
|
9584
|
+
totalVolume
|
|
9585
|
+
metadataURI
|
|
9586
|
+
createdAt
|
|
9587
|
+
priceMarket {
|
|
9588
|
+
provider
|
|
9589
|
+
feedId
|
|
9590
|
+
strikePrice
|
|
9591
|
+
priceExpo
|
|
9592
|
+
openTime
|
|
9593
|
+
closeTime
|
|
9594
|
+
}
|
|
9595
|
+
}
|
|
9596
|
+
venue {
|
|
9597
|
+
id
|
|
9598
|
+
venueId
|
|
9599
|
+
name
|
|
9600
|
+
}
|
|
9601
|
+
}
|
|
9480
9602
|
}
|
|
9481
9603
|
`;
|
|
9482
9604
|
var GET_ALL_MARKETS_FEED = gql`
|
|
9483
9605
|
query GetAllMarketsFeed($first: Int = 50, $skip: Int = 0) {
|
|
9484
|
-
# Standalone binary markets (not in groups)
|
|
9606
|
+
# Standalone binary markets (not in groups, not part of a price series)
|
|
9485
9607
|
standaloneMarkets: markets(
|
|
9486
|
-
where: { groupId: "0", status_not: "Draft" }
|
|
9608
|
+
where: { groupId: "0", status_not: "Draft", priceSeries: null }
|
|
9487
9609
|
first: $first
|
|
9488
9610
|
skip: $skip
|
|
9489
9611
|
orderBy: createdAt
|
|
@@ -9572,12 +9694,64 @@ var GET_ALL_MARKETS_FEED = gql`
|
|
|
9572
9694
|
}
|
|
9573
9695
|
}
|
|
9574
9696
|
}
|
|
9697
|
+
|
|
9698
|
+
# Price market series across all venues
|
|
9699
|
+
priceMarketSeries(
|
|
9700
|
+
where: { status_not: "Resolved" }
|
|
9701
|
+
first: $first
|
|
9702
|
+
skip: $skip
|
|
9703
|
+
orderBy: updatedAt
|
|
9704
|
+
orderDirection: desc
|
|
9705
|
+
) {
|
|
9706
|
+
id
|
|
9707
|
+
seriesKey
|
|
9708
|
+
asset
|
|
9709
|
+
kind
|
|
9710
|
+
interval
|
|
9711
|
+
intervalSeconds
|
|
9712
|
+
status
|
|
9713
|
+
tags
|
|
9714
|
+
createdAt
|
|
9715
|
+
updatedAt
|
|
9716
|
+
currentMarket {
|
|
9717
|
+
id
|
|
9718
|
+
marketId
|
|
9719
|
+
question
|
|
9720
|
+
outcomes
|
|
9721
|
+
status
|
|
9722
|
+
collateralToken
|
|
9723
|
+
tickSize
|
|
9724
|
+
lastPriceTick_0
|
|
9725
|
+
lastPriceTick_1
|
|
9726
|
+
lastTradeTimestamp
|
|
9727
|
+
topOfBook {
|
|
9728
|
+
outcome
|
|
9729
|
+
side
|
|
9730
|
+
topTick
|
|
9731
|
+
}
|
|
9732
|
+
totalVolume
|
|
9733
|
+
createdAt
|
|
9734
|
+
priceMarket {
|
|
9735
|
+
provider
|
|
9736
|
+
feedId
|
|
9737
|
+
strikePrice
|
|
9738
|
+
priceExpo
|
|
9739
|
+
openTime
|
|
9740
|
+
closeTime
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
venue {
|
|
9744
|
+
id
|
|
9745
|
+
venueId
|
|
9746
|
+
name
|
|
9747
|
+
}
|
|
9748
|
+
}
|
|
9575
9749
|
}
|
|
9576
9750
|
`;
|
|
9577
9751
|
var GET_ALL_MARKETS_FEED_BY_VOLUME = gql`
|
|
9578
9752
|
query GetAllMarketsFeedByVolume($first: Int = 50, $skip: Int = 0) {
|
|
9579
9753
|
standaloneMarkets: markets(
|
|
9580
|
-
where: { groupId: "0", status_not: "Draft" }
|
|
9754
|
+
where: { groupId: "0", status_not: "Draft", priceSeries: null }
|
|
9581
9755
|
first: $first
|
|
9582
9756
|
skip: $skip
|
|
9583
9757
|
orderBy: totalVolume
|
|
@@ -9661,6 +9835,102 @@ var GET_ALL_MARKETS_FEED_BY_VOLUME = gql`
|
|
|
9661
9835
|
}
|
|
9662
9836
|
}
|
|
9663
9837
|
}
|
|
9838
|
+
|
|
9839
|
+
# Price market series across all venues, sorted by volume of current market
|
|
9840
|
+
priceMarketSeries(
|
|
9841
|
+
where: { status_not: "Resolved" }
|
|
9842
|
+
first: $first
|
|
9843
|
+
skip: $skip
|
|
9844
|
+
orderBy: updatedAt
|
|
9845
|
+
orderDirection: desc
|
|
9846
|
+
) {
|
|
9847
|
+
id
|
|
9848
|
+
seriesKey
|
|
9849
|
+
asset
|
|
9850
|
+
kind
|
|
9851
|
+
interval
|
|
9852
|
+
intervalSeconds
|
|
9853
|
+
status
|
|
9854
|
+
tags
|
|
9855
|
+
createdAt
|
|
9856
|
+
updatedAt
|
|
9857
|
+
currentMarket {
|
|
9858
|
+
id
|
|
9859
|
+
marketId
|
|
9860
|
+
question
|
|
9861
|
+
outcomes
|
|
9862
|
+
status
|
|
9863
|
+
collateralToken
|
|
9864
|
+
tickSize
|
|
9865
|
+
lastPriceTick_0
|
|
9866
|
+
lastPriceTick_1
|
|
9867
|
+
lastTradeTimestamp
|
|
9868
|
+
topOfBook {
|
|
9869
|
+
outcome
|
|
9870
|
+
side
|
|
9871
|
+
topTick
|
|
9872
|
+
}
|
|
9873
|
+
totalVolume
|
|
9874
|
+
createdAt
|
|
9875
|
+
priceMarket {
|
|
9876
|
+
provider
|
|
9877
|
+
feedId
|
|
9878
|
+
strikePrice
|
|
9879
|
+
priceExpo
|
|
9880
|
+
openTime
|
|
9881
|
+
closeTime
|
|
9882
|
+
}
|
|
9883
|
+
}
|
|
9884
|
+
venue {
|
|
9885
|
+
id
|
|
9886
|
+
venueId
|
|
9887
|
+
name
|
|
9888
|
+
}
|
|
9889
|
+
}
|
|
9890
|
+
}
|
|
9891
|
+
`;
|
|
9892
|
+
var GET_PRICE_MARKET_SERIES = gql`
|
|
9893
|
+
query GetPriceMarketSeries($venueId: BigInt!, $seriesKey: String!) {
|
|
9894
|
+
priceMarketSeries(
|
|
9895
|
+
where: { venue_: { venueId: $venueId }, seriesKey: $seriesKey }
|
|
9896
|
+
first: 1
|
|
9897
|
+
) {
|
|
9898
|
+
id
|
|
9899
|
+
seriesKey
|
|
9900
|
+
asset
|
|
9901
|
+
kind
|
|
9902
|
+
interval
|
|
9903
|
+
intervalSeconds
|
|
9904
|
+
status
|
|
9905
|
+
tags
|
|
9906
|
+
createdAt
|
|
9907
|
+
updatedAt
|
|
9908
|
+
currentMarket {
|
|
9909
|
+
id
|
|
9910
|
+
marketId
|
|
9911
|
+
}
|
|
9912
|
+
venue {
|
|
9913
|
+
id
|
|
9914
|
+
venueId
|
|
9915
|
+
name
|
|
9916
|
+
}
|
|
9917
|
+
markets {
|
|
9918
|
+
id
|
|
9919
|
+
marketId
|
|
9920
|
+
question
|
|
9921
|
+
status
|
|
9922
|
+
resolvedOutcome
|
|
9923
|
+
outcomes
|
|
9924
|
+
priceMarket {
|
|
9925
|
+
openTime
|
|
9926
|
+
closeTime
|
|
9927
|
+
resolved
|
|
9928
|
+
outcome
|
|
9929
|
+
finalPrice
|
|
9930
|
+
strikePrice
|
|
9931
|
+
}
|
|
9932
|
+
}
|
|
9933
|
+
}
|
|
9664
9934
|
}
|
|
9665
9935
|
`;
|
|
9666
9936
|
var GET_RECENT_TRADES = gql`
|
|
@@ -10106,7 +10376,8 @@ var PublicModule = class extends BaseModule {
|
|
|
10106
10376
|
}
|
|
10107
10377
|
/**
|
|
10108
10378
|
* Merge and sort unified feed results
|
|
10109
|
-
* Combines standaloneMarkets and
|
|
10379
|
+
* Combines standaloneMarkets, marketGroups, and priceMarketSeries into a single sorted array.
|
|
10380
|
+
* Each row in the merged feed carries a `type` discriminator: 'standalone' | 'group' | 'series'.
|
|
10110
10381
|
*/
|
|
10111
10382
|
mergeAndSortFeed(feedData, sortBy = "created", limit) {
|
|
10112
10383
|
const standalone = (feedData.standaloneMarkets || []).map((m) => ({
|
|
@@ -10126,11 +10397,49 @@ var PublicModule = class extends BaseModule {
|
|
|
10126
10397
|
sortValue: sortBy === "volume" ? totalVolume : BigInt(g.createdAt || "0")
|
|
10127
10398
|
};
|
|
10128
10399
|
});
|
|
10129
|
-
const
|
|
10400
|
+
const series = (feedData.priceMarketSeries || []).map((s) => ({
|
|
10401
|
+
...s,
|
|
10402
|
+
type: "series",
|
|
10403
|
+
sortValue: sortBy === "volume" ? BigInt(s.currentMarket?.totalVolume || "0") : BigInt(s.updatedAt || s.createdAt || "0")
|
|
10404
|
+
}));
|
|
10405
|
+
const merged = [...standalone, ...groups, ...series].sort((a, b) => {
|
|
10130
10406
|
return a.sortValue > b.sortValue ? -1 : 1;
|
|
10131
10407
|
});
|
|
10132
10408
|
return limit ? merged.slice(0, limit) : merged;
|
|
10133
10409
|
}
|
|
10410
|
+
/**
|
|
10411
|
+
* Get a PriceMarketSeries with all its member markets.
|
|
10412
|
+
*
|
|
10413
|
+
* Used by the market detail page to render the time-button navigation strip
|
|
10414
|
+
* showing past, current, and upcoming windows for the same asset+interval.
|
|
10415
|
+
*
|
|
10416
|
+
* @param params.venueId - Venue the series belongs to
|
|
10417
|
+
* @param params.seriesKey - Series key, e.g. "btc-updown-5m"
|
|
10418
|
+
* @returns The series with `markets` array, or null if not found
|
|
10419
|
+
*/
|
|
10420
|
+
async getPriceMarketSeries(params) {
|
|
10421
|
+
const response = await this.subgraph.request(GET_PRICE_MARKET_SERIES, {
|
|
10422
|
+
venueId: params.venueId.toString(),
|
|
10423
|
+
seriesKey: params.seriesKey
|
|
10424
|
+
});
|
|
10425
|
+
return response.priceMarketSeries?.[0] || null;
|
|
10426
|
+
}
|
|
10427
|
+
/**
|
|
10428
|
+
* Helper: extract the seriesKey from a market's tags.
|
|
10429
|
+
*
|
|
10430
|
+
* A market belongs to a price series iff its tags contain both "price-market"
|
|
10431
|
+
* and a "series:<key>" tag. Returns the key (without prefix) or null.
|
|
10432
|
+
*/
|
|
10433
|
+
extractSeriesKey(tags) {
|
|
10434
|
+
if (!tags) return null;
|
|
10435
|
+
let hasPriceMarketTag = false;
|
|
10436
|
+
let seriesKey = null;
|
|
10437
|
+
for (const t of tags) {
|
|
10438
|
+
if (t === "price-market") hasPriceMarketTag = true;
|
|
10439
|
+
else if (t.startsWith("series:")) seriesKey = t.slice("series:".length);
|
|
10440
|
+
}
|
|
10441
|
+
return hasPriceMarketTag ? seriesKey : null;
|
|
10442
|
+
}
|
|
10134
10443
|
/**
|
|
10135
10444
|
* Calculate probability for a market using mark price waterfall.
|
|
10136
10445
|
* Returns probability as a decimal string (e.g., "0.65" for 65%)
|
|
@@ -10288,7 +10597,100 @@ var PublicModule = class extends BaseModule {
|
|
|
10288
10597
|
first: params.first || 20
|
|
10289
10598
|
});
|
|
10290
10599
|
}
|
|
10600
|
+
// ============================================
|
|
10601
|
+
// Raw subgraph access
|
|
10602
|
+
// ============================================
|
|
10603
|
+
/**
|
|
10604
|
+
* Run an arbitrary GraphQL query against the same subgraph endpoint the SDK
|
|
10605
|
+
* uses. Lets external services (e.g. cron workers) share the SDK's
|
|
10606
|
+
* subgraph connection without instantiating their own GraphQLClient.
|
|
10607
|
+
*/
|
|
10608
|
+
async raw(query, variables) {
|
|
10609
|
+
return this.subgraph.request(query, variables);
|
|
10610
|
+
}
|
|
10611
|
+
// ============================================
|
|
10612
|
+
// Price Markets
|
|
10613
|
+
// ============================================
|
|
10614
|
+
/**
|
|
10615
|
+
* Find an unresolved PriceMarket matching (feedId, closeTime) created by
|
|
10616
|
+
* `creator`. Returns null when no match exists. Used as a create-idempotency
|
|
10617
|
+
* check by price-market bots before submitting a new market.
|
|
10618
|
+
*/
|
|
10619
|
+
async findPriceMarketByFeedAndCloseTime(params) {
|
|
10620
|
+
const data = await this.subgraph.request(FIND_PRICE_MARKET_BY_FEED_AND_CLOSE_TIME, {
|
|
10621
|
+
feedId: params.pythFeedId.toLowerCase(),
|
|
10622
|
+
closeTime: params.closeTime.toString(),
|
|
10623
|
+
creator: params.creator.toLowerCase()
|
|
10624
|
+
});
|
|
10625
|
+
const hit = data.priceMarkets[0];
|
|
10626
|
+
return hit ? { marketId: BigInt(hit.market.marketId) } : null;
|
|
10627
|
+
}
|
|
10628
|
+
/**
|
|
10629
|
+
* List unresolved PriceMarkets created by `creator` whose closeTime is in
|
|
10630
|
+
* the past and whose parent Market is still Active, ordered by closeTime
|
|
10631
|
+
* ascending. Used by resolution cron workers to find markets that need
|
|
10632
|
+
* settling.
|
|
10633
|
+
*/
|
|
10634
|
+
async findExpiredOpenPriceMarkets(params) {
|
|
10635
|
+
const data = await this.subgraph.request(FIND_EXPIRED_OPEN_PRICE_MARKETS, {
|
|
10636
|
+
creator: params.creator.toLowerCase(),
|
|
10637
|
+
now: params.now.toString(),
|
|
10638
|
+
first: params.first ?? 100
|
|
10639
|
+
});
|
|
10640
|
+
return data.priceMarkets.map((p) => ({
|
|
10641
|
+
marketId: BigInt(p.market.marketId),
|
|
10642
|
+
feedId: p.feedId,
|
|
10643
|
+
closeTime: BigInt(p.closeTime)
|
|
10644
|
+
}));
|
|
10645
|
+
}
|
|
10291
10646
|
};
|
|
10647
|
+
var FIND_PRICE_MARKET_BY_FEED_AND_CLOSE_TIME = gql`
|
|
10648
|
+
query FindPriceMarketByFeedAndCloseTime(
|
|
10649
|
+
$feedId: Bytes!
|
|
10650
|
+
$closeTime: BigInt!
|
|
10651
|
+
$creator: Bytes!
|
|
10652
|
+
) {
|
|
10653
|
+
priceMarkets(
|
|
10654
|
+
where: {
|
|
10655
|
+
feedId: $feedId
|
|
10656
|
+
closeTime: $closeTime
|
|
10657
|
+
resolved: false
|
|
10658
|
+
market_: { creator: $creator }
|
|
10659
|
+
}
|
|
10660
|
+
first: 1
|
|
10661
|
+
) {
|
|
10662
|
+
id
|
|
10663
|
+
market {
|
|
10664
|
+
marketId
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
}
|
|
10668
|
+
`;
|
|
10669
|
+
var FIND_EXPIRED_OPEN_PRICE_MARKETS = gql`
|
|
10670
|
+
query FindExpiredOpenPriceMarkets(
|
|
10671
|
+
$creator: Bytes!
|
|
10672
|
+
$now: BigInt!
|
|
10673
|
+
$first: Int!
|
|
10674
|
+
) {
|
|
10675
|
+
priceMarkets(
|
|
10676
|
+
where: {
|
|
10677
|
+
resolved: false
|
|
10678
|
+
closeTime_lt: $now
|
|
10679
|
+
market_: { creator: $creator, status: Active }
|
|
10680
|
+
}
|
|
10681
|
+
first: $first
|
|
10682
|
+
orderBy: closeTime
|
|
10683
|
+
orderDirection: asc
|
|
10684
|
+
) {
|
|
10685
|
+
id
|
|
10686
|
+
feedId
|
|
10687
|
+
closeTime
|
|
10688
|
+
market {
|
|
10689
|
+
marketId
|
|
10690
|
+
}
|
|
10691
|
+
}
|
|
10692
|
+
}
|
|
10693
|
+
`;
|
|
10292
10694
|
|
|
10293
10695
|
// src/modules/token.ts
|
|
10294
10696
|
var TokenModule = class extends BaseModule {
|
|
@@ -11488,6 +11890,6 @@ function parseMetadata(json) {
|
|
|
11488
11890
|
// src/index.ts
|
|
11489
11891
|
var version = "0.1.0";
|
|
11490
11892
|
|
|
11491
|
-
export { AccessControlFacet_default as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet_default as BatchOrdersFacetABI, CONTRACT_ADDRESSES, ConditionalTokens_default as ConditionalTokensABI, DEFAULT_CHAIN, ERC20_default as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet_default as LimitOrdersFacetABI, MarketGroupFacet_default as MarketGroupFacetABI, MarketModule, MarketOrdersFacet_default as MarketOrdersFacetABI, MarketsFacet_default as MarketsFacetABI, MatchingFacet_default as MatchingFacetABI, MetadataFacet_default as MetadataFacetABI, NegRiskFacet_default as NegRiskFacetABI, OddMakiClient, OrderBookFacet_default as OrderBookFacetABI, PROTOCOL_FEES, PriceMarketFacet_default as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet_default as ProtocolFacetABI, PublicModule, PythResolutionFacet_default as PythResolutionFacetABI, ResolutionFacet_default as ResolutionFacetABI, SUBGRAPH_IDS, SubgraphClient, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet_default as TagsFacetABI, TokenModule, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle_default as UmaOracleABI, VALID_TICK_SIZES, VaultFacet_default as VaultFacetABI, VenueFacet_default as VenueFacetABI, VenueModule, WhitelistAccessControl_default as WhitelistAccessControlABI, buildSubgraphGatewayUrl, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
|
|
11893
|
+
export { AccessControlFacet_default as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet_default as BatchOrdersFacetABI, CONTRACT_ADDRESSES, ConditionalTokens_default as ConditionalTokensABI, DEFAULT_CHAIN, ERC20_default as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PRICE_MARKET_SERIES, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet_default as LimitOrdersFacetABI, MarketGroupFacet_default as MarketGroupFacetABI, MarketModule, MarketOrdersFacet_default as MarketOrdersFacetABI, MarketsFacet_default as MarketsFacetABI, MatchingFacet_default as MatchingFacetABI, MetadataFacet_default as MetadataFacetABI, NegRiskFacet_default as NegRiskFacetABI, OddMakiClient, OrderBookFacet_default as OrderBookFacetABI, PROTOCOL_FEES, PriceMarketFacet_default as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet_default as ProtocolFacetABI, PublicModule, PythResolutionFacet_default as PythResolutionFacetABI, ResolutionFacet_default as ResolutionFacetABI, SUBGRAPH_IDS, SubgraphClient, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet_default as TagsFacetABI, TokenModule, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle_default as UmaOracleABI, VALID_TICK_SIZES, VaultFacet_default as VaultFacetABI, VenueFacet_default as VenueFacetABI, VenueModule, WhitelistAccessControl_default as WhitelistAccessControlABI, buildSubgraphGatewayUrl, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
|
|
11492
11894
|
//# sourceMappingURL=index.mjs.map
|
|
11493
11895
|
//# sourceMappingURL=index.mjs.map
|