token namespace emits SauceScript for token operations: ERC-20 on an EVM compile target, SPL Token on svm. It is TypeScript that writes SauceScript for a host program; a SauceScript program imports the @sauce/token library instead. token.Token.transfer({ token, to, amount }).toSauceScript("evm") returns an object whose source is a program routes.compileSauceProgram compiles. token.Token is also the root export Token.
@eco-incorp/sauce.
token.tokenProgramValueExpr
Function · @eco-incorp/sauce
The SauceScript expression for a SvmTokenProgramInput CPI-target VALUE. Defaults to "spl".
token.assertRefIsIdentifier
Function · @eco-incorp/sauce
token.newSvmEmitState
Function · @eco-incorp/sauce
token.accountParamType
Function · @eco-incorp/sauce
Account, Account<Writable>, Account<Signer> or Account<Writable, Signer>.
token.svmAccountParams
Function · @eco-incorp/sauce
Every account the program’s specs touch, in FIRST-USE order - the order a caller attaches them
and the order the manifest reports. A ref shared across ops (owner/tokenProgram by design)
appears once, holding the strongest role any op demanded of it.
token.svmAccountParamList
Function · @eco-incorp/sauce
The main(...) parameter list for specs, annotated with each slot’s required role.
token.svmTransferLines
Function · @eco-incorp/sauce
token.svmApproveLines
Function · @eco-incorp/sauce
token.svmBalanceExpression
Function · @eco-incorp/sauce
token.accountRefsForTransfer
Function · @eco-incorp/sauce
The account manifest refs, in attach order, for transfer/approve with the given refs.
token.accountRefsForApprove
Function · @eco-incorp/sauce
token.TOKEN_PROGRAM_BIGINT
Variable · @eco-incorp/sauce
Well-known SPL program ids, converted once to the bigint literal the identity check wants.
token.TOKEN_2022_PROGRAM_BIGINT
Variable · @eco-incorp/sauce
token.SvmEmitState
Interface · @eco-incorp/sauce
Per-program emission state: a token program is pinned at most once per ref per program.
token.SvmAccountParam
Interface · @eco-incorp/sauce
One main account parameter: the ref name and the role its annotation asserts.
