Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreTP/SLgenerateTpSlSalt

generateTpSlSalt

Generate a random uint256 salt (as a decimal string) for replay protection. Every conditional-order and delete message carries a fresh salt; buildConditionalOrderMessage and buildTpSlDeleteMessage call this automatically unless you pass an explicit salt (e.g. to sign deterministically in tests).

Draws 32 random bytes from crypto.getRandomValues and folds them into a big integer.

import { generateTpSlSalt } from "@symmio/trading-core"; const salt = generateTpSlSalt(); // "8471293…" (decimal string)

Parameters

None.

Returns

string
A random uint256 as a decimal string.
Last updated on