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:
| Option | mainnet preset | Gateway |
|---|---|---|
endpoints.rpc | https://api.mainnet-beta.solana.com | No |
endpoints.indexer | https://data.api-v2.umbraprivacy.com | No |
endpoints.context | https://context.api-v2.umbraprivacy.com | No |
endpoints.guardians | 1: 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-3 | Yes |
endpoints.screeners | 0: https://gateway.api-v2.umbraprivacy.com/screener | Yes |
endpoints.dataEndorsers | 0: https://gateway.api-v2.umbraprivacy.com/data-endorser | Yes |
endpoints.feeEnclave | https://gateway.api-v2.umbraprivacy.com/fee-enclave | Yes |
endpoints.relayer | https://gateway.api-v2.umbraprivacy.com/relayer | Yes |
endpoints.coordinator | https://gateway.api-v2.umbraprivacy.com/process-coordinator | Yes |
endpoints.primitivesWasm | Your app supplies it | No |
provingKeys | https://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