UNPKG

@polkadot/types

Version:
20 lines (19 loc) 581 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sign = sign; exports.signV5 = signV5; exports.signGeneral = signGeneral; function sign(registry, signerPair, u8a, options) { const encoded = u8a.length > 256 ? registry.hash(u8a) : u8a; return signerPair.sign(encoded, options); } function signV5(registry, signerPair, u8a, options) { const encoded = registry.hash(u8a); return signerPair.sign(encoded, options); } function signGeneral(registry, u8a) { const encoded = registry.hash(u8a); return encoded; }