Table of contents
- Introduction
- What is QuickNode?
- Key Features of the QuickNode Function Library
- Functions Features
- Key Use Cases for the QuickNode Function Library
- Benefits of Using the QuickNode Function Library
- How to Use the QuickNode Function Library
- Supported Chains
- Configuring Your Function
- Function Editor
- Features:
- Key-Value Store Integration
- Available Key-Value Store features within functions
- Lists
- Sets
- Conclusion
- Additional Resources
- About QuickNode
Introduction
In today’s blockchain development landscape, speed and efficiency are critical. Developers need tools that not only save time but also simplify complex interactions with blockchain networks. The QuickNode Function Library is designed to cater to these needs by providing developers with pre-built, reusable functions for interacting with different blockchain protocols, services, and APIs. By leveraging this library, developers can skip reinventing the wheel and focus on building innovative applications that matter.
This guide will explore the QuickNode Function Library, its features, use cases, and how it can benefit developers working with different blockchain ecosystems.
What is QuickNode?
QuickNode is a powerful platform that provides developers with access to a variety of blockchain nodes, APIs, and services that make blockchain development more accessible and efficient. Whether you're building decentralized applications (dApps), interacting with smart contracts, or tracking blockchain data, QuickNode offers tools that simplify the entire process.
The QuickNode Function Library is one of these tools, offering a set of functions designed to work with a variety of blockchains and services. With the QuickNode Function Library, developers can seamlessly integrate with their blockchain projects and save significant development time.
Key Features of the QuickNode Function Library
Multi-Blockchain Support The QuickNode Function Library supports a wide range of blockchains, making it an ideal tool for developers working across different ecosystems. Whether you're interacting with Ethereum, Solana, Bitcoin, Polygon, or newer chains like Polkadot and Cosmos, the library provides pre-built functions that support various blockchain protocols.
Pre-Built Functions The library includes a collection of pre-built functions designed to simplify common blockchain tasks. These functions handle interactions such as querying blockchain data, sending transactions, fetching block information, getting wallet balances, and interacting with smart contracts. With the library’s pre-built functions, developers don’t need to write complex code from scratch.
Simplified Integration One of the standout features of the QuickNode Function Library is how easy it is to integrate. Whether you're using JavaScript, Python, or other common programming languages, the library provides simple, clear interfaces that developers can plug directly into their projects.
Security and Performance QuickNode places a strong emphasis on security and performance, ensuring that interactions with the blockchain are secure and fast. The function library inherits these features, offering high-performance APIs that respond quickly, along with robust security measures to ensure that transactions and data queries are safe from potential attacks.
Customizable While the library comes with a range of built-in functions, it is also customizable. Developers can modify the pre-built functions or extend the library’s capabilities to suit their specific needs. This flexibility allows you to use the library for a wide range of blockchain applications, whether you’re building simple dApps or complex, multi-chain systems.
Functions Features
API Ready: Your functions are automatically exposed as an API, ready to be called from your front-end or other services. This makes integration seamless, allowing your blockchain functions to be invoked directly from your application’s interface or external services.
Performance at Scale: QuickNode ensures smooth operation, even during peak loads, through its globally balanced, auto-scaling infrastructure. Whether your application experiences high demand or fluctuating traffic, you can count on reliable performance every time.
Blockchain Optimized: Use your function as a destination for Streams, and it will automatically activate when new data is piped in from your Stream. You can also activate your function via API and optionally specify a specific blockchain dataset to access within your function during activation. This streamlining of data flow enhances real-time processing and reduces latency.
Storage Access: Manage your Storage data seamlessly within your function. Whether it’s reading from or writing to data storage, QuickNode allows you to easily access and manage your data from within the function, enabling data-driven operations without additional complexity.
Cost Effective: QuickNode follows a pay-for-what-you-use model, with no upfront costs or long-term commitments. This makes it a cost-effective choice for developers, allowing you to scale your usage and expenses in line with your project’s requirements.
Key Use Cases for the QuickNode Function Library
Decentralized Application (dApp) Development For dApp developers, interacting with blockchain networks is an integral part of the process. The QuickNode Function Library simplifies this task by providing functions for querying blockchain data (such as transaction history, token balances, and block data) and interacting with smart contracts. Instead of spending time writing custom logic to interact with the blockchain, developers can use the pre-built functions to speed up their development workflow.
Transaction Management The QuickNode Function Library allows developers to manage blockchain transactions effortlessly. Whether it's sending tokens, interacting with smart contracts, or executing other on-chain actions, developers can use the library to perform these operations efficiently. Pre-built functions help handle transaction creation, signing, broadcasting, and tracking, ensuring that developers can focus on the functionality of their applications rather than the intricacies of transaction management.
Blockchain Data Analytics Blockchain analytics is crucial for tracking and visualizing blockchain data. With the QuickNode Function Library, developers can easily fetch data related to blocks, transactions, wallets, and smart contracts. This data can then be analyzed, visualized, and presented in a user-friendly format. Whether you're building an explorer or a tool for transaction monitoring, the library provides the necessary building blocks to get started.
Wallet Integration Many applications require wallet integration to enable users to interact with blockchain networks. With QuickNode's library, developers can quickly retrieve wallet balances, monitor transactions, and perform wallet-related actions. By leveraging the library, developers can seamlessly integrate wallet functionalities into their applications, supporting a wide range of wallet services across multiple blockchains.
Cross-Chain Interoperability As blockchain ecosystems grow, interoperability between different networks becomes increasingly important. The QuickNode Function Library helps developers overcome interoperability challenges by providing functions that facilitate cross-chain communication. Whether it’s Ethereum to Solana, or Polkadot to Cosmos, the library makes it easier for developers to interact with multiple blockchain networks.
Benefits of Using the QuickNode Function Library
Saves Time and Effort One of the most significant benefits of the QuickNode Function Library is the amount of time it saves developers. By offering pre-built, tested functions for common blockchain tasks, developers can save countless hours of coding and debugging. Rather than building every component from scratch, developers can simply integrate the library’s functions and focus on the core aspects of their application.
Reduces Complexity Blockchain development often involves complex interactions with nodes, APIs, and smart contracts. The QuickNode Function Library abstracts much of this complexity by providing simple functions that do all the heavy lifting behind the scenes. Developers can interact with blockchain networks without needing to understand the full technical details of each protocol, making it easier to build blockchain-based applications.
Increased Reliability Building custom blockchain functions from scratch can be error-prone. The QuickNode Function Library, on the other hand, is designed and maintained by a team of experts, ensuring that the functions are reliable and bug-free. Developers can trust that the library’s functions will work as expected, reducing the likelihood of encountering issues during development.
Comprehensive Support With QuickNode, developers get access to comprehensive support. Whether you’re new to blockchain development or an experienced developer, the QuickNode team is there to provide assistance. The QuickNode Function Library comes with extensive documentation, example code, and tutorials that make it easy to get started and troubleshoot any issues you encounter.
Scalability Blockchain applications often need to scale to handle increasing traffic and data. The QuickNode Function Library is built with scalability in mind, ensuring that it can handle large volumes of requests without compromising performance. Whether you’re building a small application or a large-scale platform, the library’s functions are designed to scale with your needs.
How to Use the QuickNode Function Library
Before using the QuickNode Function Library, you’ll need to set up a QuickNode account and obtain an API key. QuickNode offers access to a variety of blockchain networks, so you’ll need to select the network you want to work with and configure your environment.
Functions can be triggered in three primary ways:
Test Activations:
Manually activate your function in the function editor available within the QuickNode Developer Portal.Streams Activation:
Assign your function as a destination for a Stream. The function is automatically triggered when the Stream delivers data. Learn more about using functions as Stream destinations.API Activation:
On the function's overview page in the QuickNode Developer Portal, you’ll find a unique API endpoint. This endpoint can be directly called to trigger the function. Discover the datasets accessible for API activations.
Supported Chains
When triggered via API, functions can seamlessly access blockchain data from supported chains and networks listed below. Teams with unique needs can contact QuickNode for assistance, though the self-serve experience covers the following chains:
Chain | Mainnet | Testnets |
Arbitrum | ✅ | Sepolia |
Arbitrum Nova | ✅ | |
Avalanche C-Chain | ✅ | Fuji |
Base | ✅ | Sepolia |
Bera | Coming soon | bArtio |
Blast | ✅ | Sepolia |
BNB Smart Chain | ✅ | Testnet |
Celo | ✅ | |
Cyber | ✅ | Sepolia |
Ethereum | ✅ | Holesky, Sepolia |
Fantom | ✅ | |
Fraxtal | ✅ | |
Gnosis | ✅ | |
Immutable zkEVM | ✅ | Testnet |
Mantle | ✅ | Sepolia |
Mode | ✅ | |
Optimism | ✅ | Sepolia |
Polygon | ✅ | Amoy |
Polygon zkEVM | ✅ | |
Scroll | ✅ | Testnet |
Solana | ✅ | Devnet, Testnet |
TRON | ✅ | |
zkSync | ✅ | Sepolia |
Xai | ✅ | Sepolia |
Zora | ✅ |
Configuring Your Function
Function Name: Specify a unique name for your function.
Runtime: Currently supports Node.js v20.
Description: Add markdown-supported descriptions for clarity.
Timeout Limit: Set a runtime limit between 5 and 60 seconds for your function.
Function Editor
The integrated code editor allows you to develop, test, and refine your function code.
Features:
Code View: Write the logic executed during API calls or when data is delivered via Streams.
Testing: Run tests against blockchain datasets and review activation results.
Package Access: Use all packages included in the selected runtime.
Key-Value Store Integration
Easily manage Key-Value Store data within your functions. Supported features include creating lists, adding/removing items, and managing key-value sets. To learn more about Key-Value Store, please visit the Key-Value Store documentation.
async function main(params) {
const results = {};
try {
results.qnGetAllLists = await qnLib.qnGetAllLists();
results.qnAddListItem = await qnLib.qnAddListItem('testList', 'testItem');
results.qnContainsListItem = await qnLib.qnContainsListItem('testList', 'testItem');
results.qnRemoveListItem = await qnLib.qnRemoveListItem('testList', 'testItem');
results.qnUpsertList = await qnLib.qnUpsertList('testList', { add_items: ['item1'] });
results.qnAddSet = await qnLib.qnAddSet('testSet', 'testValue');
results.qnGetSet = await qnLib.qnGetSet('testSet');
} catch (error) {
console.error('Error during method tests:', error);
}
return { message: 'Test Results', results };
}
Available Key-Value Store features within functions
Lists
qnUpsertList
: Creates or updates a new list in Key-Value Store.qnGetList
: Retrieves all items from a specific list in Key-Value Store.qnGetAllLists
: Retrieves all lists in Key-Value Store.qnAddListItem
: Adds an item to a specific list in Key-Value Store.qnRemoveListItem
: Removes an item from a specific list in Key-Value Store.qnContainsListItem
: Checks if an item exists in a specific list in Key-Value Store.qnDeleteList
: Deletes a specific list in Key-Value Store.
Sets
qnAddSet
: Creates a key-value set in Key-Value Store.qnBulkSets
: Creates and removes bulk key-value sets in Key-Value Store.qnDeleteSet
: Deletes a key-value set from Key-Value Store.qnGetSet
: Retrieves the value of a specific key from Key-Value Store.qnListAllSets
: List all keys for sets in Key-Value Store.
The QuickNode Developer Portal provides a centralized interface to monitor metrics, view logs, edit and test functions, and access unique REST API endpoints for seamless activation and integration into workflows.
Conclusion
The QuickNode Function Library empowers developers to create, deploy, and manage serverless functions seamlessly integrated with blockchain data. Its robust features—such as API-ready endpoints, optimized performance at scale, blockchain-specific integrations, and key-value storage capabilities—make it a powerful tool for building modern Web3 applications. Whether you are leveraging the library for real-time event processing, enhancing application workflows, or managing decentralized data, QuickNode offers a streamlined, scalable, and cost-effective solution.
With its intuitive interface, extensive documentation, and support for a wide range of blockchain networks, the Function Library bridges the gap between complex blockchain operations and user-friendly application development. The flexibility to activate functions via API, Streams, or manual testing ensures that developers can adapt their workflows to specific use cases, enabling greater efficiency and productivity.
I'd love to connect with you on Twitter | LinkedIn | Instagram.
Additional Resources
Learn more about QuickNode Function: QuickNode Function
QuickNode Discord Community: discord.com/invite/quicknode
About QuickNode
QuickNode is dedicated to constructing the infrastructure necessary to uphold the forthcoming era of Web3. Since 2017, we've collaborated with numerous developers and organizations, facilitating the expansion of decentralized applications (dApps) and offering superior access to over 29 blockchains. Sign up for our newsletter to access further content like this and remain up-to-date with the latest developments in Web3!