Watr Developer Portal
  • Home
  • Quickstart
    • Block Explorer
    • Creating a Polkadot Wallet
    • Requesting Watr Tokens
    • Connecting to Testnet
    • Keystore Setup
    • Submitting a Transaction
    • Building & Running Locally
  • Builders
    • Adding an Asset
    • Substrate Contracts
    • Ethereum Contracts
      • Deploy ERC-20 Contracts
      • Interact with ERC-20 Contract
      • Polkadot/Ethereum Address Translation
      • Add Watr to Metamask Wallet
      • Send WATR to/from Metamask Wallet
      • Launch local Ethereum block explorer
      • Remix
    • Watr SS58 Spec
  • Running A Node
    • Node Types
    • Standard Requirements
    • Deployment
Powered by GitBook
On this page
  1. Quickstart

Connecting to Testnet

PreviousRequesting Watr TokensNextKeystore Setup

Last updated 2 years ago

The simplest way to build around Watr is to use the polkadot.js rpc client. You can download the Polkadot RPC Client .

Connecting to the network is as easy as specifying which RPC endpoint to connect to

import { WsProvider, ApiPromise } from "@polkadot/api"

const WATR_ENDPOINT = "wss://rpc.dev.watr.org/"
const provider: WsProvider = new WsProvider(WATR_ENDPOINT)
const api = await ApiPromise.create({ provider })
here