token namespace emits SauceScript for token operations: ERC-20 on an EVM compile target, SPL Token on svm. token.Token is also installed as the default global Token.
sdk/dist/token/api.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.token.TokenSauceScript
Interface · sdk/dist/token/api.d.ts
token.TokenCall
Interface · sdk/dist/token/api.d.ts
token.TokenBinding
Interface · sdk/dist/token/api.d.ts
What Token(<addr>) yields inside a route body - the wrapper form, not the runtime API.
Route-body calls are positional (Token(a).approve(spender, amt)) where the runtime
[TokenApi] takes a spec object, because the body is compiled to Sauce bytecode rather than
executed: token-rewrite.ts#rewriteTokenFactory replaces the callee with IERC20.at before the
compiler sees it, and these signatures are what let a typed closure body typecheck on the way
there. Nothing calls these at run time, which is why they live here rather than on TokenApi.
token.TokenFactory
Interface · sdk/dist/token/api.d.ts
The call signature the ambient Token global carries, intersected onto [TokenApi] by
gen-route-globals.mjs - the same way each chain global is ChainGlobals[...] & ChainContracts.
Deliberately NOT on TokenApi itself: the runtime Token export is a frozen object and is not
callable, so typing it as callable would promise something that throws. The ambient declaration
describes what is legal in a route body, where the call never survives to run.
token.TokenApi
Interface · sdk/dist/token/api.d.ts
token.Token
Variable · sdk/dist/token/api.d.ts
The universal token interface - ERC20 on an EVM compile target, SPL Token on svm. See
sdk/src/token/index.ts for the module overview. Installed as the DEFAULT GLOBAL Token (zero
import) by sdk/src/routes/globals.ts; also available as the named export token.Token.
