import { DEFAULT_WEIGHT } from "./set-pointer-multiple";
export function FundmeError(err: string): string {
return "Fundme.js: " + err;
}
export const addressNotFound = "address not found.";
export const addressIsNotAString = "address must be a string.";
export const getCurrentPointerAddressMustClientSide =
"can't use getCurrentPointerAddress() server-side.";
export const weightNotFound = "entries .weight not found.";
export function weightIsNotANumber(str: string) {
return `${str} has weight that is not a number. It has been set to ${DEFAULT_WEIGHT} (default).`;
}
export const invalidAddress = "invalid Web Monetization pointer address is given.";
// multiple pointers
export const getWinningPointerMustBeANumber =
"all pointers' weight during calculating a winning pointer must have type of number.";
// default address
export const defaultAddressNotFound =
"default address not found. Use setDefaultAddress(str: string) to set it first.";
export const invalidDefaultAddress = "invalid default address.";
export const defaultAddressArrayCannotBeEmpty = "invalid default address.";
// utils
export const canOnlyCleanStringCustomSyntax = "can only clean custom syntax with typeof string.";
// about meta tag for Web Monetization API
export const metaTagNotFound = "web monetization meta tag is not found.";
export const metaTagMultipleIsFound =
'multiple found - Web Monetization API only support a single meta tag.';
// pointers template
export const noTemplateFound = "no monetization template is found.";
export const failParsingTemplate = "fails to parse address from .";
export const templateSinglePointerHasWeight =
"found single but has weight - only address will be parsed.";
// script json template
export const cannotParseScriptJson =
"cannot parse JSON from