Automata 1RPC
  • LLM relay
    • Overview
  • Using the LLM API
    • Getting started
    • Models
    • Payment
    • Authentication
    • Errors
  • Web3 Relay
    • Overview
  • USING THE WEB3 API
    • Getting started
    • Transaction sanitizers
    • Networks
    • Payment
      • How to make a payment
        • Fiat Payment
        • Crypto Payment
      • How to top up crypto payment
      • How to change billing cycle
      • How to change from fiat to crypto payment
      • How to change from crypto to fiat payment
      • How to upgrade or downgrade plan
      • How to cancel a plan
      • How to update credit card
      • How to view payment history
      • Policy
    • Errors
  • Getting help
    • Discord
    • Useful links
Powered by GitBook
On this page
  1. USING THE WEB3 API

Getting started

1RPC.io provides a single endpoint that protects users' privacy and assets.

1rpc.io and 1rpc.ai have separate account systems. API keys for each platform are unique and cannot be used interchangeably.

  • Zero tracking: Enforces that user metadata is not retained once the request has been successfully relayed. This is also known as burn after relaying.

  • Metadata masking: Metadata attached to a user's request is placed with 1RPC's own.

  • Random dispatching: Requests are dispatched randomly to providers to break the linkage between wallets when requests are sent from different addresses. Shuffling requests in this manner makes it impossible to log the association between accounts with the same private key.

  • Transaction sanitizers: Filter and validate transactions before they are relayed to the blockchain.

Build with 1RPC

Replace the existing URL with 1RPC's endpoint to interact with the blockchain.

curl --request POST \
--url https://1rpc.io/eth \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "jsonrpc": "2.0", "method": "eth_blockNumber" }'
package main

import (
    "context"
    "fmt"
    "github.com/ethereum/go-ethereum/ethclient"
)

func main() {
    const url = "https://1rpc.io/eth"  // url string
    
    rpcClient,err := ethclient.Dial(url)
    
    if err != nil {
        panic(err)
    }
    
    blockNumber, err := rpcClient.BlockNumber(context.Background())
    
    if err != nil {
        panic(err)
    }
    
    fmt.Println(blockNumber)
}
const Web3 = require('web3');

const url = 'https://1rpc.io/eth'  // url string

const web3 = new Web3(new Web3.providers.HttpProvider(url));

web3.eth.getBlockNumber((error, blockNumber) => {
    if(!error) {
        console.log(blockNumber);
    } else {
        console.log(error);
    }
});
from web3 import Web3
            
def test_block_number(self):
    url = 'https://1rpc.io/eth'  # url string
    
    web3 = Web3(HTTPProvider(url))
    print(web3.eth.block_number)
$ wscat -c wss://1rpc.io/dot

> {"jsonrpc":  "2.0", "id": 0, "method":  "system_chainType"}

PreviousOverviewNextTransaction sanitizers

Last updated 1 month ago