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