Documentation
    Preparing search index...

    Variable Base64Const

    Base64: { decode: typeof decode; encode: typeof encode }

    UTF-8 base64 codec used by @tonconnect/protocol. Wraps the NaCl helpers with optional URL-safe encoding and a typed decoder that can yield a string, an object (JSON-parsed), or the raw byte array.

    Type declaration

    import { Base64 } from '@tonconnect/protocol';

    const encoded = Base64.encode({ hello: 'world' });
    const obj = Base64.decode(encoded).toObject<{ hello: string }>();
    const bin = Base64.decode(Base64.encode('Hello')).toUint8Array();