@ultronswap-wormhole/sdk-icons
v1.10.34
Published
This package contains icons for all of the Wormhole connected [chains](https://docs.wormhole.com/wormhole/reference/blockchain-environments).
Readme
Wormhole Icons
This package contains icons for all of the Wormhole connected chains.
Installation
Basic
Install this package
npm install @ultronswap-wormhole/sdk-iconsUsage
Getting started is simple, just import Wormhole and the Platform modules you wish to support
import { Chain } from "@ultronswap-wormhole/sdk-base";
import { chainToIcon } from "@ultronswap-wormhole/sdk-icons";
function ChainIcon({chain}: {chain: Chain}) {
const icon = chainToIcon(chain);
return icon ? <img src={icon} alt={chain} height="32px" width="32px" /> : null
}Development
SVGs for each chain should be included only once in src/images/chains and they should be minified using a tool like SVGOMG to reduce the overall bundle size.
When a new chain is added, the strict typing should enforce that this package must be updated. In most cases, this should be as simple as dropping the SVG in /src/images/chains and running npm run gen
