@ultratestbro/wdk-swidge-assets
v0.2.0
Published
Chain and asset catalog shared by the WDK Swidge modules.
Maintainers
Readme
@ultratestbro/wdk-swidge-assets
Chain and asset catalog shared by the WDK Swidge modules.
Installation
npm install @ultratestbro/wdk-swidge-assets @tetherto/wdk-walletWhat's inside
A dependency-free catalog of the chains and assets the venue modules route between: CAIP-2 chain ids, human labels, and per-asset symbol, contract or mint, decimals and 1Click asset id.
It is the reason a caller can say "USDT" on the source side at all — symbols are resolved here. Destination tokens are matched by contract address, mint or asset id instead, so a symbol passed as a destination resolves to nothing and the route comes back empty.
Lookup helpers (ccChain, ccAsset, ccAssetByToken) fail closed rather than guessing: a contract-less non-native entry never silently resolves to the chain's native coin.
Safety contract
- This is a support package, not a WDK protocol module: it implements no protocol interface and is installed as a dependency of the modules that do.
- Non-EVM token-source deposits use the official WDK account
transfer({ token, recipient, amount })capability. They fail closed when the bound account does not expose it; token metadata is never passed to nativesendTransaction(). - Provider credentials, affiliate settings, endpoints and enablement are explicit constructor options. The package reads no application environment variables.
- Before production use, validate with limited funds and configure fee caps appropriate for the source asset.
Links
- Source: https://github.com/ultratestbro/wdk-swidge-modules
- Upstream discussion: https://github.com/tetherto/wdk/issues/85
Licensed under Apache-2.0.
