import { Convert } from 'pvtsutils' ; export function fromBase64URL ( x ) { return new Uint8Array ( Convert . FromBase64Url ( x ) ) ; } export function toBase64URL ( x ) { return Convert . ToBase64Url ( x ) ; } export function toHex ( x ) { return Convert . ToHex ( x ) ; } export function fromHex ( x ) { if ( x . startsWith ( '0x' ) ) x = x . slice ( 2 ) ; return new Uint8Array ( Convert . FromHex ( x ) ) ; }