Skip to main content



type serializedTransaction = string;

To execute transactions from NEAR, the parameter serializedTransaction must be provided. These data are available through the near-api-js library, and comprehensive usage is explained in the link and the example below.


Consider the following example of connecting with a pre-deployed counter contract on the NEAR Testnet. The contract code is available on the repository.

You are required to have at least a certain amount of NEAR to execute a transaction that modifies the state of the contract. You can request faucet through the FAUCET tab in the wallet.

The code that follows sends a transaction that runs the contract's increment operation. The increment method employs the FunctionCall action type to add the counter value within the contract by the count value supplied as an input parameter.

Live Editor