paulmillr/micro-eth-signer

Library broken with micro-packed v0.5.2 compared to v0.5.1

Systerr opened this issue · 1 comments

Hi. Thank you for a great library.
I found that using micro-packed v0.5.2 broke some features of library related to ABI encoding.
By default micro-eth-signer uses "micro-packed~0.5.1" that includes v0.5.2 too
Standard 'npm upgrade' command upgrading dependency to 0.5.2

import * as abi from 'micro-eth-signer/lib/esm/web3.js'; // here also bug, export should be in package.json
const abiString = abi.mapComponent({type: 'string'});
console.log(abiString.encode('USDT'));

For V0.5.1 all correct

Uint8Array(96) [......

For V0.5.2

error : Error: Writer(): bigint: invalid value: 4
    at Writer.err (file:///var/www/node_modules/micro-packed/lib/esm/index.js:319:16)
    at Object.encodeStream (file:///var/www/node_modules/micro-packed/lib/esm/index.js:570:21)
    at Writer.length (file:///var/www/node_modules/micro-packed/lib/esm/index.js:350:24)
    at Object.encodeStream (file:///var/www/node_modules/micro-packed/lib/esm/index.js:654:15)
    at Object.encodeStream (file:///var/www/node_modules/micro-packed/lib/esm/index.js:677:43)
    at Object.encodeStream (file:///var/www/node_modules/micro-packed/lib/esm/index.js:1132:19)
    at Object.encode (file:///var/www/node_modules/micro-packed/lib/esm/index.js:407:19)
    at Object.encodeStream (file:///var/www/node_modules/micro-packed/lib/esm/index.js:1161:58)
    at Object.encode (file:///var/www/node_modules/micro-packed/lib/esm/index.js:407:19)

Env: node v20.7.0 with "type:module" via docker

please upgrade to v0.8