src/sigs.js
// extracts v as number, RS as 32-byte Uint8Arrays
extracts v as number, RS as 32-byte Uint8Arrays
extracts v as number RS as 32 - byte Uint8Arrays
function extractVRS(rsvStr) {
  let rsv = '';
  if (utils.safeSlice(rsvStr, 0, 2) === '0x') {
    rsv = utils.safeSlice(rsvStr, 2);
  } else {
    rsv = rsvStr;
  }
  const r = utils.deserializeHex(utils.safeSlice(rsv, 0, 64));
  const s = utils.deserializeHex(utils.safeSlice(rsv, 64, 128));
  const v = utils.deserializeHex(utils.safeSlice(rsv, rsv.length - 2))[0];
  return { v, r, s };
}
function extractVRS ( rsvStr ) { let rsv = '' ; if ( utils . safeSlice ( rsvStr , 0 , 2 ) === '0x' ) { rsv = utils . safeSlice ( rsvStr , 2 ) ; } else { rsv = rsvStr ; } const r = utils . deserializeHex ( utils . safeSlice ( rsv , 0 , 64 ) ) ; const s = utils . deserializeHex ( utils . safeSlice ( rsv , 64 , 128 ) ) ; const v = utils . deserializeHex ( utils . safeSlice ( rsv , rsv . length - 2 ) ) [ 0 ] ; return { v , r , s } ; }
extracts v as number, RS as 32-byte Uint8Arrays
extracts v as number RS as 32 - byte Uint8Arrays