createSmartRouter()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / createSmartRouter
Function: createSmartRouter()
Section titled “Function: createSmartRouter()”createSmartRouter(
registry):SmartRouter
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:4806
Create a new SmartRouter instance
Parameters
Section titled “Parameters”registry
Section titled “registry”Settlement registry with registered backends
Returns
Section titled “Returns”SmartRouter instance
Example
Section titled “Example”const registry = new SettlementRegistry()registry.register(nearIntentsBackend)registry.register(zcashBackend)
const router = createSmartRouter(registry)const routes = await router.findBestRoute({ ... })