node-red-near-protocol 1.0.3

Allows to run Near Protocol blockchain smart-contract methods on Node RED

npm install node-red-near-protocol

node-red-near-protocol

platform NPM version NPM

This module provides nodes to call smart contract methods and observe it from your automation Node-RED Project.

Install

To install the stable version use the Menu - Manage palette option and search for node-red-near-protocol, or run the following command in your Node-RED user directory - typically ~/.node-red:

npm i node-red-near-protocol

Create your first flow

  1. Add Near Contract node to workspase

  2. Double click it and configure contract.

  3. Set values to fields, fill in contract methods and press Done

    How to get your private key? Near Wallet

    Open Browser DevTools go to tab Application, open Local Storage and find private key.

    Another wallet

    Go to Settings - Backup Account Choose export method Private Key


  4. Press Deploy button. After succesful flow deploy you have to see similar contract node or error message.

  5. Add Contract Method node to workspase

  6. Double click it and configure method. Choose created before contract and method and press Done

  7. Method node has to change label

  8. To call contract we have to emit some event and pass some arguments. To do it let't add standard inject node to a workspace.

  9. Set arguments to payload field and press Done

  10. Add standart debug node to show result in debug console, connect nodes inputs and outputs and press Deploy. After that you can run contract by pressing to button on inject node.

    Execution error will be displayed in debug console and as a contract node status

    Execution succes result will be transmitted to next node. If contract call does not return any result next node will get { payload: {} }

Node Info

Version: 1.0.3
Updated 2 years, 2 months ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

9 in the last week

Nodes

  • Near Contract
  • Contract Method

Keywords

  • nodered
  • node-red
  • near-protocol
  • blockchain
  • smart-contract

Maintainers