n8n-nodes-blockfrost 0.0.4

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/LICENSE ADDED
@@ -0,0 +1,160 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+ To protect your rights, we need to prevent others from denying you
29
+ these rights or asking you to surrender the rights. Therefore, you have
30
+ certain responsibilities if you distribute copies of the software, or if
31
+ you modify it: responsibilities to respect the freedom of others.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must pass on to the recipients the same
35
+ freedoms that you received. You must make sure that they, too, receive
36
+ or can get the source code. And you must show them these terms so they
37
+ know their rights.
38
+
39
+ Developers that use the GNU GPL protect your rights with two steps:
40
+ (1) assert copyright on the software, and (2) offer you this License
41
+ giving you legal permission to copy, distribute and/or modify it.
42
+
43
+ For the developers' and authors' protection, the GPL clearly explains
44
+ that there is no warranty for this free software. For both users' and
45
+ authors' sake, the GPL requires that modified versions be marked as
46
+ changed, so that their problems will not be attributed erroneously to
47
+ authors of previous versions.
48
+
49
+ Some devices are designed to deny users access to install or run
50
+ modified versions of the software inside them, although the manufacturer
51
+ can do so. This is fundamentally incompatible with the aim of
52
+ protecting users' freedom to change the software. The systematic
53
+ pattern of such abuse occurs in the area of products for individuals to
54
+ use, which is precisely where it is most unacceptable. Therefore, we
55
+ have designed this version of the GPL to prohibit the practice for those
56
+ products. If such problems arise substantially in other domains, we
57
+ stand ready to extend this provision to those domains in future versions
58
+ of the GPL, as needed to protect the freedom of users.
59
+
60
+ Finally, every program is threatened constantly by software patents.
61
+ States should not allow patents to restrict development and use of
62
+ software on general-purpose computers, but in those that do, we wish to
63
+ avoid the special danger that patents applied to a free program could
64
+ make it effectively proprietary. To prevent this, the GPL assures that
65
+ patents cannot be used to render the program non-free.
66
+ The precise terms and conditions for copying, distribution and
67
+ modification follow.
68
+
69
+ TERMS AND CONDITIONS
70
+
71
+ 0. Definitions.
72
+
73
+ "This License" refers to version 3 of the GNU General Public License.
74
+
75
+ "Copyright" also means copyright-like laws that apply to other kinds of
76
+ works, such as semiconductor masks.
77
+
78
+ "The Program" refers to any copyrightable work licensed under this
79
+ License. Each licensee is addressed as "you". "Licensees" and
80
+ "recipients" may be individuals or organizations.
81
+
82
+ To "modify" a work means to copy from or adapt all or part of the work
83
+ in a fashion requiring copyright permission, other than the making of an
84
+ exact copy. The resulting work is called a "modified version" of the
85
+ earlier work or a work "based on" the earlier work.
86
+
87
+ A "covered work" means either the unmodified Program or a work based
88
+ on the Program.
89
+
90
+ To "propagate" a work means to do anything with it that, without
91
+ permission, would make you directly or secondarily liable for
92
+ infringement under applicable copyright law, except executing it on a
93
+ computer or modifying a private copy. Propagation includes copying,
94
+ distribution (with or without modification), making available to the
95
+ public, and in some countries other activities as well.
96
+
97
+ To "convey" a work means any kind of propagation that enables other
98
+ parties to make or receive copies. Mere interaction with a user through
99
+ a computer network, with no transfer of a copy, is not conveying.
100
+ An interactive user interface displays "Appropriate Legal Notices"
101
+ to the extent that it includes a convenient and prominently visible
102
+ feature that (1) displays an appropriate copyright notice, and (2)
103
+ tells the user that there is no warranty for the work (except to the
104
+ extent that warranties are provided), that licensees may convey the
105
+ work under this License, and how to view a copy of this License. If
106
+ the interface presents a list of user commands or options, such as a
107
+ menu, a prominent item in the list meets this criterion.
108
+
109
+ 1. Source Code.
110
+
111
+ The "source code" for a work means the preferred form of the work
112
+ for making modifications to it. "Object code" means any non-source
113
+ form of a work.
114
+
115
+ A "Standard Interface" means an interface that either is an official
116
+ standard defined by a recognized standards body, or, in the case of
117
+ interfaces specified for a particular programming language, one that
118
+ is widely used among developers working in that language.
119
+
120
+ The "System Libraries" of an executable work include anything, other
121
+ than the work as a whole, that (a) is included in the normal form of
122
+ packaging a Major Component, but which is not part of that Major
123
+ Component, and (b) serves only to enable use of the work with that
124
+ Major Component, or to implement a Standard Interface for which an
125
+ implementation is available to the public in source code form. A
126
+ "Major Component", in this context, means a major essential component
127
+ (kernel, window system, and so on) of the specific operating system
128
+ (if any) on which the executable work runs, or a compiler used to
129
+ produce the work, or an object code interpreter used to run it.
130
+
131
+ [... rest of the GPL-3.0 license text ...]
132
+
133
+ END OF TERMS AND CONDITIONS
134
+
135
+ How to Apply These Terms to Your New Programs
136
+
137
+ If you develop a new program, and you want it to be of the greatest
138
+ possible use to the public, the best way to achieve this is to make it
139
+ free software which everyone can redistribute and change under these terms.
140
+
141
+ To do so, attach the following notices to the program. It is safest
142
+ to attach them to the start of each source file to most effectively
143
+ state the exclusion of warranty; and each file should have at least
144
+ the "copyright" line and a pointer to where the full notice is found.
145
+
146
+ n8n-nodes-blockfrost - Custom n8n node for interacting with the Cardano blockchain via the Blockfrost API
147
+ Copyright (C) 2025 Amit Bevinakatti
148
+
149
+ This program is free software: you can redistribute it and/or modify
150
+ it under the terms of the GNU General Public License as published by
151
+ the Free Software Foundation, either version 3 of the License, or
152
+ (at your option) any later version.
153
+
154
+ This program is distributed in the hope that it will be useful,
155
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
156
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
157
+ GNU General Public License for more details.
158
+
159
+ You should have received a copy of the GNU General Public License
160
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ ## Screenshots
2
+
3
+ ### Example 1
4
+ ![Screenshot 1](assets/001.jpg)
5
+
6
+ ### Example 2
7
+ ![Screenshot 2](assets/002.jpg)
8
+
9
+ ### Example 3
10
+ ![Screenshot 3](assets/003.jpg)
11
+
12
+ ### Example 4
13
+ ![Screenshot 4](assets/004.jpg)
14
+ # n8n-nodes-blockfrost
15
+
16
+ This is a custom n8n node for interacting with the [Cardano blockchain](https://cardano.org) via the [Blockfrost API](https://blockfrost.io).
17
+
18
+ ## Features
19
+
20
+ - Query Cardano blockchain data (accounts, addresses, transactions, blocks, etc.)
21
+ - Work with NFTs and native tokens
22
+ - Access IPFS data (if supported by your Blockfrost project)
23
+ - Integrate Cardano blockchain data into your n8n workflows
24
+
25
+ ## Installation
26
+
27
+ ### Option 1: Community Node (via npm)
28
+
29
+ 1. Open your n8n instance
30
+ 2. Go to **Settings** > **Community Nodes**
31
+ 3. Click **Install**
32
+ 4. Enter `n8n-nodes-blockfrost` and click **Install**
33
+
34
+ ### Option 2: Manual Installation
35
+
36
+ 1. Navigate to your n8n custom directory: `~/.n8n/custom/`
37
+ 2. Clone this repository: `git clone https://github.com/bevanamit/n8n-nodes-blockfrost.git`
38
+ 3. Install dependencies: `cd n8n-nodes-blockfrost && npm install`
39
+ 4. Build the project: `npm run build`
40
+ 5. Restart n8n
41
+
42
+ ### Option 3: Fail-Safe Installation (if npm install does not work as expected)
43
+
44
+ If running `npm install n8n-nodes-blockfrost` in your `~/.n8n/custom/` directory does not install the package correctly, try the following steps:
45
+
46
+ 1. Open a terminal and navigate to your n8n custom directory:
47
+ ```
48
+ cd ~/.n8n/custom
49
+ ```
50
+ 2. Initialize a package.json if it does not exist:
51
+ ```
52
+ npm init -y
53
+ ```
54
+ 3. Install the package:
55
+ ```
56
+ npm install n8n-nodes-blockfrost
57
+ ```
58
+ 4. Restart n8n completely (stop and start the process).
59
+
60
+ This ensures the package and its dependencies are installed correctly and n8n can load the custom node.
61
+
62
+ ## Prerequisites
63
+
64
+ - [n8n](https://n8n.io/) (version 0.209.0 or newer)
65
+ - A [Blockfrost](https://blockfrost.io) account and project API key
66
+
67
+ ## Credentials
68
+
69
+ To use this node, you need to set up Blockfrost API credentials:
70
+
71
+ 1. Sign up for a free account on [Blockfrost.io](https://blockfrost.io)
72
+ 2. Create a project and get your API key
73
+ 3. In n8n, create a new credential of type **Blockfrost API**
74
+ 4. Enter your **Project ID** (API key)
75
+ 5. Select the appropriate **Network** (mainnet, preprod, preview)
76
+
77
+ ## Usage
78
+
79
+ 1. Add the **Blockfrost** node to your workflow
80
+ 2. Select a **Category** (e.g., Accounts, Addresses, Assets, etc.)
81
+ 3. Choose an **Operation** specific to that category
82
+ 4. Fill in the required parameters
83
+ 5. Connect the node to other nodes in your workflow
84
+
85
+ ## Example Workflows
86
+
87
+ ### 1. Monitor Cardano Address Balance
88
+
89
+ Create a workflow that periodically checks a Cardano address balance and sends notifications when changes occur.
90
+
91
+ ### 2. Track NFT Ownership
92
+
93
+ Monitor ownership changes of specific NFTs on the Cardano blockchain.
94
+
95
+ ### 3. Analyze Transaction History
96
+
97
+ Pull transaction data for analysis or reporting purposes.
98
+
99
+ ## Development
100
+
101
+ If you want to contribute to this node:
102
+
103
+ 1. Clone the repository
104
+ 2. Install dependencies: `npm install`
105
+ 3. Build the code: `npm run build`
106
+ 4. Link to your local n8n: `npm link`
107
+ 5. In your n8n installation directory: `npm link n8n-nodes-blockfrost`
108
+
109
+ ## Blockfrost Account Setup
110
+
111
+ To use this node, you'll need a Blockfrost account and Project ID. Follow these steps to set one up:
112
+
113
+ 1. **Create an Account**:
114
+ - Visit [blockfrost.io](https://blockfrost.io/)
115
+ - Click the "Sign Up" button
116
+ - Complete the registration form
117
+
118
+ 2. **Create a Project**:
119
+ - After signing in, navigate to the Dashboard
120
+ - Click "Create Project"
121
+ - Enter a project name (e.g., "n8n Integration")
122
+ - Select the network:
123
+ - **Cardano Mainnet**: For production use
124
+ - **Cardano Preprod**: For testing on the preprod testnet
125
+ - **Cardano Preview**: For testing on the preview testnet
126
+
127
+ 3. **Get Your Project ID**:
128
+ - After creating your project, you'll be shown your Project ID
129
+ - This ID will look something like `mainnet1a2b3c4d5e6f7g8h9i0j`
130
+ - Copy this ID to use in your n8n Blockfrost node credentials
131
+
132
+ 4. **Free Tier Information**:
133
+ - Blockfrost offers a free tier with 50,000 requests per day
134
+ - This is sufficient for many use cases and development
135
+ - Paid plans are available if you need higher limits
136
+
137
+ 5. **Security Note**:
138
+ - Treat your Project ID as a secret key
139
+ - Don't commit it to public repositories
140
+ - Consider using n8n's credential encryption feature
141
+
142
+ ## License
143
+
144
+ This project is licensed under the [GNU General Public License v3.0](LICENSE) - see the [LICENSE](LICENSE) file for details.
145
+
146
+ This is free software, and you are welcome to redistribute it under certain conditions.
147
+ ## Support & Donations
148
+
149
+ I am not Catalyst funded. Any support you provide is greatly appreciated!
150
+
151
+ **Cardano (ADA) donation address:**
152
+
153
+ `addr1qyxypmc96e3pska6ch2ucq4uv5d7uz6nhpgcne4ea4hgmemv40lpm3wmc3wqk5arjpgzrccm0m9k72puaqzwsgrj47asch66sp`
@@ -0,0 +1,4 @@
1
+ import BlockfrostNode from './nodes/Blockfrost/Blockfrost.node';
2
+ import BlockfrostCredentials from './nodes/Blockfrost/Blockfrost.credentials';
3
+ export { BlockfrostNode as Blockfrost, BlockfrostCredentials, };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,qBAAqB,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EACL,cAAc,IAAI,UAAU,EAC5B,qBAAqB,GACtB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BlockfrostCredentials = exports.Blockfrost = void 0;
7
+ const Blockfrost_node_1 = __importDefault(require("./nodes/Blockfrost/Blockfrost.node"));
8
+ exports.Blockfrost = Blockfrost_node_1.default;
9
+ const Blockfrost_credentials_1 = __importDefault(require("./nodes/Blockfrost/Blockfrost.credentials"));
10
+ exports.BlockfrostCredentials = Blockfrost_credentials_1.default;
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAIA,yFAAgE;AAI5C,qBAJb,yBAAc,CAIS;AAH9B,uGAA8E;AAI5E,gCAJK,gCAAqB,CAIL"}
@@ -0,0 +1,27 @@
1
+ import { ICredentialType } from 'n8n-workflow';
2
+ export declare class Blockfrost implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ properties: ({
6
+ displayName: string;
7
+ name: string;
8
+ type: "string";
9
+ required: boolean;
10
+ default: string;
11
+ description: string;
12
+ options?: never;
13
+ } | {
14
+ displayName: string;
15
+ name: string;
16
+ type: "options";
17
+ options: {
18
+ name: string;
19
+ value: string;
20
+ }[];
21
+ default: string;
22
+ required: boolean;
23
+ description: string;
24
+ })[];
25
+ }
26
+ export default Blockfrost;
27
+ //# sourceMappingURL=Blockfrost.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blockfrost.credentials.d.ts","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/Blockfrost.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,qBAAa,UAAW,YAAW,eAAe;IAChD,IAAI,SAAmB;IACvB,WAAW,SAAoB;IAC/B,UAAU;;;;;;;;;;;;;;;;;;;SAsBR;CACH;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Blockfrost = void 0;
4
+ class Blockfrost {
5
+ constructor() {
6
+ this.name = 'blockfrostApi';
7
+ this.displayName = 'Blockfrost API';
8
+ this.properties = [
9
+ {
10
+ displayName: 'Project ID',
11
+ name: 'projectId',
12
+ type: 'string',
13
+ required: true,
14
+ default: '',
15
+ description: 'Your Blockfrost Project ID from https://blockfrost.io',
16
+ },
17
+ {
18
+ displayName: 'Network',
19
+ name: 'network',
20
+ type: 'options',
21
+ options: [
22
+ { name: 'Mainnet', value: 'mainnet' },
23
+ { name: 'Preprod', value: 'preprod' },
24
+ { name: 'Preview', value: 'preview' },
25
+ ],
26
+ default: 'mainnet',
27
+ required: true,
28
+ description: 'The Cardano network to connect to',
29
+ },
30
+ ];
31
+ }
32
+ }
33
+ exports.Blockfrost = Blockfrost;
34
+ exports.default = Blockfrost;
35
+ //# sourceMappingURL=Blockfrost.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blockfrost.credentials.js","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/Blockfrost.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;IAAvB;QACE,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,eAAU,GAAG;YACX;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAiB;gBACvB,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uDAAuD;aACrE;YACD;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAkB;gBACxB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACrC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACrC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACtC;gBACD,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mCAAmC;aACjD;SACF,CAAC;IACJ,CAAC;CAAA;AA1BD,gCA0BC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Blockfrost implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ export default Blockfrost;
7
+ //# sourceMappingURL=Blockfrost.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blockfrost.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/Blockfrost.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAItB,qBAAa,UAAW,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CAwR/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAiMxE;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,486 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Blockfrost = void 0;
7
+ const blockfrost_js_1 = require("@blockfrost/blockfrost-js");
8
+ const got_1 = __importDefault(require("got"));
9
+ class Blockfrost {
10
+ constructor() {
11
+ this.description = {
12
+ displayName: 'Blockfrost',
13
+ name: 'blockfrost',
14
+ icon: 'file:blockfrost.svg',
15
+ group: ['transform'],
16
+ version: 1,
17
+ subtitle: '={{$parameter["category"]}} - {{$parameter["operation"]}}',
18
+ description: 'Interact with Cardano blockchain via Blockfrost API',
19
+ defaults: {
20
+ name: 'Blockfrost',
21
+ },
22
+ inputs: ['main'],
23
+ outputs: ['main'],
24
+ credentials: [
25
+ {
26
+ name: 'blockfrostApi',
27
+ required: true,
28
+ },
29
+ ],
30
+ properties: [
31
+ {
32
+ displayName: 'Category',
33
+ name: 'category',
34
+ type: 'options',
35
+ noDataExpression: true,
36
+ options: [
37
+ { name: 'Health', value: 'health' },
38
+ { name: 'Metrics', value: 'metrics' },
39
+ { name: 'Accounts', value: 'accounts' },
40
+ { name: 'Addresses', value: 'addresses' },
41
+ { name: 'Assets', value: 'assets' },
42
+ ],
43
+ default: 'health',
44
+ required: true,
45
+ },
46
+ {
47
+ displayName: 'Operation',
48
+ name: 'operation',
49
+ type: 'options',
50
+ noDataExpression: true,
51
+ displayOptions: {
52
+ show: {
53
+ category: ['assets'],
54
+ },
55
+ },
56
+ options: [
57
+ { name: 'List Assets', value: 'listAssets', description: 'List of assets (GET /assets)' },
58
+ { name: 'Get Asset', value: 'getAsset', description: 'Information about a specific asset (GET /assets/{asset})' },
59
+ { name: 'Get Asset History', value: 'getAssetHistory', description: 'History of a specific asset (GET /assets/{asset}/history)' },
60
+ { name: 'Get Asset Transactions', value: 'getAssetTransactions', description: 'Transactions of a specific asset (GET /assets/{asset}/transactions)' },
61
+ { name: 'Get Asset Txs', value: 'getAssetTxs', description: 'Transaction hashes of a specific asset (GET /assets/{asset}/txs)' },
62
+ { name: 'Get Asset Addresses', value: 'getAssetAddresses', description: 'Addresses containing a specific asset (GET /assets/{asset}/addresses)' },
63
+ { name: 'List Policy Assets', value: 'listPolicyAssets', description: 'List of assets under a policy (GET /assets/policy/{policy_id})' },
64
+ ],
65
+ default: 'listAssets',
66
+ },
67
+ {
68
+ displayName: 'Count',
69
+ name: 'count',
70
+ type: 'number',
71
+ default: 100,
72
+ required: false,
73
+ displayOptions: {
74
+ show: {
75
+ category: ['assets'],
76
+ operation: ['listAssets', 'getAssetHistory', 'getAssetTransactions', 'getAssetTxs', 'getAssetAddresses', 'listPolicyAssets'],
77
+ },
78
+ },
79
+ description: 'Max number of results per page (1-100)',
80
+ },
81
+ {
82
+ displayName: 'Page',
83
+ name: 'page',
84
+ type: 'number',
85
+ default: 1,
86
+ required: false,
87
+ displayOptions: {
88
+ show: {
89
+ category: ['assets'],
90
+ operation: ['listAssets', 'getAssetHistory', 'getAssetTransactions', 'getAssetTxs', 'getAssetAddresses', 'listPolicyAssets'],
91
+ },
92
+ },
93
+ description: 'Page number for results',
94
+ },
95
+ {
96
+ displayName: 'Order',
97
+ name: 'order',
98
+ type: 'options',
99
+ options: [
100
+ { name: 'Ascending', value: 'asc' },
101
+ { name: 'Descending', value: 'desc' },
102
+ ],
103
+ default: 'asc',
104
+ required: false,
105
+ displayOptions: {
106
+ show: {
107
+ category: ['assets'],
108
+ operation: ['listAssets', 'getAssetHistory', 'getAssetTransactions', 'getAssetTxs', 'getAssetAddresses', 'listPolicyAssets'],
109
+ },
110
+ },
111
+ description: 'Order of results',
112
+ },
113
+ {
114
+ displayName: 'Asset',
115
+ name: 'asset',
116
+ type: 'string',
117
+ required: true,
118
+ default: '',
119
+ displayOptions: {
120
+ show: {
121
+ category: ['assets'],
122
+ operation: ['getAsset', 'getAssetHistory', 'getAssetTransactions', 'getAssetTxs', 'getAssetAddresses'],
123
+ },
124
+ },
125
+ description: 'Asset unit (policy_id + hex encoded asset_name)',
126
+ },
127
+ {
128
+ displayName: 'Policy ID',
129
+ name: 'policyId',
130
+ type: 'string',
131
+ required: true,
132
+ default: '',
133
+ displayOptions: {
134
+ show: {
135
+ category: ['assets'],
136
+ operation: ['listPolicyAssets'],
137
+ },
138
+ },
139
+ description: 'Policy ID',
140
+ },
141
+ {
142
+ displayName: 'Operation',
143
+ name: 'operation',
144
+ type: 'options',
145
+ noDataExpression: true,
146
+ displayOptions: {
147
+ show: {
148
+ category: ['addresses'],
149
+ },
150
+ },
151
+ options: [
152
+ { name: 'Get Address', value: 'getAddress', description: 'Obtain information about a specific address (GET /addresses/{address})' },
153
+ { name: 'Get Address Extended', value: 'getAddressExtended', description: 'Obtain extended information about a specific address (GET /addresses/{address}/extended)' },
154
+ { name: 'Get Address Total', value: 'getAddressTotal', description: 'Obtain details about an address (GET /addresses/{address}/total)' },
155
+ { name: 'Get Address UTXOs', value: 'getAddressUtxos', description: 'UTXOs of the address (GET /addresses/{address}/utxos)' },
156
+ { name: 'Get Address UTXOs of Asset', value: 'getAddressUtxosAsset', description: 'UTXOs of the address for a given asset (GET /addresses/{address}/utxos/{asset})' },
157
+ { name: 'Get Address Transactions', value: 'getAddressTransactions', description: 'Transactions on the address (GET /addresses/{address}/transactions)' },
158
+ ],
159
+ default: 'getAddress',
160
+ },
161
+ {
162
+ displayName: 'Address',
163
+ name: 'address',
164
+ type: 'string',
165
+ required: true,
166
+ default: '',
167
+ displayOptions: {
168
+ show: {
169
+ category: ['addresses'],
170
+ },
171
+ },
172
+ description: 'Cardano address in Bech32 format',
173
+ },
174
+ {
175
+ displayName: 'Asset',
176
+ name: 'asset',
177
+ type: 'string',
178
+ required: false,
179
+ default: '',
180
+ displayOptions: {
181
+ show: {
182
+ category: ['addresses'],
183
+ operation: ['getAddressUtxosAsset'],
184
+ },
185
+ },
186
+ description: 'Asset unit (policy_id + hex encoded asset_name)',
187
+ },
188
+ {
189
+ displayName: 'Operation',
190
+ name: 'operation',
191
+ type: 'options',
192
+ noDataExpression: true,
193
+ displayOptions: {
194
+ show: {
195
+ category: ['health'],
196
+ },
197
+ },
198
+ options: [
199
+ {
200
+ name: 'Root Endpoint',
201
+ value: 'root',
202
+ description: 'Get information pointing to the documentation (GET /)',
203
+ },
204
+ {
205
+ name: 'Backend Health Status',
206
+ value: 'health',
207
+ description: 'Get backend health status (GET /health)',
208
+ },
209
+ {
210
+ name: 'Current Backend Time',
211
+ value: 'clock',
212
+ description: 'Get current backend UNIX time (GET /health/clock)',
213
+ },
214
+ ],
215
+ default: 'root',
216
+ },
217
+ {
218
+ displayName: 'Operation',
219
+ name: 'operation',
220
+ type: 'options',
221
+ noDataExpression: true,
222
+ displayOptions: {
223
+ show: {
224
+ category: ['metrics'],
225
+ },
226
+ },
227
+ options: [
228
+ {
229
+ name: 'Usage Metrics',
230
+ value: 'usage',
231
+ description: 'History of your Blockfrost usage metrics in the past 30 days (GET /metrics)',
232
+ },
233
+ {
234
+ name: 'Endpoint Usage Metrics',
235
+ value: 'endpoints',
236
+ description: 'History of your Blockfrost usage metrics per endpoint in the past 30 days (GET /metrics/endpoints)',
237
+ },
238
+ ],
239
+ default: 'usage',
240
+ },
241
+ {
242
+ displayName: 'Operation',
243
+ name: 'operation',
244
+ type: 'options',
245
+ noDataExpression: true,
246
+ displayOptions: {
247
+ show: {
248
+ category: ['accounts'],
249
+ },
250
+ },
251
+ options: [
252
+ { name: 'Get Account', value: 'getAccount', description: 'Obtain information about a specific stake account (GET /accounts/{stake_address})' },
253
+ { name: 'Get Rewards', value: 'getRewards', description: 'Obtain information about the reward history of a specific account (GET /accounts/{stake_address}/rewards)' },
254
+ { name: 'Get History', value: 'getHistory', description: 'Obtain information about the history of a specific account (GET /accounts/{stake_address}/history)' },
255
+ { name: 'Get Delegations', value: 'getDelegations', description: 'Obtain information about the delegation of a specific account (GET /accounts/{stake_address}/delegations)' },
256
+ { name: 'Get Registrations', value: 'getRegistrations', description: 'Obtain information about the registrations and deregistrations of a specific account (GET /accounts/{stake_address}/registrations)' },
257
+ { name: 'Get Withdrawals', value: 'getWithdrawals', description: 'Obtain information about the withdrawals of a specific account (GET /accounts/{stake_address}/withdrawals)' },
258
+ { name: 'Get MIRs', value: 'getMirs', description: 'Obtain information about the MIRs of a specific account (GET /accounts/{stake_address}/mirs)' },
259
+ { name: 'Get Associated Addresses', value: 'getAddresses', description: 'Obtain information about the addresses of a specific account (GET /accounts/{stake_address}/addresses)' },
260
+ { name: 'Get Associated Assets', value: 'getAddressesAssets', description: 'Obtain information about assets associated with addresses of a specific account (GET /accounts/{stake_address}/addresses/assets)' },
261
+ { name: 'Get Addresses Total', value: 'getAddressesTotal', description: 'Obtain summed details about all addresses associated with a given account (GET /accounts/{stake_address}/addresses/total)' },
262
+ { name: 'Get UTXOs', value: 'getUtxos', description: 'UTXOs associated with the account (GET /accounts/{stake_address}/utxos)' },
263
+ ],
264
+ default: 'getAccount',
265
+ },
266
+ {
267
+ displayName: 'Stake Address',
268
+ name: 'stakeAddress',
269
+ type: 'string',
270
+ required: true,
271
+ default: '',
272
+ displayOptions: {
273
+ show: {
274
+ category: ['accounts'],
275
+ },
276
+ },
277
+ description: 'Stake address in Bech32 format',
278
+ },
279
+ ],
280
+ };
281
+ }
282
+ async execute() {
283
+ const credentials = await this.getCredentials('blockfrostApi');
284
+ const blockfrost = new blockfrost_js_1.BlockFrostAPI({
285
+ projectId: credentials.projectId,
286
+ network: credentials.network,
287
+ });
288
+ const category = this.getNodeParameter('category', 0);
289
+ const operation = this.getNodeParameter('operation', 0);
290
+ let responseData = [];
291
+ try {
292
+ if (category === 'assets') {
293
+ const count = this.getNodeParameter('count', 0, 100);
294
+ const page = this.getNodeParameter('page', 0, 1);
295
+ const order = this.getNodeParameter('order', 0, 'asc');
296
+ const operation = this.getNodeParameter('operation', 0);
297
+ let url = '';
298
+ let params = { count, page, order };
299
+ let asset = '';
300
+ let policyId = '';
301
+ switch (operation) {
302
+ case 'listAssets':
303
+ url = '/assets';
304
+ break;
305
+ case 'getAsset':
306
+ asset = this.getNodeParameter('asset', 0);
307
+ url = `/assets/${asset}`;
308
+ params = {};
309
+ break;
310
+ case 'getAssetHistory':
311
+ asset = this.getNodeParameter('asset', 0);
312
+ url = `/assets/${asset}/history`;
313
+ break;
314
+ case 'getAssetTransactions':
315
+ asset = this.getNodeParameter('asset', 0);
316
+ url = `/assets/${asset}/transactions`;
317
+ break;
318
+ case 'getAssetTxs':
319
+ asset = this.getNodeParameter('asset', 0);
320
+ url = `/assets/${asset}/txs`;
321
+ break;
322
+ case 'getAssetAddresses':
323
+ asset = this.getNodeParameter('asset', 0);
324
+ url = `/assets/${asset}/addresses`;
325
+ break;
326
+ case 'listPolicyAssets':
327
+ policyId = this.getNodeParameter('policyId', 0);
328
+ url = `/assets/policy/${policyId}`;
329
+ break;
330
+ default:
331
+ throw new Error(`Unknown operation: ${operation}`);
332
+ }
333
+ const apiBase = credentials.network === 'mainnet'
334
+ ? 'https://cardano-mainnet.blockfrost.io/api/v0'
335
+ : credentials.network === 'preprod'
336
+ ? 'https://cardano-preprod.blockfrost.io/api/v0'
337
+ : 'https://cardano-preview.blockfrost.io/api/v0';
338
+ const reqUrl = apiBase + url;
339
+ const headers = {
340
+ project_id: credentials.projectId,
341
+ };
342
+ let gotOptions = {
343
+ method: 'GET',
344
+ headers,
345
+ responseType: 'json',
346
+ };
347
+ if (params && Object.keys(params).length > 0) {
348
+ gotOptions.searchParams = params;
349
+ }
350
+ const response = await (0, got_1.default)(reqUrl, gotOptions);
351
+ const body = response.body;
352
+ if (Array.isArray(body)) {
353
+ responseData = body;
354
+ }
355
+ else if (typeof body === 'object' && body !== null) {
356
+ responseData = [body];
357
+ }
358
+ else {
359
+ responseData = [{ result: body }];
360
+ }
361
+ }
362
+ else if (category === 'health') {
363
+ switch (operation) {
364
+ case 'root':
365
+ responseData = [await blockfrost.root()];
366
+ break;
367
+ case 'health':
368
+ responseData = [await blockfrost.health()];
369
+ break;
370
+ case 'clock':
371
+ responseData = [await blockfrost.healthClock()];
372
+ break;
373
+ default:
374
+ throw new Error(`Unknown operation: ${operation}`);
375
+ }
376
+ }
377
+ else if (category === 'metrics') {
378
+ switch (operation) {
379
+ case 'usage':
380
+ responseData = await blockfrost.metrics();
381
+ break;
382
+ case 'endpoints':
383
+ responseData = await blockfrost.metricsEndpoints();
384
+ break;
385
+ default:
386
+ throw new Error(`Unknown operation: ${operation}`);
387
+ }
388
+ }
389
+ else if (category === 'accounts') {
390
+ const stakeAddress = this.getNodeParameter('stakeAddress', 0);
391
+ switch (operation) {
392
+ case 'getAccount':
393
+ responseData = [await blockfrost.accounts(stakeAddress)];
394
+ break;
395
+ case 'getRewards':
396
+ responseData = await blockfrost.accountsRewards(stakeAddress);
397
+ break;
398
+ case 'getHistory':
399
+ responseData = await blockfrost.accountsHistory(stakeAddress);
400
+ break;
401
+ case 'getDelegations':
402
+ responseData = await blockfrost.accountsDelegations(stakeAddress);
403
+ break;
404
+ case 'getRegistrations':
405
+ responseData = await blockfrost.accountsRegistrations(stakeAddress);
406
+ break;
407
+ case 'getWithdrawals':
408
+ responseData = await blockfrost.accountsWithdrawals(stakeAddress);
409
+ break;
410
+ case 'getMirs':
411
+ responseData = await blockfrost.accountsMirs(stakeAddress);
412
+ break;
413
+ case 'getAddresses':
414
+ responseData = await blockfrost.accountsAddresses(stakeAddress);
415
+ break;
416
+ case 'getAddressesAssets':
417
+ responseData = await blockfrost.accountsAddressesAssets(stakeAddress);
418
+ break;
419
+ case 'getAddressesTotal':
420
+ responseData = [await blockfrost.accountsAddressesTotal(stakeAddress)];
421
+ break;
422
+ case 'getUtxos':
423
+ if (typeof blockfrost.request === 'function') {
424
+ responseData = await blockfrost.request(`/accounts/${stakeAddress}/utxos`);
425
+ }
426
+ else if (typeof blockfrost._request === 'function') {
427
+ responseData = await blockfrost._request('GET', `/accounts/${stakeAddress}/utxos`);
428
+ }
429
+ else {
430
+ throw new Error('accountsUtxos method not available in Blockfrost SDK.');
431
+ }
432
+ break;
433
+ default:
434
+ throw new Error(`Unknown operation: ${operation}`);
435
+ }
436
+ }
437
+ else if (category === 'addresses') {
438
+ const address = this.getNodeParameter('address', 0);
439
+ switch (operation) {
440
+ case 'getAddress':
441
+ responseData = [await blockfrost.addresses(address)];
442
+ break;
443
+ case 'getAddressExtended':
444
+ responseData = [await blockfrost.addressesExtended(address)];
445
+ break;
446
+ case 'getAddressTotal':
447
+ responseData = [await blockfrost.addressesTotal(address)];
448
+ break;
449
+ case 'getAddressUtxos':
450
+ responseData = await blockfrost.addressesUtxos(address);
451
+ break;
452
+ case 'getAddressUtxosAsset': {
453
+ const asset = this.getNodeParameter('asset', 0);
454
+ if (!asset)
455
+ throw new Error('Asset is required for this operation.');
456
+ if (typeof blockfrost.request === 'function') {
457
+ responseData = await blockfrost.request(`/addresses/${address}/utxos/${asset}`);
458
+ }
459
+ else if (typeof blockfrost._request === 'function') {
460
+ responseData = await blockfrost._request('GET', `/addresses/${address}/utxos/${asset}`);
461
+ }
462
+ else {
463
+ throw new Error('addressesUtxosAsset method not available in Blockfrost SDK.');
464
+ }
465
+ break;
466
+ }
467
+ case 'getAddressTransactions':
468
+ responseData = await blockfrost.addressesTransactions(address);
469
+ break;
470
+ default:
471
+ throw new Error(`Unknown operation: ${operation}`);
472
+ }
473
+ }
474
+ else {
475
+ throw new Error(`Category ${category} not implemented yet`);
476
+ }
477
+ }
478
+ catch (error) {
479
+ throw new Error(`Blockfrost API error: ${error.message}`);
480
+ }
481
+ return [this.helpers.returnJsonArray(responseData)];
482
+ }
483
+ }
484
+ exports.Blockfrost = Blockfrost;
485
+ exports.default = Blockfrost;
486
+ //# sourceMappingURL=Blockfrost.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blockfrost.node.js","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/Blockfrost.node.ts"],"names":[],"mappings":";;;;;;AAOA,6DAA0D;AAC1D,8CAAsB;AAEtB,MAAa,UAAU;IAAvB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,2DAA2D;YACrE,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE;gBACR,IAAI,EAAE,YAAY;aACnB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAA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AA5dD,gCA4dC;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function validateStakeAddress(address: string): boolean;
2
+ export declare function handleApiError(error: any): string;
3
+ //# sourceMappingURL=GenericFunctions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.d.ts","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/GenericFunctions.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAOjD"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateStakeAddress = validateStakeAddress;
4
+ exports.handleApiError = handleApiError;
5
+ function validateStakeAddress(address) {
6
+ return address.startsWith('stake1') && address.length === 59;
7
+ }
8
+ function handleApiError(error) {
9
+ var _a;
10
+ if (error.response) {
11
+ const status = error.response.status;
12
+ const message = ((_a = error.response.data) === null || _a === void 0 ? void 0 : _a.message) || 'Unknown error';
13
+ return `HTTP ${status}: ${message}`;
14
+ }
15
+ return error.message || 'Unknown error';
16
+ }
17
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../src/nodes/Blockfrost/GenericFunctions.ts"],"names":[],"mappings":";;AAEA,oDAGC;AAED,wCAOC;AAZD,SAAgB,oBAAoB,CAAC,OAAe;IAElD,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,CAAC;AAC/D,CAAC;AAED,SAAgB,cAAc,CAAC,KAAU;;IACvC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACrC,MAAM,OAAO,GAAG,CAAA,MAAA,KAAK,CAAC,QAAQ,CAAC,IAAI,0CAAE,OAAO,KAAI,eAAe,CAAC;QAChE,OAAO,QAAQ,MAAM,KAAK,OAAO,EAAE,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,IAAI,eAAe,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,9 @@
1
+ const { BlockfrostNode } = require('./Blockfrost.node');
2
+
3
+ // Create an alias class for compatibility
4
+ class Blockfrost extends BlockfrostNode {}
5
+
6
+ module.exports = {
7
+ BlockfrostNode,
8
+ Blockfrost,
9
+ };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "n8n-nodes-blockfrost",
3
+ "version": "0.0.4",
4
+ "description": "n8n node for Blockfrost API - Interact with Cardano blockchain via no-code workflows",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "blockfrost",
8
+ "cardano",
9
+ "blockchain",
10
+ "api"
11
+ ],
12
+ "license": "GPL-3.0",
13
+ "homepage": "https://github.com/bevanamit/n8n-nodes-blockfrost",
14
+ "author": {
15
+ "name": "Amit A B (bevanamit)",
16
+ "email": "bevanamit@gmail.com"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/bevanamit/n8n-nodes-blockfrost.git"
21
+ },
22
+ "main": "dist/index.js",
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "dev": "tsc --watch",
26
+ "test": "jest",
27
+ "lint": "eslint src/**/*.ts",
28
+ "lintfix": "eslint src/**/*.ts --fix"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "n8n": {
34
+ "nodes": [
35
+ "dist/nodes/Blockfrost/Blockfrost.node.js"
36
+ ],
37
+ "credentials": [
38
+ "dist/nodes/Blockfrost/Blockfrost.credentials.js"
39
+ ]
40
+ },
41
+ "devDependencies": {
42
+ "@types/jest": "^29.5.0",
43
+ "@types/node": "^20.0.0",
44
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
45
+ "@typescript-eslint/parser": "^6.0.0",
46
+ "eslint": "^8.0.0",
47
+ "jest": "^29.0.0",
48
+ "n8n-workflow": "^1.0.0",
49
+ "ts-jest": "^29.0.0",
50
+ "typescript": "^5.0.0"
51
+ },
52
+ "dependencies": {
53
+ "@blockfrost/blockfrost-js": "^5.4.1",
54
+ "n8n": "^1.112.5"
55
+ }
56
+ }