@rabby-wallet/rabby-api 0.7.24-alpha.0 → 0.7.24-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -288,9 +288,16 @@ export declare class OpenApiService {
288
288
  hasInteraction: (addr: string, chainId: string, contractId: string) => Promise<{
289
289
  has_interaction: boolean;
290
290
  }>;
291
+ /**
292
+ * @deprecated
293
+ * 授权风险敞口
294
+ */
291
295
  tokenApproveExposure: (id: string, chainId: string) => Promise<{
292
296
  usd_value: number;
293
297
  }>;
298
+ tokenApproveTrustValue: (id: string, chainId: string) => Promise<{
299
+ usd_value: number;
300
+ }>;
294
301
  addrDesc: (id: string) => Promise<AddrDescResponse>;
295
302
  hasTransfer: (chainId: string, from: string, to: string) => Promise<{
296
303
  has_transfer: boolean;
@@ -299,9 +306,15 @@ export declare class OpenApiService {
299
306
  is_token: boolean;
300
307
  }>;
301
308
  addrUsedChainList: (id: string) => Promise<UsedChain[]>;
309
+ /**
310
+ * @deprecated
311
+ */
302
312
  getTokenNFTExposure: (chainId: string, id: string) => Promise<{
303
313
  usd_value: number;
304
314
  }>;
315
+ getTokenNFTTrustValue: (chainId: string, id: string) => Promise<{
316
+ usd_value: number;
317
+ }>;
305
318
  getCollection: (chainId: string, id: string) => Promise<{
306
319
  collection: CollectionWithFloorPrice;
307
320
  }>;
package/dist/index.js CHANGED
@@ -641,7 +641,10 @@ export class OpenApiService {
641
641
  });
642
642
  return data;
643
643
  });
644
- // 授权风险敞口
644
+ /**
645
+ * @deprecated
646
+ * 授权风险敞口
647
+ */
645
648
  this.tokenApproveExposure = (id, chainId) => __awaiter(this, void 0, void 0, function* () {
646
649
  const { data } = yield this.request.get('/v1/engine/contract/token_approval_exposure', {
647
650
  params: {
@@ -651,6 +654,15 @@ export class OpenApiService {
651
654
  });
652
655
  return data;
653
656
  });
657
+ this.tokenApproveTrustValue = (id, chainId) => __awaiter(this, void 0, void 0, function* () {
658
+ const { data } = yield this.request.get('/v1/engine/contract/spend_usd_value', {
659
+ params: {
660
+ chain_id: chainId,
661
+ id,
662
+ },
663
+ });
664
+ return data;
665
+ });
654
666
  // 地址描述
655
667
  this.addrDesc = (id) => __awaiter(this, void 0, void 0, function* () {
656
668
  const { data } = yield this.request.get('/v1/engine/addr/desc', {
@@ -686,12 +698,21 @@ export class OpenApiService {
686
698
  });
687
699
  return data;
688
700
  });
701
+ /**
702
+ * @deprecated
703
+ */
689
704
  this.getTokenNFTExposure = (chainId, id) => __awaiter(this, void 0, void 0, function* () {
690
705
  const { data } = yield this.request.get('/v1/engine/contract/top_nft_approval_exposure', {
691
706
  params: { chain_id: chainId, id },
692
707
  });
693
708
  return data;
694
709
  });
710
+ this.getTokenNFTTrustValue = (chainId, id) => __awaiter(this, void 0, void 0, function* () {
711
+ const { data } = yield this.request.get('/v1/engine/contract/top_nft_spend_usd_value', {
712
+ params: { chain_id: chainId, id },
713
+ });
714
+ return data;
715
+ });
695
716
  this.getCollection = (chainId, id) => __awaiter(this, void 0, void 0, function* () {
696
717
  const { data } = yield this.request.get('/v1/engine/collection', {
697
718
  params: { chain_id: chainId, id },
package/dist/types.d.ts CHANGED
@@ -197,6 +197,7 @@ export interface TokenApproval<SpenderType extends Spender = Spender> {
197
197
  }
198
198
  export interface Spender {
199
199
  id: string;
200
+ permit2_id?: string;
200
201
  value: number;
201
202
  exposure_usd: number;
202
203
  protocol: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.24-alpha.0",
3
+ "version": "0.7.24-alpha.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@babel/preset-env": "^7.19.1",
22
- "@debank/common": "^0.3.9",
22
+ "@debank/common": "^0.3.60",
23
23
  "@types/jest": "^29.0.3",
24
24
  "@types/lodash": "^4.14.185",
25
25
  "@types/node": "^18.7.18",