Const
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.
@tonconnect/protocol
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(); Copy
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();
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.