Skip to content
by Unity Nodes
LEARN · DOCUMENTATION

Documentation

Pages from 3 sources, kept in sync: the official NEAR documentation, documentation from teams building on NEAR, and readmes from their code. Search all of it, or start from a path below.

483pages
synced 45m ago3 sources
This week483pages updated upstreamNewestAccountsNov 4, 2026Official245pages from the official docs

Recently updated

47 pages
OfficialNomicon · DataStructures › Account
Accounts
Accounts Account ID NEAR Protocol has an account names system. Account ID is similar to a username. Account IDs have to follow the rules. Account ID Rules • minimum length is 2 • maximum length is 64
Nov 4, 2026
OfficialNomicon · GenesisConfig › RuntimeFeeConfig
ActionCreationConfig
actioncreationconfig Describes the cost of creating a specific action, Action. It covers the actions up to delegatecost. The fees of newer actions, such as global contract, state init and gas key acti
Nov 4, 2026
OfficialNomicon · RuntimeSpec
Actions
Actions There are a several action types in Near: ![allow(unused)] fn main() { pub enum Action { CreateAccount(CreateAccountAction), DeployContract(DeployContractAction), FunctionCall(FunctionCallActi
Nov 4, 2026
OfficialNomicon · RuntimeSpec › Scenarios
Cross-ContractCall
Cross-Contract Call This guide assumes that you have read the Financial Transaction section. Suppose Alice is a calling a function reservetrip(city: String, date: u64) on a smart contract deployed to
Nov 4, 2026
OfficialNomicon · RuntimeSpec › Scenarios
Financial Transaction
Financial Transaction Suppose Alice wants to transfer 100 tokens to Bob. In this case we are talking about native Near Protocol tokens, oppose to user-defined tokens implemented through a smart contra
Nov 4, 2026
OfficialNomicon · GenesisConfig › RuntimeFeeConfig
Fraction
Fraction A rational number. In code it is a Rational32. In the genesis config and in RPC responses it is a JSON array of two signed 32-bit integers, [numerator, denominator]. For example, [3, 10] mean
Nov 4, 2026
OfficialNomicon · ChainSpec
Light Client
Light Client Note: This page is out of date and may contain errors. Do not use it as the only reference when you build a light client. Have any light client implementation reviewed independently befor
Nov 4, 2026
OfficialNomicon · NetworkSpec
Messages
Messages All messages sent in the network are of type PeerMessage. A PeerMessage is encoded with Protocol Buffers , using the schema in network.proto . Some fields of that schema are bytes fields that
Nov 4, 2026
OfficialNomicon · RuntimeSpec
Receipts
Receipt All cross-contract (we assume that each account lives in its own shard) communication in Near happens through Receipts. Receipts are stateful in a sense that they serve not only as messages be
Nov 4, 2026
OfficialNomicon · RuntimeSpec
Refunds
Refunds When execution of a receipt fails or there is some unused amount of prepaid gas left after a function call, the Runtime generates refund receipts. The are 2 types of refunds: • Refunds for the
Nov 4, 2026
OfficialNomicon · RuntimeSpec › Components
Runtime Crate
Runtime crate Runtime crate encapsulates the logic of how transactions and receipts should be handled. If it encounters a smart contract call within a transaction or a receipt it calls near-vm-runner,
Nov 4, 2026
OfficialNomicon · GenesisConfig
RuntimeConfig
RuntimeConfig The structure that holds the parameters of the runtime, mostly economics. It is not part of genesis. Each nearcore release contains the runtime config for every protocol version (core/pa
Nov 4, 2026
OfficialNomicon · GenesisConfig
RuntimeFeeConfig
RuntimeFeesConfig Economic parameters for runtime actionreceiptcreationconfig type: Fee Describes the cost of creating an action receipt, ActionReceipt, excluding the actual cost of actions. datarecei
Nov 4, 2026
OfficialNomicon · ChainSpec › SelectingBlockProducers
Selecting Chunk and Block Producers
Selecting Chunk and Block Producers Background Note: this section describes the Simple Nightshade design as of March 2021. Since stateless validation (protocol version 69), block producers no longer t
Nov 4, 2026
OfficialNomicon · GenesisConfig › RuntimeFeeConfig
StorageUsageConfig
StorageUsageConfig Describes how the storage that an account uses is counted for storage staking. numbytesaccount type: u64 Number of bytes counted for the account record, including rounding up for th
Nov 4, 2026
OfficialNomicon · GenesisConfig
VMConfig
VMConfig Config of wasm operations. The fields from maxgasburnt to maxtotalloglength belong to the limit config. In the JSON view they are nested under the limitconfig key of wasmconfig. extcosts type
Nov 4, 2026
OfficialNomicon · DataStructures › AccessKey
Access Keys
Access Keys Access key provides an access for a particular account. Each access key belongs to some account and is identified by a unique (within the account) public key. Access keys are stored as acc
Nov 2, 2026
OfficialNomicon · GenesisConfig › RuntimeFeeConfig
AccessKeyCreationConfig
AccessKeyCreationConfig Describes the cost of creating an access key. fullaccesscost type: Fee Base cost of creating a full access access-key. functioncallcost type: Fee Base cost of creating an acces
Nov 2, 2026
OfficialNomicon · RuntimeSpec › AccountStorage
Account Receipt Storage
Account Receipt Storage There is a definition of all the keys and values we store in the Account Storage Received data key = receiverid: String,dataid: CryptoHash value = Option<Vec<u8 Runtime saves i
Nov 2, 2026
OfficialNomicon · RuntimeSpec
Applying chunk
Applying chunk Inputs and outputs Runtime.apply takes following inputs: • trie and current state root • validatoraccountsupdate • incomingreceipts • transactions and produces following outputs: • new
Nov 2, 2026
OfficialNomicon · DataStructures › Block
Block and Block Header
Block and Block Header The data structures for block and block headers are ![allow(unused)] fn main() { pub struct Block { /// Block Header pub header: BlockHeader, /// Headers of chunk in the block p
Nov 2, 2026
OfficialNomicon · ChainSpec
Block Processing
Block Processing This section covers how blocks are processed once they arrive from the network. Data Structures Please refer to this section for details about blocks and chunks. Validity of Block Hea
Nov 2, 2026
OfficialNomicon · ChainSpec
Chain Specification
Overview This chapter covers the NEAR Protocol chain specification. Chain Specification • Block Processing • Consensus • Light Client • Selecting Chunk and Block Producers • Transactions in the Blockc
Nov 2, 2026
OfficialNomicon · ChainSpec
Consensus
Consensus Definitions and notation For the purpose of maintaining consensus, transactions are grouped into blocks . There is a single preconfigured block G called genesis block . Every block except G
Nov 2, 2026
OfficialNomicon · RuntimeSpec › Components › BindingsSpec
Context API
Context API Context API mostly provides read-only functions that access current information about the blockchain, the accounts (that originally initiated the chain of cross-contract calls, the immedia
Nov 2, 2026
OfficialNomicon · RuntimeSpec › Preparation
Contract Preparation
Contract preparation This document describes the contract preparation and instrumentation process as well as the limitations this process imposes on the contract authors. In order to provide high perf
Nov 2, 2026
OfficialNomicon
Data Structures
Overview This chapter describes various data structures used by NEAR Protocol. Data Structures • Access Keys • Accounts • Block and Block Header • Data Types • Merkle Proofs • Transaction
Nov 2, 2026
OfficialNomicon · DataStructures
Data Types
Data Types type CryptoHash = [u8; 32] A sha256 or keccak256 hash. AccountId = String Account identifier. Provides access to user's state. type MerkleHash = CryptoHash Hash used by a struct implementin
Nov 2, 2026
OfficialNomicon · GenesisConfig › RuntimeFeeConfig
DataReceiptCreationConfig
DataReceiptCreationConfig Describes the cost of creating a data receipt, DataReceipt. basecost type: Fee Base cost of creating a data receipt. costperbyte type: Fee Additional cost per byte sent.
Nov 2, 2026
OfficialNomicon · RuntimeSpec › Components › BindingsSpec
Economics API
Economics API Accounts own certain balance; and each transaction and each receipt have certain amount of balance and prepaid gas attached to them. During the contract execution, the contract has acces
Nov 2, 2026
Showing 1 to 30 of 47Search all sources →