Skip to main content

index/functions/signRawObject.md

signRawObject(privateKey, obj): object & Record<string, unknown>

Raw object signing (wallet signObject), used for transfers, bridge and fee-dry-run DTOs the wallet signs itself. Removes ONLY signature, signs keccak256(serialize(rest)) natively (no prefix handling, and trace / multisig stay in the signed bytes, unlike signNative), and returns { signature, ...rest } with the signature as the FIRST key, exactly like the wallet. Callers that must not sign extra fields strip them first.

Parameters​

ParameterType
privateKeyPrivateKeyInput
objRecord<string, unknown>

Returns​

object & Record<string, unknown>