@bifrostwallet/assets
Curated catalog of data providers, validators, tokens, contracts and dapps for Bifrost Wallet.
Adding a data provider or validator: CONTRIBUTING.md. Tokens, contracts, and dapps are curated by the Bifrost Wallet team.
Using the package
Pin one version and commit the lockfile.
npm install @bifrostwallet/assets --save-exact
yarn add @bifrostwallet/assets --exact
createAssets() is the package entry. baseURL is optional. Omit it and logo URLs use jsDelivr for this release tag:
https://cdn.jsdelivr.net/gh/bifrostwallet/assets@<version>/data/
<version> is the package version and the git tag. That tag is written into the package at build time. Returned logoURL values are absolute. A missing record is still null.
An exact version tag is immutable on jsDelivr. Cache headers last one year, and the file is stored permanently, so this pinned URL does not go stale (Caching). Self-host when you want a copy you control. The steps are in Self-hosting logos.
Don't load logos from raw.githubusercontent.com. GitHub's raw file host is not a CDN: it rate-limits requests per IP and returns HTTP 429 under load. jsDelivr is built for this traffic.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets();
const provider = assets.getProvider(
"eip155:14",
"0x1650d2760baee638c034200dedcbe17b050d0364",
);
// provider.logoURL is an absolute URL.
console.log(provider?.logoURL);
Pass baseURL when you host the files yourself. A trailing slash is optional. The examples further down do that.
Optional: versioned logo URLs
Pass versionedLogos: true to append ?v= and the first 8 hex digits of logoHash to every logoURL. A replaced logo then gets a new URL, so caches never serve the old file. It is off by default, and URLs are unchanged without it.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
versionedLogos: true,
});
// https://assets.example.com/tokens/eip155-14/native/logo.webp?v=<8 hex>
console.log(assets.getNativeToken("eip155:14")?.logoURL);
Optional: check a downloaded logo
Download the logo, then check the file bytes with verifyLogoHash(bytes, logoHash). It is true when the SHA-256 of those bytes equals logoHash: 64 lowercase hex characters, no 0x prefix. Hash the original bytes, not a transcoded or resized image (image proxies and CDN optimizers change bytes), and don't use response.text() or a blob URL round-trip that alters bytes.
import { createAssets, verifyLogoHash } from "@bifrostwallet/assets";
const assets = createAssets();
// Optional: createAssets({ baseURL: "https://assets.example.com/" }) when you host the files.
const entry = assets.getProvider(
"eip155:14",
"0x1650d2760baee638c034200dedcbe17b050d0364",
);
if (!entry) throw new Error("missing catalog entry");
const response = await fetch(entry.logoURL);
if (!response.ok) throw new Error("Could not download logo");
const bytes = new Uint8Array(await response.arrayBuffer());
if (bytes.byteLength > 256 * 1024) throw new Error("logo exceeds 256KB");
if (!verifyLogoHash(bytes, entry.logoHash)) throw new Error("logo hash mismatch");
// Display or cache the image only after the hash matches.
Self-hosting logos
Logo files are not in the npm package. Clone this repository and check out the same version as your installed @bifrostwallet/assets.
git clone https://github.com/bifrostwallet/assets
cd assets
git checkout <version>
<version> is the installed package version, for example 1.2.2.
Upload only the logo.webp files under data/. Keep those relative paths (tokens/…, providers/…, contracts/…, dapps/…) so baseURL can join them.
Google Cloud:
gcloud storage rsync data gs://<your-bucket> --recursive --exclude='^(?!.*logo\.webp$).*'
Amazon S3:
aws s3 sync data s3://<your-bucket> --exclude '*' --include '*logo.webp'
Point the package at the public URL of that directory:
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
});
When you bump @bifrostwallet/assets, check out that version and upload again before you ship. The default jsDelivr URL changes with the version. A copy you host does not.
Listed providers
Picker and discovery views use providers with listed: true. A confirmation or a transaction detail still shows a provider the user already chose, including one that is not listed.
Chain ids are CAIP-2: eip155:14 (Flare), eip155:19 (Songbird), and xrpl:0 (XRPL). An unknown chain id throws. A missing provider returns null.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
});
const listed = assets.getListedProviders("eip155:14");
// [
// {
// name: "Bifrost Wallet",
// identityAddress: "0x1650d2760baee638c034200dedcbe17b050d0364",
// listed: true,
// logoURL:
// "https://assets.example.com/providers/eip155-14/0x1650d2760baee638c034200dedcbe17b050d0364/logo.webp",
// validators: ["NodeID-5oLazJm5PtV8JFb2GpzuCVMZdi1GxkwYP", ...],
// ...
// },
// ...
// ]
assets.getListedProviders(chainId) returns providers with listed: true. assets.getProviders(chainId) returns every provider on that chain. assets.getProvider(chainId, identityAddress) returns one provider, or null, and the address match ignores case. assets.getManagementGroupProviders(chainId) returns providers with managementGroup: true.
Listed validators
assets.getListedValidators(chainId) returns one entry per NodeID for providers with listed: true, in that provider order. Each entry has nodeId, identityAddress, name, and the operating provider's logoURL. assets.getValidators(chainId) returns every validator on the chain, including validators of providers that are not listed.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
});
const validators = assets.getListedValidators("eip155:14");
// [
// {
// nodeId: "NodeID-5oLazJm5PtV8JFb2GpzuCVMZdi1GxkwYP",
// identityAddress: "0x1650d2760baee638c034200dedcbe17b050d0364",
// name: "Bifrost Wallet",
// logoURL:
// "https://assets.example.com/providers/eip155-14/0x1650d2760baee638c034200dedcbe17b050d0364/logo.webp",
// },
// // ...
// ]
Validators for one identity
assets.getValidatorsByIdentity(chainId, identityAddress) returns that provider's validators. The address match ignores case, and a missing identity returns an empty array. assets.findProviderByValidator(chainId, nodeId) returns the provider that operates that NodeID, or null. The NodeID includes the NodeID- prefix.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
});
const own = assets.getValidatorsByIdentity(
"eip155:14",
"0x1650d2760baee638c034200dedcbe17b050d0364",
);
const provider = assets.findProviderByValidator(
"eip155:14",
"NodeID-5oLazJm5PtV8JFb2GpzuCVMZdi1GxkwYP",
);
// own[0] is
// {
// nodeId: "NodeID-5oLazJm5PtV8JFb2GpzuCVMZdi1GxkwYP",
// identityAddress: "0x1650d2760baee638c034200dedcbe17b050d0364",
// name: "Bifrost Wallet",
// logoURL:
// "https://assets.example.com/providers/eip155-14/0x1650d2760baee638c034200dedcbe17b050d0364/logo.webp",
// }
// followed by three more NodeIDs for that identity.
// provider is { name: "Bifrost Wallet", identityAddress: "0x1650d2760baee638c034200dedcbe17b050d0364", listed: true, ... }
Other lookups
assets.getTokens(chainId), assets.getToken(chainId, address), assets.getNativeToken(chainId), and assets.getXrplToken(issuer, currency) read the token catalog. getXrplToken keeps the issuer and currency case. getNativeToken also covers Bitcoin, Litecoin and Dogecoin (bip122:<genesis hash prefix>, e.g. bip122:000000000019d6689c085ae165831e93) and XRP (xrpl:0). XRP is not in getTokens("xrpl:0"), which lists issued tokens only. assets.getContracts and assets.getContract read contract names, including named XRPL accounts (xrpl:0). getContract matches an EVM address in any case and an XRPL r-address exactly. assets.getDapps() returns every dapp, and assets.getDapp(slug) returns one dapp or null. assets.getDappCategories() returns the browser chips. Show a dapp with logoURL, the same as a provider or token. The records themselves are described in CONTRIBUTING.md.
import { createAssets } from "@bifrostwallet/assets";
const assets = createAssets({
baseURL: "https://assets.example.com/",
});
const flr = assets.getNativeToken(
"eip155:14",
);
// {
// name: "Flare",
// symbol: "FLR",
// decimals: 18,
// address: null,
// ...
// }
const wflr = assets.getToken(
"eip155:14",
"0x1d80c49bbbcd1c0911346656b529df9e5c2f783d",
);
// {
// name: "Wrapped Flare",
// symbol: "WFLR",
// decimals: 18,
// address: "0x1d80c49bbbcd1c0911346656b529df9e5c2f783d",
// logoURL:
// "https://assets.example.com/tokens/eip155-14/0x1d80c49bbbcd1c0911346656b529df9e5c2f783d/logo.webp",
// ...
// }
const issued = assets.getXrplToken(
"rcA8X3TVMST1n3CJeAdGk1RdRCHii7N2h",
"ETH",
);
// {
// name: "GateHub ETH",
// symbol: "ETH",
// issuer: "rcA8X3TVMST1n3CJeAdGk1RdRCHii7N2h",
// currency: "ETH",
// ...
// }
const chips = assets.getDappCategories();
// [
// {
// id: "featured",
// label: "Featured",
// dapps: [],
// },
// {
// id: "dex",
// label: "DEX",
// dapps: ["sparkdex-ai", "blazeswap-xyz", ...],
// },
// ...
// ]
Signatures
Operator signatures ship from @bifrostwallet/assets/signatures, so a normal import does not download them. Some listings stay unsigned until 31 December 2026 (date to be confirmed with the provider community). Curator fields such as listed sit outside the signature. An unknown chain throws. A missing provider or signature returns an empty array.
The signature is EIP-712 (eth_signTypedData_v4) over ProviderListing, self-signed by the identity address. Changing any signed field needs a new signature. logoHash is the SHA-256 of logo.webp: 64 lowercase hex characters, with no 0x prefix.
New listings are signed with version 2. It adds three fields to the signed message: signedAt (the entry's date), nonce (a single-use value issued by the listing service) and sealedHash. They are stored on the signature entry, so the date of a version 2 signature cannot be changed without breaking it, and an older signature cannot be submitted again. Version 1 entries (no version field) remain valid. getProviderListingVerification returns the right typed data for each entry.
Domain
| Field |
Value |
name |
"Bifrost Assets" |
version |
"2" for entries with "version": 2, otherwise "1" |
chainId |
The id in eip155-<id>. Flare is 14. Songbird is 19. |
salt |
EIP712_DOMAIN_SALT, the precomputed keccak256 of the UTF-8 string https://bifrostwallet.com |
import { verifyTypedData } from "viem";
import { getProviderListingVerification } from "@bifrostwallet/assets/signatures";
const [entry] = getProviderListingVerification(
"eip155:14",
"0x1650d2760baee638c034200dedcbe17b050d0364",
);
await verifyTypedData(entry); // true
EIP712_DOMAIN_SALT, PROVIDER_LISTING_TYPES, PROVIDER_LISTING_PRIMARY_TYPE, and providerListingTypedData({ message, chain }) are exported from @bifrostwallet/assets for anyone building version 1 typed data themselves. For version 2, add signedAt (string), nonce (string) and sealedHash (bytes32) after contentHash and use domain version "2", or use getProviderListingVerification.
jsDelivr all.json (Legacy)
Fetch provider all.json from jsDelivr on @main when you are not installing the package. logoURL in that file is already absolute and uses the same @main snapshot. There is no token all.json. Token lists are not published that way; use createAssets.
@main is the moving catalog, not a release tag. Provider all.json logo URLs in this repository use that unpinned branch. Updates there can take up to 12 hours to appear because jsDelivr caches branch URLs for up to 12 hours (Caching). The npm package pins @<version> so its logos match the installed snapshot.
Compared with the package and logos you host:
- No version pin. The URL is
@main, so changes arrive unannounced and can break you.
- List and logo requests from your users go to jsDelivr.
- Providers and their validator NodeIDs only. No tokens, contracts, dapps, or dapp categories.
- No TypeScript types, and no helpers for lookups, listed filters, or finding a provider from a validator.
- No signature checks. Those ship on
@bifrostwallet/assets/signatures.
- Fetch
https://cdn.jsdelivr.net/gh/bifrostwallet/assets@main/data/providers/<chain>/all.json. The chain directory uses a hyphen, such as eip155-14 (Flare) or eip155-19 (Songbird).
- For listed providers, keep records with
listed: true. Check logoHash against the logo bytes before you display the image. logoURL is absolute.
- For listed validator NodeIDs, read
validators on those records. The logo is the provider logo.
const response = await fetch(
"https://cdn.jsdelivr.net/gh/bifrostwallet/assets@main/data/providers/eip155-14/all.json",
);
const providers = await response.json();
const listed = providers.filter((provider) => provider.listed);
const logoURL = listed[0]?.logoURL;
const nodeIds = listed.flatMap((provider) => provider.validators);
// logoURL is
// "https://cdn.jsdelivr.net/gh/bifrostwallet/assets@main/data/providers/eip155-14/0x1650d2760baee638c034200dedcbe17b050d0364/logo.webp"
// nodeIds starts ["NodeID-5oLazJm5PtV8JFb2GpzuCVMZdi1GxkwYP", ...]
Security
Report vulnerabilities as described in SECURITY.md.
Repository rules checked in CI
- Build origin:
package-attestations.json records the source repository of every package that publishes provenance. The required Supply chain check verifies registry signatures and build attestations on every pull request and fails with a DO NOT MERGE message. Checked by scripts/security/verify-attestations.sh in .github/workflows/supply-chain.yml.
- Committed archives: nobody reviews a zip, so a commit can swap an archive in
.yarn/cache together with its yarn.lock checksum. The required Supply chain check compares every committed archive with what the registry serves on every pull request and fails with a DO NOT MERGE message. Local installs run the same check. Checked by ./yarn install --immutable --check-cache in .github/workflows/supply-chain.yml.