anchor-sdk 0.1.43-beta.0 → 0.1.43-beta.3

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 (38) hide show
  1. package/dist/AnchorApiClientV2.d.ts +3 -3
  2. package/dist/generated/Api.d.ts +63 -50
  3. package/dist/index.js +6450 -1339
  4. package/dist/index.js.map +12 -11
  5. package/dist/react/index.js +6462 -8
  6. package/dist/react/index.js.map +19 -0
  7. package/package.json +10 -5
  8. package/dist/AnchorApiClientV2.d.ts.map +0 -1
  9. package/dist/AnchorApiClientV2.js +0 -358
  10. package/dist/AnchorERC1155Client.d.ts.map +0 -1
  11. package/dist/AnchorERC1155Client.js +0 -301
  12. package/dist/AnchorPayClient.d.ts.map +0 -1
  13. package/dist/AnchorPayClient.js +0 -908
  14. package/dist/abi/AnchorERC1155.d.ts.map +0 -1
  15. package/dist/abi/AnchorERC1155.js +0 -1122
  16. package/dist/abi/AnchorPay.json +0 -578
  17. package/dist/constants.d.ts.map +0 -1
  18. package/dist/constants.js +0 -367
  19. package/dist/generated/Api.d.ts.map +0 -1
  20. package/dist/generated/Api.js +0 -854
  21. package/dist/index.d.ts.map +0 -1
  22. package/dist/react/AnchorReactSDK.js +0 -192
  23. package/dist/typechain/AnchorERC1155.d.ts.map +0 -1
  24. package/dist/typechain/AnchorERC1155.js +0 -2
  25. package/dist/typechain/AnchorPay.d.ts.map +0 -1
  26. package/dist/typechain/AnchorPay.js +0 -2
  27. package/dist/typechain/common.d.ts.map +0 -1
  28. package/dist/typechain/common.js +0 -2
  29. package/dist/typechain/factories/AnchorERC1155__factory.d.ts.map +0 -1
  30. package/dist/typechain/factories/AnchorERC1155__factory.js +0 -1766
  31. package/dist/typechain/factories/AnchorPay__factory.d.ts.map +0 -1
  32. package/dist/typechain/factories/AnchorPay__factory.js +0 -469
  33. package/dist/typechain/factories/index.d.ts.map +0 -1
  34. package/dist/typechain/factories/index.js +0 -10
  35. package/dist/typechain/index.d.ts.map +0 -1
  36. package/dist/typechain/index.js +0 -41
  37. package/dist/types.d.ts.map +0 -1
  38. package/dist/types.js +0 -2
@@ -1,854 +0,0 @@
1
- "use strict";
2
- /* eslint-disable */
3
- /* tslint:disable */
4
- // @ts-nocheck
5
- /*
6
- * ---------------------------------------------------------------
7
- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
- * ## ##
9
- * ## AUTHOR: acacode ##
10
- * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
- * ---------------------------------------------------------------
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Api = exports.HttpClient = exports.ContentType = void 0;
15
- var ContentType;
16
- (function (ContentType) {
17
- ContentType["Json"] = "application/json";
18
- ContentType["JsonApi"] = "application/vnd.api+json";
19
- ContentType["FormData"] = "multipart/form-data";
20
- ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
21
- ContentType["Text"] = "text/plain";
22
- })(ContentType || (exports.ContentType = ContentType = {}));
23
- class HttpClient {
24
- constructor(apiConfig = {}) {
25
- this.baseUrl = "https://anchordev.dipbit.xyz/";
26
- this.securityData = null;
27
- this.abortControllers = new Map();
28
- this.customFetch = (...fetchParams) => fetch(...fetchParams);
29
- this.baseApiParams = {
30
- credentials: "same-origin",
31
- headers: {},
32
- redirect: "follow",
33
- referrerPolicy: "no-referrer",
34
- };
35
- this.setSecurityData = (data) => {
36
- this.securityData = data;
37
- };
38
- this.contentFormatters = {
39
- [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
40
- ? JSON.stringify(input)
41
- : input,
42
- [ContentType.JsonApi]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
43
- ? JSON.stringify(input)
44
- : input,
45
- [ContentType.Text]: (input) => input !== null && typeof input !== "string"
46
- ? JSON.stringify(input)
47
- : input,
48
- [ContentType.FormData]: (input) => {
49
- if (input instanceof FormData) {
50
- return input;
51
- }
52
- return Object.keys(input || {}).reduce((formData, key) => {
53
- const property = input[key];
54
- formData.append(key, property instanceof Blob
55
- ? property
56
- : typeof property === "object" && property !== null
57
- ? JSON.stringify(property)
58
- : `${property}`);
59
- return formData;
60
- }, new FormData());
61
- },
62
- [ContentType.UrlEncoded]: (input) => this.toQueryString(input),
63
- };
64
- this.createAbortSignal = (cancelToken) => {
65
- if (this.abortControllers.has(cancelToken)) {
66
- const abortController = this.abortControllers.get(cancelToken);
67
- if (abortController) {
68
- return abortController.signal;
69
- }
70
- return void 0;
71
- }
72
- const abortController = new AbortController();
73
- this.abortControllers.set(cancelToken, abortController);
74
- return abortController.signal;
75
- };
76
- this.abortRequest = (cancelToken) => {
77
- const abortController = this.abortControllers.get(cancelToken);
78
- if (abortController) {
79
- abortController.abort();
80
- this.abortControllers.delete(cancelToken);
81
- }
82
- };
83
- this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
84
- const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
85
- this.securityWorker &&
86
- (await this.securityWorker(this.securityData))) ||
87
- {};
88
- const requestParams = this.mergeRequestParams(params, secureParams);
89
- const queryString = query && this.toQueryString(query);
90
- const payloadFormatter = this.contentFormatters[type || ContentType.Json];
91
- const responseFormat = format || requestParams.format;
92
- return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
93
- ...requestParams,
94
- headers: {
95
- ...(requestParams.headers || {}),
96
- ...(type && type !== ContentType.FormData
97
- ? { "Content-Type": type }
98
- : {}),
99
- },
100
- signal: (cancelToken
101
- ? this.createAbortSignal(cancelToken)
102
- : requestParams.signal) || null,
103
- body: typeof body === "undefined" || body === null
104
- ? null
105
- : payloadFormatter(body),
106
- }).then(async (response) => {
107
- const r = response;
108
- r.data = null;
109
- r.error = null;
110
- const data = !responseFormat
111
- ? r
112
- : await response[responseFormat]()
113
- .then((data) => {
114
- if (r.ok) {
115
- r.data = data;
116
- }
117
- else {
118
- r.error = data;
119
- }
120
- return r;
121
- })
122
- .catch((e) => {
123
- r.error = e;
124
- return r;
125
- });
126
- if (cancelToken) {
127
- this.abortControllers.delete(cancelToken);
128
- }
129
- if (!response.ok)
130
- throw data;
131
- return data;
132
- });
133
- };
134
- Object.assign(this, apiConfig);
135
- }
136
- encodeQueryParam(key, value) {
137
- const encodedKey = encodeURIComponent(key);
138
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
139
- }
140
- addQueryParam(query, key) {
141
- return this.encodeQueryParam(key, query[key]);
142
- }
143
- addArrayQueryParam(query, key) {
144
- const value = query[key];
145
- return value.map((v) => this.encodeQueryParam(key, v)).join("&");
146
- }
147
- toQueryString(rawQuery) {
148
- const query = rawQuery || {};
149
- const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
150
- return keys
151
- .map((key) => Array.isArray(query[key])
152
- ? this.addArrayQueryParam(query, key)
153
- : this.addQueryParam(query, key))
154
- .join("&");
155
- }
156
- addQueryParams(rawQuery) {
157
- const queryString = this.toQueryString(rawQuery);
158
- return queryString ? `?${queryString}` : "";
159
- }
160
- mergeRequestParams(params1, params2) {
161
- return {
162
- ...this.baseApiParams,
163
- ...params1,
164
- ...(params2 || {}),
165
- headers: {
166
- ...(this.baseApiParams.headers || {}),
167
- ...(params1.headers || {}),
168
- ...((params2 && params2.headers) || {}),
169
- },
170
- };
171
- }
172
- }
173
- exports.HttpClient = HttpClient;
174
- /**
175
- * @title Anchor OpenApi
176
- * @version V1.0
177
- * @license Apache 2.0 (http://springdoc.org)
178
- * @baseUrl https://anchordev.dipbit.xyz/
179
- */
180
- class Api extends HttpClient {
181
- constructor() {
182
- super(...arguments);
183
- this.s1 = {
184
- /**
185
- * @description assets of badge
186
- *
187
- * @tags AnchorS2S
188
- * @name QueryAssets
189
- * @summary assets of badge
190
- * @request POST:/s1/assets/{type}
191
- */
192
- queryAssets: (type, data, params = {}) => this.request({
193
- path: `/s1/assets/${type}`,
194
- method: "POST",
195
- body: data,
196
- type: ContentType.Json,
197
- format: "json",
198
- ...params,
199
- }),
200
- /**
201
- * @description grant badge
202
- *
203
- * @tags AnchorS2S
204
- * @name GrantBadge
205
- * @summary grant badge
206
- * @request POST:/s1/badges
207
- */
208
- grantBadge: (data, params = {}) => this.request({
209
- path: `/s1/badges`,
210
- method: "POST",
211
- body: data,
212
- type: ContentType.Json,
213
- format: "json",
214
- ...params,
215
- }),
216
- /**
217
- * @description badges check
218
- *
219
- * @tags AnchorS2S
220
- * @name BadgesCheck
221
- * @summary badges check
222
- * @request POST:/s1/badges/check
223
- */
224
- badgesCheck: (data, params = {}) => this.request({
225
- path: `/s1/badges/check`,
226
- method: "POST",
227
- body: data,
228
- type: ContentType.Json,
229
- format: "json",
230
- ...params,
231
- }),
232
- /**
233
- * @description query badges holders
234
- *
235
- * @tags AnchorS2S
236
- * @name QueryBadgesHolders
237
- * @summary query badges holders
238
- * @request GET:/s1/badges/holders
239
- */
240
- queryBadgesHolders: (query, params = {}) => this.request({
241
- path: `/s1/badges/holders`,
242
- method: "GET",
243
- query: query,
244
- format: "json",
245
- ...params,
246
- }),
247
- /**
248
- * @description check by event
249
- *
250
- * @tags AnchorS2S
251
- * @name CheckByEvent
252
- * @summary check by event
253
- * @request POST:/s1/check/event
254
- */
255
- checkByEvent: (data, params = {}) => this.request({
256
- path: `/s1/check/event`,
257
- method: "POST",
258
- body: data,
259
- type: ContentType.Json,
260
- format: "json",
261
- ...params,
262
- }),
263
- /**
264
- * @description 重制探测徽章冷却时间
265
- *
266
- * @tags AnchorS2S
267
- * @name IntervalReset
268
- * @summary interval reset
269
- * @request POST:/s1/interval/reset
270
- */
271
- intervalReset: (data, params = {}) => this.request({
272
- path: `/s1/interval/reset`,
273
- method: "POST",
274
- body: data,
275
- type: ContentType.Json,
276
- format: "json",
277
- ...params,
278
- }),
279
- /**
280
- * @description 查询钱包地址列表对应的NFT持有数量(持有时间超过指定时间戳),透传调用RemoteNftService.GetUserNftHoldingByDuration
281
- *
282
- * @tags AnchorS2S
283
- * @name GetUserNftHoldingByDuration
284
- * @summary 查询NFT持有数量(按持有时长)
285
- * @request POST:/s1/nft/holding-by-duration
286
- */
287
- getUserNftHoldingByDuration: (data, params = {}) => this.request({
288
- path: `/s1/nft/holding-by-duration`,
289
- method: "POST",
290
- body: data,
291
- type: ContentType.Json,
292
- format: "json",
293
- ...params,
294
- }),
295
- /**
296
- * @description purchase mint with signature
297
- *
298
- * @tags AnchorS2S
299
- * @name PurchaseMint
300
- * @summary purchase mint with signature
301
- * @request POST:/s1/purchase/{type}
302
- */
303
- purchaseMint: (type, data, params = {}) => this.request({
304
- path: `/s1/purchase/${type}`,
305
- method: "POST",
306
- body: data,
307
- type: ContentType.Json,
308
- format: "json",
309
- ...params,
310
- }),
311
- /**
312
- * @description get nft series by id
313
- *
314
- * @tags AnchorS2S
315
- * @name GetNftSeriesDetail
316
- * @summary get nft series by id
317
- * @request GET:/s1/series/{type}/{series}
318
- */
319
- getNftSeriesDetail: (type, series, query, params = {}) => this.request({
320
- path: `/s1/series/${type}/${series}`,
321
- method: "GET",
322
- query: query,
323
- format: "json",
324
- ...params,
325
- }),
326
- /**
327
- * @description 创建新团队,支持设置背景图
328
- *
329
- * @tags AnchorS2S
330
- * @name CreateTeam
331
- * @summary Create team
332
- * @request POST:/s1/teams
333
- */
334
- createTeam: (data, params = {}) => this.request({
335
- path: `/s1/teams`,
336
- method: "POST",
337
- body: data,
338
- type: ContentType.Json,
339
- format: "json",
340
- ...params,
341
- }),
342
- /**
343
- * @description 加入团队,支持通过邀请码或直接指定团队ID
344
- *
345
- * @tags AnchorS2S
346
- * @name JoinTeam
347
- * @summary Join team
348
- * @request POST:/s1/teams/join
349
- */
350
- joinTeam: (data, params = {}) => this.request({
351
- path: `/s1/teams/join`,
352
- method: "POST",
353
- body: data,
354
- type: ContentType.Json,
355
- format: "json",
356
- ...params,
357
- }),
358
- /**
359
- * @description 退出当前团队
360
- *
361
- * @tags AnchorS2S
362
- * @name LeaveTeam
363
- * @summary Leave team (self)
364
- * @request DELETE:/s1/teams/leave/{userId}
365
- */
366
- leaveTeam: (userId, params = {}) => this.request({
367
- path: `/s1/teams/leave/${userId}`,
368
- method: "DELETE",
369
- format: "json",
370
- ...params,
371
- }),
372
- /**
373
- * @description 队长移除团队成员
374
- *
375
- * @tags AnchorS2S
376
- * @name RemoveTeamMember
377
- * @summary Remove member by captain
378
- * @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
379
- */
380
- removeTeamMember: (captainUserId, userId, params = {}) => this.request({
381
- path: `/s1/teams/remove/${captainUserId}/${userId}`,
382
- method: "DELETE",
383
- format: "json",
384
- ...params,
385
- }),
386
- /**
387
- * @description 批量查询多个钱包地址的代币余额,透传调用RemoteInsightTokenService.GetTokenBalances
388
- *
389
- * @tags AnchorS2S
390
- * @name GetTokenBalances
391
- * @summary 批量查询代币余额
392
- * @request POST:/s1/token/balances
393
- */
394
- getTokenBalances: (data, params = {}) => this.request({
395
- path: `/s1/token/balances`,
396
- method: "POST",
397
- body: data,
398
- type: ContentType.Json,
399
- format: "json",
400
- ...params,
401
- }),
402
- };
403
- this.v1 = {
404
- /**
405
- * @description query user claimable or claimed Badges
406
- *
407
- * @tags Anchor
408
- * @name BadgeAssets
409
- * @summary query user claimable or claimed Badges
410
- * @request GET:/v1/badges
411
- */
412
- badgeAssets: (query, params = {}) => this.request({
413
- path: `/v1/badges`,
414
- method: "GET",
415
- query: query,
416
- format: "json",
417
- ...params,
418
- }),
419
- /**
420
- * @description get check result
421
- *
422
- * @tags Anchor
423
- * @name GetCheckResult
424
- * @summary get check result
425
- * @request GET:/v1/check/{type}
426
- */
427
- getCheckResult: (type, params = {}) => this.request({
428
- path: `/v1/check/${type}`,
429
- method: "GET",
430
- format: "json",
431
- ...params,
432
- }),
433
- /**
434
- * @description anchor check
435
- *
436
- * @tags Anchor
437
- * @name Check
438
- * @summary anchor check
439
- * @request POST:/v1/check/{type}
440
- */
441
- check: (type, params = {}) => this.request({
442
- path: `/v1/check/${type}`,
443
- method: "POST",
444
- format: "json",
445
- ...params,
446
- }),
447
- /**
448
- * @description 获取用户的通知列表
449
- *
450
- * @tags TeamV1
451
- * @name GetNotifications
452
- * @summary Get notifications
453
- * @request GET:/v1/notifications
454
- */
455
- getNotifications: (query, params = {}) => this.request({
456
- path: `/v1/notifications`,
457
- method: "GET",
458
- query: query,
459
- format: "json",
460
- ...params,
461
- }),
462
- /**
463
- * @description 标记指定通知为已读状态
464
- *
465
- * @tags TeamV1
466
- * @name MarkNotificationRead
467
- * @summary Mark notification as read
468
- * @request POST:/v1/notifications/{notificationId}/read
469
- */
470
- markNotificationRead: (notificationId, params = {}) => this.request({
471
- path: `/v1/notifications/${notificationId}/read`,
472
- method: "POST",
473
- format: "json",
474
- ...params,
475
- }),
476
- /**
477
- * @description list season config
478
- *
479
- * @tags Season
480
- * @name ListSeasonConfig
481
- * @summary list season config
482
- * @request GET:/v1/seasons
483
- */
484
- listSeasonConfig: (params = {}) => this.request({
485
- path: `/v1/seasons`,
486
- method: "GET",
487
- format: "json",
488
- ...params,
489
- }),
490
- /**
491
- * @description get nft series
492
- *
493
- * @tags Anchor
494
- * @name NftSeries
495
- * @summary get nft series
496
- * @request GET:/v1/series/{type}
497
- */
498
- nftSeries: (type, params = {}) => this.request({
499
- path: `/v1/series/${type}`,
500
- method: "GET",
501
- format: "json",
502
- ...params,
503
- }),
504
- /**
505
- * @description get nft series by id
506
- *
507
- * @tags Anchor
508
- * @name GetNftSeriesById
509
- * @summary get nft series by id
510
- * @request GET:/v1/series/{type}/{series}
511
- */
512
- getNftSeriesById: (type, series, query, params = {}) => this.request({
513
- path: `/v1/series/${type}/${series}`,
514
- method: "GET",
515
- query: query,
516
- format: "json",
517
- ...params,
518
- }),
519
- /**
520
- * @description 获取团队所有徽章的状态信息,支持按状态筛选
521
- *
522
- * @tags TeamV1
523
- * @name GetTeamBadges
524
- * @summary Get team badges
525
- * @request GET:/v1/teams/badges
526
- */
527
- getTeamBadges: (query, params = {}) => this.request({
528
- path: `/v1/teams/badges`,
529
- method: "GET",
530
- query: query,
531
- format: "json",
532
- ...params,
533
- }),
534
- /**
535
- * @description 获取指定徽章的贡献者列表
536
- *
537
- * @tags TeamV1
538
- * @name GetBadgeContributors
539
- * @summary Get badge contributors
540
- * @request GET:/v1/teams/badges/{badgeId}/contributors
541
- */
542
- getBadgeContributors: (badgeId, params = {}) => this.request({
543
- path: `/v1/teams/badges/${badgeId}/contributors`,
544
- method: "GET",
545
- format: "json",
546
- ...params,
547
- }),
548
- /**
549
- * @description 获取团队排行榜,支持分页查询,返回个人团队信息
550
- *
551
- * @tags TeamV1
552
- * @name GetTeamLeaderboard
553
- * @summary Get team leaderboard
554
- * @request GET:/v1/teams/leaderboard
555
- */
556
- getTeamLeaderboard: (query, params = {}) => this.request({
557
- path: `/v1/teams/leaderboard`,
558
- method: "GET",
559
- query: query,
560
- format: "json",
561
- ...params,
562
- }),
563
- /**
564
- * @description 获取当前用户的个人概况信息
565
- *
566
- * @tags TeamV1
567
- * @name GetMyTeamProfile
568
- * @summary Get my team profile
569
- * @request GET:/v1/teams/members/me
570
- */
571
- getMyTeamProfile: (params = {}) => this.request({
572
- path: `/v1/teams/members/me`,
573
- method: "GET",
574
- format: "json",
575
- ...params,
576
- }),
577
- /**
578
- * @description 获取团队详情,包含已解锁的徽章信息
579
- *
580
- * @tags TeamV1
581
- * @name GetTeamDetail
582
- * @summary Get team detail
583
- * @request GET:/v1/teams/{teamId}/detail
584
- */
585
- getTeamDetail: (teamId, params = {}) => this.request({
586
- path: `/v1/teams/${teamId}/detail`,
587
- method: "GET",
588
- format: "json",
589
- ...params,
590
- }),
591
- /**
592
- * @description 获取团队内成员贡献排行榜
593
- *
594
- * @tags TeamV1
595
- * @name GetTeamMemberRanking
596
- * @summary Get team member ranking
597
- * @request GET:/v1/teams/{teamId}/members/ranking
598
- */
599
- getTeamMemberRanking: (teamId, query, params = {}) => this.request({
600
- path: `/v1/teams/${teamId}/members/ranking`,
601
- method: "GET",
602
- query: query,
603
- format: "json",
604
- ...params,
605
- }),
606
- /**
607
- * @description 前端监听到合约成功事件,调用加快后端事件处理
608
- *
609
- * @tags Transaction
610
- * @name UserOpHashProcess
611
- * @summary userOpHash process
612
- * @request POST:/v1/transaction/process/userOpHash
613
- */
614
- userOpHashProcess: (data, params = {}) => this.request({
615
- path: `/v1/transaction/process/userOpHash`,
616
- method: "POST",
617
- body: data,
618
- type: ContentType.Json,
619
- format: "json",
620
- ...params,
621
- }),
622
- /**
623
- * @description 前端监听到合约成功事件,调用加快后端事件处理
624
- *
625
- * @tags Transaction
626
- * @name TransactionHashProcess
627
- * @summary speed up transaction
628
- * @request POST:/v1/transaction/process/{txHash}
629
- */
630
- transactionHashProcess: (txHash, params = {}) => this.request({
631
- path: `/v1/transaction/process/${txHash}`,
632
- method: "POST",
633
- format: "json",
634
- ...params,
635
- }),
636
- };
637
- this.v2 = {
638
- /**
639
- * @description query badges by conditions
640
- *
641
- * @tags BadgeV2
642
- * @name QueryBadges
643
- * @summary query badges by conditions
644
- * @request GET:/v2/badges
645
- */
646
- queryBadges: (query, params = {}) => this.request({
647
- path: `/v2/badges`,
648
- method: "GET",
649
- query: query,
650
- format: "json",
651
- ...params,
652
- }),
653
- /**
654
- * @description Check which badges the user can claim
655
- *
656
- * @tags BadgeV2
657
- * @name CheckUserClaimableBadges
658
- * @summary Check user claimable badges
659
- * @request POST:/v2/badges
660
- */
661
- checkUserClaimableBadges: (data, params = {}) => this.request({
662
- path: `/v2/badges`,
663
- method: "POST",
664
- body: data,
665
- type: ContentType.Json,
666
- format: "json",
667
- ...params,
668
- }),
669
- /**
670
- * @description Get user's claimed and claimable badge assets
671
- *
672
- * @tags BadgeV2
673
- * @name GetUserBadgeAssets
674
- * @summary Get user badge assets
675
- * @request GET:/v2/badges/assets
676
- */
677
- getUserBadgeAssets: (query, params = {}) => this.request({
678
- path: `/v2/badges/assets`,
679
- method: "GET",
680
- query: query,
681
- format: "json",
682
- ...params,
683
- }),
684
- /**
685
- * @description Query badge by category
686
- *
687
- * @tags BadgeV2
688
- * @name CategoriesList
689
- * @summary Query badge by category
690
- * @request GET:/v2/badges/categories
691
- */
692
- categoriesList: (query, params = {}) => this.request({
693
- path: `/v2/badges/categories`,
694
- method: "GET",
695
- query: query,
696
- format: "json",
697
- ...params,
698
- }),
699
- /**
700
- * @description Get detailed information of a specific badge category
701
- *
702
- * @tags BadgeV2
703
- * @name CategoriesDetail
704
- * @summary Get badge detail by category
705
- * @request GET:/v2/badges/categories/{category}
706
- */
707
- categoriesDetail: (category, params = {}) => this.request({
708
- path: `/v2/badges/categories/${category}`,
709
- method: "GET",
710
- format: "json",
711
- ...params,
712
- }),
713
- /**
714
- * @description Get badges that the user can claim
715
- *
716
- * @tags BadgeV2
717
- * @name GetUserClaimableBadges
718
- * @summary Get user claimable badges
719
- * @request GET:/v2/badges/claimable
720
- */
721
- getUserClaimableBadges: (query, params = {}) => this.request({
722
- path: `/v2/badges/claimable`,
723
- method: "GET",
724
- query: query,
725
- format: "json",
726
- ...params,
727
- }),
728
- /**
729
- * @description Query badge series with optional filtering conditions
730
- *
731
- * @tags BadgeV2
732
- * @name GetBadgeSeries
733
- * @summary Query badge series with conditions
734
- * @request GET:/v2/badges/series
735
- */
736
- getBadgeSeries: (query, params = {}) => this.request({
737
- path: `/v2/badges/series`,
738
- method: "GET",
739
- query: query,
740
- format: "json",
741
- ...params,
742
- }),
743
- /**
744
- * @description Get detailed information of a specific badge series
745
- *
746
- * @tags BadgeV2
747
- * @name GetBadgeSeriesDetail
748
- * @summary Get badge series detail
749
- * @request GET:/v2/badges/series/{series}
750
- */
751
- getBadgeSeriesDetail: (series, query, params = {}) => this.request({
752
- path: `/v2/badges/series/${series}`,
753
- method: "GET",
754
- query: query,
755
- format: "json",
756
- ...params,
757
- }),
758
- /**
759
- * @description Get signatures required for claiming badges
760
- *
761
- * @tags BadgeV2
762
- * @name GetBadgeClaimSignatures
763
- * @summary Get badge claim signatures
764
- * @request POST:/v2/badges/signatures
765
- */
766
- getBadgeClaimSignatures: (data, params = {}) => this.request({
767
- path: `/v2/badges/signatures`,
768
- method: "POST",
769
- body: data,
770
- type: ContentType.Json,
771
- format: "json",
772
- ...params,
773
- }),
774
- /**
775
- * @description Get verifiers for badge conditions based on platform and type
776
- *
777
- * @tags BadgeV2
778
- * @name GetBadgeVerifiers
779
- * @summary Get badge verifiers
780
- * @request GET:/v2/badges/verifiers
781
- */
782
- getBadgeVerifiers: (query, params = {}) => this.request({
783
- path: `/v2/badges/verifiers`,
784
- method: "GET",
785
- query: query,
786
- format: "json",
787
- ...params,
788
- }),
789
- /**
790
- * @description Get detailed information of a specific badge
791
- *
792
- * @tags BadgeV2
793
- * @name GetBadgeDetail
794
- * @summary Get badge detail
795
- * @request GET:/v2/badges/{badgeId}
796
- */
797
- getBadgeDetail: (badgeId, params = {}) => this.request({
798
- path: `/v2/badges/${badgeId}`,
799
- method: "GET",
800
- format: "json",
801
- ...params,
802
- }),
803
- /**
804
- * @description Check if a specific badge is claimable for the user
805
- *
806
- * @tags BadgeV2
807
- * @name CheckSingleBadgeClaimable
808
- * @summary Check single badge claimable status
809
- * @request POST:/v2/badges/{badgeId}
810
- */
811
- checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
812
- path: `/v2/badges/${badgeId}`,
813
- method: "POST",
814
- body: data,
815
- type: ContentType.Json,
816
- format: "json",
817
- ...params,
818
- }),
819
- /**
820
- * @description anchor batch mint
821
- *
822
- * @tags AnchorV2
823
- * @name BatchMint
824
- * @summary anchor batch mint
825
- * @request POST:/v2/batch/mint/{type}
826
- */
827
- batchMint: (type, data, params = {}) => this.request({
828
- path: `/v2/batch/mint/${type}`,
829
- method: "POST",
830
- body: data,
831
- type: ContentType.Json,
832
- format: "json",
833
- ...params,
834
- }),
835
- /**
836
- * @description anchor mint
837
- *
838
- * @tags AnchorV2
839
- * @name Mint
840
- * @summary anchor mint
841
- * @request POST:/v2/mint/{type}
842
- */
843
- mint: (type, data, params = {}) => this.request({
844
- path: `/v2/mint/${type}`,
845
- method: "POST",
846
- body: data,
847
- type: ContentType.Json,
848
- format: "json",
849
- ...params,
850
- }),
851
- };
852
- }
853
- }
854
- exports.Api = Api;