@zoralabs/coins-sdk 0.4.9 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @zoralabs/coins-sdk
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 78df4fc6: Updated to allow for a different base URL for testing
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - e174b53f: Add `getTrend` and `getTrends` for looking up trend coins
14
+ - `getTrend({ ticker })` — look up a single trend coin by ticker (case-insensitive, server-side)
15
+ - `getTrends({ name })` — search trend coins by name with pagination
16
+ - Also exports `TrendCoinResponse` and `TrendsByNameResponse` types for consumers
17
+
3
18
  ## 0.4.9
4
19
 
5
20
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"tradeCoin.d.ts","sourceRoot":"","sources":["../../src/actions/tradeCoin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,OAAO,EAEP,YAAY,EAEZ,GAAG,EACJ,MAAM,MAAM,CAAC;AAEd,OAAO,EAAa,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,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Aa,CAAC;IACpB,GAAG,EAAE,aAAa,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,OAAO,CAAC;IAEhB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACxD,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,wBAAsB,SAAS,CAAC,EAC9B,eAAe,EACf,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,mBAA0B,GAC3B,EAAE;IACD,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,mBAAmB,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,gBAoHA;AAED,wBAAsB,eAAe,CACnC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAkC5B"}
@@ -18,4 +18,5 @@ export declare const apiPost: (path: string, data?: Record<string, unknown>) =>
18
18
  request: Request;
19
19
  response: Response;
20
20
  }>;
21
+ export declare const setApiBaseUrl: (baseUrl: string) => void;
21
22
  //# sourceMappingURL=api-raw.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-raw.d.ts","sourceRoot":"","sources":["../../src/api/api-raw.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACP,CAAC;AAE7D,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACR,CAAC"}
1
+ {"version":3,"file":"api-raw.d.ts","sourceRoot":"","sources":["../../src/api/api-raw.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACP,CAAC;AAE7D,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;EACR,CAAC;AAE7D,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,SAE5C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { GetExploreData, GetExploreResponse } from "../client/types.gen";
1
+ import type { GetExploreData, GetExploreResponse, GetTrendCoinData, GetTrendCoinResponse, GetTrendsByNameData, GetTrendsByNameResponse } from "../client/types.gen";
2
2
  import { RequestOptionsType } from "./query-types";
3
3
  /**
4
4
  * The inner type for the explore queries that omits listType.
@@ -11,6 +11,12 @@ type ExploreResponse = {
11
11
  export type ListType = GetExploreData["query"]["listType"];
12
12
  export type { ExploreResponse };
13
13
  export type { GetExploreData };
14
+ export type TrendCoinResponse = {
15
+ data?: GetTrendCoinResponse;
16
+ };
17
+ export type TrendsByNameResponse = {
18
+ data?: GetTrendsByNameResponse;
19
+ };
14
20
  /** Get top gaining coins */
15
21
  export declare const getCoinsTopGainers: (query?: QueryRequestType, options?: RequestOptionsType<GetExploreData>) => Promise<ExploreResponse>;
16
22
  /** Get coins with highest 24h volume */
@@ -46,6 +52,10 @@ export declare const getTopVolumeTrends24h: (query?: QueryRequestType, options?:
46
52
  export declare const getTrendingTrends: (query?: QueryRequestType, options?: RequestOptionsType<GetExploreData>) => Promise<ExploreResponse>;
47
53
  /** Get most valuable coins across all types */
48
54
  export declare const getMostValuableAll: (query?: QueryRequestType, options?: RequestOptionsType<GetExploreData>) => Promise<ExploreResponse>;
55
+ /** Look up a single trend coin by ticker (case-insensitive) */
56
+ export declare const getTrend: (query: GetTrendCoinData["query"], options?: RequestOptionsType<GetTrendCoinData>) => Promise<TrendCoinResponse>;
57
+ /** Search trend coins by name, with fuzzy search (paginated) */
58
+ export declare const getTrends: (query: GetTrendsByNameData["query"], options?: RequestOptionsType<GetTrendsByNameData>) => Promise<TrendsByNameResponse>;
49
59
  /** Generic explore query for any list type */
50
60
  export declare const getExploreList: (listType: ListType, query?: QueryRequestType, options?: RequestOptionsType<GetExploreData>) => Promise<ExploreResponse>;
51
61
  //# sourceMappingURL=explore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../src/api/explore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;AAEzE,KAAK,eAAe,GAAG;IAAE,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;AAE3D,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,YAAY,EAAE,cAAc,EAAE,CAAC;AAgB/B,4BAA4B;AAC5B,eAAO,MAAM,kBAAkB,GAC7B,QAAO,gBAAqB,EAC5B,UAAU,kBAAkB,CAAC,cAAc,CAAC,KAC3C,OAAO,CAAC,eAAe,CACyB,CAAC;AAEpD,wCAAwC;AACxC,eAAO,MAAM,oBAAoB,GAC/B,QAAO,gBAAqB,EAC5B,UAAU,kBAAkB,CAAC,cAAc,CAAC,KAC3C,OAAO,CAAC,eAAe,CAC4B,CAAC;AAEvD,8BAA8B;AAC9B,eAAO,MAAM,oBAAoB,GAC/B,QAAO,gBAAqB,EAC5B,UAAU,kBAAkB,CAAC,cAAc,CAAC,KAC3C,OAAO,CAAC,eAAe,CAC2B,CAAC;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,OAAO,CAAC,eAAe,CAC+B,CAAC;AAE1D,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,GACnB,OAAO,gBAAgB,CAAC,OAAO,CAAC,EAChC,UAAU,kBAAkB,CAAC,gBAAgB,CAAC,KAC7C,OAAO,CAAC,iBAAiB,CAKxB,CAAC;AAEL,gEAAgE;AAChE,eAAO,MAAM,SAAS,GACpB,OAAO,mBAAmB,CAAC,OAAO,CAAC,EACnC,UAAU,kBAAkB,CAAC,mBAAmB,CAAC,KAChD,OAAO,CAAC,oBAAoB,CAK3B,CAAC;AAEL,8CAA8C;AAC9C,eAAO,MAAM,cAAc,GACzB,UAAU,QAAQ,EAClB,QAAO,gBAAqB,EAC5B,UAAU,kBAAkB,CAAC,cAAc,CAAC,KAC3C,OAAO,CAAC,eAAe,CAAiD,CAAC"}
package/dist/index.cjs CHANGED
@@ -339,6 +339,30 @@ var getTraderLeaderboard = (options) => {
339
339
  ...options
340
340
  });
341
341
  };
342
+ var getTrendCoin = (options) => {
343
+ return (_nullishCoalesce(options.client, () => ( client))).get({
344
+ security: [
345
+ {
346
+ name: "api-key",
347
+ type: "apiKey"
348
+ }
349
+ ],
350
+ url: "/trendCoin",
351
+ ...options
352
+ });
353
+ };
354
+ var getTrendsByName = (options) => {
355
+ return (_nullishCoalesce(options.client, () => ( client))).get({
356
+ security: [
357
+ {
358
+ name: "api-key",
359
+ type: "apiKey"
360
+ }
361
+ ],
362
+ url: "/trendsByName",
363
+ ...options
364
+ });
365
+ };
342
366
  var postQuote = (options) => {
343
367
  return (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _8 => _8.client]), () => ( client))).post({
344
368
  security: [
@@ -418,6 +442,16 @@ var getNewTrends = (query = {}, options) => createExploreQuery(query, "NEW_TREND
418
442
  var getTopVolumeTrends24h = (query = {}, options) => createExploreQuery(query, "TOP_VOLUME_TRENDS_24H", options);
419
443
  var getTrendingTrends = (query = {}, options) => createExploreQuery(query, "TRENDING_TRENDS", options);
420
444
  var getMostValuableAll = (query = {}, options) => createExploreQuery(query, "MOST_VALUABLE_ALL", options);
445
+ var getTrend = (query, options) => getTrendCoin({
446
+ ...options,
447
+ query,
448
+ ...getApiKeyMeta()
449
+ });
450
+ var getTrends = (query, options) => getTrendsByName({
451
+ ...options,
452
+ query,
453
+ ...getApiKeyMeta()
454
+ });
421
455
  var getExploreList = (listType, query = {}, options) => createExploreQuery(query, listType, options);
422
456
 
423
457
  // src/api/queries.ts
@@ -931,14 +965,23 @@ async function createTradeCall(tradeParameters) {
931
965
  });
932
966
  if (!quote.data) {
933
967
  console.error(quote);
934
- throw new Error("Quote failed");
968
+ const errorBody = quote.error;
969
+ const errorMessage = _optionalChain([errorBody, 'optionalAccess', _26 => _26.error]) || "Quote failed";
970
+ const err = new Error(errorMessage);
971
+ err.errorType = _optionalChain([errorBody, 'optionalAccess', _27 => _27.errorType]);
972
+ err.errorBody = errorBody;
973
+ throw err;
935
974
  }
936
975
  return quote.data;
937
976
  }
938
977
 
939
978
  // src/api/api-raw.ts
979
+
940
980
  var apiGet = (path, data) => client.get({ url: path, query: data, ...getApiKeyMeta() });
941
981
  var apiPost = (path, data) => client.post({ url: path, body: data, ...getApiKeyMeta() });
982
+ var setApiBaseUrl = (baseUrl) => {
983
+ client.setConfig(_clientfetch.createConfig.call(void 0, { baseUrl }));
984
+ };
942
985
 
943
986
  // src/uploader/metadata.ts
944
987
  function validateImageMimeType(mimeType) {
@@ -1055,9 +1098,9 @@ var CoinMetadataBuilder = class {
1055
1098
  symbol: this.symbol,
1056
1099
  description: this.description,
1057
1100
  image: this.imageURL.toString(),
1058
- animation_url: _optionalChain([this, 'access', _26 => _26.mediaURL, 'optionalAccess', _27 => _27.toString, 'call', _28 => _28()]),
1101
+ animation_url: _optionalChain([this, 'access', _28 => _28.mediaURL, 'optionalAccess', _29 => _29.toString, 'call', _30 => _30()]),
1059
1102
  content: this.mediaURL ? {
1060
- uri: _optionalChain([this, 'access', _29 => _29.mediaURL, 'optionalAccess', _30 => _30.toString, 'call', _31 => _31()]),
1103
+ uri: _optionalChain([this, 'access', _31 => _31.mediaURL, 'optionalAccess', _32 => _32.toString, 'call', _33 => _33()]),
1061
1104
  mime: this.mediaMimeType
1062
1105
  } : void 0,
1063
1106
  properties: this.properties
@@ -1122,7 +1165,7 @@ var ZoraUploader = class {
1122
1165
  const response = await setCreateUploadJwt2({
1123
1166
  creatorAddress: this.creatorAddress
1124
1167
  });
1125
- this.jwtApiKey = _optionalChain([response, 'access', _32 => _32.data, 'optionalAccess', _33 => _33.createUploadJwtFromApiKey]);
1168
+ this.jwtApiKey = _optionalChain([response, 'access', _34 => _34.data, 'optionalAccess', _35 => _35.createUploadJwtFromApiKey]);
1126
1169
  if (!this.jwtApiKey) {
1127
1170
  throw new Error("Failed to create upload JWT");
1128
1171
  }
@@ -1217,5 +1260,8 @@ function createZoraUploaderForCreator(creatorAddress) {
1217
1260
 
1218
1261
 
1219
1262
 
1220
- exports.CoinMetadataBuilder = CoinMetadataBuilder; exports.CreateConstants = CreateConstants; exports.ZoraUploader = ZoraUploader; exports.apiGet = apiGet; exports.apiPost = apiPost; exports.cleanAndValidateMetadataURI = cleanAndValidateMetadataURI; exports.createCoin = createCoin; exports.createCoinCall = createCoinCall; exports.createMetadataBuilder = createMetadataBuilder; exports.createTradeCall = createTradeCall; exports.createZoraUploaderForCreator = createZoraUploaderForCreator; exports.getCoin = getCoin2; exports.getCoinComments = getCoinComments2; exports.getCoinCreateFromLogs = getCoinCreateFromLogs; exports.getCoinHolders = getCoinHolders2; exports.getCoinSwaps = getCoinSwaps2; exports.getCoins = getCoins2; exports.getCoinsLastTraded = getCoinsLastTraded; exports.getCoinsLastTradedUnique = getCoinsLastTradedUnique; exports.getCoinsMostValuable = getCoinsMostValuable; exports.getCoinsNew = getCoinsNew; exports.getCoinsTopGainers = getCoinsTopGainers; exports.getCoinsTopVolume24h = getCoinsTopVolume24h; exports.getContentCoinPoolConfig = getContentCoinPoolConfig2; exports.getCreatorCoinPoolConfig = getCreatorCoinPoolConfig2; exports.getCreatorCoins = getCreatorCoins; exports.getExploreFeaturedCreators = getExploreFeaturedCreators; exports.getExploreFeaturedVideos = getExploreFeaturedVideos; exports.getExploreList = getExploreList; exports.getExploreNewAll = getExploreNewAll; exports.getExploreTopVolumeAll24h = getExploreTopVolumeAll24h; exports.getExploreTopVolumeCreators24h = getExploreTopVolumeCreators24h; exports.getFeaturedCreators = getFeaturedCreators2; exports.getMostValuableAll = getMostValuableAll; exports.getMostValuableCreatorCoins = getMostValuableCreatorCoins; exports.getMostValuableTrends = getMostValuableTrends; exports.getNewTrends = getNewTrends; exports.getProfile = getProfile2; exports.getProfileBalances = getProfileBalances2; exports.getProfileCoins = getProfileCoins2; exports.getProfileSocial = getProfileSocial2; exports.getTokenInfo = getTokenInfo2; exports.getTopVolumeTrends24h = getTopVolumeTrends24h; exports.getTraderLeaderboard = getTraderLeaderboard2; exports.getTrendingAll = getTrendingAll; exports.getTrendingCreators = getTrendingCreators; exports.getTrendingPosts = getTrendingPosts; exports.getTrendingTrends = getTrendingTrends; exports.getURLFromUploadResult = getURLFromUploadResult; exports.setApiKey = setApiKey; exports.tradeCoin = tradeCoin; exports.updateCoinURI = updateCoinURI; exports.updateCoinURICall = updateCoinURICall; exports.updatePayoutRecipient = updatePayoutRecipient; exports.updatePayoutRecipientCall = updatePayoutRecipientCall; exports.validateImageMimeType = validateImageMimeType; exports.validateMetadataJSON = validateMetadataJSON; exports.validateMetadataURIContent = validateMetadataURIContent;
1263
+
1264
+
1265
+
1266
+ exports.CoinMetadataBuilder = CoinMetadataBuilder; exports.CreateConstants = CreateConstants; exports.ZoraUploader = ZoraUploader; exports.apiGet = apiGet; exports.apiPost = apiPost; exports.cleanAndValidateMetadataURI = cleanAndValidateMetadataURI; exports.createCoin = createCoin; exports.createCoinCall = createCoinCall; exports.createMetadataBuilder = createMetadataBuilder; exports.createTradeCall = createTradeCall; exports.createZoraUploaderForCreator = createZoraUploaderForCreator; exports.getCoin = getCoin2; exports.getCoinComments = getCoinComments2; exports.getCoinCreateFromLogs = getCoinCreateFromLogs; exports.getCoinHolders = getCoinHolders2; exports.getCoinSwaps = getCoinSwaps2; exports.getCoins = getCoins2; exports.getCoinsLastTraded = getCoinsLastTraded; exports.getCoinsLastTradedUnique = getCoinsLastTradedUnique; exports.getCoinsMostValuable = getCoinsMostValuable; exports.getCoinsNew = getCoinsNew; exports.getCoinsTopGainers = getCoinsTopGainers; exports.getCoinsTopVolume24h = getCoinsTopVolume24h; exports.getContentCoinPoolConfig = getContentCoinPoolConfig2; exports.getCreatorCoinPoolConfig = getCreatorCoinPoolConfig2; exports.getCreatorCoins = getCreatorCoins; exports.getExploreFeaturedCreators = getExploreFeaturedCreators; exports.getExploreFeaturedVideos = getExploreFeaturedVideos; exports.getExploreList = getExploreList; exports.getExploreNewAll = getExploreNewAll; exports.getExploreTopVolumeAll24h = getExploreTopVolumeAll24h; exports.getExploreTopVolumeCreators24h = getExploreTopVolumeCreators24h; exports.getFeaturedCreators = getFeaturedCreators2; exports.getMostValuableAll = getMostValuableAll; exports.getMostValuableCreatorCoins = getMostValuableCreatorCoins; exports.getMostValuableTrends = getMostValuableTrends; exports.getNewTrends = getNewTrends; exports.getProfile = getProfile2; exports.getProfileBalances = getProfileBalances2; exports.getProfileCoins = getProfileCoins2; exports.getProfileSocial = getProfileSocial2; exports.getTokenInfo = getTokenInfo2; exports.getTopVolumeTrends24h = getTopVolumeTrends24h; exports.getTraderLeaderboard = getTraderLeaderboard2; exports.getTrend = getTrend; exports.getTrendingAll = getTrendingAll; exports.getTrendingCreators = getTrendingCreators; exports.getTrendingPosts = getTrendingPosts; exports.getTrendingTrends = getTrendingTrends; exports.getTrends = getTrends; exports.getURLFromUploadResult = getURLFromUploadResult; exports.setApiBaseUrl = setApiBaseUrl; exports.setApiKey = setApiKey; exports.tradeCoin = tradeCoin; exports.updateCoinURI = updateCoinURI; exports.updateCoinURICall = updateCoinURICall; exports.updatePayoutRecipient = updatePayoutRecipient; exports.updatePayoutRecipientCall = updatePayoutRecipientCall; exports.validateImageMimeType = validateImageMimeType; exports.validateMetadataJSON = validateMetadataJSON; exports.validateMetadataURIContent = validateMetadataURIContent;
1221
1267
  //# sourceMappingURL=index.cjs.map