nk.base64Decode() returns an ArrayBuffer, not a string in typescript

In the nk.base64Decode() function description, the document says it returns an ArrayBuffer, but the example code returns a string. I think it’s better to return a string if possible.

I’m having a hard time converting ArrayBuffer to string. Many of the methods recommended by Stack Overflow cause errors. :face_with_spiral_eyes:

*btoa is not defined.*
*TextDecoder is not defined.*
*Buffer is not defined.*
  1. Versions: Nakama {3.20}, {Windows Docker}
  2. Server Framework Runtime language {TS}

Hello @waguwagu,

You can use nk.binaryToString to convert the output to a string. The example is incorrect, we’ll fix it.


1 Like