Deprecation Notice: Quicknode Functions
Deprecation Notice: Quicknode Functions
Quicknode Functions will be deprecated and will no longer be available soon.
:::
Overview
The Node.js v20 Runtime enables you to build and deploy serverless functions using the Node.js v20 environment. This runtime provides access to the Quicknode SDK, popular packages and web3 libraries, as well as the Node.js core modules.
Available Packages
The Node.js 20 runtime includes the following useful packages and web3 libraries which can be used inside your function:
@aws-sdk/client-sqs@3.678.0@azure/service-bus@7.9.5@azure/storage-blob@12.25.0@coral-xyz/anchor@0.30.1@quicknode/sdk@2.3.0@solana/spl-token@0.4.9@solana/web3.js@1.95.4axios@1.7.7bn.js@5.2.1date-fns@3.6.0ethers@6.13.1kafkajs@2.2.4lodash@4.17.21mongodb@6.11.0mongoose@8.8.4pg@8.13.1redis@4.7.0twitter-api-v2@1.18.2web3@4.10.0
The Node.js v20 runtime also includes the following core modules:
assertbufferchild_processclusterconsolecryptodgramdnseventsfshttphttpsnetospathprocessquerystringreadlinestreamstring_decodertlsttyurlutilv8vmzlib
For more details, you can refer to the Node.js GitHub repository.
Using the Code Editor
Within the code editor, you can write and test your function using the core modules listed above. Here is a simple example of a Node.js function:
function main(params) {
// Extract dataset and network from metadata in params
const dataset = params.metadata.dataset;
const network = params.metadata.network;
return {
message: `This is data from the ${dataset} dataset on the ${network} network.`,
params
};
}