routes namespace packages a Sauce program as an Eco intent. Base(body, options) and the other chain globals (installed by importing the root package) forward to routes.openRoute(destination, body, options), which returns a PendingSauceRoute; .nest(...) adds child intents and .reward(...) returns a BuiltIntent.
sdk/dist/routes/vault.d.ts, sdk/dist/routes/portal.d.ts.
Generated from the type declarations shipped in
@eco-incorp/sauce 0.99.4. Each entry shows the package authors’ JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see architecture and deployments.routes.predictVaultAddress
Function · sdk/dist/routes/vault.d.ts
The off-chain twin of IntentSource._getVault(intentHash) -> Clones.predict(intentHash, CREATE2_PREFIX). Throws (rather than silently computing against a missing/malformed
vaultInitCodeHash) since there is no safe baked default - see the module doc.
routes.vaultInitCodeHash
Function · sdk/dist/routes/vault.d.ts
keccak256(proxyCreationCode ++ abi.encode(implementation)) - the initCodeHash half of the
Clones.predict formula, for a caller who has the real type(Proxy).creationCode bytes (e.g.
pulled from a deployment artifact) and only needs the implementation-address encoding step done
correctly.
routes.VaultConfig
Interface · sdk/dist/routes/vault.d.ts
routes.approvalTxs
Function · sdk/dist/routes/portal.d.ts
One approve(portal, amount) per DISTINCT reward token, in first-seen order - see the module
doc’s funding-mechanics table: the allowance is to the PORTAL, never the vault. Several reward
entries naming the same token collapse into ONE approve for the LARGEST of their amounts, never
their sum: IntentSource._fundToken compares each leg against the vault’s TOTAL balance and
short-circuits, so the largest leg is the binding allowance. Emits nothing for
reward.nativeAmount (that needs value, not an approval); a token whose largest entry is zero
is emitted as approve(portal, 0) rather than filtered. Does NOT emit allowance/balanceOf
read-calls to let a caller skip a redundant approve - see isIntentFundedCall for the “is this
already funded?” question.
routes.fundTx
Function · sdk/dist/routes/portal.d.ts
Portal.fund(destination, routeHash, reward, allowPartial). value = reward.nativeAmount.
routes.intentHashCall
Function · sdk/dist/routes/portal.d.ts
Portal.getIntentHash(destination, routeBytes, reward) - the on-chain cross-check for our
off-chain hashIntent.
routes.intentVaultAddressCall
Function · sdk/dist/routes/portal.d.ts
Portal.intentVaultAddress(destination, routeBytes, reward) - the PRIMARY vault path (an eth_call
the caller performs; see vault.ts#predictVaultAddress for the zero-RPC offline option).
routes.isIntentFundedCall
Function · sdk/dist/routes/portal.d.ts
Portal.isIntentFunded(destination, routeBytes, reward).
routes.publishAndFundTx
Function · sdk/dist/routes/portal.d.ts
Portal.publishAndFund(destination, routeBytes, reward, allowPartial). value = reward.nativeAmount.
routes.publishTx
Function · sdk/dist/routes/portal.d.ts
Portal.publish(destination, routeBytes, reward). value is always 0n.
routes.PORTAL_ABI
Variable · sdk/dist/routes/portal.d.ts
The bytes-route overload only - see the module doc for why. One overload per name, so
encodeFunctionData({ abi: PORTAL_ABI, functionName }) can never pick the wrong signature.
routes.PortalReadCall
Interface · sdk/dist/routes/portal.d.ts
An eth_call request plus its own decoder - the caller performs the RPC, this module never does.
routes.PortalTarget
Interface · sdk/dist/routes/portal.d.ts
Where to submit. portal is the SOURCE-chain Portal - never defaulted, never invented.
routes.PortalTx
Interface · sdk/dist/routes/portal.d.ts
A submittable transaction request. value is always explicit, never omitted.
