Erebuzdocs

findRoute()

Quote the best private lane between a source and destination.

Coming soon

The SDK is not yet publicly available, signatures below may change before launch.

Resolves the best privacy route for a transfer and returns a quote. Nothing moves until you pass the route to send().

const route = await erebuz.findRoute({
  from: { chain: "base", token: "USDC" },
  to: { chain: "arbitrum", address: "0xRecipient…" },
  amount: "100.00",
});

Parameters

NameTypeDescription
from.chainstringSource chain id, e.g. "base"
from.tokenstringToken symbol or address on the source chain
to.chainstringDestination chain id
to.addressstringRecipient address on the destination chain
amountstringHuman-readable amount to send

Returns

A Route object:

FieldTypeDescription
receivesstringAmount the recipient gets after fees
feestringTotal network fee (destination gas is covered)
compliancenumberCompliance score for the route, 0-100
settlesInstringExpected settlement time
expiresAtnumberUnix time after which the quote must be re-fetched

Errors

CodeMeaning
UNSUPPORTED_ROUTENo lane exists between the given chains/tokens
COMPLIANCE_REJECTEDSource funds failed screening
AMOUNT_TOO_SMALLAmount below the pool minimum for this lane

On this page