mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-30 06:42:25 -05:00
feat: initialize base agent node
This commit is contained in:
parent
e33348ac69
commit
2fbccb3423
13 changed files with 8082 additions and 536 deletions
66
credentials/BaseApi.credentials.ts
Normal file
66
credentials/BaseApi.credentials.ts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class BaseApi implements ICredentialType {
|
||||
name = 'baseApi';
|
||||
displayName = 'Base API';
|
||||
documentationUrl = 'https://docs.base.com/';
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Private Key',
|
||||
name: 'privateKey',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'The private key of your Base wallet',
|
||||
},
|
||||
{
|
||||
displayName: 'RPC URL',
|
||||
name: 'rpcUrl',
|
||||
type: 'string',
|
||||
default: 'https://api.mainnet-beta.base.com',
|
||||
required: true,
|
||||
description: 'The URL of the Base RPC node',
|
||||
},
|
||||
{
|
||||
displayName: 'OpenAI API Key',
|
||||
name: 'openAiApiKey',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'API key for OpenAI services',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '={{$credentials.rpcUrl}}',
|
||||
url: '/',
|
||||
method: 'POST',
|
||||
body: {
|
||||
jsonrpc: '2.0',
|
||||
id: 1,
|
||||
method: 'getHealth',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue