import { FieldElement } from './fe'
-/* sqrt(-1) */
+/**
+ * √-1
+ */
export const fe_sqrtm1: FieldElement = StaticArray.fromArray<i32>([
-32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482, 0, 0
])
-/* 37095705934669439343138083508754565189542113879843219016388785533085940283555 */
+/**
+ * d = −121665 / 121666
+ * = 37095705934669439343138083508754565189542113879843219016388785533085940283555
+ */
export const ed25519_d: FieldElement = StaticArray.fromArray<i32>([
-10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116, 0, 0
])
-/* 16295367250680780974490674513165176452449235426866156013048779062215315747161 */
+/**
+ * 2d = −121665 / 60833
+ * = 16295367250680780974490674513165176452449235426866156013048779062215315747161
+ */
export const ed25519_d2: FieldElement = StaticArray.fromArray<i32>([
-21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199, 0, 0
])
+
+const PAGE_BYTELENGTH: i32 = 1 << 16
+export const BLOCKHASH_BYTELENGTH: i32 = 32
+export const KEY_BYTELENGTH: i32 = 32
+export const SIGNATURE_BYTELENGTH: i32 = 64
+export const MAX_VERIFY_BLOCKS: i32 = 64
+export const SIGNEDBLOCK_BYTELENGTH: i32 = BLOCKHASH_BYTELENGTH + SIGNATURE_BYTELENGTH
+export const MAX_VERIFY_BLOCKS_BYTELENGTH: i32 = MAX_VERIFY_BLOCKS * SIGNEDBLOCK_BYTELENGTH
+export const MAX_MESSAGE_BYTELENGTH: i32 = MAX_VERIFY_BLOCKS_BYTELENGTH > PAGE_BYTELENGTH ? MAX_VERIFY_BLOCKS_BYTELENGTH : PAGE_BYTELENGTH
//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
//! SPDX-License-Identifier: GPL-3.0-or-later
-import { KEY_BYTELENGTH } from '.'
import { Blake2b } from './blake2b'
+import { KEY_BYTELENGTH } from './constants'
import { crypto_derive } from './crypto_derive'
import { ge_scalarmult_base_tobytes } from './ge'
import { sc_muladd, sc_reduce } from './sc'
//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
//! SPDX-License-Identifier: GPL-3.0-or-later
-import { BLOCKHASH_BYTELENGTH, KEY_BYTELENGTH } from '.'
import { Blake2b } from './blake2b'
+import { BLOCKHASH_BYTELENGTH, KEY_BYTELENGTH } from './constants'
import { ge_double_scalarmult_vartime_to_p3, ge_frombytes, ge_frombytes_negate_vartime, ge_has_small_order, ge_is_canonical } from './ge'
import { ge_p3, ge_p3_tobytes, ge_sub_p3 } from './p'
import { sc_is_canonical, sc_reduce } from './sc'
//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
//! SPDX-License-Identifier: GPL-3.0-or-later
-import { crypto_derive } from './crypto_derive'
-import { crypto_sign } from './crypto_sign'
-import { crypto_verify_decodepubkey, crypto_verify_donna, crypto_verify_sodium } from './crypto_verify'
-import { errors } from './errors'
+import { BLOCKHASH_BYTELENGTH, KEY_BYTELENGTH, MAX_MESSAGE_BYTELENGTH, MAX_VERIFY_BLOCKS, MAX_VERIFY_BLOCKS_BYTELENGTH, SIGNATURE_BYTELENGTH, SIGNEDBLOCK_BYTELENGTH, } from './constants'
+import { crypto_derive, } from './crypto_derive'
+import { crypto_sign, } from './crypto_sign'
+import { crypto_verify_decodepubkey, crypto_verify_donna, crypto_verify_sodium, } from './crypto_verify'
+import { errors, } from './errors'
import './tests'
-export const BLOCKHASH_BYTELENGTH: i32 = 32
-export const KEY_BYTELENGTH: i32 = 32
-export const SIGNATURE_BYTELENGTH: i32 = 64
-
-const PAGE_BYTELENGTH: i32 = 1 << 16
-const SIGNEDBLOCK_BYTELENGTH: i32 = BLOCKHASH_BYTELENGTH + SIGNATURE_BYTELENGTH
-export const MAX_VERIFY_BLOCKS: i32 = 64
-export const MAX_VERIFY_BLOCKS_BYTELENGTH: i32 = MAX_VERIFY_BLOCKS * SIGNEDBLOCK_BYTELENGTH
-export const MAX_MESSAGE_BYTELENGTH: i32 = MAX_VERIFY_BLOCKS_BYTELENGTH > PAGE_BYTELENGTH ? MAX_VERIFY_BLOCKS_BYTELENGTH : PAGE_BYTELENGTH
+export { BLOCKHASH_BYTELENGTH, KEY_BYTELENGTH, MAX_MESSAGE_BYTELENGTH, MAX_VERIFY_BLOCKS, MAX_VERIFY_BLOCKS_BYTELENGTH, SIGNATURE_BYTELENGTH }
// Static I/O buffers
const INPUT_MSG = new StaticArray<u8>(MAX_MESSAGE_BYTELENGTH)