@saberhq/spl-token-icons
TypeScript icon, indicating that this package has built-in type declarations

0.1.1259 • Public • Published

spl-token-icons

Icons pre-downloaded to be able to be delivered efficiently via a GitHub CDN.

Usage

const parts = token.logoURI.split(".");
<img
  src={`https://spl-token-icons.static-assets.ship.capital/icons/${
    token.chainId
  }/${token.address}.${parts[parts.length - 1] ?? ""}`}
/>;

or

yarn add @saberhq/spl-token-icons
import { getTokenIcon } from "@saberhq/spl-token-icons";

const icon = getTokenIcon({ address: "...", chainId: "..." });

Updating

rm -r icons/
yarn add @solana/spl-token-registry
yarn icons:fetch

License

Apache 2.0

Package Sidebar

Install

npm i @saberhq/spl-token-icons

Weekly Downloads

0

Version

0.1.1259

License

Apache-2.0

Unpacked Size

2.27 MB

Total Files

20

Last publish

Collaborators

  • simplyianm
  • shipcap