@goat-sdk/plugin-coingecko
Advanced tools
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:!0});exports.a = d; |
| import{a as t}from"./chunk-XFILW5RS.mjs";import{a as e}from"./chunk-YSXGDEY5.mjs";import{PluginBase as c}from"@goat-sdk/core";var o=class extends c{static{e(this,"CoinGeckoPlugin")}constructor({apiKey:n}){super("coingecko",[new t(n)])}supportsChain=e(()=>!0,"supportsChain")};function m(r){return new o(r)}e(m,"coingecko");export{o as a,m as b}; |
| import{a as o}from"./chunk-YSXGDEY5.mjs";async function u(r,n,t={}){let e=await fetch(r,{...t,headers:{...t.headers,"x-cg-demo-api-key":n}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()}o(u,"coingeckoRequest");function p(r,n){let t=new URLSearchParams;for(let[c,s]of Object.entries(n))s!==void 0&&t.append(c,s.toString());let e=t.toString();return e?`${r}?${e}`:r}o(p,"buildUrl");var f="https://api.coingecko.com/api/v3";export{u as a,p as b,f as c}; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI7MMDWYjs = require('./chunk-EI7MMDWY.js');async function i(r,n,t={}){let e=await fetch(r,{...t,headers:{...t.headers,"x-cg-demo-api-key":n}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()}_chunkEI7MMDWYjs.a.call(void 0, i,"coingeckoRequest");function u(r,n){let t=new URLSearchParams;for(let[c,s]of Object.entries(n))s!==void 0&&t.append(c,s.toString());let e=t.toString();return e?`${r}?${e}`:r}_chunkEI7MMDWYjs.a.call(void 0, u,"buildUrl");var p="https://api.coingecko.com/api/v3";exports.a = i; exports.b = u; exports.c = p; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRS2GPPLXjs = require('./chunk-RS2GPPLX.js');var _chunkNMNLU6UWjs = require('./chunk-NMNLU6UW.js');var _chunkEI7MMDWYjs = require('./chunk-EI7MMDWY.js');var _core = require('@goat-sdk/core');function l(m,e,n,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(m,e,n,i);else for(var c=m.length-1;c>=0;c--)(o=m[c])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}_chunkEI7MMDWYjs.a.call(void 0, l,"_ts_decorate");function t(m,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,e)}_chunkEI7MMDWYjs.a.call(void 0, t,"_ts_metadata");var s=class{static{_chunkEI7MMDWYjs.a.call(void 0, this,"CoinGeckoService")}constructor(e){this.apiKey=e}async getTrendingCoins(e){return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/search/trending`,{}),this.apiKey)}async getCoinPrice(e){let{coinId:n,vsCurrency:i,includeMarketCap:r,include24hrVol:a,include24hrChange:o,includeLastUpdatedAt:c}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/simple/price`,{ids:n,vs_currencies:i,include_market_cap:r,include_24hr_vol:a,include_24hr_change:o,include_last_updated_at:c}),this.apiKey)}async searchCoins(e){let{query:n}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/search`,{query:n}),this.apiKey)}async getCoinPriceByContractAddress(e){let{id:n,contractAddresses:i,vsCurrency:r,includeMarketCap:a,include24hrVol:o,include24hrChange:c,includeLastUpdatedAt:g}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/simple/token_price/${n}`,{contract_addresses:i.join(","),vs_currencies:r,include_market_cap:a,include_24hr_vol:o,include_24hr_change:c,include_last_updated_at:g}),this.apiKey)}async getCoinData(e){let{id:n,localization:i,tickers:r,marketData:a,communityData:o,developerData:c,sparkline:g}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/coins/${n}`,{localization:i,tickers:r,market_data:a,community_data:o,developer_data:c,sparkline:g}),this.apiKey)}async getSupportedCoins(e){let{includePlatform:n}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/coins/list`,{include_platform:n}),this.apiKey)}async getHistoricalData(e){let{id:n,date:i,localization:r}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/coins/${n}/history`,{date:i,localization:r}),this.apiKey)}async getOHLCData(e){let{id:n,vsCurrency:i,days:r}=e;return _chunkNMNLU6UWjs.a.call(void 0, _chunkNMNLU6UWjs.b.call(void 0, `${_chunkNMNLU6UWjs.c}/coins/${n}/ohlc`,{vs_currency:i,days:r}),this.apiKey)}};l([_core.Tool.call(void 0, {description:"Get the list of trending coins from CoinGecko"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.a>"u"?Object:_chunkRS2GPPLXjs.a]),t("design:returntype",Promise)],s.prototype,"getTrendingCoins",null);l([_core.Tool.call(void 0, {description:"Get the price of a specific coin from CoinGecko"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.b>"u"?Object:_chunkRS2GPPLXjs.b]),t("design:returntype",Promise)],s.prototype,"getCoinPrice",null);l([_core.Tool.call(void 0, {description:"Search for coins by keyword"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.c>"u"?Object:_chunkRS2GPPLXjs.c]),t("design:returntype",Promise)],s.prototype,"searchCoins",null);l([_core.Tool.call(void 0, {description:"Get coin price by contract address"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.d>"u"?Object:_chunkRS2GPPLXjs.d]),t("design:returntype",Promise)],s.prototype,"getCoinPriceByContractAddress",null);l([_core.Tool.call(void 0, {description:"Get detailed coin data by ID (including market data, community data, developer stats, and more)"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.e>"u"?Object:_chunkRS2GPPLXjs.e]),t("design:returntype",Promise)],s.prototype,"getCoinData",null);l([_core.Tool.call(void 0, {description:"Get list of all supported coins"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.f>"u"?Object:_chunkRS2GPPLXjs.f]),t("design:returntype",Promise)],s.prototype,"getSupportedCoins",null);l([_core.Tool.call(void 0, {description:"Get historical data for a coin by ID"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.g>"u"?Object:_chunkRS2GPPLXjs.g]),t("design:returntype",Promise)],s.prototype,"getHistoricalData",null);l([_core.Tool.call(void 0, {description:"Get OHLC chart data for a coin by ID"}),t("design:type",Function),t("design:paramtypes",[typeof _chunkRS2GPPLXjs.h>"u"?Object:_chunkRS2GPPLXjs.h]),t("design:returntype",Promise)],s.prototype,"getOHLCData",null);exports.a = s; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI7MMDWYjs = require('./chunk-EI7MMDWY.js');var _core = require('@goat-sdk/core');var _zod = require('zod');var d=class extends _core.createToolParameters.call(void 0, _zod.z.object({limit:_zod.z.number().optional().describe("The number of trending coins to return. Defaults to all coins."),include_platform:_zod.z.boolean().optional().describe("Include platform contract addresses (e.g., ETH, BSC) in response")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetTrendingCoinsParameters")}},n= exports.b =class extends _core.createToolParameters.call(void 0, _zod.z.object({coinId:_zod.z.string().describe("The ID of the coin on CoinGecko (e.g., 'bitcoin', 'ethereum')"),vsCurrency:_zod.z.string().default("usd").describe("The target currency to get price in (e.g., 'usd', 'eur', 'jpy')"),includeMarketCap:_zod.z.boolean().optional().default(!1).describe("Include market cap data in the response"),include24hrVol:_zod.z.boolean().optional().default(!1).describe("Include 24 hour volume data in the response"),include24hrChange:_zod.z.boolean().optional().default(!1).describe("Include 24 hour price change data in the response"),includeLastUpdatedAt:_zod.z.boolean().optional().default(!1).describe("Include last updated timestamp in the response")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetCoinPriceParameters")}},s= exports.c =class extends _core.createToolParameters.call(void 0, _zod.z.object({query:_zod.z.string().describe("The search query to find coins (e.g., 'bitcoin' or 'btc')")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"SearchCoinsParameters")}},l= exports.d =class extends _core.createToolParameters.call(void 0, _zod.z.object({id:_zod.z.string().describe("Asset platform's id (e.g., 'ethereum')"),contractAddresses:_zod.z.array(_zod.z.string()).describe("List of contract addresses for the tokens"),vsCurrency:_zod.z.string().default("usd").describe("Target currency (e.g., 'usd', 'eur')"),includeMarketCap:_zod.z.boolean().optional().default(!1).describe("Include market cap data"),include24hrVol:_zod.z.boolean().optional().default(!1).describe("Include 24hr volume"),include24hrChange:_zod.z.boolean().optional().default(!1).describe("Include 24hr change"),includeLastUpdatedAt:_zod.z.boolean().optional().default(!1).describe("Include last updated timestamp")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetCoinPriceByContractAddressParameters")}},c= exports.e =class extends _core.createToolParameters.call(void 0, _zod.z.object({id:_zod.z.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),localization:_zod.z.boolean().optional().default(!1).describe("Include all localizations"),tickers:_zod.z.boolean().optional().default(!0).describe("Include tickers data"),marketData:_zod.z.boolean().optional().default(!0).describe("Include market data"),communityData:_zod.z.boolean().optional().default(!0).describe("Include community data"),developerData:_zod.z.boolean().optional().default(!0).describe("Include developer data"),sparkline:_zod.z.boolean().optional().default(!1).describe("Include sparkline 7 days data")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetCoinDataParameters")}},i= exports.f =class extends _core.createToolParameters.call(void 0, _zod.z.object({includePlatform:_zod.z.boolean().optional().default(!1).describe("Include platform contract addresses")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetSupportedCoinsParameters")}},r= exports.g =class extends _core.createToolParameters.call(void 0, _zod.z.object({id:_zod.z.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),date:_zod.z.string().describe("The date of data snapshot in dd-mm-yyyy format"),localization:_zod.z.boolean().optional().default(!0).describe("Include localized languages")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetHistoricalDataParameters")}},u= exports.h =class extends _core.createToolParameters.call(void 0, _zod.z.object({id:_zod.z.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),vsCurrency:_zod.z.string().default("usd").describe("The target currency of market data (usd, eur, jpy, etc.)"),days:_zod.z.number().describe("Data up to number of days ago (1/7/14/30/90/180/365/max)")})){static{_chunkEI7MMDWYjs.a.call(void 0, this,"GetOHLCParameters")}};exports.a = d; exports.b = n; exports.c = s; exports.d = l; exports.e = c; exports.f = i; exports.g = r; exports.h = u; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkQXTF2QLUjs = require('./chunk-QXTF2QLU.js');var _chunkEI7MMDWYjs = require('./chunk-EI7MMDWY.js');var _core = require('@goat-sdk/core');var o= (_class =class extends _core.PluginBase{static{_chunkEI7MMDWYjs.a.call(void 0, this,"CoinGeckoPlugin")}constructor({apiKey:n}){super("coingecko",[new (0, _chunkQXTF2QLUjs.a)(n)]);_class.prototype.__init.call(this);}__init() {this.supportsChain=_chunkEI7MMDWYjs.a.call(void 0, ()=>!0,"supportsChain")}}, _class);function u(r){return new o(r)}_chunkEI7MMDWYjs.a.call(void 0, u,"coingecko");exports.a = o; exports.b = u; |
| import{a as t}from"./chunk-YSXGDEY5.mjs";import{createToolParameters as o}from"@goat-sdk/core";import{z as e}from"zod";var d=class extends o(e.object({limit:e.number().optional().describe("The number of trending coins to return. Defaults to all coins."),include_platform:e.boolean().optional().describe("Include platform contract addresses (e.g., ETH, BSC) in response")})){static{t(this,"GetTrendingCoinsParameters")}},n=class extends o(e.object({coinId:e.string().describe("The ID of the coin on CoinGecko (e.g., 'bitcoin', 'ethereum')"),vsCurrency:e.string().default("usd").describe("The target currency to get price in (e.g., 'usd', 'eur', 'jpy')"),includeMarketCap:e.boolean().optional().default(!1).describe("Include market cap data in the response"),include24hrVol:e.boolean().optional().default(!1).describe("Include 24 hour volume data in the response"),include24hrChange:e.boolean().optional().default(!1).describe("Include 24 hour price change data in the response"),includeLastUpdatedAt:e.boolean().optional().default(!1).describe("Include last updated timestamp in the response")})){static{t(this,"GetCoinPriceParameters")}},s=class extends o(e.object({query:e.string().describe("The search query to find coins (e.g., 'bitcoin' or 'btc')")})){static{t(this,"SearchCoinsParameters")}},l=class extends o(e.object({id:e.string().describe("Asset platform's id (e.g., 'ethereum')"),contractAddresses:e.array(e.string()).describe("List of contract addresses for the tokens"),vsCurrency:e.string().default("usd").describe("Target currency (e.g., 'usd', 'eur')"),includeMarketCap:e.boolean().optional().default(!1).describe("Include market cap data"),include24hrVol:e.boolean().optional().default(!1).describe("Include 24hr volume"),include24hrChange:e.boolean().optional().default(!1).describe("Include 24hr change"),includeLastUpdatedAt:e.boolean().optional().default(!1).describe("Include last updated timestamp")})){static{t(this,"GetCoinPriceByContractAddressParameters")}},c=class extends o(e.object({id:e.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),localization:e.boolean().optional().default(!1).describe("Include all localizations"),tickers:e.boolean().optional().default(!0).describe("Include tickers data"),marketData:e.boolean().optional().default(!0).describe("Include market data"),communityData:e.boolean().optional().default(!0).describe("Include community data"),developerData:e.boolean().optional().default(!0).describe("Include developer data"),sparkline:e.boolean().optional().default(!1).describe("Include sparkline 7 days data")})){static{t(this,"GetCoinDataParameters")}},i=class extends o(e.object({includePlatform:e.boolean().optional().default(!1).describe("Include platform contract addresses")})){static{t(this,"GetSupportedCoinsParameters")}},r=class extends o(e.object({id:e.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),date:e.string().describe("The date of data snapshot in dd-mm-yyyy format"),localization:e.boolean().optional().default(!0).describe("Include localized languages")})){static{t(this,"GetHistoricalDataParameters")}},u=class extends o(e.object({id:e.string().describe("Pass the coin id (can be obtained from the supported coins endpoint)"),vsCurrency:e.string().default("usd").describe("The target currency of market data (usd, eur, jpy, etc.)"),days:e.number().describe("Data up to number of days ago (1/7/14/30/90/180/365/max)")})){static{t(this,"GetOHLCParameters")}};export{d as a,n as b,s as c,l as d,c as e,i as f,r as g,u as h}; |
| import{a as h,b as C,c as _,d as P,e as b,f as O,g as G,h as D}from"./chunk-TPWA5WWM.mjs";import{a as d,b as p,c as u}from"./chunk-FACMQ53K.mjs";import{a as f}from"./chunk-YSXGDEY5.mjs";import{Tool as y}from"@goat-sdk/core";function l(m,e,n,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(m,e,n,i);else for(var c=m.length-1;c>=0;c--)(o=m[c])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}f(l,"_ts_decorate");function t(m,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,e)}f(t,"_ts_metadata");var s=class{static{f(this,"CoinGeckoService")}apiKey;constructor(e){this.apiKey=e}async getTrendingCoins(e){return d(p(`${u}/search/trending`,{}),this.apiKey)}async getCoinPrice(e){let{coinId:n,vsCurrency:i,includeMarketCap:r,include24hrVol:a,include24hrChange:o,includeLastUpdatedAt:c}=e;return d(p(`${u}/simple/price`,{ids:n,vs_currencies:i,include_market_cap:r,include_24hr_vol:a,include_24hr_change:o,include_last_updated_at:c}),this.apiKey)}async searchCoins(e){let{query:n}=e;return d(p(`${u}/search`,{query:n}),this.apiKey)}async getCoinPriceByContractAddress(e){let{id:n,contractAddresses:i,vsCurrency:r,includeMarketCap:a,include24hrVol:o,include24hrChange:c,includeLastUpdatedAt:g}=e;return d(p(`${u}/simple/token_price/${n}`,{contract_addresses:i.join(","),vs_currencies:r,include_market_cap:a,include_24hr_vol:o,include_24hr_change:c,include_last_updated_at:g}),this.apiKey)}async getCoinData(e){let{id:n,localization:i,tickers:r,marketData:a,communityData:o,developerData:c,sparkline:g}=e;return d(p(`${u}/coins/${n}`,{localization:i,tickers:r,market_data:a,community_data:o,developer_data:c,sparkline:g}),this.apiKey)}async getSupportedCoins(e){let{includePlatform:n}=e;return d(p(`${u}/coins/list`,{include_platform:n}),this.apiKey)}async getHistoricalData(e){let{id:n,date:i,localization:r}=e;return d(p(`${u}/coins/${n}/history`,{date:i,localization:r}),this.apiKey)}async getOHLCData(e){let{id:n,vsCurrency:i,days:r}=e;return d(p(`${u}/coins/${n}/ohlc`,{vs_currency:i,days:r}),this.apiKey)}};l([y({description:"Get the list of trending coins from CoinGecko"}),t("design:type",Function),t("design:paramtypes",[typeof h>"u"?Object:h]),t("design:returntype",Promise)],s.prototype,"getTrendingCoins",null);l([y({description:"Get the price of a specific coin from CoinGecko"}),t("design:type",Function),t("design:paramtypes",[typeof C>"u"?Object:C]),t("design:returntype",Promise)],s.prototype,"getCoinPrice",null);l([y({description:"Search for coins by keyword"}),t("design:type",Function),t("design:paramtypes",[typeof _>"u"?Object:_]),t("design:returntype",Promise)],s.prototype,"searchCoins",null);l([y({description:"Get coin price by contract address"}),t("design:type",Function),t("design:paramtypes",[typeof P>"u"?Object:P]),t("design:returntype",Promise)],s.prototype,"getCoinPriceByContractAddress",null);l([y({description:"Get detailed coin data by ID (including market data, community data, developer stats, and more)"}),t("design:type",Function),t("design:paramtypes",[typeof b>"u"?Object:b]),t("design:returntype",Promise)],s.prototype,"getCoinData",null);l([y({description:"Get list of all supported coins"}),t("design:type",Function),t("design:paramtypes",[typeof O>"u"?Object:O]),t("design:returntype",Promise)],s.prototype,"getSupportedCoins",null);l([y({description:"Get historical data for a coin by ID"}),t("design:type",Function),t("design:paramtypes",[typeof G>"u"?Object:G]),t("design:returntype",Promise)],s.prototype,"getHistoricalData",null);l([y({description:"Get OHLC chart data for a coin by ID"}),t("design:type",Function),t("design:paramtypes",[typeof D>"u"?Object:D]),t("design:returntype",Promise)],s.prototype,"getOHLCData",null);export{s as a}; |
| var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:!0});export{d as a}; |
| /** | ||
| * Helper function to make requests to the CoinGecko API | ||
| * @param endpointUrl - The full URL of the CoinGecko API endpoint | ||
| * @param apiKey - The CoinGecko API key | ||
| * @param options - Optional fetch options to merge with defaults | ||
| * @returns The parsed JSON response | ||
| * @throws Error if the response is not OK | ||
| */ | ||
| declare function coingeckoRequest<T = unknown>(endpointUrl: string, apiKey: string, options?: RequestInit): Promise<T>; | ||
| /** | ||
| * Helper function to build a URL with query parameters | ||
| * @param baseUrl - The base URL without query parameters | ||
| * @param params - Object containing query parameters | ||
| * @returns The full URL with encoded query parameters | ||
| */ | ||
| declare function buildUrl(baseUrl: string, params: Record<string, string | boolean | number>): string; | ||
| /** | ||
| * Base URL for the CoinGecko API | ||
| */ | ||
| declare const COINGECKO_API_BASE_URL = "https://api.coingecko.com/api/v3"; | ||
| export { COINGECKO_API_BASE_URL, buildUrl, coingeckoRequest }; |
| /** | ||
| * Helper function to make requests to the CoinGecko API | ||
| * @param endpointUrl - The full URL of the CoinGecko API endpoint | ||
| * @param apiKey - The CoinGecko API key | ||
| * @param options - Optional fetch options to merge with defaults | ||
| * @returns The parsed JSON response | ||
| * @throws Error if the response is not OK | ||
| */ | ||
| declare function coingeckoRequest<T = unknown>(endpointUrl: string, apiKey: string, options?: RequestInit): Promise<T>; | ||
| /** | ||
| * Helper function to build a URL with query parameters | ||
| * @param baseUrl - The base URL without query parameters | ||
| * @param params - Object containing query parameters | ||
| * @returns The full URL with encoded query parameters | ||
| */ | ||
| declare function buildUrl(baseUrl: string, params: Record<string, string | boolean | number>): string; | ||
| /** | ||
| * Base URL for the CoinGecko API | ||
| */ | ||
| declare const COINGECKO_API_BASE_URL = "https://api.coingecko.com/api/v3"; | ||
| export { COINGECKO_API_BASE_URL, buildUrl, coingeckoRequest }; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNMNLU6UWjs = require('./chunk-NMNLU6UW.js');require('./chunk-EI7MMDWY.js');exports.COINGECKO_API_BASE_URL = _chunkNMNLU6UWjs.c; exports.buildUrl = _chunkNMNLU6UWjs.b; exports.coingeckoRequest = _chunkNMNLU6UWjs.a; |
| import{a,b,c}from"./chunk-FACMQ53K.mjs";import"./chunk-YSXGDEY5.mjs";export{c as COINGECKO_API_BASE_URL,b as buildUrl,a as coingeckoRequest}; |
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUGX5KSERjs = require('./chunk-UGX5KSER.js');require('./chunk-EHUWU43E.js');require('./chunk-DXFRBO2O.js');exports.CoinGeckoPlugin = _chunkUGX5KSERjs.a; exports.coingecko = _chunkUGX5KSERjs.b; | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSN2WIAQXjs = require('./chunk-SN2WIAQX.js');require('./chunk-QXTF2QLU.js');require('./chunk-RS2GPPLX.js');require('./chunk-NMNLU6UW.js');require('./chunk-EI7MMDWY.js');exports.CoinGeckoPlugin = _chunkSN2WIAQXjs.a; exports.coingecko = _chunkSN2WIAQXjs.b; |
@@ -1,1 +0,1 @@ | ||
| import{a,b}from"./chunk-Z55766RW.mjs";import"./chunk-AFKNFVAQ.mjs";import"./chunk-M3VKZ2YD.mjs";export{a as CoinGeckoPlugin,b as coingecko}; | ||
| import{a,b}from"./chunk-F4VDHQVT.mjs";import"./chunk-XFILW5RS.mjs";import"./chunk-TPWA5WWM.mjs";import"./chunk-FACMQ53K.mjs";import"./chunk-YSXGDEY5.mjs";export{a as CoinGeckoPlugin,b as coingecko}; |
@@ -1,2 +0,2 @@ | ||
| import { GetTrendingCoinsParameters, GetCoinPriceParameters } from './parameters.mjs'; | ||
| import { GetTrendingCoinsParameters, GetCoinPriceParameters, SearchCoinsParameters, GetCoinPriceByContractAddressParameters, GetCoinDataParameters, GetSupportedCoinsParameters, GetHistoricalDataParameters, GetOHLCParameters } from './parameters.mjs'; | ||
| import '@goat-sdk/core'; | ||
@@ -8,6 +8,12 @@ import 'zod'; | ||
| constructor(apiKey: string); | ||
| getTrendingCoins(parameters: GetTrendingCoinsParameters): Promise<any>; | ||
| getCoinPrice(parameters: GetCoinPriceParameters): Promise<any>; | ||
| getTrendingCoins(parameters: GetTrendingCoinsParameters): Promise<unknown>; | ||
| getCoinPrice(parameters: GetCoinPriceParameters): Promise<unknown>; | ||
| searchCoins(parameters: SearchCoinsParameters): Promise<unknown>; | ||
| getCoinPriceByContractAddress(parameters: GetCoinPriceByContractAddressParameters): Promise<unknown>; | ||
| getCoinData(parameters: GetCoinDataParameters): Promise<unknown>; | ||
| getSupportedCoins(parameters: GetSupportedCoinsParameters): Promise<unknown>; | ||
| getHistoricalData(parameters: GetHistoricalDataParameters): Promise<unknown>; | ||
| getOHLCData(parameters: GetOHLCParameters): Promise<unknown>; | ||
| } | ||
| export { CoinGeckoService }; |
@@ -1,2 +0,2 @@ | ||
| import { GetTrendingCoinsParameters, GetCoinPriceParameters } from './parameters.js'; | ||
| import { GetTrendingCoinsParameters, GetCoinPriceParameters, SearchCoinsParameters, GetCoinPriceByContractAddressParameters, GetCoinDataParameters, GetSupportedCoinsParameters, GetHistoricalDataParameters, GetOHLCParameters } from './parameters.js'; | ||
| import '@goat-sdk/core'; | ||
@@ -8,6 +8,12 @@ import 'zod'; | ||
| constructor(apiKey: string); | ||
| getTrendingCoins(parameters: GetTrendingCoinsParameters): Promise<any>; | ||
| getCoinPrice(parameters: GetCoinPriceParameters): Promise<any>; | ||
| getTrendingCoins(parameters: GetTrendingCoinsParameters): Promise<unknown>; | ||
| getCoinPrice(parameters: GetCoinPriceParameters): Promise<unknown>; | ||
| searchCoins(parameters: SearchCoinsParameters): Promise<unknown>; | ||
| getCoinPriceByContractAddress(parameters: GetCoinPriceByContractAddressParameters): Promise<unknown>; | ||
| getCoinData(parameters: GetCoinDataParameters): Promise<unknown>; | ||
| getSupportedCoins(parameters: GetSupportedCoinsParameters): Promise<unknown>; | ||
| getHistoricalData(parameters: GetHistoricalDataParameters): Promise<unknown>; | ||
| getOHLCData(parameters: GetOHLCParameters): Promise<unknown>; | ||
| } | ||
| export { CoinGeckoService }; |
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEHUWU43Ejs = require('./chunk-EHUWU43E.js');require('./chunk-DXFRBO2O.js');exports.CoinGeckoService = _chunkEHUWU43Ejs.a; | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQXTF2QLUjs = require('./chunk-QXTF2QLU.js');require('./chunk-RS2GPPLX.js');require('./chunk-NMNLU6UW.js');require('./chunk-EI7MMDWY.js');exports.CoinGeckoService = _chunkQXTF2QLUjs.a; |
@@ -1,1 +0,1 @@ | ||
| import{a}from"./chunk-AFKNFVAQ.mjs";import"./chunk-M3VKZ2YD.mjs";export{a as CoinGeckoService}; | ||
| import{a}from"./chunk-XFILW5RS.mjs";import"./chunk-TPWA5WWM.mjs";import"./chunk-FACMQ53K.mjs";import"./chunk-YSXGDEY5.mjs";export{a as CoinGeckoService}; |
+1
-1
| export { CoinGeckoPlugin, coingecko } from './coingecko.plugin.mjs'; | ||
| export { GetCoinPriceParameters, GetTrendingCoinsParameters, SearchCoinsParameters } from './parameters.mjs'; | ||
| export { GetCoinDataParameters, GetCoinPriceByContractAddressParameters, GetCoinPriceParameters, GetHistoricalDataParameters, GetOHLCParameters, GetSupportedCoinsParameters, GetTrendingCoinsParameters, SearchCoinsParameters } from './parameters.mjs'; | ||
| import '@goat-sdk/core'; | ||
| import 'zod'; |
+1
-1
| export { CoinGeckoPlugin, coingecko } from './coingecko.plugin.js'; | ||
| export { GetCoinPriceParameters, GetTrendingCoinsParameters, SearchCoinsParameters } from './parameters.js'; | ||
| export { GetCoinDataParameters, GetCoinPriceByContractAddressParameters, GetCoinPriceParameters, GetHistoricalDataParameters, GetOHLCParameters, GetSupportedCoinsParameters, GetTrendingCoinsParameters, SearchCoinsParameters } from './parameters.js'; | ||
| import '@goat-sdk/core'; | ||
| import 'zod'; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUGX5KSERjs = require('./chunk-UGX5KSER.js');require('./chunk-EHUWU43E.js');var _chunkDXFRBO2Ojs = require('./chunk-DXFRBO2O.js');exports.CoinGeckoPlugin = _chunkUGX5KSERjs.a; exports.GetCoinPriceParameters = _chunkDXFRBO2Ojs.c; exports.GetTrendingCoinsParameters = _chunkDXFRBO2Ojs.b; exports.SearchCoinsParameters = _chunkDXFRBO2Ojs.d; exports.coingecko = _chunkUGX5KSERjs.b; | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSN2WIAQXjs = require('./chunk-SN2WIAQX.js');require('./chunk-QXTF2QLU.js');var _chunkRS2GPPLXjs = require('./chunk-RS2GPPLX.js');require('./chunk-NMNLU6UW.js');require('./chunk-EI7MMDWY.js');exports.CoinGeckoPlugin = _chunkSN2WIAQXjs.a; exports.GetCoinDataParameters = _chunkRS2GPPLXjs.e; exports.GetCoinPriceByContractAddressParameters = _chunkRS2GPPLXjs.d; exports.GetCoinPriceParameters = _chunkRS2GPPLXjs.b; exports.GetHistoricalDataParameters = _chunkRS2GPPLXjs.g; exports.GetOHLCParameters = _chunkRS2GPPLXjs.h; exports.GetSupportedCoinsParameters = _chunkRS2GPPLXjs.f; exports.GetTrendingCoinsParameters = _chunkRS2GPPLXjs.a; exports.SearchCoinsParameters = _chunkRS2GPPLXjs.c; exports.coingecko = _chunkSN2WIAQXjs.b; |
+1
-1
@@ -1,1 +0,1 @@ | ||
| import{a as f,b as m}from"./chunk-Z55766RW.mjs";import"./chunk-AFKNFVAQ.mjs";import{b as o,c as r,d as e}from"./chunk-M3VKZ2YD.mjs";export{f as CoinGeckoPlugin,r as GetCoinPriceParameters,o as GetTrendingCoinsParameters,e as SearchCoinsParameters,m as coingecko}; | ||
| import{a,b}from"./chunk-F4VDHQVT.mjs";import"./chunk-XFILW5RS.mjs";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x}from"./chunk-TPWA5WWM.mjs";import"./chunk-FACMQ53K.mjs";import"./chunk-YSXGDEY5.mjs";export{a as CoinGeckoPlugin,m as GetCoinDataParameters,f as GetCoinPriceByContractAddressParameters,r as GetCoinPriceParameters,t as GetHistoricalDataParameters,x as GetOHLCParameters,p as GetSupportedCoinsParameters,o as GetTrendingCoinsParameters,e as SearchCoinsParameters,b as coingecko}; |
@@ -42,13 +42,103 @@ import * as _goat_sdk_core from '@goat-sdk/core'; | ||
| query: z.ZodString; | ||
| exact_match: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| query: string; | ||
| exact_match: boolean; | ||
| }, { | ||
| query: string; | ||
| exact_match?: boolean | undefined; | ||
| }>>; | ||
| declare class SearchCoinsParameters extends SearchCoinsParameters_base { | ||
| } | ||
| declare const GetCoinPriceByContractAddressParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| contractAddresses: z.ZodArray<z.ZodString, "many">; | ||
| vsCurrency: z.ZodDefault<z.ZodString>; | ||
| includeMarketCap: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| include24hrVol: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| include24hrChange: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| includeLastUpdatedAt: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| vsCurrency: string; | ||
| includeMarketCap: boolean; | ||
| include24hrVol: boolean; | ||
| include24hrChange: boolean; | ||
| includeLastUpdatedAt: boolean; | ||
| id: string; | ||
| contractAddresses: string[]; | ||
| }, { | ||
| id: string; | ||
| contractAddresses: string[]; | ||
| vsCurrency?: string | undefined; | ||
| includeMarketCap?: boolean | undefined; | ||
| include24hrVol?: boolean | undefined; | ||
| include24hrChange?: boolean | undefined; | ||
| includeLastUpdatedAt?: boolean | undefined; | ||
| }>>; | ||
| declare class GetCoinPriceByContractAddressParameters extends GetCoinPriceByContractAddressParameters_base { | ||
| } | ||
| declare const GetCoinDataParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| localization: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| tickers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| marketData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| communityData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| developerData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| sparkline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| id: string; | ||
| localization: boolean; | ||
| tickers: boolean; | ||
| marketData: boolean; | ||
| communityData: boolean; | ||
| developerData: boolean; | ||
| sparkline: boolean; | ||
| }, { | ||
| id: string; | ||
| localization?: boolean | undefined; | ||
| tickers?: boolean | undefined; | ||
| marketData?: boolean | undefined; | ||
| communityData?: boolean | undefined; | ||
| developerData?: boolean | undefined; | ||
| sparkline?: boolean | undefined; | ||
| }>>; | ||
| declare class GetCoinDataParameters extends GetCoinDataParameters_base { | ||
| } | ||
| declare const GetSupportedCoinsParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| includePlatform: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| includePlatform: boolean; | ||
| }, { | ||
| includePlatform?: boolean | undefined; | ||
| }>>; | ||
| declare class GetSupportedCoinsParameters extends GetSupportedCoinsParameters_base { | ||
| } | ||
| declare const GetHistoricalDataParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| date: z.ZodString; | ||
| localization: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| date: string; | ||
| id: string; | ||
| localization: boolean; | ||
| }, { | ||
| date: string; | ||
| id: string; | ||
| localization?: boolean | undefined; | ||
| }>>; | ||
| declare class GetHistoricalDataParameters extends GetHistoricalDataParameters_base { | ||
| } | ||
| declare const GetOHLCParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| vsCurrency: z.ZodDefault<z.ZodString>; | ||
| days: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| vsCurrency: string; | ||
| id: string; | ||
| days: number; | ||
| }, { | ||
| id: string; | ||
| days: number; | ||
| vsCurrency?: string | undefined; | ||
| }>>; | ||
| declare class GetOHLCParameters extends GetOHLCParameters_base { | ||
| } | ||
| export { GetCoinPriceParameters, GetTrendingCoinsParameters, SearchCoinsParameters }; | ||
| export { GetCoinDataParameters, GetCoinPriceByContractAddressParameters, GetCoinPriceParameters, GetHistoricalDataParameters, GetOHLCParameters, GetSupportedCoinsParameters, GetTrendingCoinsParameters, SearchCoinsParameters }; |
+94
-4
@@ -42,13 +42,103 @@ import * as _goat_sdk_core from '@goat-sdk/core'; | ||
| query: z.ZodString; | ||
| exact_match: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| query: string; | ||
| exact_match: boolean; | ||
| }, { | ||
| query: string; | ||
| exact_match?: boolean | undefined; | ||
| }>>; | ||
| declare class SearchCoinsParameters extends SearchCoinsParameters_base { | ||
| } | ||
| declare const GetCoinPriceByContractAddressParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| contractAddresses: z.ZodArray<z.ZodString, "many">; | ||
| vsCurrency: z.ZodDefault<z.ZodString>; | ||
| includeMarketCap: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| include24hrVol: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| include24hrChange: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| includeLastUpdatedAt: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| vsCurrency: string; | ||
| includeMarketCap: boolean; | ||
| include24hrVol: boolean; | ||
| include24hrChange: boolean; | ||
| includeLastUpdatedAt: boolean; | ||
| id: string; | ||
| contractAddresses: string[]; | ||
| }, { | ||
| id: string; | ||
| contractAddresses: string[]; | ||
| vsCurrency?: string | undefined; | ||
| includeMarketCap?: boolean | undefined; | ||
| include24hrVol?: boolean | undefined; | ||
| include24hrChange?: boolean | undefined; | ||
| includeLastUpdatedAt?: boolean | undefined; | ||
| }>>; | ||
| declare class GetCoinPriceByContractAddressParameters extends GetCoinPriceByContractAddressParameters_base { | ||
| } | ||
| declare const GetCoinDataParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| localization: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| tickers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| marketData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| communityData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| developerData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| sparkline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| id: string; | ||
| localization: boolean; | ||
| tickers: boolean; | ||
| marketData: boolean; | ||
| communityData: boolean; | ||
| developerData: boolean; | ||
| sparkline: boolean; | ||
| }, { | ||
| id: string; | ||
| localization?: boolean | undefined; | ||
| tickers?: boolean | undefined; | ||
| marketData?: boolean | undefined; | ||
| communityData?: boolean | undefined; | ||
| developerData?: boolean | undefined; | ||
| sparkline?: boolean | undefined; | ||
| }>>; | ||
| declare class GetCoinDataParameters extends GetCoinDataParameters_base { | ||
| } | ||
| declare const GetSupportedCoinsParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| includePlatform: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| includePlatform: boolean; | ||
| }, { | ||
| includePlatform?: boolean | undefined; | ||
| }>>; | ||
| declare class GetSupportedCoinsParameters extends GetSupportedCoinsParameters_base { | ||
| } | ||
| declare const GetHistoricalDataParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| date: z.ZodString; | ||
| localization: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| date: string; | ||
| id: string; | ||
| localization: boolean; | ||
| }, { | ||
| date: string; | ||
| id: string; | ||
| localization?: boolean | undefined; | ||
| }>>; | ||
| declare class GetHistoricalDataParameters extends GetHistoricalDataParameters_base { | ||
| } | ||
| declare const GetOHLCParameters_base: _goat_sdk_core.ToolParametersStatic<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| vsCurrency: z.ZodDefault<z.ZodString>; | ||
| days: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| vsCurrency: string; | ||
| id: string; | ||
| days: number; | ||
| }, { | ||
| id: string; | ||
| days: number; | ||
| vsCurrency?: string | undefined; | ||
| }>>; | ||
| declare class GetOHLCParameters extends GetOHLCParameters_base { | ||
| } | ||
| export { GetCoinPriceParameters, GetTrendingCoinsParameters, SearchCoinsParameters }; | ||
| export { GetCoinDataParameters, GetCoinPriceByContractAddressParameters, GetCoinPriceParameters, GetHistoricalDataParameters, GetOHLCParameters, GetSupportedCoinsParameters, GetTrendingCoinsParameters, SearchCoinsParameters }; |
@@ -1,1 +0,1 @@ | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDXFRBO2Ojs = require('./chunk-DXFRBO2O.js');exports.GetCoinPriceParameters = _chunkDXFRBO2Ojs.c; exports.GetTrendingCoinsParameters = _chunkDXFRBO2Ojs.b; exports.SearchCoinsParameters = _chunkDXFRBO2Ojs.d; | ||
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRS2GPPLXjs = require('./chunk-RS2GPPLX.js');require('./chunk-EI7MMDWY.js');exports.GetCoinDataParameters = _chunkRS2GPPLXjs.e; exports.GetCoinPriceByContractAddressParameters = _chunkRS2GPPLXjs.d; exports.GetCoinPriceParameters = _chunkRS2GPPLXjs.b; exports.GetHistoricalDataParameters = _chunkRS2GPPLXjs.g; exports.GetOHLCParameters = _chunkRS2GPPLXjs.h; exports.GetSupportedCoinsParameters = _chunkRS2GPPLXjs.f; exports.GetTrendingCoinsParameters = _chunkRS2GPPLXjs.a; exports.SearchCoinsParameters = _chunkRS2GPPLXjs.c; |
@@ -1,1 +0,1 @@ | ||
| import{b as a,c as b,d as c}from"./chunk-M3VKZ2YD.mjs";export{b as GetCoinPriceParameters,a as GetTrendingCoinsParameters,c as SearchCoinsParameters}; | ||
| import{a,b,c,d,e,f,g,h}from"./chunk-TPWA5WWM.mjs";import"./chunk-YSXGDEY5.mjs";export{e as GetCoinDataParameters,d as GetCoinPriceByContractAddressParameters,b as GetCoinPriceParameters,g as GetHistoricalDataParameters,h as GetOHLCParameters,f as GetSupportedCoinsParameters,a as GetTrendingCoinsParameters,c as SearchCoinsParameters}; |
+3
-3
| { | ||
| "name": "@goat-sdk/plugin-coingecko", | ||
| "version": "0.2.3", | ||
| "version": "0.2.4", | ||
| "files": [ | ||
@@ -15,6 +15,6 @@ "dist/**/*", | ||
| "zod": "3.23.8", | ||
| "@goat-sdk/core": "0.4.3" | ||
| "@goat-sdk/core": "0.4.4" | ||
| }, | ||
| "peerDependencies": { | ||
| "@goat-sdk/core": "0.4.3" | ||
| "@goat-sdk/core": "0.4.4" | ||
| }, | ||
@@ -21,0 +21,0 @@ "homepage": "https://ohmygoat.dev", |
| import{a as p,b as u,c as l}from"./chunk-M3VKZ2YD.mjs";import{Tool as m}from"@goat-sdk/core";function g(i,e,t,r){var o=arguments.length,n=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(i,e,t,r);else for(var s=i.length-1;s>=0;s--)(c=i[s])&&(n=(o<3?c(n):o>3?c(e,t,n):c(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n}p(g,"_ts_decorate");function a(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}p(a,"_ts_metadata");var d=class{static{p(this,"CoinGeckoService")}apiKey;constructor(e){this.apiKey=e}async getTrendingCoins(e){let t=await fetch(`https://api.coingecko.com/api/v3/search/trending?x_cg_demo_api_key=${this.apiKey}`);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}async getCoinPrice(e){let{coinId:t,vsCurrency:r,includeMarketCap:o,include24hrVol:n,include24hrChange:c,includeLastUpdatedAt:s}=e,_=new URLSearchParams({ids:t,vs_currencies:r,include_market_cap:o.toString(),include_24hr_vol:n.toString(),include_24hr_change:c.toString(),include_last_updated_at:s.toString()}),f=await fetch(`https://api.coingecko.com/api/v3/simple/price?${_.toString()}&x_cg_demo_api_key=${this.apiKey}`);if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return await f.json()}};g([m({description:"Get the list of trending coins from CoinGecko"}),a("design:type",Function),a("design:paramtypes",[typeof u>"u"?Object:u]),a("design:returntype",Promise)],d.prototype,"getTrendingCoins",null);g([m({description:"Get the price of a specific coin from CoinGecko"}),a("design:type",Function),a("design:paramtypes",[typeof l>"u"?Object:l]),a("design:returntype",Promise)],d.prototype,"getCoinPrice",null);export{d as a}; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var l=Object.defineProperty;var o=(t,s)=>l(t,"name",{value:s,configurable:!0});var _core = require('@goat-sdk/core');var _zod = require('zod');var a=class extends _core.createToolParameters.call(void 0, _zod.z.object({limit:_zod.z.number().optional().describe("The number of trending coins to return. Defaults to all coins."),include_platform:_zod.z.boolean().optional().describe("Include platform contract addresses (e.g., ETH, BSC) in response")})){static{o(this,"GetTrendingCoinsParameters")}},r= exports.c =class extends _core.createToolParameters.call(void 0, _zod.z.object({coinId:_zod.z.string().describe("The ID of the coin on CoinGecko (e.g., 'bitcoin', 'ethereum')"),vsCurrency:_zod.z.string().default("usd").describe("The target currency to get price in (e.g., 'usd', 'eur', 'jpy')"),includeMarketCap:_zod.z.boolean().optional().default(!1).describe("Include market cap data in the response"),include24hrVol:_zod.z.boolean().optional().default(!1).describe("Include 24 hour volume data in the response"),include24hrChange:_zod.z.boolean().optional().default(!1).describe("Include 24 hour price change data in the response"),includeLastUpdatedAt:_zod.z.boolean().optional().default(!1).describe("Include last updated timestamp in the response")})){static{o(this,"GetCoinPriceParameters")}},c= exports.d =class extends _core.createToolParameters.call(void 0, _zod.z.object({query:_zod.z.string().describe("The search query to find coins (e.g., 'bitcoin' or 'btc')"),exact_match:_zod.z.boolean().optional().default(!1).describe("Only return exact matches for the search query")})){static{o(this,"SearchCoinsParameters")}};exports.a = o; exports.b = a; exports.c = r; exports.d = c; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDXFRBO2Ojs = require('./chunk-DXFRBO2O.js');var _core = require('@goat-sdk/core');function g(i,e,t,r){var o=arguments.length,n=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(i,e,t,r);else for(var s=i.length-1;s>=0;s--)(c=i[s])&&(n=(o<3?c(n):o>3?c(e,t,n):c(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n}_chunkDXFRBO2Ojs.a.call(void 0, g,"_ts_decorate");function a(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}_chunkDXFRBO2Ojs.a.call(void 0, a,"_ts_metadata");var d=class{static{_chunkDXFRBO2Ojs.a.call(void 0, this,"CoinGeckoService")}constructor(e){this.apiKey=e}async getTrendingCoins(e){let t=await fetch(`https://api.coingecko.com/api/v3/search/trending?x_cg_demo_api_key=${this.apiKey}`);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}async getCoinPrice(e){let{coinId:t,vsCurrency:r,includeMarketCap:o,include24hrVol:n,include24hrChange:c,includeLastUpdatedAt:s}=e,_=new URLSearchParams({ids:t,vs_currencies:r,include_market_cap:o.toString(),include_24hr_vol:n.toString(),include_24hr_change:c.toString(),include_last_updated_at:s.toString()}),f=await fetch(`https://api.coingecko.com/api/v3/simple/price?${_.toString()}&x_cg_demo_api_key=${this.apiKey}`);if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return await f.json()}};g([_core.Tool.call(void 0, {description:"Get the list of trending coins from CoinGecko"}),a("design:type",Function),a("design:paramtypes",[typeof _chunkDXFRBO2Ojs.b>"u"?Object:_chunkDXFRBO2Ojs.b]),a("design:returntype",Promise)],d.prototype,"getTrendingCoins",null);g([_core.Tool.call(void 0, {description:"Get the price of a specific coin from CoinGecko"}),a("design:type",Function),a("design:paramtypes",[typeof _chunkDXFRBO2Ojs.c>"u"?Object:_chunkDXFRBO2Ojs.c]),a("design:returntype",Promise)],d.prototype,"getCoinPrice",null);exports.a = d; |
| var l=Object.defineProperty;var o=(t,s)=>l(t,"name",{value:s,configurable:!0});import{createToolParameters as n}from"@goat-sdk/core";import{z as e}from"zod";var a=class extends n(e.object({limit:e.number().optional().describe("The number of trending coins to return. Defaults to all coins."),include_platform:e.boolean().optional().describe("Include platform contract addresses (e.g., ETH, BSC) in response")})){static{o(this,"GetTrendingCoinsParameters")}},r=class extends n(e.object({coinId:e.string().describe("The ID of the coin on CoinGecko (e.g., 'bitcoin', 'ethereum')"),vsCurrency:e.string().default("usd").describe("The target currency to get price in (e.g., 'usd', 'eur', 'jpy')"),includeMarketCap:e.boolean().optional().default(!1).describe("Include market cap data in the response"),include24hrVol:e.boolean().optional().default(!1).describe("Include 24 hour volume data in the response"),include24hrChange:e.boolean().optional().default(!1).describe("Include 24 hour price change data in the response"),includeLastUpdatedAt:e.boolean().optional().default(!1).describe("Include last updated timestamp in the response")})){static{o(this,"GetCoinPriceParameters")}},c=class extends n(e.object({query:e.string().describe("The search query to find coins (e.g., 'bitcoin' or 'btc')"),exact_match:e.boolean().optional().default(!1).describe("Only return exact matches for the search query")})){static{o(this,"SearchCoinsParameters")}};export{o as a,a as b,r as c,c as d}; |
| "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _chunkEHUWU43Ejs = require('./chunk-EHUWU43E.js');var _chunkDXFRBO2Ojs = require('./chunk-DXFRBO2O.js');var _core = require('@goat-sdk/core');var o= (_class =class extends _core.PluginBase{static{_chunkDXFRBO2Ojs.a.call(void 0, this,"CoinGeckoPlugin")}constructor({apiKey:n}){super("coingecko",[new (0, _chunkEHUWU43Ejs.a)(n)]);_class.prototype.__init.call(this);}__init() {this.supportsChain=_chunkDXFRBO2Ojs.a.call(void 0, ()=>!0,"supportsChain")}}, _class);function u(r){return new o(r)}_chunkDXFRBO2Ojs.a.call(void 0, u,"coingecko");exports.a = o; exports.b = u; |
| import{a as t}from"./chunk-AFKNFVAQ.mjs";import{a as e}from"./chunk-M3VKZ2YD.mjs";import{PluginBase as c}from"@goat-sdk/core";var o=class extends c{static{e(this,"CoinGeckoPlugin")}constructor({apiKey:n}){super("coingecko",[new t(n)])}supportsChain=e(()=>!0,"supportsChain")};function m(r){return new o(r)}e(m,"coingecko");export{o as a,m as b}; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 5 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 4 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
40937
132.61%32
33.33%289
142.86%3
-25%12
33.33%+ Added
- Removed
Updated