Tokens
The function that names the token of a history item.
Tokens shows where a token's decimals come from, and how to format amounts and show names and logos.
findMintByIdentifier
Use it to name the token of a history item. A history item names its token by a 32-byte value derived from the mint address, not by the address itself.
function findMintByIdentifier(
sdk: NimbusSdk,
args: { readonly mintIdentifier: Uint8Array },
): NimbusMint | undefined;Types used: NimbusSdk, NimbusMint
Example
import { } from "@umbra/nimbus-solana-web";
import type { HistoryPage, NimbusSdk } from "@umbra/nimbus-solana-web";
declare const : NimbusSdk;
declare const : HistoryPage;
for (const of .) {
for (const of .) {
const = (, { : .. });
.(.., ?.);
}
}Parameters
Prop
Type
Returns
NimbusMint | undefined
The mint, with its address, token program and decimals; none when the preset lists no mint with that identifier.
NimbusSdkError with reason "misconfigured" when mintIdentifier is shorter
than 32 bytes.
Finds the preset mint a note or an intent names by its mint identifier, such as a
HistoryPage entry's note.mintIdentifier.
Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/mints.ts.
Last updated