Skip to main content

Overview

Goldsky is the modern back-end for crypto-enabled products; the infrastructure layer between your application and the blockchain. We handle the complex, undifferentiated work of building on crypto rails: streaming real-time data, maintaining reliable chain connectivity, and executing onchain logic. Teams use Goldsky to ship faster and stay focused on their core product.

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. If you want to use Turbo or Compose, you’ll also need to install their respective CLI extensions.
  1. Install the Goldsky CLI: For macOS/Linux:
    curl https://goldsky.com | sh
    
    For Windows:
    npm install -g @goldskycom/cli
    
    Windows users need to have Node.js and npm installed first. Download from nodejs.org if not already installed.
  2. Go to your Project Settings page and create an API key.
  3. Back in your Goldsky CLI, log into your Project by running the command goldsky login and paste your API key.
  4. Now that you are logged in, run goldsky to get started:
    goldsky
    
If you already have the Goldsky CLI installed, install the Turbo extension by running:
goldsky turbo
This will automatically install the Turbo extension. Verify the installation:
goldsky turbo list
Make sure to update the CLI to the latest version before running Turbo commands: curl https://goldsky.com | sh
For a complete reference of all Turbo CLI commands, see the CLI Reference guide.
Compose is currently in private beta and access is invite-only. The following commands will not work unless you have been explicitly whitelisted by the Goldsky team. Enterprise customers can contact their Account Manager for expedited early access.
If you already have the Goldsky CLI installed, install the Compose extension by running:
goldsky compose install
To update to the latest version:
goldsky compose update
For more details, see the Compose quickstart guide.

Subgraphs

NOT COMPATIBLESubgraphs are designed for EVM-compatible chains and are not available for NEAR.NEAR uses a different virtual machine architecture. For NEAR data indexing, consider using Mirror or Turbo pipelines which support non-EVM chains.

Mirror

MAINNET SUPPORTEDMirror pipelines allow users to replicate data into their own infrastructure (any of the supported sinks) in real time, including both subgraphs as well as chain-level datasets (ie. blocks, logs, transactions, traces). Pipelines can be deployed on Goldsky in 3 ways:
  • Using Goldsky Flow on the dashboard, see walkthrough video here
  • Using the interactive CLI, by entering the command goldsky pipeline create <pipeline-name>. This will kick off a guided flow with the first step to choose the dataset type (project subgraph, community subgraph, or chain-level dataset). You'll then be guided through adding some simple filters to this data and where to persist the results.
  • Using a definition file, by entering the command goldsky pipeline create <pipeline-name> --definition-path <path-to-file>. This makes it easier to set up complex pipelines involving multiple sources, multiple sinks, and more complex, SQL-based transformations. For the full reference documentation on, click here.

Turbo

MAINNET SUPPORTEDTurbo pipelines provide high-performance streaming data pipelines with sub-second latency. Deploy a pipeline to start streaming NEAR data to your preferred destination.

Quick deploy

Create a new Turbo pipeline using the CLI:
Create pipeline
goldsky turbo deploy my-near-pipeline --chain near

Configuration file

For more complex pipelines, use a YAML configuration file:
near-pipeline.yaml
name: my-near-pipeline
sources:
  - type: evm
    chain: near
    start_block: latest

transforms:
  - type: sql
    query: |
      SELECT * FROM blocks

sinks:
  - type: postgres
    secret_name: MY_POSTGRES_SECRET
Deploy with:
Deploy from config
goldsky turbo deploy -f near-pipeline.yaml

Available chain slugs

Mainnet: nearFor the full configuration reference and available transforms, see the Turbo documentation.
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:
DatasetDescription
ReceiptsReceipts created during execution of transactions.
TransactionsTransactions pulled from chunks as found on the NEAR blockchain.
Execution OutcomesExecution outcomes generated from both transaction and receipt executions.
These datasets can be used as sources in your Turbo pipelines to stream NEAR data to any of the supported sinks.

Deploying NEAR pipelines with Turbo

Turbo pipelines are defined using YAML configuration files and deployed via the Goldsky CLI. Here’s the workflow:
  1. Create a pipeline configuration file - Define your sources, transforms, and sinks in a YAML file
  2. Validate your configuration - Run goldsky turbo validate near-pipeline.yaml to check for errors
  3. Deploy the pipeline - Run goldsky turbo apply -f near-pipeline.yaml to deploy
  4. Monitor your pipeline - Use goldsky turbo logs near-pipeline.yaml to view logs and goldsky turbo inspect near-pipeline.yaml to see live data
For a complete walkthrough, see the Turbo Pipelines Quickstart.
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 the near.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:
SELECT
  id,
  executor_id,
  status,
  gas_burnt,
  tokens_burnt,
  transaction_hash,
  signer_id,
  trigger_block_height,
  trigger_block_timestamp
FROM execution_outcomes
WHERE status <> 'SUCCESS'
The power of this approach:
  • The Source - Pull directly from the near.execution_outcomes dataset
  • 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
Here’s the complete Turbo pipeline configuration:
near-execution-outcomes-failures.yaml
name: near-execution-outcomes-failures
resource_size: s

sources:
  execution_outcomes:
    type: dataset
    dataset_name: near.execution_outcomes
    version: 1.1.0
    start_at: latest

transforms:
  failed_executions:
    type: sql
    primary_key: id
    sql: |
      SELECT
        id,
        executor_id,
        status,
        gas_burnt,
        tokens_burnt,
        transaction_hash,
        signer_id,
        trigger_block_height,
        trigger_block_timestamp
      FROM execution_outcomes
      WHERE status <> 'SUCCESS'

sinks:
  postgres_output:
    type: postgres
    from: failed_executions
    schema: public
    table: failed_execution_outcomes
    secret_name: YOUR_POSTGRES_SECRET
    primary_key: id
Add your corresponding secret name and run goldsky turbo apply -f near-execution-outcomes-failures.yaml to deploy the pipeline.

RPC Edge

NOT COMPATIBLERPC Edge is designed for EVM-compatible chains and is not available for NEAR.NEAR uses a different virtual machine architecture. For NEAR data access, consider using Mirror or Turbo pipelines which support non-EVM chains.

Compose

NOT YET AVAILABLECompose lets you build offchain-to-onchain systems that durably move data and execute logic between your application and the blockchain. Learn more about what you can build with Compose in the Compose documentation. Compose is not currently enabled for NEAR, but we'd love to change that. From the NEAR team? Book a call to explore enabling Compose for your ecosystem.
Building on NEAR? Contact us about dedicated infrastructure options.

Getting support

Can’t find what you’re looking for? Reach out to us at support@goldsky.com for help.