/** * Lightweight, zero-dependency protobuf decoder for Bilibili SEND_GIFT_V2. * * Handles only the subset of wire types and fields required by SendGiftV2. * Designed for performance: no reflection, no codegen, no allocations beyond * the target object. * * @see {@link https://github.com/lovelyyoshino/Bilibili-Live-API/blob/master/API.live_websocket.md} */ export interface SendGiftV2Medal { anchor_uid: number; medal_level: number; medal_name: string; color_start: number; color: number; color_border: number; color_end: number; guard_level: number; } export interface SendGiftV2Effect { img_basic: string; img_2: string; img_gif: string; } export interface SendGiftV2Receiver { uname: string; uid: number; } export interface SendGiftV2Gift { gift_id: number; gift_name: string; num: number; price: number; total_coin: number; coin_type: string; tid: string; timestamp: number; action: string; receiver: SendGiftV2Receiver; effect?: SendGiftV2Effect; } export interface SendGiftV2Data { uid: number; uname: string; face: string; medal?: SendGiftV2Medal; gift: SendGiftV2Gift; } /** * Decode a base64-encoded SEND_GIFT_V2 protobuf payload. * * @param base64 - The raw `data.pb` string from a SEND_GIFT_V2 message. * @returns Decoded gift data. * @throws If the input is not valid base64 or protobuf. */ export declare function decodeSendGiftV2(base64: string): SendGiftV2Data;