Principal.fromBlob

It is a bit frustrating to have Principal.toBlob() but not Principal.fromBlob.

public let toBlob : (p : Principal) -> Blob = Prim.blobOfPrincipal;

Any strategies to use to marshal this in the short term, and can we get it added to base in the long term?

2 Likes

I concur, would like the above too.

1 Like

FYI…I’m going to and from Text in the mean time, but I would imagine that is wasting a good number of bytes.

as a heads-up, agent-js is heading in the direction of removing blobs entirely, and operating in Uint8Arrays and ArrayBuffers. This will reduce the number of polyfills that the package requires.