Holo-Host / holo-envoy

Server that facilitates communication between hosted Agents and a Host's Holochain Conductor
158 stars 2 forks source link

Cannot pass ArrayObjects over json-rpc #76

Open zo-el opened 3 years ago

zo-el commented 3 years ago

Currently while passing Buffers and UInt8Arrays over json-rpc changes the type into an object as mentioned bellow For Buffers

{ type: "Buffer", data: [120, 32, 45] }

or For Uint8Arrays

{"0": 120, "1": 32, "2": 45}

This causes an issues when sending a zomeCall that expects a HoloHash/Uint8Array: https://github.com/Holo-Host/holo-envoy/issues/73

zo-el commented 3 years ago

Current Solution:

Updated the payload for zomeCall to be encoded on the web-sdk and decoded on holo-envoy.

Also, note that we still cannot pass buffers so update the UI to have Uint8Arrays instead

Solution:

Update to use msgpack instead of json-rpc.

contesini commented 2 years ago

Development branch has updated to use msgpack instead of json-rpc https://github.com/Holo-Host/holo-envoy/blob/7a8ad4c41a33a2763819a177d09e18a6c32a89b2/src/index.ts#L16

I think we can close this issue.