@fireballgg/sdk 0.0.1

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 (48) hide show
  1. package/README.md +39 -0
  2. package/dist/abis/sparks.abi.json +195 -0
  3. package/dist/chunk-3GG7NNPX.js +2 -0
  4. package/dist/chunk-3GG7NNPX.js.map +1 -0
  5. package/dist/chunk-4C666HHU.js +2 -0
  6. package/dist/chunk-4C666HHU.js.map +1 -0
  7. package/dist/chunk-CAWVA63V.js +10 -0
  8. package/dist/chunk-CAWVA63V.js.map +1 -0
  9. package/dist/chunk-HSPNA3WS.js +40 -0
  10. package/dist/chunk-HSPNA3WS.js.map +1 -0
  11. package/dist/chunk-VFDUHPNG.js +2185 -0
  12. package/dist/chunk-VFDUHPNG.js.map +1 -0
  13. package/dist/chunk-VMT37ZHW.js +2 -0
  14. package/dist/chunk-VMT37ZHW.js.map +1 -0
  15. package/dist/chunk-ZBGOXQP5.js +4 -0
  16. package/dist/chunk-ZBGOXQP5.js.map +1 -0
  17. package/dist/data/checkpoints.json +22 -0
  18. package/dist/data/constants.json +9 -0
  19. package/dist/data/enemies.json +632 -0
  20. package/dist/data/fishing_cards.json +1152 -0
  21. package/dist/data/fishing_exchange_rates.json +236 -0
  22. package/dist/data/gear.json +11617 -0
  23. package/dist/data/hatchery.json +54 -0
  24. package/dist/data/items.json +6073 -0
  25. package/dist/data/recipes.json +9471 -0
  26. package/dist/fireball-api/index.d.ts +5 -0
  27. package/dist/fireball-api/index.js +2 -0
  28. package/dist/fireball-api/index.js.map +1 -0
  29. package/dist/gigaverse-api/index.d.ts +5 -0
  30. package/dist/gigaverse-api/index.js +2 -0
  31. package/dist/gigaverse-api/index.js.map +1 -0
  32. package/dist/index-BPihDahL.d.ts +2514 -0
  33. package/dist/index-D5hv4Edu.d.ts +2474 -0
  34. package/dist/index-DKZ1Igbv.d.ts +88 -0
  35. package/dist/index-DO_0xTs_.d.ts +7499 -0
  36. package/dist/index.d.ts +1691 -0
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/juiced-api/index.d.ts +1 -0
  40. package/dist/juiced-api/index.js +2 -0
  41. package/dist/juiced-api/index.js.map +1 -0
  42. package/dist/juiced-subgraph/index.d.ts +3 -0
  43. package/dist/juiced-subgraph/index.js +2 -0
  44. package/dist/juiced-subgraph/index.js.map +1 -0
  45. package/dist/logger/index.d.ts +56 -0
  46. package/dist/logger/index.js +2 -0
  47. package/dist/logger/index.js.map +1 -0
  48. package/package.json +125 -0
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # sdk package
2
+
3
+ Shared SDK for Gigaverse and Fireball APIs with comprehensive type safety and GraphQL integration.
4
+
5
+ ## features
6
+
7
+ - 🎮 **Game Integration**: Complete API coverage for all Gigaverse game features
8
+ - 📊 **State Management**: Robust game state tracking and management
9
+ - 🔄 **Real-time Updates**: Support for real-time game state synchronization
10
+ - 🛠️ **Type Safety**: Full TypeScript support with comprehensive type definitions
11
+ - 📝 **Documentation**: Detailed API documentation and usage examples
12
+
13
+ ## development
14
+
15
+ ```bash
16
+ # Build SDK
17
+ bun build
18
+
19
+ # Build in watch mode
20
+ bun build:watch
21
+
22
+ # Generate GraphQL types
23
+ bun codegen
24
+
25
+ # Fetch external data
26
+ bun fetch
27
+ ```
28
+
29
+ ## structure
30
+
31
+ - `src/gigaverse-api/` - Gigaverse game API client
32
+ - `src/fireball-api/` - Fireball backend API client
33
+ - `src/data/` - Shared game data (items, enemies, gear)
34
+
35
+ ## license
36
+
37
+ Business Source License 1.1 - see [LICENSE](../../LICENSE) file for details.
38
+
39
+ [← Back to main README](../../README.md)
@@ -0,0 +1,195 @@
1
+ [
2
+ {
3
+ "inputs": [{ "internalType": "address", "name": "treasury_", "type": "address" }],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ { "inputs": [], "name": "ContractPaused", "type": "error" },
8
+ { "inputs": [], "name": "NotOwner", "type": "error" },
9
+ { "inputs": [], "name": "PaymentTooSmall", "type": "error" },
10
+ { "inputs": [], "name": "PeriodDurationTooLong", "type": "error" },
11
+ { "inputs": [], "name": "PeriodDurationTooShort", "type": "error" },
12
+ { "inputs": [], "name": "PeriodSparkLimitExceeded", "type": "error" },
13
+ { "inputs": [], "name": "ReentrantCall", "type": "error" },
14
+ { "inputs": [], "name": "SelfReferral", "type": "error" },
15
+ { "inputs": [], "name": "TransferFailed", "type": "error" },
16
+ { "inputs": [], "name": "ZeroAddress", "type": "error" },
17
+ { "inputs": [], "name": "ZeroPayment", "type": "error" },
18
+ { "inputs": [], "name": "ZeroPeriodDuration", "type": "error" },
19
+ { "inputs": [], "name": "ZeroSparkLimit", "type": "error" },
20
+ {
21
+ "anonymous": false,
22
+ "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }],
23
+ "name": "OwnershipTransferred",
24
+ "type": "event"
25
+ },
26
+ { "anonymous": false, "inputs": [], "name": "Paused", "type": "event" },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ { "indexed": false, "internalType": "uint256", "name": "sparkLimit", "type": "uint256" },
31
+ { "indexed": false, "internalType": "uint256", "name": "periodDuration", "type": "uint256" }
32
+ ],
33
+ "name": "PeriodConfigurationUpdated",
34
+ "type": "event"
35
+ },
36
+ {
37
+ "anonymous": false,
38
+ "inputs": [
39
+ { "indexed": true, "internalType": "address", "name": "buyer", "type": "address" },
40
+ { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" },
41
+ { "indexed": false, "internalType": "uint256", "name": "sparks", "type": "uint256" },
42
+ { "indexed": false, "internalType": "address", "name": "referral", "type": "address" }
43
+ ],
44
+ "name": "SparksPurchased",
45
+ "type": "event"
46
+ },
47
+ {
48
+ "anonymous": false,
49
+ "inputs": [
50
+ { "indexed": true, "internalType": "address", "name": "treasury", "type": "address" }
51
+ ],
52
+ "name": "TreasuryUpdated",
53
+ "type": "event"
54
+ },
55
+ { "anonymous": false, "inputs": [], "name": "Unpaused", "type": "event" },
56
+ {
57
+ "inputs": [],
58
+ "name": "REFERRAL_PERCENTAGE",
59
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
60
+ "stateMutability": "view",
61
+ "type": "function"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "SPARK_PRICE",
66
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
67
+ "stateMutability": "view",
68
+ "type": "function"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "emergencyWithdraw",
73
+ "outputs": [],
74
+ "stateMutability": "nonpayable",
75
+ "type": "function"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "getCurrentPeriodStart",
80
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
81
+ "stateMutability": "view",
82
+ "type": "function"
83
+ },
84
+ {
85
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
86
+ "name": "lastPeriodStart",
87
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
88
+ "stateMutability": "view",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "inputs": [],
93
+ "name": "limitPeriodDuration",
94
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
95
+ "stateMutability": "view",
96
+ "type": "function"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "owner",
101
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
102
+ "stateMutability": "view",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [],
107
+ "name": "pause",
108
+ "outputs": [],
109
+ "stateMutability": "nonpayable",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [],
114
+ "name": "paused",
115
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
116
+ "stateMutability": "view",
117
+ "type": "function"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
122
+ "components": [
123
+ { "internalType": "address", "name": "referral", "type": "address" },
124
+ { "internalType": "address", "name": "receiver", "type": "address" }
125
+ ],
126
+ "internalType": "struct FireballPaymentGateway.PaymentData",
127
+ "name": "data_",
128
+ "type": "tuple"
129
+ }
130
+ ],
131
+ "name": "pay",
132
+ "outputs": [],
133
+ "stateMutability": "payable",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [],
138
+ "name": "periodSparkLimit",
139
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
140
+ "stateMutability": "view",
141
+ "type": "function"
142
+ },
143
+ {
144
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
145
+ "name": "periodSparksPurchased",
146
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
147
+ "stateMutability": "view",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "inputs": [
152
+ { "internalType": "uint256", "name": "sparkLimit_", "type": "uint256" },
153
+ { "internalType": "uint256", "name": "periodDuration_", "type": "uint256" }
154
+ ],
155
+ "name": "setPeriodConfiguration",
156
+ "outputs": [],
157
+ "stateMutability": "nonpayable",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "inputs": [{ "internalType": "address", "name": "treasury_", "type": "address" }],
162
+ "name": "setTreasury",
163
+ "outputs": [],
164
+ "stateMutability": "nonpayable",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
169
+ "name": "totalSparksPurchased",
170
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
171
+ "stateMutability": "view",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [{ "internalType": "address", "name": "owner_", "type": "address" }],
176
+ "name": "transferOwnership",
177
+ "outputs": [],
178
+ "stateMutability": "nonpayable",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [],
183
+ "name": "treasury",
184
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
185
+ "stateMutability": "view",
186
+ "type": "function"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "unpause",
191
+ "outputs": [],
192
+ "stateMutability": "nonpayable",
193
+ "type": "function"
194
+ }
195
+ ]
@@ -0,0 +1,2 @@
1
+ import{a as p}from"./chunk-4C666HHU.js";var d={};p(d,{JUICED_API_ENDPOINT:()=>i,JuicedApi:()=>t,createJuicedApi:()=>u});import c from"axios";var i="https://juiced.sh/api",t=class{axiosInstance;constructor(o={}){let{timeout:a=3e4}=o;this.axiosInstance=c.create({baseURL:i,timeout:a,headers:{"Content-Type":"application/json",Accept:"application/json","x-app-version":"v2025-11-15-001"}}),this.axiosInstance.interceptors.response.use(e=>e,e=>{let r=e.response?.data;console.error("[JuicedApi] Error response:",{status:e.response?.status,statusText:e.response?.statusText,data:r,url:e.config?.url});let s=r?.error||r?.message||e.message||"unknown error";throw typeof s=="object"&&(s=JSON.stringify(s)),new Error(s)})}async getLatestTrades(o={}){let{limit:a=50}=o;return(await this.axiosInstance.get("/trades",{params:{limit:a}})).data}};function u(n={}){return new t(n)}export{i as a,t as b,u as c,d};
2
+ //# sourceMappingURL=chunk-3GG7NNPX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/juiced-api/index.ts","../src/juiced-api/client.ts"],"sourcesContent":["export * from \"./client\";\nexport * from \"./types\";\n","/**\n * Juiced API Client\n *\n * This module provides access to the Juiced REST API at juiced.sh,\n * including latest trades and marketplace data.\n *\n * @example\n * ```ts\n * import { createJuicedApi } from '@fireballgg/sdk/juiced-api';\n *\n * const api = createJuicedApi();\n * const trades = await api.getLatestTrades({ limit: 50 });\n * ```\n */\nimport axios, { type AxiosInstance } from \"axios\";\n\nimport type { GetTradesParams, GetTradesResponse } from \"./types\";\n\n/**\n * Juiced REST API endpoint\n */\nexport const JUICED_API_ENDPOINT = \"https://juiced.sh/api\";\n\n/**\n * Options for creating a Juiced API client\n */\nexport interface JuicedApiOptions {\n /**\n * Request timeout in milliseconds\n * @default 30000\n */\n timeout?: number;\n}\n\n/**\n * Juiced API client for REST endpoints\n */\nexport class JuicedApi {\n private axiosInstance: AxiosInstance;\n\n constructor(options: JuicedApiOptions = {}) {\n const { timeout = 30000 } = options;\n\n this.axiosInstance = axios.create({\n baseURL: JUICED_API_ENDPOINT,\n timeout,\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"x-app-version\": \"v2025-11-15-001\",\n },\n });\n\n // Add response interceptor to handle errors\n this.axiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n const responseData = error.response?.data;\n console.error(\"[JuicedApi] Error response:\", {\n status: error.response?.status,\n statusText: error.response?.statusText,\n data: responseData,\n url: error.config?.url,\n });\n let errorMessage =\n responseData?.error || responseData?.message || error.message || \"unknown error\";\n if (typeof errorMessage === \"object\") {\n errorMessage = JSON.stringify(errorMessage);\n }\n throw new Error(errorMessage);\n },\n );\n }\n\n /**\n * Get latest trades from the marketplace\n * @param params - Query parameters\n * @returns Latest trades\n */\n public async getLatestTrades(params: GetTradesParams = {}): Promise<GetTradesResponse> {\n const { limit = 50 } = params;\n\n const response = await this.axiosInstance.get<GetTradesResponse>(\"/trades\", {\n params: { limit },\n });\n\n return response.data;\n }\n}\n\n/**\n * Creates a configured JuicedApi instance.\n *\n * @param options - API configuration options\n * @returns Configured JuicedApi instance\n *\n * @example\n * ```ts\n * import { createJuicedApi } from '@fireballgg/sdk/juiced-api';\n *\n * const api = createJuicedApi();\n * const trades = await api.getLatestTrades({ limit: 50 });\n * ```\n */\nexport function createJuicedApi(options: JuicedApiOptions = {}): JuicedApi {\n return new JuicedApi(options);\n}\n"],"mappings":"wCAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,cAAAC,EAAA,oBAAAC,ICcA,OAAOC,MAAmC,QAOnC,IAAMC,EAAsB,wBAgBtBC,EAAN,KAAgB,CACb,cAER,YAAYC,EAA4B,CAAC,EAAG,CAC1C,GAAM,CAAE,QAAAC,EAAU,GAAM,EAAID,EAE5B,KAAK,cAAgBH,EAAM,OAAO,CAChC,QAASC,EACT,QAAAG,EACA,QAAS,CACP,eAAgB,mBAChB,OAAQ,mBACR,gBAAiB,iBACnB,CACF,CAAC,EAGD,KAAK,cAAc,aAAa,SAAS,IACtCC,GAAaA,EACbC,GAAU,CACT,IAAMC,EAAeD,EAAM,UAAU,KACrC,QAAQ,MAAM,8BAA+B,CAC3C,OAAQA,EAAM,UAAU,OACxB,WAAYA,EAAM,UAAU,WAC5B,KAAMC,EACN,IAAKD,EAAM,QAAQ,GACrB,CAAC,EACD,IAAIE,EACFD,GAAc,OAASA,GAAc,SAAWD,EAAM,SAAW,gBACnE,MAAI,OAAOE,GAAiB,WAC1BA,EAAe,KAAK,UAAUA,CAAY,GAEtC,IAAI,MAAMA,CAAY,CAC9B,CACF,CACF,CAOA,MAAa,gBAAgBC,EAA0B,CAAC,EAA+B,CACrF,GAAM,CAAE,MAAAC,EAAQ,EAAG,EAAID,EAMvB,OAJiB,MAAM,KAAK,cAAc,IAAuB,UAAW,CAC1E,OAAQ,CAAE,MAAAC,CAAM,CAClB,CAAC,GAEe,IAClB,CACF,EAgBO,SAASC,EAAgBR,EAA4B,CAAC,EAAc,CACzE,OAAO,IAAID,EAAUC,CAAO,CAC9B","names":["juiced_api_exports","__export","JUICED_API_ENDPOINT","JuicedApi","createJuicedApi","axios","JUICED_API_ENDPOINT","JuicedApi","options","timeout","response","error","responseData","errorMessage","params","limit","createJuicedApi"]}
@@ -0,0 +1,2 @@
1
+ var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:!0})};export{e as a};
2
+ //# sourceMappingURL=chunk-4C666HHU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,10 @@
1
+ import{a as m}from"./chunk-ZBGOXQP5.js";import{a as k}from"./chunk-4C666HHU.js";var U={};k(U,{Aggregation_Interval:()=>_,DailyMarketSnapshot_OrderBy:()=>b,GetItemsLastSaleDocument:()=>f,GlobalStats_OrderBy:()=>M,Item24hMetrics_OrderBy:()=>B,ItemDayData_OrderBy:()=>T,ItemHourData_OrderBy:()=>D,ItemHourSnapshot_OrderBy:()=>h,Item_OrderBy:()=>d,JUICED_SUBGRAPH_ENDPOINT:()=>x,Listing_OrderBy:()=>E,MarketHourSnapshot_OrderBy:()=>A,OrderDirection:()=>H,Transfer_OrderBy:()=>P,UserItemPosition_OrderBy:()=>v,UserTransaction_OrderBy:()=>C,User_OrderBy:()=>w,_SubgraphErrorPolicy_:()=>V,createJuicedSubgraph:()=>Q,getSdk:()=>S});var _=(l=>(l.Day="day",l.Hour="hour",l))(_||{}),b=(u=>(u.ActiveItems="activeItems",u.ActiveListings="activeListings",u.DayStartTimestamp="dayStartTimestamp",u.Id="id",u.PreviousDayTrades="previousDayTrades",u.PreviousDayVolumeEth="previousDayVolumeETH",u.PreviousRollingVolumeEth="previousRollingVolumeETH",u.TopItemByVolume="topItemByVolume",u.TopItemByVolumeActiveListingsCount="topItemByVolume__activeListingsCount",u.TopItemByVolumeCurrentPriceEth="topItemByVolume__currentPriceETH",u.TopItemByVolumeId="topItemByVolume__id",u.TopItemByVolumeLastTradeTimestamp="topItemByVolume__lastTradeTimestamp",u.TopItemByVolumeTotalItemsSold="topItemByVolume__totalItemsSold",u.TopItemByVolumeTotalListingsCount="topItemByVolume__totalListingsCount",u.TopItemByVolumeTotalTrades="topItemByVolume__totalTrades",u.TopItemByVolumeTotalVolumeEth="topItemByVolume__totalVolumeETH",u.TopItemVolumeEth="topItemVolumeETH",u.TotalTrades="totalTrades",u.TotalVolumeEth="totalVolumeETH",u.TotalVolumeEthRolling="totalVolumeETHRolling",u.VolumeChangePercentDay="volumeChangePercentDay",u.VolumeChangePercentRolling="volumeChangePercentRolling",u))(b||{}),M=(r=>(r.ActiveListings="activeListings",r.Id="id",r.LastUpdated="lastUpdated",r.TotalItems="totalItems",r.TotalTrades="totalTrades",r.TotalVolumeEth="totalVolumeETH",r.Trades7d="trades7d",r.Trades24h="trades24h",r.Volume7dEth="volume7dETH",r.Volume24hEth="volume24hETH",r))(M||{}),B=(e=>(e.DayItemsSold="dayItemsSold",e.DayItemsSoldChangePercent="dayItemsSoldChangePercent",e.DayStartTimestamp="dayStartTimestamp",e.DayTrades="dayTrades",e.DayVolumeChangePercent="dayVolumeChangePercent",e.DayVolumeEth="dayVolumeETH",e.High24h="high24h",e.Id="id",e.Item="item",e.ItemActiveListingsCount="item__activeListingsCount",e.ItemCurrentPriceEth="item__currentPriceETH",e.ItemId="item__id",e.ItemLastTradeTimestamp="item__lastTradeTimestamp",e.ItemTotalItemsSold="item__totalItemsSold",e.ItemTotalListingsCount="item__totalListingsCount",e.ItemTotalTrades="item__totalTrades",e.ItemTotalVolumeEth="item__totalVolumeETH",e.ItemsSold24h="itemsSold24h",e.ItemsSoldChangePercent24h="itemsSoldChangePercent24h",e.LastPrice="lastPrice",e.LastUpdatedHour="lastUpdatedHour",e.Low24h="low24h",e.PreviousDayItemsSold="previousDayItemsSold",e.PreviousDayVolumeEth="previousDayVolumeETH",e.PreviousItemsSold24h="previousItemsSold24h",e.PreviousVolume24h="previousVolume24h",e.PriceChange24h="priceChange24h",e.PriceChangePercent24h="priceChangePercent24h",e.PriceChangePercentDay="priceChangePercentDay",e.RollingPrice24hAgo="rollingPrice24hAgo",e.Trades24h="trades24h",e.Volume24h="volume24h",e.VolumeChangePercent24h="volumeChangePercent24h",e))(B||{}),T=(a=>(a.Close="close",a.DayStartTimestamp="dayStartTimestamp",a.High="high",a.Id="id",a.Item="item",a.ItemActiveListingsCount="item__activeListingsCount",a.ItemCurrentPriceEth="item__currentPriceETH",a.ItemId="item__id",a.ItemLastTradeTimestamp="item__lastTradeTimestamp",a.ItemTotalItemsSold="item__totalItemsSold",a.ItemTotalListingsCount="item__totalListingsCount",a.ItemTotalTrades="item__totalTrades",a.ItemTotalVolumeEth="item__totalVolumeETH",a.Low="low",a.Open="open",a.PreviousDayClose="previousDayClose",a.PriceChange="priceChange",a.PriceChangePercent="priceChangePercent",a.TradesCount="tradesCount",a.VolumeEth="volumeETH",a.VolumeItems="volumeItems",a))(T||{}),D=(p=>(p.Close="close",p.High="high",p.HourStartTimestamp="hourStartTimestamp",p.Id="id",p.Item="item",p.ItemActiveListingsCount="item__activeListingsCount",p.ItemCurrentPriceEth="item__currentPriceETH",p.ItemId="item__id",p.ItemLastTradeTimestamp="item__lastTradeTimestamp",p.ItemTotalItemsSold="item__totalItemsSold",p.ItemTotalListingsCount="item__totalListingsCount",p.ItemTotalTrades="item__totalTrades",p.ItemTotalVolumeEth="item__totalVolumeETH",p.Low="low",p.Open="open",p.TradesCount="tradesCount",p.VolumeEth="volumeETH",p.VolumeItems="volumeItems",p))(D||{}),h=(a=>(a.AvgPrice="avgPrice",a.ClosePrice="closePrice",a.FirstTradeTimestamp="firstTradeTimestamp",a.HourStartTimestamp="hourStartTimestamp",a.Id="id",a.Item="item",a.ItemActiveListingsCount="item__activeListingsCount",a.ItemCurrentPriceEth="item__currentPriceETH",a.ItemId="item__id",a.ItemLastTradeTimestamp="item__lastTradeTimestamp",a.ItemTotalItemsSold="item__totalItemsSold",a.ItemTotalListingsCount="item__totalListingsCount",a.ItemTotalTrades="item__totalTrades",a.ItemTotalVolumeEth="item__totalVolumeETH",a.LastTradeTimestamp="lastTradeTimestamp",a.MaxPrice="maxPrice",a.MinPrice="minPrice",a.OpenPrice="openPrice",a.TradesCount="tradesCount",a.VolumeEth="volumeETH",a.VolumeItems="volumeItems",a))(h||{}),d=(r=>(r.ActiveListingsCount="activeListingsCount",r.CurrentPriceEth="currentPriceETH",r.Id="id",r.LastTradeTimestamp="lastTradeTimestamp",r.Listings="listings",r.TotalItemsSold="totalItemsSold",r.TotalListingsCount="totalListingsCount",r.TotalTrades="totalTrades",r.TotalVolumeEth="totalVolumeETH",r.Transfers="transfers",r))(d||{}),E=(t=>(t.Amount="amount",t.AmountRemaining="amountRemaining",t.Id="id",t.IsActive="isActive",t.Item="item",t.ItemActiveListingsCount="item__activeListingsCount",t.ItemCurrentPriceEth="item__currentPriceETH",t.ItemId="item__id",t.ItemLastTradeTimestamp="item__lastTradeTimestamp",t.ItemTotalItemsSold="item__totalItemsSold",t.ItemTotalListingsCount="item__totalListingsCount",t.ItemTotalTrades="item__totalTrades",t.ItemTotalVolumeEth="item__totalVolumeETH",t.Owner="owner",t.OwnerFirstTradeTimestamp="owner__firstTradeTimestamp",t.OwnerId="owner__id",t.OwnerLastTradeTimestamp="owner__lastTradeTimestamp",t.OwnerProfitLossEth="owner__profitLossETH",t.OwnerTotalEarnedEth="owner__totalEarnedETH",t.OwnerTotalPurchases="owner__totalPurchases",t.OwnerTotalSales="owner__totalSales",t.OwnerTotalSpentEth="owner__totalSpentETH",t.OwnerTotalVolumeEth="owner__totalVolumeETH",t.PricePerItemEth="pricePerItemETH",t.Status="status",t.Timestamp="timestamp",t.Transfers="transfers",t))(E||{}),A=(I=>(I.HourStartTimestamp="hourStartTimestamp",I.Id="id",I.TradesCount="tradesCount",I.VolumeEth="volumeETH",I))(A||{}),H=(l=>(l.Asc="asc",l.Desc="desc",l))(H||{}),P=(n=>(n.Amount="amount",n.Id="id",n.IsPurchase="isPurchase",n.Item="item",n.ItemActiveListingsCount="item__activeListingsCount",n.ItemCurrentPriceEth="item__currentPriceETH",n.ItemId="item__id",n.ItemLastTradeTimestamp="item__lastTradeTimestamp",n.ItemTotalItemsSold="item__totalItemsSold",n.ItemTotalListingsCount="item__totalListingsCount",n.ItemTotalTrades="item__totalTrades",n.ItemTotalVolumeEth="item__totalVolumeETH",n.Listing="listing",n.ListingAmount="listing__amount",n.ListingAmountRemaining="listing__amountRemaining",n.ListingId="listing__id",n.ListingIsActive="listing__isActive",n.ListingPricePerItemEth="listing__pricePerItemETH",n.ListingStatus="listing__status",n.ListingTimestamp="listing__timestamp",n.PricePerItemEth="pricePerItemETH",n.Timestamp="timestamp",n.TotalValueEth="totalValueETH",n.TransferType="transferType",n.TransferredTo="transferredTo",n.TransferredToFirstTradeTimestamp="transferredTo__firstTradeTimestamp",n.TransferredToId="transferredTo__id",n.TransferredToLastTradeTimestamp="transferredTo__lastTradeTimestamp",n.TransferredToProfitLossEth="transferredTo__profitLossETH",n.TransferredToTotalEarnedEth="transferredTo__totalEarnedETH",n.TransferredToTotalPurchases="transferredTo__totalPurchases",n.TransferredToTotalSales="transferredTo__totalSales",n.TransferredToTotalSpentEth="transferredTo__totalSpentETH",n.TransferredToTotalVolumeEth="transferredTo__totalVolumeETH",n.TxHash="txHash",n))(P||{}),v=(t=>(t.AvgPurchasePriceEth="avgPurchasePriceETH",t.AvgSalePriceEth="avgSalePriceETH",t.Id="id",t.Item="item",t.ItemActiveListingsCount="item__activeListingsCount",t.ItemCurrentPriceEth="item__currentPriceETH",t.ItemId="item__id",t.ItemLastTradeTimestamp="item__lastTradeTimestamp",t.ItemTotalItemsSold="item__totalItemsSold",t.ItemTotalListingsCount="item__totalListingsCount",t.ItemTotalTrades="item__totalTrades",t.ItemTotalVolumeEth="item__totalVolumeETH",t.RealizedProfitEth="realizedProfitETH",t.TotalEarnedEth="totalEarnedETH",t.TotalPurchased="totalPurchased",t.TotalSold="totalSold",t.TotalSpentEth="totalSpentETH",t.User="user",t.UserFirstTradeTimestamp="user__firstTradeTimestamp",t.UserId="user__id",t.UserLastTradeTimestamp="user__lastTradeTimestamp",t.UserProfitLossEth="user__profitLossETH",t.UserTotalEarnedEth="user__totalEarnedETH",t.UserTotalPurchases="user__totalPurchases",t.UserTotalSales="user__totalSales",t.UserTotalSpentEth="user__totalSpentETH",t.UserTotalVolumeEth="user__totalVolumeETH",t))(v||{}),C=(i=>(i.Amount="amount",i.Id="id",i.Item="item",i.ItemActiveListingsCount="item__activeListingsCount",i.ItemCurrentPriceEth="item__currentPriceETH",i.ItemId="item__id",i.ItemLastTradeTimestamp="item__lastTradeTimestamp",i.ItemTotalItemsSold="item__totalItemsSold",i.ItemTotalListingsCount="item__totalListingsCount",i.ItemTotalTrades="item__totalTrades",i.ItemTotalVolumeEth="item__totalVolumeETH",i.PricePerItemEth="pricePerItemETH",i.Timestamp="timestamp",i.TotalValueEth="totalValueETH",i.TxHash="txHash",i.Type="type",i.User="user",i.UserFirstTradeTimestamp="user__firstTradeTimestamp",i.UserId="user__id",i.UserLastTradeTimestamp="user__lastTradeTimestamp",i.UserProfitLossEth="user__profitLossETH",i.UserTotalEarnedEth="user__totalEarnedETH",i.UserTotalPurchases="user__totalPurchases",i.UserTotalSales="user__totalSales",i.UserTotalSpentEth="user__totalSpentETH",i.UserTotalVolumeEth="user__totalVolumeETH",i))(C||{}),w=(s=>(s.FirstTradeTimestamp="firstTradeTimestamp",s.Id="id",s.ItemPositions="itemPositions",s.LastTradeTimestamp="lastTradeTimestamp",s.Listings="listings",s.ProfitLossEth="profitLossETH",s.Purchases="purchases",s.TotalEarnedEth="totalEarnedETH",s.TotalPurchases="totalPurchases",s.TotalSales="totalSales",s.TotalSpentEth="totalSpentETH",s.TotalVolumeEth="totalVolumeETH",s.Transactions="transactions",s))(w||{}),V=(l=>(l.Allow="allow",l.Deny="deny",l))(V||{}),f=m`
2
+ query GetItemsLastSale($first: Int = 1000) {
3
+ items(first: $first, where: {lastTradeTimestamp_not: "0"}) {
4
+ id
5
+ lastTradeTimestamp
6
+ currentPriceETH
7
+ }
8
+ }
9
+ `,F=(o,c,l,g)=>o();function S(o,c=F){return{GetItemsLastSale(l,g,I){return c(L=>o.request({document:f,variables:l,requestHeaders:{...g,...L},signal:I}),"GetItemsLastSale","query",l)}}}import{GraphQLClient as R}from"graphql-request";var x="https://api.giga-companion.online/subgraphs/name/gig10",y=class{_client;constructor(c={}){let{timeout:l=3e4}=c;this._client=new R(x,{requestMiddleware:g=>({...g,signal:AbortSignal.timeout(l)})})}};function Q(o={}){let c=new y(o),l=S(c._client);return Object.assign(c,l)}export{_ as a,b,M as c,B as d,T as e,D as f,h as g,d as h,E as i,A as j,H as k,P as l,v as m,C as n,w as o,V as p,f as q,S as r,x as s,Q as t,U as u};
10
+ //# sourceMappingURL=chunk-CAWVA63V.js.map