@velocity-bpa/n8n-nodes-aptos
v1.0.0
Published
n8n community node for Aptos blockchain API integration
Readme
n8n-nodes-aptos
[Velocity BPA Licensing Notice]
This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
For licensing information, visit https://velobpa.com/licensing or contact [email protected].
An n8n community node for interacting with the Aptos blockchain network. This node provides 6 comprehensive resources enabling blockchain data retrieval, transaction processing, and smart contract interactions through Aptos REST API endpoints.
Features
- Account Management - Retrieve account information, balances, resources, and modules
- Transaction Processing - Submit transactions, check status, and retrieve transaction details
- Block Data Access - Query blockchain blocks and their contents by height or version
- Ledger Information - Access current ledger state and blockchain metadata
- Event Monitoring - Subscribe to and query blockchain events and smart contract activities
- Table Operations - Read and interact with Move smart contract table data
- Real-time Updates - Monitor blockchain state changes and transaction confirmations
- Error Handling - Comprehensive error management with retry logic and detailed messages
Installation
Community Nodes (Recommended)
- Open n8n
- Go to Settings → Community Nodes
- Click Install a community node
- Enter
n8n-nodes-aptos - Click Install
Manual Installation
cd ~/.n8n
npm install n8n-nodes-aptosDevelopment Installation
git clone https://github.com/Velocity-BPA/n8n-nodes-aptos.git
cd n8n-nodes-aptos
npm install
npm run build
mkdir -p ~/.n8n/custom
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-aptos
n8n startCredentials Setup
| Field | Description | Required | |-------|-------------|----------| | API Key | Your Aptos node API key for authenticated requests | Yes | | Node URL | Aptos REST API endpoint URL (mainnet/testnet/devnet) | Yes | | Network | Target Aptos network (mainnet, testnet, devnet) | Yes |
Resources & Operations
1. Account
| Operation | Description | |-----------|-------------| | Get Account | Retrieve account information and authentication key | | Get Balance | Get account balance for specific coin types | | Get Resources | List all resources stored in an account | | Get Modules | Get all Move modules published by an account | | Get Events | Retrieve events generated by account transactions |
2. Transaction
| Operation | Description | |-----------|-------------| | Submit Transaction | Submit a signed transaction to the blockchain | | Get Transaction | Retrieve transaction details by hash or version | | Get Transactions | Get multiple transactions with pagination | | Simulate Transaction | Simulate transaction execution without submitting | | Estimate Gas | Calculate gas fees for transaction execution |
3. Block
| Operation | Description | |-----------|-------------| | Get Block | Retrieve block information by height | | Get Latest Block | Get the most recent block in the chain | | Get Block Range | Fetch multiple blocks within a specified range | | Get Block Transactions | List all transactions in a specific block |
4. Ledger
| Operation | Description | |-----------|-------------| | Get Ledger Info | Retrieve current blockchain state and metadata | | Get Node Health | Check Aptos node health and synchronization status | | Get Chain ID | Get the chain identifier for the network |
5. Event
| Operation | Description | |-----------|-------------| | Get Events | Query events by event handle | | Get Events by Type | Filter events by specific event types | | Subscribe to Events | Set up real-time event monitoring | | Get Transaction Events | Retrieve all events from a specific transaction |
6. Table
| Operation | Description | |-----------|-------------| | Get Table Item | Read data from Move smart contract tables | | Get Raw Table Item | Retrieve raw table data without deserialization | | Query Table | Search table data with custom filters |
Usage Examples
// Get account balance for APT coin
{
"account": "0x1234567890abcdef1234567890abcdef12345678",
"coinType": "0x1::aptos_coin::AptosCoin"
}// Submit a simple transfer transaction
{
"sender": "0x1234567890abcdef1234567890abcdef12345678",
"recipient": "0xabcdef1234567890abcdef1234567890abcdef12",
"amount": "1000000",
"coinType": "0x1::aptos_coin::AptosCoin",
"maxGasAmount": "2000",
"gasUnitPrice": "100"
}// Query events from a smart contract
{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"eventHandle": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"fieldName": "withdraw_events",
"start": 0,
"limit": 10
}// Read data from a Move table
{
"tableHandle": "0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca",
"keyType": "address",
"valueType": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"key": "0x1234567890abcdef1234567890abcdef12345678"
}Error Handling
| Error | Description | Solution | |-------|-------------|----------| | Invalid API Key | Authentication failed with provided credentials | Verify API key and network configuration | | Account Not Found | Requested account does not exist on chain | Check account address format and network | | Transaction Failed | Transaction simulation or submission failed | Review transaction parameters and gas settings | | Rate Limit Exceeded | Too many requests sent to API endpoint | Implement delays between requests | | Network Timeout | Request timed out waiting for response | Check network connectivity and node status | | Insufficient Gas | Transaction gas limit too low for execution | Increase maxGasAmount or gasUnitPrice |
Development
npm install
npm run build
npm test
npm run lint
npm run devAuthor
Velocity BPA
- Website: velobpa.com
- GitHub: Velocity-BPA
Licensing
This n8n community node is licensed under the Business Source License 1.1.
Free Use
Permitted for personal, educational, research, and internal business use.
Commercial Use
Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
For licensing inquiries: [email protected]
See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.
Contributing
Contributions are welcome! Please ensure:
- Code follows existing style conventions
- All tests pass (
npm test) - Linting passes (
npm run lint) - Documentation is updated for new features
- Commit messages are descriptive
Support
- Issues: GitHub Issues
- Aptos Documentation: Aptos Developer Docs
- Aptos Community: Aptos Discord
