anchor-sdk 0.1.43-beta.1 → 0.1.43-beta.4

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/constants.d.ts +1 -1
  2. package/dist/generated/Api.d.ts +199 -197
  3. package/dist/index.js +3 -1379
  4. package/dist/index.js.map +12 -11
  5. package/dist/react/index.js +3 -8
  6. package/dist/react/index.js.map +19 -0
  7. package/package.json +15 -15
  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 -868
  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,868 +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 查询我的团队信息
344
- *
345
- * @tags AnchorS2S
346
- * @name TeamDetail
347
- * @summary query my team info
348
- * @request GET:/s1/teams/detail/{userId}
349
- */
350
- teamDetail: (userId, params = {}) => this.request({
351
- path: `/s1/teams/detail/${userId}`,
352
- method: "GET",
353
- format: "json",
354
- ...params,
355
- }),
356
- /**
357
- * @description 加入团队,支持通过邀请码或直接指定团队ID
358
- *
359
- * @tags AnchorS2S
360
- * @name JoinTeam
361
- * @summary Join team
362
- * @request POST:/s1/teams/join
363
- */
364
- joinTeam: (data, params = {}) => this.request({
365
- path: `/s1/teams/join`,
366
- method: "POST",
367
- body: data,
368
- type: ContentType.Json,
369
- format: "json",
370
- ...params,
371
- }),
372
- /**
373
- * @description 退出当前团队
374
- *
375
- * @tags AnchorS2S
376
- * @name LeaveTeam
377
- * @summary Leave team (self)
378
- * @request DELETE:/s1/teams/leave/{userId}
379
- */
380
- leaveTeam: (userId, params = {}) => this.request({
381
- path: `/s1/teams/leave/${userId}`,
382
- method: "DELETE",
383
- format: "json",
384
- ...params,
385
- }),
386
- /**
387
- * @description 队长移除团队成员
388
- *
389
- * @tags AnchorS2S
390
- * @name RemoveTeamMember
391
- * @summary Remove member by captain
392
- * @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
393
- */
394
- removeTeamMember: (captainUserId, userId, params = {}) => this.request({
395
- path: `/s1/teams/remove/${captainUserId}/${userId}`,
396
- method: "DELETE",
397
- format: "json",
398
- ...params,
399
- }),
400
- /**
401
- * @description 批量查询多个钱包地址的代币余额,透传调用RemoteInsightTokenService.GetTokenBalances
402
- *
403
- * @tags AnchorS2S
404
- * @name GetTokenBalances
405
- * @summary 批量查询代币余额
406
- * @request POST:/s1/token/balances
407
- */
408
- getTokenBalances: (data, params = {}) => this.request({
409
- path: `/s1/token/balances`,
410
- method: "POST",
411
- body: data,
412
- type: ContentType.Json,
413
- format: "json",
414
- ...params,
415
- }),
416
- };
417
- this.v1 = {
418
- /**
419
- * @description query user claimable or claimed Badges
420
- *
421
- * @tags Anchor
422
- * @name BadgeAssets
423
- * @summary query user claimable or claimed Badges
424
- * @request GET:/v1/badges
425
- */
426
- badgeAssets: (query, params = {}) => this.request({
427
- path: `/v1/badges`,
428
- method: "GET",
429
- query: query,
430
- format: "json",
431
- ...params,
432
- }),
433
- /**
434
- * @description get check result
435
- *
436
- * @tags Anchor
437
- * @name GetCheckResult
438
- * @summary get check result
439
- * @request GET:/v1/check/{type}
440
- */
441
- getCheckResult: (type, params = {}) => this.request({
442
- path: `/v1/check/${type}`,
443
- method: "GET",
444
- format: "json",
445
- ...params,
446
- }),
447
- /**
448
- * @description anchor check
449
- *
450
- * @tags Anchor
451
- * @name Check
452
- * @summary anchor check
453
- * @request POST:/v1/check/{type}
454
- */
455
- check: (type, params = {}) => this.request({
456
- path: `/v1/check/${type}`,
457
- method: "POST",
458
- format: "json",
459
- ...params,
460
- }),
461
- /**
462
- * @description 获取用户的通知列表
463
- *
464
- * @tags TeamV1
465
- * @name GetNotifications
466
- * @summary Get notifications
467
- * @request GET:/v1/notifications
468
- */
469
- getNotifications: (query, params = {}) => this.request({
470
- path: `/v1/notifications`,
471
- method: "GET",
472
- query: query,
473
- format: "json",
474
- ...params,
475
- }),
476
- /**
477
- * @description 标记指定通知为已读状态
478
- *
479
- * @tags TeamV1
480
- * @name MarkNotificationRead
481
- * @summary Mark notification as read
482
- * @request POST:/v1/notifications/{notificationId}/read
483
- */
484
- markNotificationRead: (notificationId, params = {}) => this.request({
485
- path: `/v1/notifications/${notificationId}/read`,
486
- method: "POST",
487
- format: "json",
488
- ...params,
489
- }),
490
- /**
491
- * @description list season config
492
- *
493
- * @tags Season
494
- * @name ListSeasonConfig
495
- * @summary list season config
496
- * @request GET:/v1/seasons
497
- */
498
- listSeasonConfig: (params = {}) => this.request({
499
- path: `/v1/seasons`,
500
- method: "GET",
501
- format: "json",
502
- ...params,
503
- }),
504
- /**
505
- * @description get nft series
506
- *
507
- * @tags Anchor
508
- * @name NftSeries
509
- * @summary get nft series
510
- * @request GET:/v1/series/{type}
511
- */
512
- nftSeries: (type, params = {}) => this.request({
513
- path: `/v1/series/${type}`,
514
- method: "GET",
515
- format: "json",
516
- ...params,
517
- }),
518
- /**
519
- * @description get nft series by id
520
- *
521
- * @tags Anchor
522
- * @name GetNftSeriesById
523
- * @summary get nft series by id
524
- * @request GET:/v1/series/{type}/{series}
525
- */
526
- getNftSeriesById: (type, series, query, params = {}) => this.request({
527
- path: `/v1/series/${type}/${series}`,
528
- method: "GET",
529
- query: query,
530
- format: "json",
531
- ...params,
532
- }),
533
- /**
534
- * @description 获取团队所有徽章的状态信息,支持按状态筛选
535
- *
536
- * @tags TeamV1
537
- * @name GetTeamBadges
538
- * @summary Get team badges
539
- * @request GET:/v1/teams/badges
540
- */
541
- getTeamBadges: (query, params = {}) => this.request({
542
- path: `/v1/teams/badges`,
543
- method: "GET",
544
- query: query,
545
- format: "json",
546
- ...params,
547
- }),
548
- /**
549
- * @description 获取指定徽章的贡献者列表
550
- *
551
- * @tags TeamV1
552
- * @name GetBadgeContributors
553
- * @summary Get badge contributors
554
- * @request GET:/v1/teams/badges/{badgeId}/contributors
555
- */
556
- getBadgeContributors: (badgeId, params = {}) => this.request({
557
- path: `/v1/teams/badges/${badgeId}/contributors`,
558
- method: "GET",
559
- format: "json",
560
- ...params,
561
- }),
562
- /**
563
- * @description 获取团队排行榜,支持分页查询,返回个人团队信息
564
- *
565
- * @tags TeamV1
566
- * @name GetTeamLeaderboard
567
- * @summary Get team leaderboard
568
- * @request GET:/v1/teams/leaderboard
569
- */
570
- getTeamLeaderboard: (query, params = {}) => this.request({
571
- path: `/v1/teams/leaderboard`,
572
- method: "GET",
573
- query: query,
574
- format: "json",
575
- ...params,
576
- }),
577
- /**
578
- * @description 获取当前用户的个人概况信息
579
- *
580
- * @tags TeamV1
581
- * @name GetMyTeamProfile
582
- * @summary Get my team profile
583
- * @request GET:/v1/teams/members/me
584
- */
585
- getMyTeamProfile: (params = {}) => this.request({
586
- path: `/v1/teams/members/me`,
587
- method: "GET",
588
- format: "json",
589
- ...params,
590
- }),
591
- /**
592
- * @description 获取团队详情,包含已解锁的徽章信息
593
- *
594
- * @tags TeamV1
595
- * @name GetTeamDetail
596
- * @summary Get team detail
597
- * @request GET:/v1/teams/{teamId}/detail
598
- */
599
- getTeamDetail: (teamId, params = {}) => this.request({
600
- path: `/v1/teams/${teamId}/detail`,
601
- method: "GET",
602
- format: "json",
603
- ...params,
604
- }),
605
- /**
606
- * @description 获取团队内成员贡献排行榜
607
- *
608
- * @tags TeamV1
609
- * @name GetTeamMemberRanking
610
- * @summary Get team member ranking
611
- * @request GET:/v1/teams/{teamId}/members/ranking
612
- */
613
- getTeamMemberRanking: (teamId, query, params = {}) => this.request({
614
- path: `/v1/teams/${teamId}/members/ranking`,
615
- method: "GET",
616
- query: query,
617
- format: "json",
618
- ...params,
619
- }),
620
- /**
621
- * @description 前端监听到合约成功事件,调用加快后端事件处理
622
- *
623
- * @tags Transaction
624
- * @name UserOpHashProcess
625
- * @summary userOpHash process
626
- * @request POST:/v1/transaction/process/userOpHash
627
- */
628
- userOpHashProcess: (data, params = {}) => this.request({
629
- path: `/v1/transaction/process/userOpHash`,
630
- method: "POST",
631
- body: data,
632
- type: ContentType.Json,
633
- format: "json",
634
- ...params,
635
- }),
636
- /**
637
- * @description 前端监听到合约成功事件,调用加快后端事件处理
638
- *
639
- * @tags Transaction
640
- * @name TransactionHashProcess
641
- * @summary speed up transaction
642
- * @request POST:/v1/transaction/process/{txHash}
643
- */
644
- transactionHashProcess: (txHash, params = {}) => this.request({
645
- path: `/v1/transaction/process/${txHash}`,
646
- method: "POST",
647
- format: "json",
648
- ...params,
649
- }),
650
- };
651
- this.v2 = {
652
- /**
653
- * @description query badges by conditions
654
- *
655
- * @tags BadgeV2
656
- * @name QueryBadges
657
- * @summary query badges by conditions
658
- * @request GET:/v2/badges
659
- */
660
- queryBadges: (query, params = {}) => this.request({
661
- path: `/v2/badges`,
662
- method: "GET",
663
- query: query,
664
- format: "json",
665
- ...params,
666
- }),
667
- /**
668
- * @description Check which badges the user can claim
669
- *
670
- * @tags BadgeV2
671
- * @name CheckUserClaimableBadges
672
- * @summary Check user claimable badges
673
- * @request POST:/v2/badges
674
- */
675
- checkUserClaimableBadges: (data, params = {}) => this.request({
676
- path: `/v2/badges`,
677
- method: "POST",
678
- body: data,
679
- type: ContentType.Json,
680
- format: "json",
681
- ...params,
682
- }),
683
- /**
684
- * @description Get user's claimed and claimable badge assets
685
- *
686
- * @tags BadgeV2
687
- * @name GetUserBadgeAssets
688
- * @summary Get user badge assets
689
- * @request GET:/v2/badges/assets
690
- */
691
- getUserBadgeAssets: (query, params = {}) => this.request({
692
- path: `/v2/badges/assets`,
693
- method: "GET",
694
- query: query,
695
- format: "json",
696
- ...params,
697
- }),
698
- /**
699
- * @description Query badge by category
700
- *
701
- * @tags BadgeV2
702
- * @name CategoriesList
703
- * @summary Query badge by category
704
- * @request GET:/v2/badges/categories
705
- */
706
- categoriesList: (query, params = {}) => this.request({
707
- path: `/v2/badges/categories`,
708
- method: "GET",
709
- query: query,
710
- format: "json",
711
- ...params,
712
- }),
713
- /**
714
- * @description Get detailed information of a specific badge category
715
- *
716
- * @tags BadgeV2
717
- * @name CategoriesDetail
718
- * @summary Get badge detail by category
719
- * @request GET:/v2/badges/categories/{category}
720
- */
721
- categoriesDetail: (category, params = {}) => this.request({
722
- path: `/v2/badges/categories/${category}`,
723
- method: "GET",
724
- format: "json",
725
- ...params,
726
- }),
727
- /**
728
- * @description Get badges that the user can claim
729
- *
730
- * @tags BadgeV2
731
- * @name GetUserClaimableBadges
732
- * @summary Get user claimable badges
733
- * @request GET:/v2/badges/claimable
734
- */
735
- getUserClaimableBadges: (query, params = {}) => this.request({
736
- path: `/v2/badges/claimable`,
737
- method: "GET",
738
- query: query,
739
- format: "json",
740
- ...params,
741
- }),
742
- /**
743
- * @description Query badge series with optional filtering conditions
744
- *
745
- * @tags BadgeV2
746
- * @name GetBadgeSeries
747
- * @summary Query badge series with conditions
748
- * @request GET:/v2/badges/series
749
- */
750
- getBadgeSeries: (query, params = {}) => this.request({
751
- path: `/v2/badges/series`,
752
- method: "GET",
753
- query: query,
754
- format: "json",
755
- ...params,
756
- }),
757
- /**
758
- * @description Get detailed information of a specific badge series
759
- *
760
- * @tags BadgeV2
761
- * @name GetBadgeSeriesDetail
762
- * @summary Get badge series detail
763
- * @request GET:/v2/badges/series/{series}
764
- */
765
- getBadgeSeriesDetail: (series, query, params = {}) => this.request({
766
- path: `/v2/badges/series/${series}`,
767
- method: "GET",
768
- query: query,
769
- format: "json",
770
- ...params,
771
- }),
772
- /**
773
- * @description Get signatures required for claiming badges
774
- *
775
- * @tags BadgeV2
776
- * @name GetBadgeClaimSignatures
777
- * @summary Get badge claim signatures
778
- * @request POST:/v2/badges/signatures
779
- */
780
- getBadgeClaimSignatures: (data, params = {}) => this.request({
781
- path: `/v2/badges/signatures`,
782
- method: "POST",
783
- body: data,
784
- type: ContentType.Json,
785
- format: "json",
786
- ...params,
787
- }),
788
- /**
789
- * @description Get verifiers for badge conditions based on platform and type
790
- *
791
- * @tags BadgeV2
792
- * @name GetBadgeVerifiers
793
- * @summary Get badge verifiers
794
- * @request GET:/v2/badges/verifiers
795
- */
796
- getBadgeVerifiers: (query, params = {}) => this.request({
797
- path: `/v2/badges/verifiers`,
798
- method: "GET",
799
- query: query,
800
- format: "json",
801
- ...params,
802
- }),
803
- /**
804
- * @description Get detailed information of a specific badge
805
- *
806
- * @tags BadgeV2
807
- * @name GetBadgeDetail
808
- * @summary Get badge detail
809
- * @request GET:/v2/badges/{badgeId}
810
- */
811
- getBadgeDetail: (badgeId, params = {}) => this.request({
812
- path: `/v2/badges/${badgeId}`,
813
- method: "GET",
814
- format: "json",
815
- ...params,
816
- }),
817
- /**
818
- * @description Check if a specific badge is claimable for the user
819
- *
820
- * @tags BadgeV2
821
- * @name CheckSingleBadgeClaimable
822
- * @summary Check single badge claimable status
823
- * @request POST:/v2/badges/{badgeId}
824
- */
825
- checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
826
- path: `/v2/badges/${badgeId}`,
827
- method: "POST",
828
- body: data,
829
- type: ContentType.Json,
830
- format: "json",
831
- ...params,
832
- }),
833
- /**
834
- * @description anchor batch mint
835
- *
836
- * @tags AnchorV2
837
- * @name BatchMint
838
- * @summary anchor batch mint
839
- * @request POST:/v2/batch/mint/{type}
840
- */
841
- batchMint: (type, data, params = {}) => this.request({
842
- path: `/v2/batch/mint/${type}`,
843
- method: "POST",
844
- body: data,
845
- type: ContentType.Json,
846
- format: "json",
847
- ...params,
848
- }),
849
- /**
850
- * @description anchor mint
851
- *
852
- * @tags AnchorV2
853
- * @name Mint
854
- * @summary anchor mint
855
- * @request POST:/v2/mint/{type}
856
- */
857
- mint: (type, data, params = {}) => this.request({
858
- path: `/v2/mint/${type}`,
859
- method: "POST",
860
- body: data,
861
- type: ContentType.Json,
862
- format: "json",
863
- ...params,
864
- }),
865
- };
866
- }
867
- }
868
- exports.Api = Api;