@7kprotocol/sdk-ts 2.3.7 → 2.4.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.
Files changed (115) hide show
  1. package/README.md +31 -3
  2. package/lib/cjs/config/fetchClient.js +24 -0
  3. package/lib/cjs/{suiClient.js → config/index.js} +15 -2
  4. package/lib/cjs/constants/apiEndpoints.js +9 -0
  5. package/lib/cjs/features/limitDca/constants.js +2 -1
  6. package/lib/cjs/features/limitDca/getClosedDcaOrders.js +2 -1
  7. package/lib/cjs/features/limitDca/getClosedLimitOrders.js +2 -1
  8. package/lib/cjs/features/limitDca/getDcaOrderExecutions.js +2 -1
  9. package/lib/cjs/features/limitDca/getOpenDcaOrders.js +2 -1
  10. package/lib/cjs/features/limitDca/getOpenLimitOrders.js +2 -1
  11. package/lib/cjs/features/prices/index.js +4 -4
  12. package/lib/cjs/features/swap/buildTx.js +2 -2
  13. package/lib/cjs/features/swap/config.js +3 -1
  14. package/lib/cjs/features/swap/estimateGasFee.js +2 -2
  15. package/lib/cjs/features/swap/getQuote.js +3 -1
  16. package/lib/cjs/features/swap/getSwapHistory.js +3 -1
  17. package/lib/cjs/index.js +12 -6
  18. package/lib/cjs/libs/getCoinOjectIdsByAmount.js +2 -2
  19. package/lib/cjs/libs/getSplitCoinForTx.js +2 -2
  20. package/lib/cjs/types/config/fetchClient.d.ts +2 -0
  21. package/lib/cjs/types/config/fetchClient.d.ts.map +1 -0
  22. package/lib/cjs/types/config/index.d.ts +13 -0
  23. package/lib/cjs/types/config/index.d.ts.map +1 -0
  24. package/lib/cjs/types/constants/apiEndpoints.d.ts +7 -0
  25. package/lib/cjs/types/constants/apiEndpoints.d.ts.map +1 -0
  26. package/lib/cjs/types/features/limitDca/constants.d.ts +1 -1
  27. package/lib/cjs/types/features/limitDca/constants.d.ts.map +1 -1
  28. package/lib/cjs/types/features/limitDca/getClosedDcaOrders.d.ts.map +1 -1
  29. package/lib/cjs/types/features/limitDca/getClosedLimitOrders.d.ts.map +1 -1
  30. package/lib/cjs/types/features/limitDca/getDcaOrderExecutions.d.ts.map +1 -1
  31. package/lib/cjs/types/features/limitDca/getOpenDcaOrders.d.ts.map +1 -1
  32. package/lib/cjs/types/features/limitDca/getOpenLimitOrders.d.ts.map +1 -1
  33. package/lib/cjs/types/features/prices/index.d.ts +0 -1
  34. package/lib/cjs/types/features/prices/index.d.ts.map +1 -1
  35. package/lib/cjs/types/features/swap/buildTx.d.ts +1 -1
  36. package/lib/cjs/types/features/swap/buildTx.d.ts.map +1 -1
  37. package/lib/cjs/types/features/swap/config.d.ts.map +1 -1
  38. package/lib/cjs/types/features/swap/getQuote.d.ts.map +1 -1
  39. package/lib/cjs/types/features/swap/getSwapHistory.d.ts.map +1 -1
  40. package/lib/cjs/types/index.d.ts +13 -5
  41. package/lib/cjs/types/index.d.ts.map +1 -1
  42. package/lib/cjs/types/libs/getSplitCoinForTx.d.ts +1 -1
  43. package/lib/cjs/types/libs/getSplitCoinForTx.d.ts.map +1 -1
  44. package/lib/cjs/types/types/tx.d.ts +0 -35
  45. package/lib/cjs/types/types/tx.d.ts.map +1 -1
  46. package/lib/cjs/types/utils/token.d.ts +0 -2
  47. package/lib/cjs/types/utils/token.d.ts.map +1 -1
  48. package/lib/cjs/utils/sui.js +3 -3
  49. package/lib/cjs/utils/token.js +0 -21
  50. package/lib/esm/config/fetchClient.js +13 -0
  51. package/lib/esm/config/index.js +24 -0
  52. package/lib/esm/constants/apiEndpoints.js +6 -0
  53. package/lib/esm/features/limitDca/constants.js +2 -1
  54. package/lib/esm/features/limitDca/getClosedDcaOrders.js +2 -1
  55. package/lib/esm/features/limitDca/getClosedLimitOrders.js +2 -1
  56. package/lib/esm/features/limitDca/getDcaOrderExecutions.js +2 -1
  57. package/lib/esm/features/limitDca/getOpenDcaOrders.js +2 -1
  58. package/lib/esm/features/limitDca/getOpenLimitOrders.js +2 -1
  59. package/lib/esm/features/prices/index.js +4 -3
  60. package/lib/esm/features/swap/buildTx.js +2 -2
  61. package/lib/esm/features/swap/config.js +3 -1
  62. package/lib/esm/features/swap/estimateGasFee.js +2 -2
  63. package/lib/esm/features/swap/getQuote.js +3 -1
  64. package/lib/esm/features/swap/getSwapHistory.js +3 -1
  65. package/lib/esm/index.mjs +8 -1
  66. package/lib/esm/libs/getCoinOjectIdsByAmount.js +2 -2
  67. package/lib/esm/libs/getSplitCoinForTx.js +2 -2
  68. package/lib/esm/types/config/fetchClient.d.ts +2 -0
  69. package/lib/esm/types/config/fetchClient.d.ts.map +1 -0
  70. package/lib/esm/types/config/index.d.ts +13 -0
  71. package/lib/esm/types/config/index.d.ts.map +1 -0
  72. package/lib/esm/types/constants/apiEndpoints.d.ts +7 -0
  73. package/lib/esm/types/constants/apiEndpoints.d.ts.map +1 -0
  74. package/lib/esm/types/features/limitDca/constants.d.ts +1 -1
  75. package/lib/esm/types/features/limitDca/constants.d.ts.map +1 -1
  76. package/lib/esm/types/features/limitDca/getClosedDcaOrders.d.ts.map +1 -1
  77. package/lib/esm/types/features/limitDca/getClosedLimitOrders.d.ts.map +1 -1
  78. package/lib/esm/types/features/limitDca/getDcaOrderExecutions.d.ts.map +1 -1
  79. package/lib/esm/types/features/limitDca/getOpenDcaOrders.d.ts.map +1 -1
  80. package/lib/esm/types/features/limitDca/getOpenLimitOrders.d.ts.map +1 -1
  81. package/lib/esm/types/features/prices/index.d.ts +0 -1
  82. package/lib/esm/types/features/prices/index.d.ts.map +1 -1
  83. package/lib/esm/types/features/swap/buildTx.d.ts +1 -1
  84. package/lib/esm/types/features/swap/buildTx.d.ts.map +1 -1
  85. package/lib/esm/types/features/swap/config.d.ts.map +1 -1
  86. package/lib/esm/types/features/swap/getQuote.d.ts.map +1 -1
  87. package/lib/esm/types/features/swap/getSwapHistory.d.ts.map +1 -1
  88. package/lib/esm/types/index.d.ts +13 -5
  89. package/lib/esm/types/index.d.ts.map +1 -1
  90. package/lib/esm/types/libs/getSplitCoinForTx.d.ts +1 -1
  91. package/lib/esm/types/libs/getSplitCoinForTx.d.ts.map +1 -1
  92. package/lib/esm/types/types/tx.d.ts +0 -35
  93. package/lib/esm/types/types/tx.d.ts.map +1 -1
  94. package/lib/esm/types/utils/token.d.ts +0 -2
  95. package/lib/esm/types/utils/token.d.ts.map +1 -1
  96. package/lib/esm/utils/sui.js +3 -3
  97. package/lib/esm/utils/token.js +0 -9
  98. package/package.json +1 -1
  99. package/lib/cjs/constants/explorer.js +0 -6
  100. package/lib/cjs/types/constants/explorer.d.ts +0 -4
  101. package/lib/cjs/types/constants/explorer.d.ts.map +0 -1
  102. package/lib/cjs/types/suiClient.d.ts +0 -4
  103. package/lib/cjs/types/suiClient.d.ts.map +0 -1
  104. package/lib/cjs/types/token.js +0 -2
  105. package/lib/cjs/types/types/token.d.ts +0 -30
  106. package/lib/cjs/types/types/token.d.ts.map +0 -1
  107. package/lib/esm/constants/explorer.js +0 -3
  108. package/lib/esm/suiClient.js +0 -10
  109. package/lib/esm/types/constants/explorer.d.ts +0 -4
  110. package/lib/esm/types/constants/explorer.d.ts.map +0 -1
  111. package/lib/esm/types/suiClient.d.ts +0 -4
  112. package/lib/esm/types/suiClient.d.ts.map +0 -1
  113. package/lib/esm/types/token.js +0 -1
  114. package/lib/esm/types/types/token.d.ts +0 -30
  115. package/lib/esm/types/types/token.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { Transaction, TransactionResult } from "@mysten/sui/transactions";
2
- export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?: Transaction, inspecTransaction?: boolean, isSponsored?: boolean) => Promise<{
2
+ export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?: Transaction, inspecTransaction?: boolean) => Promise<{
3
3
  tx: Transaction;
4
4
  coinData: TransactionResult;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI1E,eAAO,MAAM,iBAAiB,YACnB,MAAM,UACP,MAAM,UACN,MAAM,EAAE,YACN,MAAM,cACJ,WAAW,sBACH,OAAO,4BAE1B,OAAO,CAAC;IACT,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAkCA,CAAC"}
1
+ {"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI1E,eAAO,MAAM,iBAAiB,YACnB,MAAM,UACP,MAAM,UACN,MAAM,EAAE,YACN,MAAM,cACJ,WAAW,sBACH,OAAO,KAC1B,OAAO,CAAC;IACT,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAkCA,CAAC"}
@@ -2,54 +2,19 @@ import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions
2
2
  import { Commission, QuoteResponse } from "./aggregator";
3
3
  import BigNumber from "bignumber.js";
4
4
  export interface CommonParams {
5
- /** Quote response from 7k api */
6
5
  quoteResponse: QuoteResponse;
7
- /** User address */
8
6
  accountAddress: string;
9
- /** Slippage tolerance, ex: 0.01 (1%) */
10
7
  slippage: BigNumber.Value;
11
- /** Commission for partner */
12
8
  commission: Commission;
13
- /**
14
- * Give Flexibility to insert custom commands before or after swap
15
- * @example
16
- * ```typescript
17
- * const rawTx = new Transaction();
18
- * // Add custom commands to rawTx
19
- * rawTx.moveCall({
20
- * target: "0x2222222::example::claim",
21
- * arguments: [],
22
- * });
23
- * const { tx, coinOut } = await buildTx({
24
- * quoteResponse,
25
- * accountAddress,
26
- * slippage,
27
- * commission,
28
- * extendTx: {
29
- * tx: rawTx,
30
- * coinIn: rawTx.object(coinObjectId),
31
- * },
32
- * });
33
- * // add more commands after the swap if needed, and remember to consume the coinOut object
34
- * tx.transferObjects([coinOut], tx.pure.address(accountAddress));
35
- * ```
36
- */
37
9
  extendTx?: {
38
10
  tx: Transaction;
39
11
  coinIn?: TransactionObjectArgument;
40
12
  };
41
- /**
42
- * If true, indicates that the transaction is sponsored and its gas object should not be modified.
43
- * In this case, the gas object is expected to be already set up correctly for the sponsored transaction.
44
- */
45
- isSponsored?: boolean;
46
13
  }
47
14
  export interface BuildTxParams extends CommonParams {
48
- /** Developer inspection mode */
49
15
  devInspect?: boolean;
50
16
  }
51
17
  export interface EstimateGasFeeParams extends CommonParams {
52
- /** Sui price in usd for gas estimation */
53
18
  suiPrice?: number;
54
19
  }
55
20
  //# sourceMappingURL=tx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,mBAAmB;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,6BAA6B;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,WAAW,CAAC;QAChB,MAAM,CAAC,EAAE,yBAAyB,CAAC;KACpC,CAAC;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,gCAAgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,WAAW,CAAC;QAChB,MAAM,CAAC,EAAE,yBAAyB,CAAC;KACpC,CAAC;CACH;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,6 +1,4 @@
1
- import { SuiscanToken } from "../types/token";
2
1
  export declare function normalizeTokenType(type: string): string;
3
2
  export declare function denormalizeTokenType(type: string): string;
4
3
  export declare function checkIsSui(type: string): type is "0x2::sui::SUI" | "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
5
- export declare function getSuiscanTokenMetadata(type: string): Promise<SuiscanToken>;
6
4
  //# sourceMappingURL=token.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../src/utils/token.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAE9C;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,UAEhD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,4GAEtC;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,yBASzD"}
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../src/utils/token.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAE9C;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,UAEhD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,4GAEtC"}
@@ -1,7 +1,7 @@
1
1
  import { Transaction } from "@mysten/sui/transactions";
2
2
  import { parseStructTag } from "@mysten/sui/utils";
3
3
  import { checkIsSui } from "./token";
4
- import { getSuiClient } from "../suiClient";
4
+ import { Config } from "../config";
5
5
  export const SuiUtils = {
6
6
  getSuiCoin(amount, txb) {
7
7
  const [coin] = txb.splitCoins(txb.gas, [amount]);
@@ -92,7 +92,7 @@ export const SuiUtils = {
92
92
  let iter = 0;
93
93
  do {
94
94
  try {
95
- const res = await getSuiClient().getCoins({
95
+ const res = await Config.getSuiClient().getCoins({
96
96
  owner: address,
97
97
  coinType: type,
98
98
  cursor: cursor,
@@ -138,7 +138,7 @@ export const SuiUtils = {
138
138
  const queryAll = paginationArgs === "all";
139
139
  let nextCursor = queryAll ? null : paginationArgs.cursor;
140
140
  do {
141
- const res = await getSuiClient().getOwnedObjects({
141
+ const res = await Config.getSuiClient().getOwnedObjects({
142
142
  owner,
143
143
  ...query,
144
144
  cursor: nextCursor,
@@ -1,4 +1,3 @@
1
- import { EXPLORER } from "../constants/explorer";
2
1
  import { SUI_FULL_TYPE, SUI_TYPE } from "../constants/tokens";
3
2
  export function normalizeTokenType(type) {
4
3
  return type === SUI_TYPE ? SUI_FULL_TYPE : type;
@@ -9,11 +8,3 @@ export function denormalizeTokenType(type) {
9
8
  export function checkIsSui(type) {
10
9
  return type === SUI_FULL_TYPE || type === SUI_TYPE;
11
10
  }
12
- export async function getSuiscanTokenMetadata(type) {
13
- const response = await fetch(`${EXPLORER.ADDRESS}/api/sui-backend/mainnet/api/coins/${denormalizeTokenType(type)}`);
14
- if (!response.ok) {
15
- throw new Error("Failed to fetch token metadata");
16
- }
17
- const data = await response.json();
18
- return { ...data, type: normalizeTokenType(data.type || "") };
19
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7kprotocol/sdk-ts",
3
- "version": "2.3.7",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EXPLORER = void 0;
4
- exports.EXPLORER = {
5
- ADDRESS: `https://suiscan.xyz`,
6
- };
@@ -1,4 +0,0 @@
1
- export declare const EXPLORER: {
2
- ADDRESS: string;
3
- };
4
- //# sourceMappingURL=explorer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"explorer.d.ts","sourceRoot":"","sources":["../../../../src/constants/explorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;CAEpB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { SuiClient } from "@mysten/sui/client";
2
- export declare function getSuiClient(): SuiClient;
3
- export declare function setSuiClient(client: SuiClient): void;
4
- //# sourceMappingURL=suiClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../src/suiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAM/D,wBAAgB,YAAY,cAE3B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,QAE7C"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,30 +0,0 @@
1
- export interface SuiscanToken {
2
- type: string;
3
- objectId: string;
4
- name: string;
5
- supply: number | null;
6
- supplyInUsd: number | null;
7
- tokenPrice: number | null;
8
- dominance: number | null;
9
- circulatingSupply: number | null;
10
- marketCap: number | null;
11
- totalVolume: number | null;
12
- maxSupply: number | null;
13
- fdv: number | null;
14
- holders: number | null;
15
- denom: string;
16
- packageId: string;
17
- createTimestamp: number;
18
- creator: string;
19
- creatorName: string | null;
20
- creatorImg: string | null;
21
- creatorScamMessage: string | null;
22
- scamMessage: string | null;
23
- decimals: number;
24
- symbol: string;
25
- iconUrl: string | null;
26
- description: string;
27
- bridge: boolean;
28
- verified: boolean;
29
- }
30
- //# sourceMappingURL=token.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../src/types/token.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
@@ -1,3 +0,0 @@
1
- export const EXPLORER = {
2
- ADDRESS: `https://suiscan.xyz`,
3
- };
@@ -1,10 +0,0 @@
1
- import { SuiClient, getFullnodeUrl } from "@mysten/sui/client";
2
- let suiClient = new SuiClient({
3
- url: getFullnodeUrl("mainnet"),
4
- });
5
- export function getSuiClient() {
6
- return suiClient;
7
- }
8
- export function setSuiClient(client) {
9
- suiClient = client;
10
- }
@@ -1,4 +0,0 @@
1
- export declare const EXPLORER: {
2
- ADDRESS: string;
3
- };
4
- //# sourceMappingURL=explorer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"explorer.d.ts","sourceRoot":"","sources":["../../../../src/constants/explorer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;CAEpB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { SuiClient } from "@mysten/sui/client";
2
- export declare function getSuiClient(): SuiClient;
3
- export declare function setSuiClient(client: SuiClient): void;
4
- //# sourceMappingURL=suiClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../src/suiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAM/D,wBAAgB,YAAY,cAE3B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,QAE7C"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,30 +0,0 @@
1
- export interface SuiscanToken {
2
- type: string;
3
- objectId: string;
4
- name: string;
5
- supply: number | null;
6
- supplyInUsd: number | null;
7
- tokenPrice: number | null;
8
- dominance: number | null;
9
- circulatingSupply: number | null;
10
- marketCap: number | null;
11
- totalVolume: number | null;
12
- maxSupply: number | null;
13
- fdv: number | null;
14
- holders: number | null;
15
- denom: string;
16
- packageId: string;
17
- createTimestamp: number;
18
- creator: string;
19
- creatorName: string | null;
20
- creatorImg: string | null;
21
- creatorScamMessage: string | null;
22
- scamMessage: string | null;
23
- decimals: number;
24
- symbol: string;
25
- iconUrl: string | null;
26
- description: string;
27
- bridge: boolean;
28
- verified: boolean;
29
- }
30
- //# sourceMappingURL=token.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../src/types/token.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB"}