@0xslots/sdk 0.2.0 → 0.4.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.ts +730 -187
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46,12 +46,12 @@ var GetLandOpenedEventsDocument = gql`
|
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
48
|
var GetSlotCreatedEventsDocument = gql`
|
|
49
|
-
query GetSlotCreatedEvents($
|
|
49
|
+
query GetSlotCreatedEvents($first: Int = 100, $orderBy: SlotCreatedEvent_orderBy, $orderDirection: OrderDirection, $where: SlotCreatedEvent_filter) {
|
|
50
50
|
slotCreatedEvents(
|
|
51
|
-
where: {land: $landId}
|
|
52
51
|
first: $first
|
|
53
|
-
orderBy:
|
|
54
|
-
orderDirection:
|
|
52
|
+
orderBy: $orderBy
|
|
53
|
+
orderDirection: $orderDirection
|
|
54
|
+
where: $where
|
|
55
55
|
) {
|
|
56
56
|
id
|
|
57
57
|
slot {
|
|
@@ -62,7 +62,6 @@ var GetSlotCreatedEventsDocument = gql`
|
|
|
62
62
|
slotId
|
|
63
63
|
currency
|
|
64
64
|
basePrice
|
|
65
|
-
price
|
|
66
65
|
taxPercentage
|
|
67
66
|
timestamp
|
|
68
67
|
blockNumber
|
|
@@ -70,20 +69,21 @@ var GetSlotCreatedEventsDocument = gql`
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
`;
|
|
73
|
-
var
|
|
74
|
-
query
|
|
75
|
-
|
|
72
|
+
var GetPriceUpdatesDocument = gql`
|
|
73
|
+
query GetPriceUpdates($first: Int = 100, $orderBy: PriceUpdate_orderBy, $orderDirection: OrderDirection, $where: PriceUpdate_filter) {
|
|
74
|
+
priceUpdates(
|
|
76
75
|
first: $first
|
|
76
|
+
orderBy: $orderBy
|
|
77
|
+
orderDirection: $orderDirection
|
|
77
78
|
where: $where
|
|
78
|
-
orderBy: timestamp
|
|
79
|
-
orderDirection: desc
|
|
80
79
|
) {
|
|
81
80
|
id
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
slot {
|
|
82
|
+
id
|
|
83
|
+
slotId
|
|
84
|
+
}
|
|
85
|
+
oldPrice
|
|
86
|
+
newPrice
|
|
87
87
|
timestamp
|
|
88
88
|
blockNumber
|
|
89
89
|
tx
|
|
@@ -96,7 +96,8 @@ var GetHubDocument = gql`
|
|
|
96
96
|
id
|
|
97
97
|
protocolFeeBps
|
|
98
98
|
protocolFeeRecipient
|
|
99
|
-
|
|
99
|
+
landCreationFee
|
|
100
|
+
slotExpansionFee
|
|
100
101
|
defaultCurrency {
|
|
101
102
|
id
|
|
102
103
|
name
|
|
@@ -109,6 +110,9 @@ var GetHubDocument = gql`
|
|
|
109
110
|
defaultMaxTaxPercentage
|
|
110
111
|
defaultMinTaxUpdatePeriod
|
|
111
112
|
defaultModule
|
|
113
|
+
moduleCallGasLimit
|
|
114
|
+
liquidationBountyBps
|
|
115
|
+
minDepositSeconds
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
`;
|
|
@@ -129,10 +133,6 @@ var GetAllowedCurrenciesDocument = gql`
|
|
|
129
133
|
name
|
|
130
134
|
symbol
|
|
131
135
|
decimals
|
|
132
|
-
underlyingToken
|
|
133
|
-
underlyingName
|
|
134
|
-
underlyingSymbol
|
|
135
|
-
underlyingDecimals
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
`;
|
|
@@ -302,8 +302,8 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
302
302
|
GetSlotCreatedEvents(variables, requestHeaders, signal) {
|
|
303
303
|
return withWrapper((wrappedRequestHeaders) => client.request({ document: GetSlotCreatedEventsDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetSlotCreatedEvents", "query", variables);
|
|
304
304
|
},
|
|
305
|
-
|
|
306
|
-
return withWrapper((wrappedRequestHeaders) => client.request({ document:
|
|
305
|
+
GetPriceUpdates(variables, requestHeaders, signal) {
|
|
306
|
+
return withWrapper((wrappedRequestHeaders) => client.request({ document: GetPriceUpdatesDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetPriceUpdates", "query", variables);
|
|
307
307
|
},
|
|
308
308
|
GetHub(variables, requestHeaders, signal) {
|
|
309
309
|
return withWrapper((wrappedRequestHeaders) => client.request({ document: GetHubDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetHub", "query", variables);
|
|
@@ -341,10 +341,12 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
341
341
|
// src/client.ts
|
|
342
342
|
var SlotsChain = /* @__PURE__ */ ((SlotsChain2) => {
|
|
343
343
|
SlotsChain2[SlotsChain2["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
|
|
344
|
+
SlotsChain2[SlotsChain2["ARBITRUM"] = 42161] = "ARBITRUM";
|
|
344
345
|
return SlotsChain2;
|
|
345
346
|
})(SlotsChain || {});
|
|
346
347
|
var SUBGRAPH_URLS = {
|
|
347
|
-
[84532 /* BASE_SEPOLIA */]: "https://api.studio.thegraph.com/query/958/0-x-slots-base-sepolia/version/latest"
|
|
348
|
+
[84532 /* BASE_SEPOLIA */]: "https://api.studio.thegraph.com/query/958/0-x-slots-base-sepolia/version/latest",
|
|
349
|
+
[42161 /* ARBITRUM */]: "https://api.studio.thegraph.com/query/958/0-x-slots-arb/version/latest"
|
|
348
350
|
};
|
|
349
351
|
var SlotsClient = class {
|
|
350
352
|
/**
|
|
@@ -436,14 +438,14 @@ var SlotsClient = class {
|
|
|
436
438
|
getSlotCreatedEvents(...args) {
|
|
437
439
|
return this.sdk.GetSlotCreatedEvents(...args);
|
|
438
440
|
}
|
|
439
|
-
|
|
440
|
-
return this.sdk.
|
|
441
|
+
getPriceUpdates(...args) {
|
|
442
|
+
return this.sdk.GetPriceUpdates(...args);
|
|
441
443
|
}
|
|
442
444
|
};
|
|
443
445
|
function createSlotsClient(config) {
|
|
444
446
|
return new SlotsClient(config);
|
|
445
447
|
}
|
|
446
448
|
|
|
447
|
-
export { GetAllowedCurrenciesDocument, GetAllowedModulesDocument, GetAvailableSlotsDocument,
|
|
449
|
+
export { GetAllowedCurrenciesDocument, GetAllowedModulesDocument, GetAvailableSlotsDocument, GetHubDocument, GetLandDocument, GetLandOpenedEventsDocument, GetLandsByOwnerDocument, GetLandsDocument, GetPriceUpdatesDocument, GetSlotCreatedEventsDocument, GetSlotDocument, GetSlotPurchasesDocument, GetSlotsByOccupantDocument, GetSlotsDocument, SUBGRAPH_URLS, SlotsChain, SlotsClient, createSlotsClient, getSdk };
|
|
448
450
|
//# sourceMappingURL=index.js.map
|
|
449
451
|
//# sourceMappingURL=index.js.map
|