timelock-sdk 0.0.76 → 0.0.77

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/client.cjs CHANGED
@@ -30,12 +30,6 @@ const UserOptionFieldsFragmentDoc = graphql_tag.default`
30
30
  market {
31
31
  address
32
32
  }
33
- exerciseEvents {
34
- transactionHash
35
- }
36
- mintEvent {
37
- transactionHash
38
- }
39
33
  optionType
40
34
  strikeTick
41
35
  entryTick
@@ -149,6 +143,66 @@ const GetUserMarketOperatorsDocument = graphql_tag.default`
149
143
  }
150
144
  }
151
145
  `;
146
+ const GetOptionEventsDocument = graphql_tag.default`
147
+ query GetOptionEvents($marketAddr: String!, $optionId: numeric!) {
148
+ MintOptionEvent(
149
+ where: {
150
+ option: {
151
+ optionId: {_eq: $optionId}
152
+ market: {address: {_eq: $marketAddr}}
153
+ }
154
+ }
155
+ limit: 1000
156
+ ) {
157
+ id
158
+ optionType
159
+ strikeTick
160
+ currentTick
161
+ expiresAt
162
+ premium
163
+ protocolFee
164
+ liquidities
165
+ timestamp
166
+ blockNumber
167
+ transactionHash
168
+ }
169
+ ExerciseOptionEvent(
170
+ where: {
171
+ option: {
172
+ market: {address: {_eq: $marketAddr}}
173
+ optionId: {_eq: $optionId}
174
+ }
175
+ }
176
+ limit: 1000
177
+ ) {
178
+ id
179
+ liquidities
180
+ currentTick
181
+ payout
182
+ timestamp
183
+ blockNumber
184
+ transactionHash
185
+ }
186
+ ExtendOptionEvent(
187
+ where: {
188
+ option: {
189
+ market: {address: {_eq: $marketAddr}}
190
+ optionId: {_eq: $optionId}
191
+ }
192
+ }
193
+ limit: 1000
194
+ ) {
195
+ id
196
+ premium
197
+ protocolFee
198
+ currentTick
199
+ addedDuration
200
+ timestamp
201
+ blockNumber
202
+ transactionHash
203
+ }
204
+ }
205
+ `;
152
206
  const defaultWrapper = (action, _operationName, _operationType, _variables) => action();
153
207
  function getSdk(client, withWrapper = defaultWrapper) {
154
208
  return {
@@ -217,6 +271,17 @@ function getSdk(client, withWrapper = defaultWrapper) {
217
271
  },
218
272
  signal
219
273
  }), "GetUserMarketOperators", "query", variables);
274
+ },
275
+ GetOptionEvents(variables, requestHeaders, signal) {
276
+ return withWrapper((wrappedRequestHeaders) => client.request({
277
+ document: GetOptionEventsDocument,
278
+ variables,
279
+ requestHeaders: {
280
+ ...requestHeaders,
281
+ ...wrappedRequestHeaders
282
+ },
283
+ signal
284
+ }), "GetOptionEvents", "query", variables);
220
285
  }
221
286
  };
222
287
  }