@cryptodevops/n8n-nodes-defillama
Version:
Custom n8n node for DefiLlama API - Access DeFi protocols data, TVL, yields, and chain analytics
37 lines (36 loc) • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefiLlamaApi = void 0;
class DefiLlamaApi {
constructor() {
this.name = 'defiLlamaApi';
this.displayName = 'DefiLlama API';
this.documentationUrl = 'https://defillama.com/docs/api';
this.properties = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
default: '',
required: false,
description: 'DefiLlama API Key (optional). Most endpoints work without authentication, but some premium features require an API key.',
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
};
this.test = {
request: {
baseURL: 'https://api.llama.fi',
url: '/protocols',
},
};
}
}
exports.DefiLlamaApi = DefiLlamaApi;