function isMultibase
isMultibase(obj: any): obj is Multibase

Type guard for a Multibase value.

Beware! Mathematically, this function is not fool-proof. After all, a random string may start with a 'z' or a 'u', and contain only characters that are part of the required base vocabulary. To increase the probability of success, an attempt is made to decode the multibase value. If successful, the value can indeed be accepted as a multibase with a reasonable probability.

Parameters

obj: any

Return Type

obj is Multibase

Usage

import { isMultibase } from "lib/utils.ts";