four-flap-meme-sdk 1.2.65 → 1.2.67

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.
@@ -38,9 +38,10 @@ export async function createTokenWithBundleBuyMerkle(params) {
38
38
  }
39
39
  const creatorKey = privateKeys[0];
40
40
  const buyerKeys = privateKeys.slice(1);
41
- // ✅ 使用 48.club RPC 节点(不使用用户传入的 rpcUrl
42
- const club48Endpoint = config.club48Endpoint || 'https://puissant-bsc.48.club';
43
- const { provider, chainId } = createChainContext(club48Endpoint);
41
+ // ✅ 使用公共 BSC RPC 节点(支持浏览器 CORS
42
+ // 48.club RPC 不支持浏览器跨域访问,所以使用公共节点进行余额查询和 gas 估算
43
+ const rpcUrl = config.rpcUrl || 'https://bsc-dataseed.binance.org';
44
+ const { provider, chainId } = createChainContext(rpcUrl);
44
45
  const devWallet = new Wallet(creatorKey, provider);
45
46
  const fourClient = new FourClient({ baseUrl: config.fourApiUrl });
46
47
  // 🔍 检查创建者余额
@@ -88,7 +88,7 @@ export async function createTokenWithBundleBuy(params) {
88
88
  const provider = new JsonRpcProvider(config.rpcUrl);
89
89
  const devWallet = new Wallet(privateKeys[0], provider);
90
90
  const club48 = new Club48Client({
91
- endpoint: config.club48Endpoint,
91
+ endpoint: 'https://puissant-bsc.48.club',
92
92
  explorerEndpoint: config.club48ExplorerEndpoint
93
93
  });
94
94
  const fourClient = new FourClient({ baseUrl: config.fourApiUrl });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.2.65",
3
+ "version": "1.2.67",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",