@ape.swap/bonds-sdk 2.7.5 → 2.7.6-test.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.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from '../types';
3
+ declare const CROSSFI: React.FC<SvgProps>;
4
+ export default CROSSFI;
@@ -21,3 +21,4 @@ export { default as LIGHTLINK } from './LIGHTLINK';
21
21
  export { default as IOTA } from './IOTA';
22
22
  export { default as BASE } from './BASE';
23
23
  export { default as BLAST } from './BLAST';
24
+ export { default as CROSSFI } from './CROSSFI';
@@ -52,6 +52,7 @@ export declare enum icons {
52
52
  IOTA = "iota",
53
53
  BASE = "base",
54
54
  BLAST = "blast",
55
+ CROSSFI = "crossfi",
55
56
  DISCORD = "discord",
56
57
  REDDIT = "reddit",
57
58
  MEDIUM = "medium",
@@ -1,5 +1,5 @@
1
1
  import { ChainId } from '@ape.swap/apeswap-lists';
2
2
  export declare const supportedByLIFI: ChainId[];
3
- export declare const APESWAP_LIST_REPO = "https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/staging";
3
+ export declare const APESWAP_LIST_REPO = "https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/crossfi";
4
4
  export declare const STRAPI_URL = "https://strapi-api.ape.bond";
5
5
  export declare const SOUL_ZAP_API = "https://zap-api.ape.bond/zap?batch=1";
package/dist/main.js CHANGED
@@ -4008,6 +4008,7 @@ var icons;
4008
4008
  icons["IOTA"] = "iota";
4009
4009
  icons["BASE"] = "base";
4010
4010
  icons["BLAST"] = "blast";
4011
+ icons["CROSSFI"] = "crossfi";
4011
4012
  //Social media icons
4012
4013
  icons["DISCORD"] = "discord";
4013
4014
  icons["REDDIT"] = "reddit";
@@ -7132,6 +7133,10 @@ const BLAST = ({ width }) => {
7132
7133
  return (jsxs("svg", { width: width || '30', height: width || '30', viewBox: "0 0 120 120", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxs("g", { clipPath: "url(#clip0_3081_2691)", children: [jsx$2("rect", { x: "0", y: "0", width: "120", height: "120", fill: "#000" }), jsx$2("path", { d: "M82.7405 59.5388L95.0113 53.4243L99.2411 40.4415L90.7814 34.2852H34.4529L21.4282 43.9594H87.6404L84.1225 54.8482H57.5706L55.0159 62.8054H81.5678L74.1132 85.7137L86.5515 79.5574L90.9908 65.8208L82.6567 59.7063L82.7405 59.5388Z", fill: "#FCFC03" }), jsx$2("path", { d: "M40.1491 75.8726L47.8131 52.001L39.3115 45.6353L26.5381 85.7144H74.1137L77.2966 75.8726H40.1491Z", fill: "#FCFC03" })] }), jsx$2("defs", { children: jsx$2("clipPath", { id: "clip0_3081_2691", children: jsx$2("rect", { width: "120", height: "120", fill: "white" }) }) })] }));
7133
7134
  };
7134
7135
 
7136
+ const CROSSFI = ({ width }) => {
7137
+ return (jsx$2("svg", { width: width || '30', height: width || '30', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 30 30", children: jsxs("g", { children: [jsx$2("title", { children: "Layer 1" }), jsxs("g", { stroke: "null", id: "svg_6", children: [jsx$2("rect", { stroke: "null", id: "svg_7", fill: "#1d2022", height: "48.28147", width: "48.28147", y: "-2.74187", x: "-1.02475" }), jsx$2("rect", { stroke: "null", id: "svg_1", fill: "#34393E", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("rect", { stroke: "null", id: "svg_2", "fill-opacity": "0.2", fill: "black", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("rect", { stroke: "null", id: "svg_3", "fill-opacity": "0.2", fill: "black", rx: "595.5", height: "25.54054", width: "25.54054", y: "2.48368", x: "2.44511" }), jsx$2("path", { stroke: "null", id: "svg_4", fill: "white", d: "m10.68808,10.67793c0,1.21364 0.48227,2.37756 1.34072,3.23574c0.85845,0.85817 2.02277,1.34028 3.23679,1.34028l-9.22885,0c-0.00019,-1.20527 0.23711,-2.3988 0.69839,-3.51239c0.46125,-1.1136 1.13742,-2.12546 1.98989,-2.9778c0.85247,-0.85232 1.86454,-1.52844 2.97842,-1.98974c1.11388,-0.46127 2.30774,-0.69871 3.51343,-0.69871l0.04872,0l0,0.02659c-1.21402,0 -2.37834,0.48209 -3.23679,1.34028c-0.85845,0.85817 -1.34072,2.0221 -1.34072,3.23574l0,0.00001z" }), jsx$2("path", { stroke: "null", id: "svg_5", fill: "white", d: "m24.39411,15.25395c0,2.42515 -0.9601,4.75174 -2.6705,6.47156c-1.7104,1.71979 -4.03214,2.69302 -6.45802,2.70717l0,-0.02659c1.21402,0 2.37834,-0.4822 3.23679,-1.34037c0.85845,-0.85817 1.34072,-2.0221 1.34072,-3.23574c0,-1.21364 -0.48227,-2.37756 -1.34072,-3.23574c-0.85845,-0.85817 -2.02277,-1.34028 -3.23679,-1.34028l9.12853,0l0,-0.00001z" })] })] }) }));
7138
+ };
7139
+
7135
7140
  const Icon$a = ({ width }) => {
7136
7141
  return (jsxs("svg", { viewBox: "0 0 32 32", width: width || '128px', children: [jsx$2("path", { d: "M24 0H8C3.58172 0 0 3.58172 0 8V24C0 28.4183 3.58172 32 8 32H24C28.4183 32 32 28.4183 32 24V8C32 3.58172 28.4183 0 24 0Z", fill: "#1E2026" }), jsx$2("path", { d: "M16.2857 4L9.97035 7.6761L12.2922 9.03415L16.2857 6.7161L20.2792 9.03415L22.6011 7.6761L16.2857 4Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2792 10.9541L22.6011 12.3122V15.0283L18.6075 17.3463V21.9824L16.2857 23.3405L13.9639 21.9824V17.3463L9.97035 15.0283V12.3122L12.2922 10.9541L16.2857 13.2722L20.2792 10.9541Z", fill: "#F0B90B" }), jsx$2("path", { d: "M22.6011 16.9483V19.6644L20.2792 21.0224V18.3063L22.6011 16.9483Z", fill: "#F0B90B" }), jsx$2("path", { d: "M20.2561 22.9424L24.2496 20.6244V15.9883L26.5714 14.6302V21.9824L20.2561 25.6585V22.9424Z", fill: "#F0B90B" }), jsx$2("path", { d: "M24.2496 11.3522L21.9278 9.99414L24.2496 8.63609L26.5714 9.99414V12.7102L24.2496 14.0683V11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M13.9639 26.642V23.9259L16.2857 25.2839L18.6075 23.9259V26.642L16.2857 28L13.9639 26.642Z", fill: "#F0B90B" }), jsx$2("path", { d: "M12.2922 21.0224L9.97035 19.6644V16.9483L12.2922 18.3063V21.0224Z", fill: "#F0B90B" }), jsx$2("path", { d: "M16.2857 11.3522L13.9639 9.99414L16.2857 8.63609L18.6075 9.99414L16.2857 11.3522Z", fill: "#F0B90B" }), jsx$2("path", { d: "M10.6437 9.99414L8.32183 11.3522V14.0683L6 12.7102V9.99414L8.32183 8.63609L10.6437 9.99414Z", fill: "#F0B90B" }), jsx$2("path", { d: "M6 14.6302L8.32183 15.9883V20.6244L12.3154 22.9424V25.6585L6 21.9824V14.6302Z", fill: "#F0B90B" })] }));
7137
7142
  };
@@ -7534,6 +7539,8 @@ const Svg = (_a) => {
7534
7539
  return jsx$2(Timer, Object.assign({}, props, { getStyles: getStyles }));
7535
7540
  case icons.BLAST:
7536
7541
  return jsx$2(BLAST, Object.assign({}, props, { getStyles: getStyles }));
7542
+ case icons.CROSSFI:
7543
+ return jsx$2(CROSSFI, Object.assign({}, props, { getStyles: getStyles }));
7537
7544
  default:
7538
7545
  return null;
7539
7546
  }
@@ -18828,6 +18835,7 @@ const MAINNET_CHAINS = [
18828
18835
  types.ChainId.GRAPHLINQ,
18829
18836
  types.ChainId.AVAX,
18830
18837
  types.ChainId.BLAST,
18838
+ types.ChainId.CROSSFI,
18831
18839
  ];
18832
18840
  // Network Icons
18833
18841
  const NETWORK_ICONS = {
@@ -18845,6 +18853,7 @@ const NETWORK_ICONS = {
18845
18853
  [types.ChainId.GRAPHLINQ]: icons.GRAPHLINQ,
18846
18854
  [types.ChainId.AVAX]: icons.AVAX_TOKEN,
18847
18855
  [types.ChainId.BLAST]: icons.BLAST,
18856
+ [types.ChainId.CROSSFI]: icons.CROSSFI,
18848
18857
  };
18849
18858
  // Network labels
18850
18859
  const NETWORK_LABEL = {
@@ -18864,6 +18873,7 @@ const NETWORK_LABEL = {
18864
18873
  [types.ChainId.GRAPHLINQ]: 'GraphLinq',
18865
18874
  [types.ChainId.AVAX]: 'Avalanche',
18866
18875
  [types.ChainId.BLAST]: 'Blast',
18876
+ [types.ChainId.CROSSFI]: 'Crossfi',
18867
18877
  };
18868
18878
  // Network block explorers
18869
18879
  const BLOCK_EXPLORER = {
@@ -18883,6 +18893,7 @@ const BLOCK_EXPLORER = {
18883
18893
  [types.ChainId.GRAPHLINQ]: 'https://graphlinq.dex.guru',
18884
18894
  [types.ChainId.AVAX]: 'https://snowscan.xyz',
18885
18895
  [types.ChainId.BLAST]: 'https://blastscan.io',
18896
+ [types.ChainId.CROSSFI]: 'https://xfiscan.com',
18886
18897
  };
18887
18898
 
18888
18899
  const supportedByLIFI = [
@@ -18896,7 +18907,7 @@ const supportedByLIFI = [
18896
18907
  types.ChainId.BLAST,
18897
18908
  ];
18898
18909
  // we should be good just by using staging on this, as it is only used for token images
18899
- const APESWAP_LIST_REPO = `https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/staging`;
18910
+ const APESWAP_LIST_REPO = `https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/crossfi`;
18900
18911
  const STRAPI_URL = `https://strapi-api.ape.bond`;
18901
18912
  const SOUL_ZAP_API = `https://zap-api.ape.bond/zap?batch=1`;
18902
18913
 
@@ -19092,6 +19103,7 @@ const NETWORK_COLORS = {
19092
19103
  [types.ChainId.GRAPHLINQ]: '#ded2ff',
19093
19104
  [types.ChainId.AVAX]: '#e74344',
19094
19105
  [types.ChainId.BLAST]: '#fcfc03',
19106
+ [types.ChainId.CROSSFI]: '#7c8084',
19095
19107
  };
19096
19108
  const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
19097
19109
  var _a, _b, _c, _d, _e;
@@ -49228,6 +49240,7 @@ const PRICE_GETTER_ADDRESSES = {
49228
49240
  [types.ChainId.BASE]: '0xE29C74B4DD05A268B5FFaadeF4fdbAa1de6FDe84', // Price getter V3
49229
49241
  [types.ChainId.BLAST]: '0x218EB9ACDC721E235969A30f5DA46FB1224Fa7A7', // Price getter V3
49230
49242
  [types.ChainId.AVAX]: '0x01dadaa586D30d93Ac92C79A5Cb02a8F276a8B4F', // Price getter V3
49243
+ [types.ChainId.CROSSFI]: '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4', // Price getter V3
49231
49244
  };
49232
49245
  const MULTICALL_V2 = {
49233
49246
  [types.ChainId.BSC]: '0x38ce767d81de3940CFa5020B55af1A400ED4F657',
@@ -49245,6 +49258,7 @@ const MULTICALL_V2 = {
49245
49258
  [types.ChainId.GRAPHLINQ]: '0xCc88b233BbcE04c064C627ad5627da6e24a8A067',
49246
49259
  [types.ChainId.AVAX]: '0xcA11bde05977b3631167028862bE2a173976CA11',
49247
49260
  [types.ChainId.BLAST]: '0xcA11bde05977b3631167028862bE2a173976CA11',
49261
+ [types.ChainId.CROSSFI]: '0x007bAC6A07894A69fBcA94ED6274005093E1c44E',
49248
49262
  };
49249
49263
  const SoulZapTokenManager = {
49250
49264
  [types.ChainId.MAINNET]: '0x2F87f76336A560bbB0d18d357D10646bB96E8802',
@@ -67850,6 +67864,7 @@ const PUBLIC_RPC_URLS = {
67850
67864
  [types.ChainId.GRAPHLINQ]: ['https://glq-dataseed.graphlinq.io'],
67851
67865
  [types.ChainId.AVAX]: ['https://avax.meowrpc.com'],
67852
67866
  [types.ChainId.BLAST]: ['https://rpc.blast.io'],
67867
+ [types.ChainId.CROSSFI]: ['https://rpc.mainnet.ms'],
67853
67868
  };
67854
67869
 
67855
67870
  // This is the legacy multicall
@@ -70211,7 +70226,7 @@ function checkImageExists(fileName) {
70211
70226
  });
70212
70227
  }
70213
70228
 
70214
- const LinkShare = ({ bondNFTData, userBill, chainId, }) => {
70229
+ const LinkShare = ({ bondNFTData, userBill, }) => {
70215
70230
  var _a, _b, _c, _d;
70216
70231
  const [isLoading, setIsLoading] = useState([false, false]);
70217
70232
  const [hideTag, setHideTag] = useState(false);
@@ -70220,17 +70235,8 @@ const LinkShare = ({ bondNFTData, userBill, chainId, }) => {
70220
70235
  const shareUrl = `${mainUrl}/bond-nft?bondAddress=${(_c = (_b = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _b === void 0 ? void 0 : _b.billNftAddress) === null || _c === void 0 ? void 0 : _c.toLowerCase()}%26bondChain=${bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.chainId}%26tokenId=${userBill === null || userBill === void 0 ? void 0 : userBill.id}%26af=${(_d = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _d === void 0 ? void 0 : _d.createdAddressOwner}`;
70221
70236
  const text = `I've filled my bags with $${userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol} at a discount, thanks to Bonds-only on @apebond! Check it out: `;
70222
70237
  const handleShare = (url, social) => __awaiter$9(void 0, void 0, void 0, function* () {
70223
- var _a;
70224
70238
  if (isLoading[0] || isLoading[1])
70225
70239
  return;
70226
- track({
70227
- event: 'referral',
70228
- chain: chainId,
70229
- data: {
70230
- cat: `${social.toUpperCase()} Share Bond`,
70231
- bond: (_a = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.data) === null || _a === void 0 ? void 0 : _a.payoutTokenData.symbol,
70232
- },
70233
- });
70234
70240
  setIsLoading(social === 'x' ? [true, false] : [false, true]);
70235
70241
  yield generateImageFromTemplate(bondNFTData, url, apiUrl);
70236
70242
  setIsLoading([false, false]);
@@ -70316,7 +70322,7 @@ const YourBondsModal = ({ onDismiss, userBill }) => {
70316
70322
  justifyContent: 'center',
70317
70323
  alignItems: 'center',
70318
70324
  zIndex: 1,
70319
- }, children: jsx$2(Spinner, { width: 100 }) })), imgLoaded && jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill, chainId: chainId })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
70325
+ }, children: jsx$2(Spinner, { width: 100 }) })), imgLoaded && jsx$2(LinkShare, { bondNFTData: bondNFTData, userBill: userBill })] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: userBill && (jsx$2(TokenImage, { symbol: (_k = (_j = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _j === void 0 ? void 0 : _j.showcaseTokenName) !== null && _k !== void 0 ? _k : (_m = (_l = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _l === void 0 ? void 0 : _l.earnToken) === null || _m === void 0 ? void 0 : _m.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_p = (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.showcaseTokenName) !== null && _p !== void 0 ? _p : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_r = (_q = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _q === void 0 ? void 0 : _q.tags) === null || _r === void 0 ? void 0 : _r.slice(0, 1).map((tag) => {
70320
70326
  return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
70321
70327
  }) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill === null || userBill === void 0 ? void 0 : userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
70322
70328
  borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
@@ -1,7 +1,6 @@
1
1
  import { UserBill, UserBillNftData } from '../../../../types/yourbonds';
2
- declare const LinkShare: ({ bondNFTData, userBill, chainId, }: {
2
+ declare const LinkShare: ({ bondNFTData, userBill, }: {
3
3
  bondNFTData: UserBillNftData | undefined;
4
4
  userBill: UserBill | undefined;
5
- chainId: number;
6
5
  }) => import("react").JSX.Element;
7
6
  export default LinkShare;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "2.7.5",
6
+ "version": "2.7.6-test.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -56,7 +56,7 @@
56
56
  "yalc": "^1.0.0-pre.53"
57
57
  },
58
58
  "dependencies": {
59
- "@ape.swap/apeswap-lists": "3.75.0",
59
+ "@ape.swap/apeswap-lists": "3.77.0-test.0",
60
60
  "@emotion/react": "11.11.4",
61
61
  "bignumber.js": "^9.1.2",
62
62
  "chart.js": "4.2.0",