Skip to content
Production

Endpoints

The mainnet endpoints the SDK uses, your own RPC, and services you run yourself.

loadNimbusSdk starts from the mainnet preset. The preset holds the programs, the supported tokens, every service's endpoint and the proving keys. So your app passes only where it serves the SDK's files.

Any endpoint you pass replaces the preset's, one at a time. sdk.settings.endpoints shows every endpoint after your options are applied.

The mainnet endpoints

The mainnet preset supports 57 tokens. These are its endpoints, read from the SDK when this site was built:

Optionmainnet presetGateway
endpoints.rpchttps://api.mainnet-beta.solana.comNo
endpoints.indexerhttps://data.api-v2.umbraprivacy.comNo
endpoints.contexthttps://context.api-v2.umbraprivacy.comNo
endpoints.guardians1: https://gateway.api-v2.umbraprivacy.com/guardian-share-node-relay-12: https://gateway.api-v2.umbraprivacy.com/guardian-share-node-relay-23: https://gateway.api-v2.umbraprivacy.com/guardian-share-node-relay-3Yes
endpoints.screeners0: https://gateway.api-v2.umbraprivacy.com/screenerYes
endpoints.dataEndorsers0: https://gateway.api-v2.umbraprivacy.com/data-endorserYes
endpoints.feeEnclavehttps://gateway.api-v2.umbraprivacy.com/fee-enclaveYes
endpoints.relayerhttps://gateway.api-v2.umbraprivacy.com/relayerYes
endpoints.coordinatorhttps://gateway.api-v2.umbraprivacy.com/process-coordinatorYes
endpoints.primitivesWasmYour app supplies itNo
provingKeyshttps://assets.api-v2.umbraprivacy.com/zk/No

"Gateway" marks the services that need the gateway token.

Use your own RPC

The preset's RPC is https://api.mainnet-beta.solana.com, Solana's public endpoint. It limits how often one client may call it, and syncing calls it often. Pass your provider's endpoint instead:

import {  } from "@umbra/nimbus-solana-web";

const  = await (
  { : "mainnet" },
  {
    : "/nimbus/",
    : { : "https://mainnet.your-rpc-provider.example" },
  },
);

Use your own services

The same endpoints option replaces any service, such as a relayer you run yourself:

import {  } from "@umbra/nimbus-solana-web";

const  = await (
  { : "mainnet" },
  {
    : "/nimbus/",
    : { : "https://relayer.your-app.example" },
  },
);

The guardians, screeners and data endorsers are lists of nodes, each with its nodeIndex. Guardian nodes are numbered from 1. Screener and data endorser nodes are numbered from 0.

A service the gateway fronts still receives the gateway token at its new address. The one exception is an address that shares its origin with a service reached directly, such as the RPC. That service gets no token, and its requests fail unauthorized.

Route through the coordinator

By default, the browser asks each service itself. With route: "coordinator", one service makes those requests for it, beside the other services. The requests a payment makes at one step go to it together, in one exchange.

import {  } from "@umbra/nimbus-solana-web";

const  = await (
  { : "mainnet" },
  { : "/nimbus/", : "coordinator" },
);

A busy service that turns a request away is asked again, up to three times in all.

Registration, the relayer's policy, following a payment, the RPC, the indexer and the prover stay direct on both routes. The mainnet preset configures the coordinator.

Next

Last updated

On this page