Overview
Goldsky provides high-performance data infrastructure for NEAR, making it easy to extract, transform, and load on-chain data to power both application and analytics use cases using Turbo Pipelines. NEAR is a sharded, proof-of-stake blockchain designed for usability and scalability. With its unique sharding mechanism called Nightshade, NEAR enables high throughput and low transaction costs while maintaining decentralization.Benefits of building with NEAR datasets
Building with NEAR datasets on Goldsky provides several key advantages:- Real-time data access - Stream NEAR data to your infrastructure with sub-second latency
- Complete historical data - Access the full history of NEAR transactions, receipts, and execution outcomes
- Flexible transformations - Use SQL to filter, aggregate, and transform data before it reaches your database
- Sharding-aware - Work with NEAR’s unique sharded architecture through structured datasets
- Cross-contract tracking - Follow execution flows across multiple contracts using receipts and execution outcomes
- Scalable infrastructure - Handle high-throughput NEAR data without managing your own nodes
Getting started
To use Goldsky, you’ll need to create an account, install the CLI, and log in.Install Goldsky's CLI and log in
Install Goldsky's CLI and log in
-
Install the Goldsky CLI:
For macOS/Linux:
For Windows:Windows users need to have Node.js and npm installed first. Download from nodejs.org if not already installed.
- Go to your Project Settings page and create an API key.
-
Back in your Goldsky CLI, log into your Project by running the command
goldsky loginand paste your API key. -
Now that you are logged in, run
goldskyto get started:
Turbo Pipelines
Turbo pipelines allow users to replicate data into their own infrastructure (any of the supported sinks) in real time. For a complete overview of how to deploy Turbo pipelines, including a video walkthrough, check the Quickstart guide.Watch this video walkthrough for a complete guide to using pipelines with NEAR.
Working with NEAR datasets
Goldsky provides real-time streaming of NEAR datasets, including all historical data, for both mainnet and testnet. The following datasets are currently available:| Dataset | Description |
|---|---|
| Receipts | Receipts created during execution of transactions. |
| Transactions | Transactions pulled from chunks as found on the NEAR blockchain. |
| Execution Outcomes | Execution outcomes generated from both transaction and receipt executions. |
Deploying NEAR pipelines with Turbo
Turbo pipelines are defined using YAML configuration files and deployed via the Goldsky CLI. Here’s the workflow:- Create a pipeline configuration file - Define your sources, transforms, and sinks in a YAML file
- Validate your configuration - Run
goldsky turbo validate near-pipeline.yamlto check for errors - Deploy the pipeline - Run
goldsky turbo apply -f near-pipeline.yamlto deploy - Monitor your pipeline - Use
goldsky turbo logs near-pipeline.yamlto view logs andgoldsky turbo inspect near-pipeline.yamlto see live data
Remember to first create a Secret in order for Turbo Pipelines to be able to write the data into the database of your choice.
Example Turbo pipeline configuration
One powerful use case is creating a dedicated “failure feed” for debugging. By pulling directly from thenear.execution_outcomes dataset and filtering for failed transactions, you can turn a massive stream of data into actionable insights.
With a simple SQL transform, you can filter execution outcomes to only capture failures:
- The Source - Pull directly from the
near.execution_outcomesdataset - The Filter - With one line (
WHERE status <> 'SUCCESS'), turn a massive stream of data into a dedicated “Failure Feed” - The Result - A clean table that any developer can sink into Postgres to build a debugging dashboard in minutes
near-execution-outcomes-failures.yaml
goldsky turbo apply -f near-execution-outcomes-failures.yaml to deploy the pipeline.