BlueWallet/class/contact-list.ts

15 lines
284 B
TypeScript
Raw Normal View History

2024-05-15 22:46:54 +01:00
import BIP47Factory from '@spsina/bip47';
2024-05-20 10:54:13 +01:00
2024-05-15 22:46:54 +01:00
import ecc from '../blue_modules/noble_ecc';
export class ContactList {
isPaymentCodeValid(pc: string): boolean {
try {
BIP47Factory(ecc).fromPaymentCode(pc);
return true;
} catch (_) {
return false;
}
}
}