/** * @import { Point2 } from "../../index.js" */ /** * @param {number[]} bytes * @param {boolean} truncate - force `bytes` to 32 bytes long, applying special padding to first and 32nd byte * @returns {bigint} */ export function decodeScalar(bytes: number[], truncate?: boolean): bigint; /** * @param {number[]} bytes * @returns {bigint} */ export function decodePrivateKey(bytes: number[]): bigint; /** * @param {bigint} x * @returns {number[]} */ export function encodeScalar(x: bigint): number[]; /** * The formula for the twisted Edwards curve is: * -x^2 + y^2 = 1 - d*x^2*y^2 * Calculating x from this we get (only y is stored in the encoded point): * y^2 - 1 = x^2*(1 - d*y^2) * x = sqrt((y^2 - 1)/(1 - d*y^2)) * @param {number[]} bytes * @returns {Point2} */ export function decodePoint(bytes: number[]): Point2; /** * @param {Point2} point * @returns {number[]} */ export function encodePoint(point: Point2): number[]; import type { Point2 } from "../../index.js"; //# sourceMappingURL=codec.d.ts.map