anchor-sdk 0.1.42 → 0.1.43-beta.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.
@@ -107,10 +107,9 @@ class HttpClient {
107
107
  const r = response;
108
108
  r.data = null;
109
109
  r.error = null;
110
- const responseToParse = responseFormat ? response.clone() : response;
111
110
  const data = !responseFormat
112
111
  ? r
113
- : await responseToParse[responseFormat]()
112
+ : await response[responseFormat]()
114
113
  .then((data) => {
115
114
  if (r.ok) {
116
115
  r.data = data;
@@ -181,161 +180,189 @@ exports.HttpClient = HttpClient;
181
180
  class Api extends HttpClient {
182
181
  constructor() {
183
182
  super(...arguments);
184
- this.v1 = {
183
+ this.s1 = {
185
184
  /**
186
- * @description get nft series by id
185
+ * @description assets of badge
187
186
  *
188
- * @tags Anchor
189
- * @name GetNftSeriesById
190
- * @summary get nft series by id
191
- * @request GET:/v1/series/{type}/{series}
187
+ * @tags AnchorS2S
188
+ * @name QueryAssets
189
+ * @summary assets of badge
190
+ * @request POST:/s1/assets/{type}
192
191
  */
193
- getNftSeriesById: (type, series, query, params = {}) => this.request({
194
- path: `/v1/series/${type}/${series}`,
195
- method: "GET",
196
- query: query,
192
+ queryAssets: (type, data, params = {}) => this.request({
193
+ path: `/s1/assets/${type}`,
194
+ method: "POST",
195
+ body: data,
196
+ type: ContentType.Json,
197
197
  format: "json",
198
198
  ...params,
199
199
  }),
200
200
  /**
201
- * @description 获取团队排行榜,支持分页查询,返回个人团队信息
201
+ * @description grant badge
202
202
  *
203
- * @tags TeamV1
204
- * @name GetTeamLeaderboard
205
- * @summary Get team leaderboard
206
- * @request GET:/v1/teams/leaderboard
203
+ * @tags AnchorS2S
204
+ * @name GrantBadge
205
+ * @summary grant badge
206
+ * @request POST:/s1/badges
207
207
  */
208
- getTeamLeaderboard: (query, params = {}) => this.request({
209
- path: `/v1/teams/leaderboard`,
210
- method: "GET",
211
- query: query,
208
+ grantBadge: (data, params = {}) => this.request({
209
+ path: `/s1/badges`,
210
+ method: "POST",
211
+ body: data,
212
+ type: ContentType.Json,
212
213
  format: "json",
213
214
  ...params,
214
215
  }),
215
216
  /**
216
- * @description anchor check
217
+ * @description badges check
217
218
  *
218
- * @tags Anchor
219
- * @name Check
220
- * @summary anchor check
221
- * @request POST:/v1/check/{type}
219
+ * @tags AnchorS2S
220
+ * @name BadgesCheck
221
+ * @summary badges check
222
+ * @request POST:/s1/badges/check
222
223
  */
223
- check: (type, params = {}) => this.request({
224
- path: `/v1/check/${type}`,
224
+ badgesCheck: (data, params = {}) => this.request({
225
+ path: `/s1/badges/check`,
225
226
  method: "POST",
227
+ body: data,
228
+ type: ContentType.Json,
226
229
  format: "json",
227
230
  ...params,
228
231
  }),
229
232
  /**
230
- * @description get check result
233
+ * @description query badges holders
231
234
  *
232
- * @tags Anchor
233
- * @name GetCheckResult
234
- * @summary get check result
235
- * @request GET:/v1/check/{type}
235
+ * @tags AnchorS2S
236
+ * @name QueryBadgesHolders
237
+ * @summary query badges holders
238
+ * @request GET:/s1/badges/holders
236
239
  */
237
- getCheckResult: (type, params = {}) => this.request({
238
- path: `/v1/check/${type}`,
240
+ queryBadgesHolders: (query, params = {}) => this.request({
241
+ path: `/s1/badges/holders`,
239
242
  method: "GET",
243
+ query: query,
240
244
  format: "json",
241
245
  ...params,
242
246
  }),
243
247
  /**
244
- * @description 获取团队详情,包含已解锁的徽章信息
248
+ * @description check by event
245
249
  *
246
- * @tags TeamV1
247
- * @name GetTeamDetail
248
- * @summary Get team detail
249
- * @request GET:/v1/teams/{teamId}/detail
250
+ * @tags AnchorS2S
251
+ * @name CheckByEvent
252
+ * @summary check by event
253
+ * @request POST:/s1/check/event
250
254
  */
251
- getTeamDetail: (teamId, params = {}) => this.request({
252
- path: `/v1/teams/${teamId}/detail`,
253
- method: "GET",
255
+ checkByEvent: (data, params = {}) => this.request({
256
+ path: `/s1/check/event`,
257
+ method: "POST",
258
+ body: data,
259
+ type: ContentType.Json,
254
260
  format: "json",
255
261
  ...params,
256
262
  }),
257
263
  /**
258
- * @description 标记指定通知为已读状态
264
+ * @description 重制探测徽章冷却时间
259
265
  *
260
- * @tags TeamV1
261
- * @name MarkNotificationRead
262
- * @summary Mark notification as read
263
- * @request POST:/v1/notifications/{notificationId}/read
266
+ * @tags AnchorS2S
267
+ * @name IntervalReset
268
+ * @summary interval reset
269
+ * @request POST:/s1/interval/reset
264
270
  */
265
- markNotificationRead: (notificationId, params = {}) => this.request({
266
- path: `/v1/notifications/${notificationId}/read`,
271
+ intervalReset: (data, params = {}) => this.request({
272
+ path: `/s1/interval/reset`,
267
273
  method: "POST",
274
+ body: data,
275
+ type: ContentType.Json,
268
276
  format: "json",
269
277
  ...params,
270
278
  }),
271
279
  /**
272
- * @description list season config
280
+ * @description 查询钱包地址列表对应的NFT持有数量(持有时间超过指定时间戳),透传调用RemoteNftService.GetUserNftHoldingByDuration
273
281
  *
274
- * @tags Season
275
- * @name ListSeasonConfig
276
- * @summary list season config
277
- * @request GET:/v1/seasons
282
+ * @tags AnchorS2S
283
+ * @name GetUserNftHoldingByDuration
284
+ * @summary 查询NFT持有数量(按持有时长)
285
+ * @request POST:/s1/nft/holding-by-duration
278
286
  */
279
- listSeasonConfig: (params = {}) => this.request({
280
- path: `/v1/seasons`,
281
- method: "GET",
287
+ getUserNftHoldingByDuration: (data, params = {}) => this.request({
288
+ path: `/s1/nft/holding-by-duration`,
289
+ method: "POST",
290
+ body: data,
291
+ type: ContentType.Json,
282
292
  format: "json",
283
293
  ...params,
284
294
  }),
285
295
  /**
286
- * @description 获取指定徽章的贡献者列表
296
+ * @description purchase mint with signature
287
297
  *
288
- * @tags TeamV1
289
- * @name GetBadgeContributors
290
- * @summary Get badge contributors
291
- * @request GET:/v1/teams/badges/{badgeId}/contributors
298
+ * @tags AnchorS2S
299
+ * @name PurchaseMint
300
+ * @summary purchase mint with signature
301
+ * @request POST:/s1/purchase/{type}
292
302
  */
293
- getBadgeContributors: (badgeId, params = {}) => this.request({
294
- path: `/v1/teams/badges/${badgeId}/contributors`,
295
- method: "GET",
303
+ purchaseMint: (type, data, params = {}) => this.request({
304
+ path: `/s1/purchase/${type}`,
305
+ method: "POST",
306
+ body: data,
307
+ type: ContentType.Json,
296
308
  format: "json",
297
309
  ...params,
298
310
  }),
299
311
  /**
300
- * @description query user claimable or claimed Badges
312
+ * @description get nft series by id
301
313
  *
302
- * @tags Anchor
303
- * @name BadgeAssets
304
- * @summary query user claimable or claimed Badges
305
- * @request GET:/v1/badges
314
+ * @tags AnchorS2S
315
+ * @name GetNftSeriesDetail
316
+ * @summary get nft series by id
317
+ * @request GET:/s1/series/{type}/{series}
306
318
  */
307
- badgeAssets: (query, params = {}) => this.request({
308
- path: `/v1/badges`,
319
+ getNftSeriesDetail: (type, series, query, params = {}) => this.request({
320
+ path: `/s1/series/${type}/${series}`,
309
321
  method: "GET",
310
322
  query: query,
311
323
  format: "json",
312
324
  ...params,
313
325
  }),
314
326
  /**
315
- * @description 获取团队内成员贡献排行榜
327
+ * @description 创建新团队,支持设置背景图
316
328
  *
317
- * @tags TeamV1
318
- * @name GetTeamMemberRanking
319
- * @summary Get team member ranking
320
- * @request GET:/v1/teams/{teamId}/members/ranking
329
+ * @tags AnchorS2S
330
+ * @name CreateTeam
331
+ * @summary Create team
332
+ * @request POST:/s1/teams
321
333
  */
322
- getTeamMemberRanking: (teamId, query, params = {}) => this.request({
323
- path: `/v1/teams/${teamId}/members/ranking`,
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}`,
324
352
  method: "GET",
325
- query: query,
326
353
  format: "json",
327
354
  ...params,
328
355
  }),
329
356
  /**
330
- * @description 前端监听到合约成功事件,调用加快后端事件处理
357
+ * @description 加入团队,支持通过邀请码或直接指定团队ID
331
358
  *
332
- * @tags Transaction
333
- * @name UserOpHashProcess
334
- * @summary userOpHash process
335
- * @request POST:/v1/transaction/process/userOpHash
359
+ * @tags AnchorS2S
360
+ * @name JoinTeam
361
+ * @summary Join team
362
+ * @request POST:/s1/teams/join
336
363
  */
337
- userOpHashProcess: (data, params = {}) => this.request({
338
- path: `/v1/transaction/process/userOpHash`,
364
+ joinTeam: (data, params = {}) => this.request({
365
+ path: `/s1/teams/join`,
339
366
  method: "POST",
340
367
  body: data,
341
368
  type: ContentType.Json,
@@ -343,45 +370,91 @@ class Api extends HttpClient {
343
370
  ...params,
344
371
  }),
345
372
  /**
346
- * @description 获取团队所有徽章的状态信息,支持按状态筛选
373
+ * @description 退出当前团队
347
374
  *
348
- * @tags TeamV1
349
- * @name GetTeamBadges
350
- * @summary Get team badges
351
- * @request GET:/v1/teams/badges
375
+ * @tags AnchorS2S
376
+ * @name LeaveTeam
377
+ * @summary Leave team (self)
378
+ * @request DELETE:/s1/teams/leave/{userId}
352
379
  */
353
- getTeamBadges: (query, params = {}) => this.request({
354
- path: `/v1/teams/badges`,
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`,
355
428
  method: "GET",
356
429
  query: query,
357
430
  format: "json",
358
431
  ...params,
359
432
  }),
360
433
  /**
361
- * @description get nft series
434
+ * @description get check result
362
435
  *
363
436
  * @tags Anchor
364
- * @name NftSeries
365
- * @summary get nft series
366
- * @request GET:/v1/series/{type}
437
+ * @name GetCheckResult
438
+ * @summary get check result
439
+ * @request GET:/v1/check/{type}
367
440
  */
368
- nftSeries: (type, params = {}) => this.request({
369
- path: `/v1/series/${type}`,
441
+ getCheckResult: (type, params = {}) => this.request({
442
+ path: `/v1/check/${type}`,
370
443
  method: "GET",
371
444
  format: "json",
372
445
  ...params,
373
446
  }),
374
447
  /**
375
- * @description 获取当前用户的个人概况信息
448
+ * @description anchor check
376
449
  *
377
- * @tags TeamV1
378
- * @name GetMyTeamProfile
379
- * @summary Get my team profile
380
- * @request GET:/v1/teams/members/me
450
+ * @tags Anchor
451
+ * @name Check
452
+ * @summary anchor check
453
+ * @request POST:/v1/check/{type}
381
454
  */
382
- getMyTeamProfile: (params = {}) => this.request({
383
- path: `/v1/teams/members/me`,
384
- method: "GET",
455
+ check: (type, params = {}) => this.request({
456
+ path: `/v1/check/${type}`,
457
+ method: "POST",
385
458
  format: "json",
386
459
  ...params,
387
460
  }),
@@ -401,137 +474,159 @@ class Api extends HttpClient {
401
474
  ...params,
402
475
  }),
403
476
  /**
404
- * @description 前端监听到合约成功事件,调用加快后端事件处理
477
+ * @description 标记指定通知为已读状态
405
478
  *
406
- * @tags Transaction
407
- * @name TransactionHashProcess
408
- * @summary speed up transaction
409
- * @request POST:/v1/transaction/process/{txHash}
479
+ * @tags TeamV1
480
+ * @name MarkNotificationRead
481
+ * @summary Mark notification as read
482
+ * @request POST:/v1/notifications/{notificationId}/read
410
483
  */
411
- transactionHashProcess: (txHash, params = {}) => this.request({
412
- path: `/v1/transaction/process/${txHash}`,
484
+ markNotificationRead: (notificationId, params = {}) => this.request({
485
+ path: `/v1/notifications/${notificationId}/read`,
413
486
  method: "POST",
414
487
  format: "json",
415
488
  ...params,
416
489
  }),
417
- };
418
- this.v2 = {
419
490
  /**
420
- * @description Get badges that the user can claim
491
+ * @description list season config
421
492
  *
422
- * @tags BadgeV2
423
- * @name GetUserClaimableBadges
424
- * @summary Get user claimable badges
425
- * @request GET:/v2/badges/claimable
493
+ * @tags Season
494
+ * @name ListSeasonConfig
495
+ * @summary list season config
496
+ * @request GET:/v1/seasons
426
497
  */
427
- getUserClaimableBadges: (query, params = {}) => this.request({
428
- path: `/v2/badges/claimable`,
498
+ listSeasonConfig: (params = {}) => this.request({
499
+ path: `/v1/seasons`,
429
500
  method: "GET",
430
- query: query,
431
501
  format: "json",
432
502
  ...params,
433
503
  }),
434
504
  /**
435
- * @description Get detailed information of a specific badge series
505
+ * @description get nft series
436
506
  *
437
- * @tags BadgeV2
438
- * @name GetBadgeSeriesDetail
439
- * @summary Get badge series detail
440
- * @request GET:/v2/badges/series/{series}
507
+ * @tags Anchor
508
+ * @name NftSeries
509
+ * @summary get nft series
510
+ * @request GET:/v1/series/{type}
441
511
  */
442
- getBadgeSeriesDetail: (series, query, params = {}) => this.request({
443
- path: `/v2/badges/series/${series}`,
512
+ nftSeries: (type, params = {}) => this.request({
513
+ path: `/v1/series/${type}`,
444
514
  method: "GET",
445
- query: query,
446
515
  format: "json",
447
516
  ...params,
448
517
  }),
449
518
  /**
450
- * @description Get user's claimed and claimable badge assets
519
+ * @description get nft series by id
451
520
  *
452
- * @tags BadgeV2
453
- * @name GetUserBadgeAssets
454
- * @summary Get user badge assets
455
- * @request GET:/v2/badges/assets
521
+ * @tags Anchor
522
+ * @name GetNftSeriesById
523
+ * @summary get nft series by id
524
+ * @request GET:/v1/series/{type}/{series}
456
525
  */
457
- getUserBadgeAssets: (query, params = {}) => this.request({
458
- path: `/v2/badges/assets`,
526
+ getNftSeriesById: (type, series, query, params = {}) => this.request({
527
+ path: `/v1/series/${type}/${series}`,
459
528
  method: "GET",
460
529
  query: query,
461
530
  format: "json",
462
531
  ...params,
463
532
  }),
464
533
  /**
465
- * @description Get verifiers for badge conditions based on platform and type
534
+ * @description 获取团队所有徽章的状态信息,支持按状态筛选
466
535
  *
467
- * @tags BadgeV2
468
- * @name GetBadgeVerifiers
469
- * @summary Get badge verifiers
470
- * @request GET:/v2/badges/verifiers
536
+ * @tags TeamV1
537
+ * @name GetTeamBadges
538
+ * @summary Get team badges
539
+ * @request GET:/v1/teams/badges
471
540
  */
472
- getBadgeVerifiers: (query, params = {}) => this.request({
473
- path: `/v2/badges/verifiers`,
541
+ getTeamBadges: (query, params = {}) => this.request({
542
+ path: `/v1/teams/badges`,
474
543
  method: "GET",
475
544
  query: query,
476
545
  format: "json",
477
546
  ...params,
478
547
  }),
479
548
  /**
480
- * @description Check which badges the user can claim
549
+ * @description 获取指定徽章的贡献者列表
481
550
  *
482
- * @tags BadgeV2
483
- * @name CheckUserClaimableBadges
484
- * @summary Check user claimable badges
485
- * @request POST:/v2/badges
551
+ * @tags TeamV1
552
+ * @name GetBadgeContributors
553
+ * @summary Get badge contributors
554
+ * @request GET:/v1/teams/badges/{badgeId}/contributors
486
555
  */
487
- checkUserClaimableBadges: (data, params = {}) => this.request({
488
- path: `/v2/badges`,
489
- method: "POST",
490
- body: data,
491
- type: ContentType.Json,
556
+ getBadgeContributors: (badgeId, params = {}) => this.request({
557
+ path: `/v1/teams/badges/${badgeId}/contributors`,
558
+ method: "GET",
492
559
  format: "json",
493
560
  ...params,
494
561
  }),
495
562
  /**
496
- * @description query user badges
563
+ * @description 获取团队排行榜,支持分页查询,返回个人团队信息
497
564
  *
498
- * @tags BadgeV2
499
- * @name QueryUserBadges
500
- * @summary query user badges
501
- * @request GET:/v2/badges
565
+ * @tags TeamV1
566
+ * @name GetTeamLeaderboard
567
+ * @summary Get team leaderboard
568
+ * @request GET:/v1/teams/leaderboard
502
569
  */
503
- queryUserBadges: (query, params = {}) => this.request({
504
- path: `/v2/badges`,
570
+ getTeamLeaderboard: (query, params = {}) => this.request({
571
+ path: `/v1/teams/leaderboard`,
505
572
  method: "GET",
506
573
  query: query,
507
574
  format: "json",
508
575
  ...params,
509
576
  }),
510
577
  /**
511
- * @description Query badge series with optional filtering conditions
578
+ * @description 获取当前用户的个人概况信息
512
579
  *
513
- * @tags BadgeV2
514
- * @name GetBadgeSeries
515
- * @summary Query badge series with conditions
516
- * @request GET:/v2/badges/series
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
517
612
  */
518
- getBadgeSeries: (query, params = {}) => this.request({
519
- path: `/v2/badges/series`,
613
+ getTeamMemberRanking: (teamId, query, params = {}) => this.request({
614
+ path: `/v1/teams/${teamId}/members/ranking`,
520
615
  method: "GET",
521
616
  query: query,
522
617
  format: "json",
523
618
  ...params,
524
619
  }),
525
620
  /**
526
- * @description anchor mint
621
+ * @description 前端监听到合约成功事件,调用加快后端事件处理
527
622
  *
528
- * @tags AnchorV2
529
- * @name Mint
530
- * @summary anchor mint
531
- * @request POST:/v2/mint/{type}
623
+ * @tags Transaction
624
+ * @name UserOpHashProcess
625
+ * @summary userOpHash process
626
+ * @request POST:/v1/transaction/process/userOpHash
532
627
  */
533
- mint: (type, data, params = {}) => this.request({
534
- path: `/v2/mint/${type}`,
628
+ userOpHashProcess: (data, params = {}) => this.request({
629
+ path: `/v1/transaction/process/userOpHash`,
535
630
  method: "POST",
536
631
  body: data,
537
632
  type: ContentType.Json,
@@ -539,47 +634,46 @@ class Api extends HttpClient {
539
634
  ...params,
540
635
  }),
541
636
  /**
542
- * @description anchor batch mint
637
+ * @description 前端监听到合约成功事件,调用加快后端事件处理
543
638
  *
544
- * @tags AnchorV2
545
- * @name BatchMint
546
- * @summary anchor batch mint
547
- * @request POST:/v2/batch/mint/{type}
639
+ * @tags Transaction
640
+ * @name TransactionHashProcess
641
+ * @summary speed up transaction
642
+ * @request POST:/v1/transaction/process/{txHash}
548
643
  */
549
- batchMint: (type, data, params = {}) => this.request({
550
- path: `/v2/batch/mint/${type}`,
644
+ transactionHashProcess: (txHash, params = {}) => this.request({
645
+ path: `/v1/transaction/process/${txHash}`,
551
646
  method: "POST",
552
- body: data,
553
- type: ContentType.Json,
554
647
  format: "json",
555
648
  ...params,
556
649
  }),
650
+ };
651
+ this.v2 = {
557
652
  /**
558
- * @description Get signatures required for claiming badges
653
+ * @description query badges by conditions
559
654
  *
560
655
  * @tags BadgeV2
561
- * @name GetBadgeClaimSignatures
562
- * @summary Get badge claim signatures
563
- * @request POST:/v2/badges/signatures
656
+ * @name QueryBadges
657
+ * @summary query badges by conditions
658
+ * @request GET:/v2/badges
564
659
  */
565
- getBadgeClaimSignatures: (data, params = {}) => this.request({
566
- path: `/v2/badges/signatures`,
567
- method: "POST",
568
- body: data,
569
- type: ContentType.Json,
660
+ queryBadges: (query, params = {}) => this.request({
661
+ path: `/v2/badges`,
662
+ method: "GET",
663
+ query: query,
570
664
  format: "json",
571
665
  ...params,
572
666
  }),
573
667
  /**
574
- * @description Check if a specific badge is claimable for the user
668
+ * @description Check which badges the user can claim
575
669
  *
576
670
  * @tags BadgeV2
577
- * @name CheckSingleBadgeClaimable
578
- * @summary Check single badge claimable status
579
- * @request POST:/v2/badges/{badgeId}
671
+ * @name CheckUserClaimableBadges
672
+ * @summary Check user claimable badges
673
+ * @request POST:/v2/badges
580
674
  */
581
- checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
582
- path: `/v2/badges/${badgeId}`,
675
+ checkUserClaimableBadges: (data, params = {}) => this.request({
676
+ path: `/v2/badges`,
583
677
  method: "POST",
584
678
  body: data,
585
679
  type: ContentType.Json,
@@ -587,121 +681,104 @@ class Api extends HttpClient {
587
681
  ...params,
588
682
  }),
589
683
  /**
590
- * @description Get detailed information of a specific badge
684
+ * @description Get user's claimed and claimable badge assets
591
685
  *
592
686
  * @tags BadgeV2
593
- * @name GetBadgeDetail
594
- * @summary Get badge detail
595
- * @request GET:/v2/badges/{badgeId}
687
+ * @name GetUserBadgeAssets
688
+ * @summary Get user badge assets
689
+ * @request GET:/v2/badges/assets
596
690
  */
597
- getBadgeDetail: (badgeId, params = {}) => this.request({
598
- path: `/v2/badges/${badgeId}`,
691
+ getUserBadgeAssets: (query, params = {}) => this.request({
692
+ path: `/v2/badges/assets`,
599
693
  method: "GET",
694
+ query: query,
600
695
  format: "json",
601
696
  ...params,
602
697
  }),
603
- };
604
- this.s1 = {
605
698
  /**
606
- * @description query badges holders
699
+ * @description Query badge by category
607
700
  *
608
- * @tags AnchorS2S
609
- * @name QueryBadgesHolders
610
- * @summary query badges holders
611
- * @request GET:/s1/badges/holders
701
+ * @tags BadgeV2
702
+ * @name CategoriesList
703
+ * @summary Query badge by category
704
+ * @request GET:/v2/badges/categories
612
705
  */
613
- queryBadgesHolders: (query, params = {}) => this.request({
614
- path: `/s1/badges/holders`,
706
+ categoriesList: (query, params = {}) => this.request({
707
+ path: `/v2/badges/categories`,
615
708
  method: "GET",
616
709
  query: query,
617
710
  format: "json",
618
711
  ...params,
619
712
  }),
620
713
  /**
621
- * @description 退出当前团队
622
- *
623
- * @tags AnchorS2S
624
- * @name LeaveTeam
625
- * @summary Leave team (self)
626
- * @request DELETE:/s1/teams/leave/{userId}
627
- */
628
- leaveTeam: (userId, params = {}) => this.request({
629
- path: `/s1/teams/leave/${userId}`,
630
- method: "DELETE",
631
- format: "json",
632
- ...params,
633
- }),
634
- /**
635
- * @description 加入团队,支持通过邀请码或直接指定团队ID
714
+ * @description Get detailed information of a specific badge category
636
715
  *
637
- * @tags AnchorS2S
638
- * @name JoinTeam
639
- * @summary Join team
640
- * @request POST:/s1/teams/join
716
+ * @tags BadgeV2
717
+ * @name CategoriesDetail
718
+ * @summary Get badge detail by category
719
+ * @request GET:/v2/badges/categories/{category}
641
720
  */
642
- joinTeam: (data, params = {}) => this.request({
643
- path: `/s1/teams/join`,
644
- method: "POST",
645
- body: data,
646
- type: ContentType.Json,
721
+ categoriesDetail: (category, params = {}) => this.request({
722
+ path: `/v2/badges/categories/${category}`,
723
+ method: "GET",
647
724
  format: "json",
648
725
  ...params,
649
726
  }),
650
727
  /**
651
- * @description get nft series by id
728
+ * @description Get badges that the user can claim
652
729
  *
653
- * @tags AnchorS2S
654
- * @name GetNftSeriesDetail
655
- * @summary get nft series by id
656
- * @request GET:/s1/series/{type}/{series}
730
+ * @tags BadgeV2
731
+ * @name GetUserClaimableBadges
732
+ * @summary Get user claimable badges
733
+ * @request GET:/v2/badges/claimable
657
734
  */
658
- getNftSeriesDetail: (type, series, query, params = {}) => this.request({
659
- path: `/s1/series/${type}/${series}`,
735
+ getUserClaimableBadges: (query, params = {}) => this.request({
736
+ path: `/v2/badges/claimable`,
660
737
  method: "GET",
661
738
  query: query,
662
739
  format: "json",
663
740
  ...params,
664
741
  }),
665
742
  /**
666
- * @description 队长移除团队成员
743
+ * @description Query badge series with optional filtering conditions
667
744
  *
668
- * @tags AnchorS2S
669
- * @name RemoveTeamMember
670
- * @summary Remove member by captain
671
- * @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
745
+ * @tags BadgeV2
746
+ * @name GetBadgeSeries
747
+ * @summary Query badge series with conditions
748
+ * @request GET:/v2/badges/series
672
749
  */
673
- removeTeamMember: (captainUserId, userId, params = {}) => this.request({
674
- path: `/s1/teams/remove/${captainUserId}/${userId}`,
675
- method: "DELETE",
750
+ getBadgeSeries: (query, params = {}) => this.request({
751
+ path: `/v2/badges/series`,
752
+ method: "GET",
753
+ query: query,
676
754
  format: "json",
677
755
  ...params,
678
756
  }),
679
757
  /**
680
- * @description 重制探测徽章冷却时间
758
+ * @description Get detailed information of a specific badge series
681
759
  *
682
- * @tags AnchorS2S
683
- * @name IntervalReset
684
- * @summary interval reset
685
- * @request POST:/s1/interval/reset
760
+ * @tags BadgeV2
761
+ * @name GetBadgeSeriesDetail
762
+ * @summary Get badge series detail
763
+ * @request GET:/v2/badges/series/{series}
686
764
  */
687
- intervalReset: (data, params = {}) => this.request({
688
- path: `/s1/interval/reset`,
689
- method: "POST",
690
- body: data,
691
- type: ContentType.Json,
765
+ getBadgeSeriesDetail: (series, query, params = {}) => this.request({
766
+ path: `/v2/badges/series/${series}`,
767
+ method: "GET",
768
+ query: query,
692
769
  format: "json",
693
770
  ...params,
694
771
  }),
695
772
  /**
696
- * @description grant badge
773
+ * @description Get signatures required for claiming badges
697
774
  *
698
- * @tags AnchorS2S
699
- * @name GrantBadge
700
- * @summary grant badge
701
- * @request POST:/s1/badges
775
+ * @tags BadgeV2
776
+ * @name GetBadgeClaimSignatures
777
+ * @summary Get badge claim signatures
778
+ * @request POST:/v2/badges/signatures
702
779
  */
703
- grantBadge: (data, params = {}) => this.request({
704
- path: `/s1/badges`,
780
+ getBadgeClaimSignatures: (data, params = {}) => this.request({
781
+ path: `/v2/badges/signatures`,
705
782
  method: "POST",
706
783
  body: data,
707
784
  type: ContentType.Json,
@@ -709,47 +786,44 @@ class Api extends HttpClient {
709
786
  ...params,
710
787
  }),
711
788
  /**
712
- * @description purchase mint with signature
789
+ * @description Get verifiers for badge conditions based on platform and type
713
790
  *
714
- * @tags AnchorS2S
715
- * @name PurchaseMint
716
- * @summary purchase mint with signature
717
- * @request POST:/s1/purchase/{type}
791
+ * @tags BadgeV2
792
+ * @name GetBadgeVerifiers
793
+ * @summary Get badge verifiers
794
+ * @request GET:/v2/badges/verifiers
718
795
  */
719
- purchaseMint: (type, data, params = {}) => this.request({
720
- path: `/s1/purchase/${type}`,
721
- method: "POST",
722
- body: data,
723
- type: ContentType.Json,
796
+ getBadgeVerifiers: (query, params = {}) => this.request({
797
+ path: `/v2/badges/verifiers`,
798
+ method: "GET",
799
+ query: query,
724
800
  format: "json",
725
801
  ...params,
726
802
  }),
727
803
  /**
728
- * @description assets of badge
804
+ * @description Get detailed information of a specific badge
729
805
  *
730
- * @tags AnchorS2S
731
- * @name QueryAssets
732
- * @summary assets of badge
733
- * @request POST:/s1/assets/{type}
806
+ * @tags BadgeV2
807
+ * @name GetBadgeDetail
808
+ * @summary Get badge detail
809
+ * @request GET:/v2/badges/{badgeId}
734
810
  */
735
- queryAssets: (type, data, params = {}) => this.request({
736
- path: `/s1/assets/${type}`,
737
- method: "POST",
738
- body: data,
739
- type: ContentType.Json,
811
+ getBadgeDetail: (badgeId, params = {}) => this.request({
812
+ path: `/v2/badges/${badgeId}`,
813
+ method: "GET",
740
814
  format: "json",
741
815
  ...params,
742
816
  }),
743
817
  /**
744
- * @description 创建新团队,支持设置背景图
818
+ * @description Check if a specific badge is claimable for the user
745
819
  *
746
- * @tags AnchorS2S
747
- * @name CreateTeam
748
- * @summary Create team
749
- * @request POST:/s1/teams
820
+ * @tags BadgeV2
821
+ * @name CheckSingleBadgeClaimable
822
+ * @summary Check single badge claimable status
823
+ * @request POST:/v2/badges/{badgeId}
750
824
  */
751
- createTeam: (data, params = {}) => this.request({
752
- path: `/s1/teams`,
825
+ checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
826
+ path: `/v2/badges/${badgeId}`,
753
827
  method: "POST",
754
828
  body: data,
755
829
  type: ContentType.Json,
@@ -757,15 +831,15 @@ class Api extends HttpClient {
757
831
  ...params,
758
832
  }),
759
833
  /**
760
- * @description check by event
834
+ * @description anchor batch mint
761
835
  *
762
- * @tags AnchorS2S
763
- * @name CheckByEvent
764
- * @summary check by event
765
- * @request POST:/s1/check/event
836
+ * @tags AnchorV2
837
+ * @name BatchMint
838
+ * @summary anchor batch mint
839
+ * @request POST:/v2/batch/mint/{type}
766
840
  */
767
- checkByEvent: (data, params = {}) => this.request({
768
- path: `/s1/check/event`,
841
+ batchMint: (type, data, params = {}) => this.request({
842
+ path: `/v2/batch/mint/${type}`,
769
843
  method: "POST",
770
844
  body: data,
771
845
  type: ContentType.Json,
@@ -773,15 +847,15 @@ class Api extends HttpClient {
773
847
  ...params,
774
848
  }),
775
849
  /**
776
- * @description badges check
850
+ * @description anchor mint
777
851
  *
778
- * @tags AnchorS2S
779
- * @name BadgesCheck
780
- * @summary badges check
781
- * @request POST:/s1/badges/check
852
+ * @tags AnchorV2
853
+ * @name Mint
854
+ * @summary anchor mint
855
+ * @request POST:/v2/mint/{type}
782
856
  */
783
- badgesCheck: (data, params = {}) => this.request({
784
- path: `/s1/badges/check`,
857
+ mint: (type, data, params = {}) => this.request({
858
+ path: `/v2/mint/${type}`,
785
859
  method: "POST",
786
860
  body: data,
787
861
  type: ContentType.Json,