@zoralabs/coins-sdk 0.0.2-sdkalpha.7 → 0.0.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.cjs CHANGED
@@ -1,75 +1,26 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- cleanAndValidateMetadataURI: () => cleanAndValidateMetadataURI,
24
- createCoin: () => createCoin,
25
- createCoinCall: () => createCoinCall,
26
- getCoin: () => getCoin2,
27
- getCoinComments: () => getCoinComments2,
28
- getCoinCreateFromLogs: () => getCoinCreateFromLogs,
29
- getCoins: () => getCoins2,
30
- getCoinsLastTraded: () => getCoinsLastTraded,
31
- getCoinsLastTradedUnique: () => getCoinsLastTradedUnique,
32
- getCoinsMostValuable: () => getCoinsMostValuable,
33
- getCoinsNew: () => getCoinsNew,
34
- getCoinsTopGainers: () => getCoinsTopGainers,
35
- getCoinsTopVolume24h: () => getCoinsTopVolume24h,
36
- getOnchainCoinDetails: () => getOnchainCoinDetails,
37
- getProfile: () => getProfile2,
38
- getProfileBalances: () => getProfileBalances2,
39
- getTradeFromLogs: () => getTradeFromLogs,
40
- setApiKey: () => setApiKey,
41
- tradeCoin: () => tradeCoin,
42
- tradeCoinCall: () => tradeCoinCall,
43
- updateCoinURI: () => updateCoinURI,
44
- updateCoinURICall: () => updateCoinURICall,
45
- updatePayoutRecipient: () => updatePayoutRecipient,
46
- updatePayoutRecipientCall: () => updatePayoutRecipientCall,
47
- validateMetadataJSON: () => validateMetadataJSON,
48
- validateMetadataURIContent: () => validateMetadataURIContent
49
- });
50
- module.exports = __toCommonJS(src_exports);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/actions/createCoin.ts
2
+ var _coins = require('@zoralabs/coins');
51
3
 
52
- // src/actions/createCoin.ts
53
- var import_coins2 = require("@zoralabs/coins");
54
- var import_viem = require("viem");
4
+
5
+ var _viem = require('viem');
55
6
 
56
7
  // src/constants.ts
57
- var import_coins = require("@zoralabs/coins");
58
- var import_chains = require("viem/chains");
59
- var COIN_FACTORY_ADDRESS = import_coins.zoraFactoryImplAddress["8453"];
8
+
9
+ var _chains = require('viem/chains');
10
+ var COIN_FACTORY_ADDRESS = _coins.zoraFactoryImplAddress["8453"];
60
11
  var SUPERCHAIN_WETH_ADDRESS = "0x4200000000000000000000000000000000000006";
61
12
  var USDC_WETH_POOLS_BY_CHAIN = {
62
- [import_chains.base.id]: "0xd0b53D9277642d899DF5C87A3966A349A798F224"
13
+ [_chains.base.id]: "0xd0b53D9277642d899DF5C87A3966A349A798F224"
63
14
  };
64
15
 
65
16
  // src/utils/validateClientNetwork.ts
66
- var import_chains2 = require("viem/chains");
17
+
67
18
  var validateClientNetwork = (publicClient) => {
68
- const clientChainId = publicClient?.chain?.id;
69
- if (clientChainId === import_chains2.base.id) {
19
+ const clientChainId = _optionalChain([publicClient, 'optionalAccess', _ => _.chain, 'optionalAccess', _2 => _2.id]);
20
+ if (clientChainId === _chains.base.id) {
70
21
  return;
71
22
  }
72
- if (clientChainId === import_chains2.baseSepolia.id) {
23
+ if (clientChainId === _chains.baseSepolia.id) {
73
24
  return;
74
25
  }
75
26
  throw new Error(
@@ -93,7 +44,7 @@ function createCoinCall({
93
44
  }
94
45
  const currency = "0x4200000000000000000000000000000000000006";
95
46
  return {
96
- abi: import_coins2.zoraFactoryImplABI,
47
+ abi: _coins.zoraFactoryImplABI,
97
48
  functionName: "deploy",
98
49
  address: COIN_FACTORY_ADDRESS,
99
50
  args: [
@@ -111,11 +62,11 @@ function createCoinCall({
111
62
  };
112
63
  }
113
64
  function getCoinCreateFromLogs(receipt) {
114
- const eventLogs = (0, import_viem.parseEventLogs)({
115
- abi: import_coins2.zoraFactoryImplABI,
65
+ const eventLogs = _viem.parseEventLogs.call(void 0, {
66
+ abi: _coins.zoraFactoryImplABI,
116
67
  logs: receipt.logs
117
68
  });
118
- return eventLogs.find((log) => log.eventName === "CoinCreated")?.args;
69
+ return _optionalChain([eventLogs, 'access', _3 => _3.find, 'call', _4 => _4((log) => log.eventName === "CoinCreated"), 'optionalAccess', _5 => _5.args]);
119
70
  }
120
71
  async function createCoin(call, walletClient, publicClient, options) {
121
72
  validateClientNetwork(publicClient);
@@ -124,7 +75,7 @@ async function createCoin(call, walletClient, publicClient, options) {
124
75
  account: walletClient.account
125
76
  });
126
77
  if (request.gas) {
127
- request.gas = request.gas * BigInt(options?.gasMultiplier ?? 100) / 100n;
78
+ request.gas = request.gas * BigInt(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _6 => _6.gasMultiplier]), () => ( 100))) / 100n;
128
79
  }
129
80
  const hash = await walletClient.writeContract(request);
130
81
  const receipt = await publicClient.waitForTransactionReceipt({ hash });
@@ -132,15 +83,50 @@ async function createCoin(call, walletClient, publicClient, options) {
132
83
  return {
133
84
  hash,
134
85
  receipt,
135
- address: deployment?.coin,
86
+ address: _optionalChain([deployment, 'optionalAccess', _7 => _7.coin]),
136
87
  deployment
137
88
  };
138
89
  }
139
90
 
140
91
  // src/actions/tradeCoin.ts
141
- var import_coins3 = require("@zoralabs/coins");
142
- var import_viem2 = require("viem");
143
- var import_chains3 = require("viem/chains");
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ async function simulateBuy({
100
+ target,
101
+ requestedOrderSize,
102
+ publicClient
103
+ }) {
104
+ const numberResult = await publicClient.simulateContract({
105
+ address: target,
106
+ abi: _coins.coinABI,
107
+ functionName: "buy",
108
+ args: [
109
+ _viem.zeroAddress,
110
+ requestedOrderSize,
111
+ 0n,
112
+ // minAmountOut
113
+ 0n,
114
+ // sqrtPriceLimitX96
115
+ _viem.zeroAddress
116
+ // tradeReferrer
117
+ ],
118
+ // We want to ensure that the multicall3 contract has enough ETH to buy in the simulation
119
+ stateOverride: [
120
+ {
121
+ address: _chains.baseSepolia.contracts.multicall3.address,
122
+ balance: _viem.parseEther.call(void 0, "10000000")
123
+ }
124
+ ]
125
+ });
126
+ const orderSize = numberResult.result[0];
127
+ const amountOut = numberResult.result[1];
128
+ return { orderSize, amountOut };
129
+ }
144
130
  function tradeCoinCall({
145
131
  target,
146
132
  direction,
@@ -149,11 +135,11 @@ function tradeCoinCall({
149
135
  orderSize,
150
136
  minAmountOut = 0n,
151
137
  sqrtPriceLimitX96 = 0n,
152
- tradeReferrer = import_viem2.zeroAddress
138
+ tradeReferrer = _viem.zeroAddress
153
139
  }
154
140
  }) {
155
141
  return {
156
- abi: import_coins3.coinABI,
142
+ abi: _coins.coinABI,
157
143
  functionName: direction,
158
144
  address: target,
159
145
  args: [
@@ -167,14 +153,14 @@ function tradeCoinCall({
167
153
  };
168
154
  }
169
155
  function getTradeFromLogs(receipt, direction) {
170
- const eventLogs = (0, import_viem2.parseEventLogs)({
171
- abi: import_coins3.coinABI,
156
+ const eventLogs = _viem.parseEventLogs.call(void 0, {
157
+ abi: _coins.coinABI,
172
158
  logs: receipt.logs
173
159
  });
174
160
  if (direction === "buy") {
175
- return eventLogs.find((log) => log.eventName === "CoinBuy")?.args;
161
+ return _optionalChain([eventLogs, 'access', _8 => _8.find, 'call', _9 => _9((log) => log.eventName === "CoinBuy"), 'optionalAccess', _10 => _10.args]);
176
162
  }
177
- return eventLogs.find((log) => log.eventName === "CoinSell")?.args;
163
+ return _optionalChain([eventLogs, 'access', _11 => _11.find, 'call', _12 => _12((log) => log.eventName === "CoinSell"), 'optionalAccess', _13 => _13.args]);
178
164
  }
179
165
  async function tradeCoin(params, walletClient, publicClient) {
180
166
  validateClientNetwork(publicClient);
@@ -193,11 +179,16 @@ async function tradeCoin(params, walletClient, publicClient) {
193
179
  }
194
180
 
195
181
  // src/actions/getOnchainCoinDetails.ts
196
- var import_coins4 = require("@zoralabs/coins");
197
- var import_viem3 = require("viem");
182
+
183
+
184
+
185
+
186
+
187
+
188
+
198
189
  async function getOnchainCoinDetails({
199
190
  coin,
200
- user = import_viem3.zeroAddress,
191
+ user = _viem.zeroAddress,
201
192
  publicClient
202
193
  }) {
203
194
  validateClientNetwork(publicClient);
@@ -206,30 +197,30 @@ async function getOnchainCoinDetails({
206
197
  contracts: [
207
198
  {
208
199
  address: coin,
209
- abi: import_coins4.coinABI,
200
+ abi: _coins.coinABI,
210
201
  functionName: "balanceOf",
211
202
  args: [user]
212
203
  },
213
204
  {
214
205
  address: coin,
215
- abi: import_coins4.coinABI,
206
+ abi: _coins.coinABI,
216
207
  functionName: "poolAddress"
217
208
  },
218
209
  {
219
210
  address: coin,
220
- abi: import_coins4.coinABI,
211
+ abi: _coins.coinABI,
221
212
  functionName: "owners"
222
213
  },
223
214
  {
224
215
  address: coin,
225
- abi: import_coins4.coinABI,
216
+ abi: _coins.coinABI,
226
217
  functionName: "payoutRecipient"
227
218
  }
228
219
  ],
229
220
  allowFailure: false
230
221
  }
231
222
  );
232
- const USDC_WETH_POOL = USDC_WETH_POOLS_BY_CHAIN[publicClient.chain?.id || 0];
223
+ const USDC_WETH_POOL = USDC_WETH_POOLS_BY_CHAIN[_optionalChain([publicClient, 'access', _14 => _14.chain, 'optionalAccess', _15 => _15.id]) || 0];
233
224
  const [
234
225
  coinWethPoolSlot0,
235
226
  coinWethPoolToken0,
@@ -241,34 +232,34 @@ async function getOnchainCoinDetails({
241
232
  contracts: [
242
233
  {
243
234
  address: pool,
244
- abi: import_coins4.iUniswapV3PoolABI,
235
+ abi: _coins.iUniswapV3PoolABI,
245
236
  functionName: "slot0"
246
237
  },
247
238
  {
248
239
  address: pool,
249
- abi: import_coins4.iUniswapV3PoolABI,
240
+ abi: _coins.iUniswapV3PoolABI,
250
241
  functionName: "token0"
251
242
  },
252
243
  {
253
244
  address: coin,
254
- abi: import_viem3.erc20Abi,
245
+ abi: _viem.erc20Abi,
255
246
  functionName: "balanceOf",
256
247
  args: [pool]
257
248
  },
258
249
  {
259
250
  address: coin,
260
- abi: import_coins4.coinABI,
251
+ abi: _coins.coinABI,
261
252
  functionName: "totalSupply"
262
253
  },
263
254
  {
264
255
  address: SUPERCHAIN_WETH_ADDRESS,
265
- abi: import_viem3.erc20Abi,
256
+ abi: _viem.erc20Abi,
266
257
  functionName: "balanceOf",
267
258
  args: [pool]
268
259
  },
269
260
  {
270
- address: USDC_WETH_POOL ?? coin,
271
- abi: import_coins4.iUniswapV3PoolABI,
261
+ address: _nullishCoalesce(USDC_WETH_POOL, () => ( coin)),
262
+ abi: _coins.iUniswapV3PoolABI,
272
263
  functionName: "slot0"
273
264
  }
274
265
  ],
@@ -285,7 +276,7 @@ async function getOnchainCoinDetails({
285
276
  coinWethPoolSlot0.sqrtPriceX96,
286
277
  18,
287
278
  18,
288
- (0, import_viem3.isAddressEqual)(coinWethPoolToken0, coin),
279
+ _viem.isAddressEqual.call(void 0, coinWethPoolToken0, coin),
289
280
  18
290
281
  );
291
282
  const marketCap = coinPriceInWeth * coinTotalSupply / 10n ** 18n;
@@ -307,9 +298,9 @@ async function getOnchainCoinDetails({
307
298
  function convertEthOutput(amountETH, wethToUsdc) {
308
299
  return {
309
300
  eth: amountETH,
310
- ethDecimal: parseFloat((0, import_viem3.formatEther)(amountETH)),
301
+ ethDecimal: parseFloat(_viem.formatEther.call(void 0, amountETH)),
311
302
  usdc: wethToUsdc ? amountETH * wethToUsdc : null,
312
- usdcDecimal: wethToUsdc ? parseFloat((0, import_viem3.formatEther)(amountETH * wethToUsdc / 10n ** 18n)) : null
303
+ usdcDecimal: wethToUsdc ? parseFloat(_viem.formatEther.call(void 0, amountETH * wethToUsdc / 10n ** 18n)) : null
313
304
  };
314
305
  }
315
306
  function uniswapV3SqrtPriceToBigIntScaled(sqrtPriceX96, token0Decimals, token1Decimals, isToken0Coin, scaleDecimals = 18) {
@@ -333,8 +324,10 @@ function uniswapV3SqrtPriceToBigIntScaled(sqrtPriceX96, token0Decimals, token1De
333
324
  }
334
325
 
335
326
  // src/actions/updateCoinURI.ts
336
- var import_coins5 = require("@zoralabs/coins");
337
- var import_viem4 = require("viem");
327
+
328
+
329
+
330
+
338
331
  function updateCoinURICall({
339
332
  newURI,
340
333
  coin
@@ -343,7 +336,7 @@ function updateCoinURICall({
343
336
  throw new Error("URI needs to be an ipfs:// prefix uri");
344
337
  }
345
338
  return {
346
- abi: import_coins5.coinABI,
339
+ abi: _coins.coinABI,
347
340
  address: coin,
348
341
  functionName: "setContractURI",
349
342
  args: [newURI]
@@ -358,7 +351,7 @@ async function updateCoinURI(args, walletClient, publicClient) {
358
351
  });
359
352
  const hash = await walletClient.writeContract(request);
360
353
  const receipt = await publicClient.waitForTransactionReceipt({ hash });
361
- const eventLogs = (0, import_viem4.parseEventLogs)({ abi: import_coins5.coinABI, logs: receipt.logs });
354
+ const eventLogs = _viem.parseEventLogs.call(void 0, { abi: _coins.coinABI, logs: receipt.logs });
362
355
  const uriUpdated = eventLogs.find(
363
356
  (log) => log.eventName === "ContractURIUpdated"
364
357
  );
@@ -366,14 +359,16 @@ async function updateCoinURI(args, walletClient, publicClient) {
366
359
  }
367
360
 
368
361
  // src/actions/updatePayoutRecipient.ts
369
- var import_coins6 = require("@zoralabs/coins");
370
- var import_viem5 = require("viem");
362
+
363
+
364
+
365
+
371
366
  function updatePayoutRecipientCall({
372
367
  newPayoutRecipient,
373
368
  coin
374
369
  }) {
375
370
  return {
376
- abi: import_coins6.coinABI,
371
+ abi: _coins.coinABI,
377
372
  address: coin,
378
373
  functionName: "setPayoutRecipient",
379
374
  args: [newPayoutRecipient]
@@ -388,7 +383,7 @@ async function updatePayoutRecipient(args, walletClient, publicClient) {
388
383
  });
389
384
  const hash = await walletClient.writeContract(request);
390
385
  const receipt = await publicClient.waitForTransactionReceipt({ hash });
391
- const eventLogs = (0, import_viem5.parseEventLogs)({ abi: import_coins6.coinABI, logs: receipt.logs });
386
+ const eventLogs = _viem.parseEventLogs.call(void 0, { abi: _coins.coinABI, logs: receipt.logs });
392
387
  const payoutRecipientUpdated = eventLogs.find(
393
388
  (log) => log.eventName === "CoinPayoutRecipientUpdated"
394
389
  );
@@ -396,46 +391,49 @@ async function updatePayoutRecipient(args, walletClient, publicClient) {
396
391
  }
397
392
 
398
393
  // src/client/client.gen.ts
399
- var import_client_fetch = require("@hey-api/client-fetch");
400
- var client = (0, import_client_fetch.createClient)(
401
- (0, import_client_fetch.createConfig)({
394
+
395
+
396
+
397
+ var _clientfetch = require('@hey-api/client-fetch');
398
+ var client = _clientfetch.createClient.call(void 0,
399
+ _clientfetch.createConfig.call(void 0, {
402
400
  baseUrl: "https://api-sdk.zora.engineering/"
403
401
  })
404
402
  );
405
403
 
406
404
  // src/client/sdk.gen.ts
407
405
  var getCoin = (options) => {
408
- return (options.client ?? client).get({
406
+ return (_nullishCoalesce(options.client, () => ( client))).get({
409
407
  url: "/coin",
410
408
  ...options
411
409
  });
412
410
  };
413
411
  var getCoinComments = (options) => {
414
- return (options.client ?? client).get({
412
+ return (_nullishCoalesce(options.client, () => ( client))).get({
415
413
  url: "/coinComments",
416
414
  ...options
417
415
  });
418
416
  };
419
417
  var getCoins = (options) => {
420
- return (options.client ?? client).get({
418
+ return (_nullishCoalesce(options.client, () => ( client))).get({
421
419
  url: "/coins",
422
420
  ...options
423
421
  });
424
422
  };
425
423
  var getExplore = (options) => {
426
- return (options.client ?? client).get({
424
+ return (_nullishCoalesce(options.client, () => ( client))).get({
427
425
  url: "/explore",
428
426
  ...options
429
427
  });
430
428
  };
431
429
  var getProfile = (options) => {
432
- return (options.client ?? client).get({
430
+ return (_nullishCoalesce(options.client, () => ( client))).get({
433
431
  url: "/profile",
434
432
  ...options
435
433
  });
436
434
  };
437
435
  var getProfileBalances = (options) => {
438
- return (options.client ?? client).get({
436
+ return (_nullishCoalesce(options.client, () => ( client))).get({
439
437
  url: "/profileBalances",
440
438
  ...options
441
439
  });
@@ -458,16 +456,14 @@ function getApiKeyMeta() {
458
456
  }
459
457
 
460
458
  // src/api/queries.ts
461
- var getCoin2 = async (query) => {
459
+ var getCoin2 = async (query, options) => {
462
460
  return await getCoin({
461
+ ...options,
463
462
  query,
464
463
  meta: getApiKeyMeta()
465
464
  });
466
465
  };
467
- var getCoins2 = async ({
468
- coinAddresses,
469
- chainId
470
- }) => {
466
+ var getCoins2 = async ({ coinAddresses, chainId }, options) => {
471
467
  return await getCoins({
472
468
  query: {
473
469
  coins: coinAddresses.map((collectionAddress) => ({
@@ -475,40 +471,44 @@ var getCoins2 = async ({
475
471
  collectionAddress
476
472
  }))
477
473
  },
478
- meta: getApiKeyMeta()
474
+ meta: getApiKeyMeta(),
475
+ ...options
479
476
  });
480
477
  };
481
- var getCoinComments2 = async (query) => {
478
+ var getCoinComments2 = async (query, options) => {
482
479
  return await getCoinComments({
483
480
  query,
484
- meta: getApiKeyMeta()
481
+ meta: getApiKeyMeta(),
482
+ ...options
485
483
  });
486
484
  };
487
- var getProfile2 = async (query) => {
485
+ var getProfile2 = async (query, options) => {
488
486
  return await getProfile({
489
487
  query,
490
- meta: getApiKeyMeta()
488
+ meta: getApiKeyMeta(),
489
+ ...options
491
490
  });
492
491
  };
493
- var getProfileBalances2 = async (query) => {
492
+ var getProfileBalances2 = async (query, options) => {
494
493
  return await getProfileBalances({
495
494
  query,
496
- meta: getApiKeyMeta()
495
+ meta: getApiKeyMeta(),
496
+ ...options
497
497
  });
498
498
  };
499
499
 
500
500
  // src/api/explore.ts
501
- var createExploreQuery = (listType, options) => getExplore({
501
+ var createExploreQuery = (query, listType, options) => getExplore({
502
502
  ...options,
503
- query: { ...options?.query, listType },
503
+ query: { ...query, listType },
504
504
  meta: getApiKeyMeta()
505
505
  });
506
- var getCoinsTopGainers = (options) => createExploreQuery("TOP_GAINERS", options);
507
- var getCoinsTopVolume24h = (options) => createExploreQuery("TOP_VOLUME_24H", options);
508
- var getCoinsMostValuable = (options) => createExploreQuery("MOST_VALUABLE", options);
509
- var getCoinsNew = (options) => createExploreQuery("NEW", options);
510
- var getCoinsLastTraded = (options) => createExploreQuery("LAST_TRADED", options);
511
- var getCoinsLastTradedUnique = (options) => createExploreQuery("LAST_TRADED_UNIQUE", options);
506
+ var getCoinsTopGainers = (query = {}, options) => createExploreQuery(query, "TOP_GAINERS", options);
507
+ var getCoinsTopVolume24h = (query = {}, options) => createExploreQuery(query, "TOP_VOLUME_24H", options);
508
+ var getCoinsMostValuable = (query = {}, options) => createExploreQuery(query, "MOST_VALUABLE", options);
509
+ var getCoinsNew = (query = {}, options) => createExploreQuery(query, "NEW", options);
510
+ var getCoinsLastTraded = (query = {}, options) => createExploreQuery(query, "LAST_TRADED", options);
511
+ var getCoinsLastTradedUnique = (query = {}, options) => createExploreQuery(query, "LAST_TRADED_UNIQUE", options);
512
512
 
513
513
  // src/metadata/cleanAndValidateMetadataURI.ts
514
514
  function cleanAndValidateMetadataURI(uri) {
@@ -570,33 +570,33 @@ async function validateMetadataURIContent(metadataURI) {
570
570
  const metadataJson = await response.json();
571
571
  return validateMetadataJSON(metadataJson);
572
572
  }
573
- // Annotate the CommonJS export names for ESM import in node:
574
- 0 && (module.exports = {
575
- cleanAndValidateMetadataURI,
576
- createCoin,
577
- createCoinCall,
578
- getCoin,
579
- getCoinComments,
580
- getCoinCreateFromLogs,
581
- getCoins,
582
- getCoinsLastTraded,
583
- getCoinsLastTradedUnique,
584
- getCoinsMostValuable,
585
- getCoinsNew,
586
- getCoinsTopGainers,
587
- getCoinsTopVolume24h,
588
- getOnchainCoinDetails,
589
- getProfile,
590
- getProfileBalances,
591
- getTradeFromLogs,
592
- setApiKey,
593
- tradeCoin,
594
- tradeCoinCall,
595
- updateCoinURI,
596
- updateCoinURICall,
597
- updatePayoutRecipient,
598
- updatePayoutRecipientCall,
599
- validateMetadataJSON,
600
- validateMetadataURIContent
601
- });
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+ exports.cleanAndValidateMetadataURI = cleanAndValidateMetadataURI; exports.createCoin = createCoin; exports.createCoinCall = createCoinCall; exports.getCoin = getCoin2; exports.getCoinComments = getCoinComments2; exports.getCoinCreateFromLogs = getCoinCreateFromLogs; exports.getCoins = getCoins2; exports.getCoinsLastTraded = getCoinsLastTraded; exports.getCoinsLastTradedUnique = getCoinsLastTradedUnique; exports.getCoinsMostValuable = getCoinsMostValuable; exports.getCoinsNew = getCoinsNew; exports.getCoinsTopGainers = getCoinsTopGainers; exports.getCoinsTopVolume24h = getCoinsTopVolume24h; exports.getOnchainCoinDetails = getOnchainCoinDetails; exports.getProfile = getProfile2; exports.getProfileBalances = getProfileBalances2; exports.getTradeFromLogs = getTradeFromLogs; exports.setApiKey = setApiKey; exports.simulateBuy = simulateBuy; exports.tradeCoin = tradeCoin; exports.tradeCoinCall = tradeCoinCall; exports.updateCoinURI = updateCoinURI; exports.updateCoinURICall = updateCoinURICall; exports.updatePayoutRecipient = updatePayoutRecipient; exports.updatePayoutRecipientCall = updatePayoutRecipientCall; exports.validateMetadataJSON = validateMetadataJSON; exports.validateMetadataURIContent = validateMetadataURIContent;
602
602
  //# sourceMappingURL=index.cjs.map