UNPKG

@aptos-labs/ts-sdk

Version:
17 lines • 993 B
import type { Fp2 } from "@noble/curves/abstract/tower.js"; import type { WeierstrassPoint, WeierstrassPointCons } from "@noble/curves/abstract/weierstrass.js"; export declare const G1_SIZE = 48; export declare const G2_SIZE = 96; /** Evaluates the short Weierstrass curve equation `x³ + a·x + b` at `x` over the field of `p`. */ export declare function weierstrassEquation<T>(x: T, p: WeierstrassPointCons<T>): T; export declare function g1ToBytes(p: WeierstrassPoint<bigint>): Uint8Array; /** * Compressed-G1 deserializer with prime-order subgroup check, matching aptos-core `ts-batch-encrypt`. */ export declare function bytesToG1(bytes: Uint8Array): WeierstrassPoint<bigint>; export declare function g2ToBytes(p: WeierstrassPoint<Fp2>): Uint8Array; /** * Compressed-G2 deserializer with prime-order subgroup check, matching aptos-core `ts-batch-encrypt`. */ export declare function bytesToG2(bytes: Uint8Array): WeierstrassPoint<Fp2>; //# sourceMappingURL=curveSerialization.d.ts.map