@citizenwallet/sdk
Version:
An sdk to easily work with citizen wallet.
31 lines • 1.33 kB
TypeScript
import { CommunityConfig } from "../config";
export declare const generateLegacyReceiveLink: (baseUrl: string, config: CommunityConfig, account: string, amount?: string, description?: string) => string;
export declare enum QRFormat {
address = 0,
voucher = 1,
eip681 = 2,
eip681Transfer = 3,
receiveUrl = 4,
unsupported = 5,
walletConnectPairing = 6,
sendtoUrl = 7,
calldataUrl = 8
}
export declare const parseQRFormat: (raw: string) => QRFormat;
/**
* A tuple type representing parsed QR code data for various formats (address, EIP-681, sendto URL, etc.)
*
* @typedef {[string, string | null, string | null]} ParseQRData
*
* The tuple contains:
* - [0] address: The recipient's address or identifier (e.g., Ethereum address, username)
* - [1] value: The transfer amount or value (can be null if not specified)
* - [2] description: Additional message or description for the transfer (can be null if not specified)
* - [3] alias/ calldata
*/
type ParseQRData = [string, string | null, string | null, string | null];
export declare const parseQRCode: (raw: string) => ParseQRData;
export declare const parseAliasFromReceiveLink: (raw: string) => string | null;
export declare const parseMessageFromReceiveLink: (raw: string) => string | null;
export {};
//# sourceMappingURL=index.d.ts.map