@gemini-wallet/core
Version:
Core SDK for Gemini Wallet integration with popup communication
35 lines • 1.2 kB
TypeScript
/**
* Utility functions for base64 encoding and decoding
* Compatible with both browser and Node.js environments
*/
/**
* Encodes a Uint8Array to a base64url string
* @param array - The Uint8Array to encode
* @returns The base64url encoded string
*/
export declare function encodeBase64(array: Uint8Array): string;
/**
* Decodes a base64url string to a Uint8Array
* @param base64url - The base64url encoded string
* @returns The decoded Uint8Array
*/
export declare function decodeBase64(base64url: string): Uint8Array;
/**
* Convert an ArrayBuffer or Uint8Array to a base64url string
* @param buffer - The buffer to convert
* @returns The base64url encoded string
*/
export declare function bufferToBase64URLString(buffer: ArrayBuffer | Uint8Array): string;
/**
* Convert a string to UTF-8 encoded Uint8Array
* @param value - The string to convert
* @returns The UTF-8 encoded Uint8Array
*/
export declare function utf8StringToBuffer(value: string): Uint8Array;
/**
* Convert a base64 string to hex string
* @param base64 - The base64 string to convert
* @returns The hex string
*/
export declare function base64ToHex(base64: string): string;
//# sourceMappingURL=base64.d.ts.map