Practical overview
When it fits
Use it when building or testing Flow applications against a local network, especially when you need to repeat tests against controlled state.
Who it is for
- Cadence smart-contract developers
- Flow dApp builders
- Teams running local integration tests
Documented uses
- Run Flow transactions, scripts and tests locally without deploying to a live network.
- Create repeatable local test states and roll back to a selected block height.
- Connect a Flow project workflow with Flow CLI and FCL.
Requirements & limits
The project is open source under the Apache-2.0 license.
- Flow CLI startup requires a flow.json file; the README points to flow init for creating one.
- The emulator can also be used as a module in a Go project.
- Flow CLI configuration uses flags, while Docker configuration uses environment variables.
- The API is described by the project as having near feature parity with mainnet and testnet.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add the Flow Emulator module to a Go project
Install the emulator module and initialize a blockchain instance in Go code.
Before you start
- A Go project.
- A Flow service private key suitable for decoding; the example leaves the private-key string empty, so supply an appropriate value for your use.
Steps
Install the module with the command below.
go get github.com/onflow/flow-emulatorIn Go code, decode the private key with
crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, ...).Create emulator options with
emulator.WithServicePublicKey(privKey.PublicKey(), crypto.ECDSA_P256, crypto.SHA3_256).Initialize the blockchain with
emulator.NewBlockchain(opts...); the example then accesses it withblockchain.GetAccount(address).
Expected outcome
The Go project has an initialized emulator blockchain instance that can be used through its blockchain methods.
Guide limitations
- The example does not provide a usable private-key value or full imports and error handling.
- The source demonstrates an account lookup but does not provide a complete transaction or testing workflow.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- onflow/flow-emulator · Official homepage title · retained in its source language

