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.
514pages
synced 33m ago3 sources
Official
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
Official
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
Official
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
Official
ExtCostsConfig
ExtCostsConfig base type: Gas Base cost for calling a host function. readmemorybase type: Gas Base cost for guest memory read readmemorybyte type: Gas Cost for guest memory read writememorybase type:
Nov 2, 2026
Official
Fee
Fee Costs associated with an object that can only be sent over the network (and executed by the receiver). sendsir Fee for sending an object from the sender to itself, guaranteeing that it does not le
Nov 2, 2026
Official
Function Call
Function Call In this section we provide an explanation how the FunctionCall action execution works, what are the inputs and what are the outputs. Suppose runtime received the following ActionReceipt:
Nov 2, 2026
Official
Math API
Math API randomseed ![allow(unused)] fn main() { randomseed(registerid: u64) } Returns random seed that can be used for pseudo-random number generation in deterministic way. Panics • If the size of th
Nov 2, 2026
Official
Merkle Proofs
Merkle Proofs Many components of NEAR Protocol rely on Merkle root and Merkle proofs. For an array of sha256 hashes, we define its merkle root as: CRYPTOHASHDEFAULT = [0] 32 def combinehash(hash1, has
Nov 2, 2026
Official
Miscellaneous API
Miscellaneous API ![allow(unused)] fn main() { valuereturn(valuelen: u64, valueptr: u64) } Sets the blob of data as the return value of the contract. Panics • If valuelen + valueptr exceeds the memory
Nov 2, 2026
Official
Promises API
Promises API promisecreate ![allow(unused)] fn main() { promisecreate(accountidlen: u64, accountidptr: u64, methodnamelen: u64, methodnameptr: u64, argumentslen: u64, argumentsptr: u64, amountptr: u64
Nov 2, 2026
Official
Registers API
Registers API Registers allow the host function to return the data into a buffer located inside the host oppose to the buffer located on the client. A special operation can be used to copy the content
Nov 2, 2026
Official
Routing Table Exchange Algorithm
Routing table exchange algorithm Every node on the network stores its own copy of the Routing Graph . nearcore exchanges this graph in two steps. When a connection is set up, the two nodes do a full s
Nov 2, 2026
Official
Runtime
Runtime Runtime layer is used to execute smart contracts and other actions created by the users and preserve the state between the executions. It can be described from three different angles: going st
Nov 2, 2026
Official
Runtime Specification
Overview This chapter covers the NEAR Protocol runtime specification. Runtime Specification • Account Receipt Storage • Actions • Applying chunk • Components • Runtime Crate • Bindings Specification •
Nov 2, 2026
Official
StateRecord
StateRecord type: Enum Enum that describes one of the records in the state storage. Account type: Unnamed struct Record that contains account information for a given account ID. accountid type: Accoun
Nov 2, 2026
Official
Transaction
Transaction See Transactions documentation in the Runtime Specification section.
Nov 2, 2026
Official
Transactions
Transactions A transaction in Near is a list of actions and additional information. There are two versions of a transaction: ![allow(unused)] fn main() { pub enum Transaction { V0(TransactionV0), V1(T
Nov 2, 2026
Official
Transactions in the Blockchain Layer
Transactions in the Blockchain Layer A client creates a transaction, computes the transaction hash and signs this hash to get a signed transaction. Now this signed transaction can be sent to a node. W
Nov 2, 2026
Official
Trie API
Trie API Here we provide a specification of trie API. After this NEP is merged, the cases where our current implementation does not follow the specification are considered to be bugs that need to be f
Nov 2, 2026
Official
Upgradability
Upgradability This part of specification describes specifics of upgrading the protocol, and touches on few different parts of the system. Three different levels of upgradability are: • Updating withou
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Aider and Zed
Configure Aider and Zed to use NEAR AI Cloud as an OpenAI-compatible provider. NEAR AI Cloud exposes an OpenAI-compatible API, so Aider and Zed can use NEAR AI models with a base URL, an API key, and
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Available Models
Explore NEAR AI Cloud model catalog NEAR AI Cloud provides access to leading AI models, each optimized for different use cases ranging from advanced reasoning and tool calling to long-context processi
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Cline, Roo Code, and Kilo Code
Configure Cline, Roo Code, and Kilo Code with NEAR AI Cloud's OpenAI-compatible API. Cline, Roo Code, and Kilo Code can use NEAR AI Cloud through OpenAI-compatible provider settings. They share the sa
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Continue
Configure Continue to use NEAR AI Cloud through its OpenAI-compatible provider. Use Continue with NEAR AI Cloud by configuring Continue's OpenAI provider with the NEAR AI Cloud gateway base URL and a
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Cursor
Configure Cursor with NEAR AI Cloud through Cursor's OpenAI API key and base URL settings. [!WARNING] Limited support Cursor can accept an OpenAI API key and an overridden OpenAI-compatible base URL,
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Dify
Configure Dify with NEAR AI Cloud through the OpenAI-API-compatible model provider plugin. Dify can use NEAR AI Cloud through the OpenAI-API-compatible model provider plugin. Configure it as a custom
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Embeddings, Images, Audio & More
Use NEAR AI Cloud for embeddings, reranking, image generation, audio transcription, and PII detection — all inside TEEs NEAR AI Cloud is not limited to chat completions. The NEAR AI Cloud Gateway (clo
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Gateway Attestation
Verify the NEAR AI Cloud gateway attestation for requests sent to cloud-api.near.ai. gatewayattestation is evidence for the NEAR AI Cloud gateway. It is not evidence for a model environment. Use model
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Goose
Configure Goose to use NEAR AI Cloud as an OpenAI-compatible provider. Goose is an open-source AI agent from Block that runs as a desktop app and a CLI. It ships a first-class NEAR AI Cloud provider,
Nov 2, 2026
Ecosystem
NEAR AI Cloud: Image Provenance
Apply an image-provenance policy to configurations measured in NEAR AI Cloud gateway and model attestations. Image provenance is separate from hardware attestation. A verified quote can bind a configu
Nov 2, 2026
Showing 241 to 270 of 514Search all sources →