# README
Emulator Examples
This package contains code samples that interact with the Flow Emulator.
- Running the emulator with the Flow CLI
- Running the examples
- Get Blocks
- Get Accounts
- Get Events
- Get Collection
- Execute Script
- Send Transaction
- Create Account
- Add Account Key
- Deploy Contract
- Transaction Arguments
- Transaction Signing
Running the emulator with the Flow CLI
The emulator is bundled with the Flow CLI, a command-line interface for working with Flow.
Installation
Follow these steps to install the Flow CLI.
Starting the server
Start the emulator by running the following command in this directory:
flow emulator start -v
The -v flag enables verbose log output, which is useful for testing
Running the examples
In a separate process, run any of the example programs below. Watch the emulator logs to see transaction output.
Get Blocks
Get blocks by ID, height or latest on Flow.
make get-blocks
Get Accounts
Get accounts by address in specific block on Flow
make get-accounts
Get Events
Get events emitted by transactions.
make get-events
Get Collection
make get-collection
Execute Script
make send-transactions
Send Transaction
make send-transactions
Create Account
make create-account
Add Account Key
Add a key to an existing account.
make add-account-key
Deploy Contract
Deploy a Cadence smart contract.
make deploy-contract
Transaction Arguments
Submit a transaction with Cadence arguments.
make transaction-arguments
Transaction Signing
Single Party, Single Signature
Sign a transaction with a single account.
make single-party
Single Party, Multiple Signatures
Sign a transaction with a single account using multiple signatures.
make single-party-multisig
Multiple Parties
Sign a transaction with multiple accounts.
make multi-party
Multiple Parties, Two authorizers
Sign a transaction with multiple accounts and authorize for both of them.
make multi-party-two-authorizers
Multiple Parties, Multiple Signatures
Sign a transaction with multiple accounts using multiple signatures.
make multi-party-multisig
Verify Signature
User Signature
Sign an arbitrary user message.
make user-signature
User Signature Verify all
make user-signature-verify-all
User Signature Verify any
make user-signature-verify-all
Verify Events
Verify events emitted in a block.
make verify-events