LogoLogo
WebsiteDiscordTelegramTwitter
  • 🏠Witnet Oracle Docs
  • Introduction
    • ❓What is Witnet?
      • ⚙️Oracle Architecture
      • 🪙The Witnet Coin (Wit)
      • 👛Wallets
      • 🤔Frequently Asked Questions
      • 😎Awesome Witnet
    • 🚀Quick Tutorials
      • 📈Price Feeds
      • 🎲Randomness
      • 🌐APIs and HTTP GET/POST
      • ⛏️Mining Wit
  • Smart contracts developers
    • ⛓️Supported chains
    • 🔮Wit/Oracle
      • HTTP GET Requests in Solidity
      • HTTP POST Requests in Solidity
      • Query GraphQL APIs in Solidity
      • Dynamic Requests in Solidity
      • UsingWitnet Inheritance
      • API Reference
        • Solidity API
          • Solidity Contracts
            • WitnetRequestBoard
        • Javascript API
        • RADON API
          • RADON Type System
          • RADON Errors
      • Multi-chain Addresses
    • 💹Wit/Price Feeds
      • How To Use Witnet Price Feeds
      • Update Conditions
      • Code Examples
      • API Reference
      • Multi-chain Addresses
        • Arbitrum Price Feeds
        • Avalanche Price Feeds
        • Base Price Feeds
        • Boba Price Feeds
        • Celo Price Feeds
        • Conflux Price Feeds
        • Cronos Price Feeds
        • Dogechain Price Feeds
        • Elastos Price Feeds
        • Ethereum Price Feeds
        • Gnosis Chain Price Feeds
        • Kaia Price Feeds
        • Kava Price Feeds
        • KCC Price Feeds
        • Mantle Price Feeds
        • Meter Price Feeds
        • Metis Price Feeds
        • Moonbeam Price Feeds
        • OKX Price Feeds
        • Optimism Price Feeds
        • Polygon Price Feeds
        • Reef Price Feeds
        • Scroll Price Feeds
        • Syscoin Price Feeds
        • Ultron Price Feeds
        • Request new price feed or chain support
    • 🎲Wit/Randomness
      • Generating Randomness
      • WitnetRandomness Contract
      • Low-level Requests
      • Code Examples
      • API Reference
      • Multi-chain Addresses
    • 🏗️Guides
      • 📖Solidity Contracts
        • Appliances
          • 📃WitnetPriceFeeds
          • 📃WitnetRandomness
        • Core
          • 📃WitnetOracle
          • 📃WitnetRadonRegistry
          • 📃WitnetRequest
          • 📃WitnetRequestFactory
          • 📃WitnetRequestTemplate
        • Mockups
          • 📃UsingWitnet
          • 📃UsingWitnetRandomness
          • 📃UsingWitnetRequest
          • 📃UsingWitnetRequestTemplate
          • 📃WitnetRandomnessRequestConsumer
          • 📃WitnetRequestConsumer
          • 📃WitnetRequestTemplateConsumer
      • 🧙Solidity Wizard
    • 🎓Tutorials
      • Building a Satoshi/Wei custom price feed
  • Witnet Node Operators
    • 🖥️Requirements
    • 🚀Witnet Node Quick Start Guide (Docker)
    • 🔎Next steps
    • 📄CLI Reference
    • 🤓Advanced Setups
      • Run Witnet as a systemd service
      • Run Witnet as a docker compose service
      • Paranoid mode (Witnet over proxies and Tor)
      • Configuration file
  • Witnet Node Developers
    • 🏗️Integration Guide
      • Node API Reference
      • Wallet API Reference
    • 🗜️Compile witnet-rust from Source Code
Powered by GitBook
On this page
  • Running Witnet-Rust
  • Witnet-Rust Components
  • Witnet-Rust node component
  • Witnet-Rust wallet component

Was this helpful?

Edit on GitHub
  1. Witnet Node Developers

Integration Guide

This guide is aimed at developers willing to integrate their software with Witnet and the Wit coin in such a way that they can manage addresses, balances, and create and verify transactions.

PreviousConfiguration fileNextNode API Reference

Last updated 3 months ago

Was this helpful?

Running Witnet-Rust

The Witnet Foundation-supported reference implementation of the Witnet protocol is .

Witnet-Rust can be easily run:

Witnet-Rust Components

Witnet-Rust contains two different components that provide different degrees of wallet functionality:

  • node, which implements a Witnet full node with an internal single-account, single-address wallet and a .

  • wallet, which implements a compliant, multi-account, multi-address wallet, and a .

Witnet-Rust node component

The Witnet-Rust node component is standalone — you can run it on its own and it will provide full-node functionality: syncing up the Witnet block chain, validate transactions and blocks in real time, and (optionally) propose blocks.

Integration architecture:
[YOUR APP] → [WITNET-RUST NODE] → [WITNET NETWORK]

Once a node instance is fully synced, its offers a minimal single-account, single-address wallet.

docker run -d \
    --name witnet_node \
    --volume ~/.witnet:/.witnet \
    --publish 21337:21337 \
    --publish 21338:21338 \
    --restart always \
    witnet/witnet-rust

Here is a quick guide on how to interact with a node using the JSON-RPC interface and any TCP client:

Witnet-Rust wallet component

The Witnet-Rust wallet component is NOT standalone. It requires a connection to an instance of the node component that will act as its "backend":

Integration architecture:
[YOUR APP] → [WITNET-RUST WALLET] → [WITNET-RUST NODE] → [WITNET NETWORK]
Sheikah Wallet app architecture:
[SHEIKAH UI*] → [WITNET-RUST WALLET*] → [WITNET-RUST NODE] → [WITNET NETWORK]

* The Sheikah UI and the Witnet-Rust wallet are run in the user's computer.

For users looking for the maximum degree of privacy, it is recommended that they run their own instance of the node component, because otherwise they may be disclosing their addresses and balances to 3rd parties, as the queries between the wallet and node components need to be sent over the Internet.

Running a Witnet-Rust node with the exposed on local port 21338 can easily be achieved with this Docker one-liner:

The full list of supported JSON-RPC methods is available in the :

There is also a that exposes all the node functionality and uses the JSON-RPC API under the hood:

Witnet Foundation operates a cluster of publicly available node instances that act as the backend for the wallet component contained within the , which follows exactly the same architecture:

The of the wallet component is different than the one from the node not because it has much more advanced wallet functionality, and uses a WebSockets transport instead of plain TCP (this is to enable web wallets and similar apps).

A full reference of the can be found here:

🏗️
Witnet-Rust
as a Docker container
as a docker-compose service
as a systemd service
compiling from source code
JSON-RPC API over TCP
BIP-32
Hierarchical Deterministic
JSON-RPC API over WebSockets
JSON-RPC over TCP API
JSON-RPC API
Node API Reference
Node API Reference
command line client (CLI)
📄CLI Reference
Sheikah Witnet wallet desktop app
JSON-RPC API
Wallet API
Wallet API Reference
Interacting with a Witnet Node via a Remote Procedure Call (RPC)Medium
Logo