SDK: helper classes
Thin wrappers around the stand-in token, asset title, and price oracle the PoC uses for tests and local chains.
Helper classes
The SDK ships three thin wrappers for the PoC's stand-in assets. Each is constructed around a ChainLike and an address, exposes its address, and has a static deploy that returns a bound instance.
Token
- static deploy(chain, name, symbol, decimals, from): Promise<Token>
- Deploy a stand-in ERC-20 (stablecoin or RWA token) and wrap it.
- mint(to, amount, from)
- Mint tokens to an address.
- approve(spender, amount, from)
- Approve a spender. Call this before
open,addCollateral,repay,payInstallment, orliquidateAssetso the registry can pull funds, passingencumbra.addressas the spender. - balanceOf(who): Promise<bigint>
- Read an address's token balance.
Nft
- static deploy(chain, name, symbol, from): Promise<Nft>
- Deploy a stand-in ERC-721 asset title (one physical asset equals one non-fungible token) and wrap it.
- mint(to, tokenId, from)
- Mint a title to an owner.
- approve(to, tokenId, from)
- Approve the registry for a title — call this before
openAsset. - ownerOf(tokenId): Promise<string>
- Read who holds a given title.
MockOracle
- static deploy(chain, from): Promise<MockOracle>
- Deploy the PoC price oracle and wrap it.
- setPrice(token, priceWad, from)
- Set the price of one collateral token in debt-token units, where a WAD means parity.
- setAllowZero(v, from)
- Simulate a broken feed: when enabled, the oracle returns the stored price verbatim, so a price of 0 stays 0.
Keep reading
The calls that change a lien are on SDK: lifecycle verbs, and the read-only calls are on SDK: views and types. The deploy example on the SDK reference shows Token.deploy in use.