Skip to content

createSmartRouter()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / createSmartRouter

createSmartRouter(registry, options?): SmartRouter

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:8018

Create a new SmartRouter instance

SettlementRegistry

Settlement registry with registered backends

SmartRouterOptions

Router configuration options

SmartRouter

SmartRouter instance

const registry = new SettlementRegistry()
registry.register(nearIntentsBackend)
registry.register(zcashBackend)
const router = createSmartRouter(registry, {
cacheTtlMs: 30_000,
backendTimeoutMs: 5_000,
})
const routes = await router.findBestRoute({ ... })