It would be useful for the @protobufjs
suite to work in a Compartment. We would like this for the Agoric blockchain.
I had to patch @protobufjs/inquire
so that it didn't tickle SES's direct eval rejection. Also, there were some portability problems in protobufjs/src/util/minimal.js
.
The relevant issue on protobufjs is protobufjs/protobuf.js#1713.
mkdir patches
mv *.patch patches/
yarn install
node user.js
Gives the expected result:
MsgSend Uint8Array(112) [
10, 45, 97, 103, 111, 114, 105, 99, 49, 55, 110, 100,
122, 102, 53, 115, 103, 57, 115, 120, 50, 102, 119, 56,
121, 122, 122, 101, 100, 100, 120, 121, 48, 104, 115, 119,
112, 48, 116, 56, 114, 51, 53, 52, 50, 112, 52, 18,
45, 97, 103, 111, 114, 105, 99, 49, 107, 104, 48, 118,
104, 56, 107, 48, 120, 115, 104, 107, 112, 54, 54, 48,
100, 108, 97, 110, 99, 100, 109, 48, 115, 51, 104, 108,
52, 103, 100, 48, 104, 102, 122, 121, 53, 101, 26, 16,
10, 4, 117, 98,
... 12 more items
]
yarn test
gives the same result!