UNPKG

@fruitsjs/crypto

Version:

Cryptographic functions for building Fruits Eco-Blockchain apps.

11 lines (9 loc) 435 B
/** * Generates a signed message digest, which can be sent to BRS API then * @param unsignedTransactionHex The unsigned message * @param signature The signature * @return The signed message digest * @module crypto */ export const generateSignedTransactionBytes = (unsignedTransactionHex: string, signature: string): string => unsignedTransactionHex.substr(0, 192) + signature + unsignedTransactionHex.substr(320);