How to use the fromSM function from bn.js

Find comprehensive JavaScript bn.js.fromSM code examples handpicked from public code repositorys.

152
153
154
155
156
157
158
159
160
      if (buf.length <= 1 || (buf[buf.length - 2] & 0x80) === 0) {
        throw new Error('non-minimally encoded script number');
      }
    }
  }
  return BN.fromSM(buf, {
    endian: 'little'
  });
};
fork icon0
star icon3
watch icon3