Our api functions that deal with binary data currently have the type number[] which serializes to the correct JSON, but has sub-par DX when used with other JavaScript tools and libraries.
The attached PR replaces all occurrences of number[] with Uint8Array the correct Vec<u8> equivalent.
This is a breaking change though, as functions no longer accept plain number arrays. Typescript users will get correct errors, but non-ts users will receive invalid type: map, expected a sequence
This change will only affect the user facing interface, as Uint8Arrays will be converted into number[] under the hood to get preserve the correct serialization
Our api functions that deal with binary data currently have the type
number[]which serializes to the correct JSON, but has sub-par DX when used with other JavaScript tools and libraries.The attached PR replaces all occurrences of
number[]withUint8Arraythe correctVec<u8>equivalent.This is a breaking change though, as functions no longer accept plain number arrays. Typescript users will get correct errors, but non-ts users will receive
invalid type: map, expected a sequenceThis change will only affect the user facing interface, as Uint8Arrays will be converted into
number[]under the hood to get preserve the correct serialization