Error trying the UNS SDK


I have a simple Node.js project (Node v13.8.0 / Yarn v1.22.0) and I tried to use the SDK with one of the example found here :

import { UNSClient, Network } from "@uns/ts-sdk"
const unsClient = new UNSClient();
unsClient.init({ network: Network.sandbox }); 

While converting TS to plain JS, I have a bunch of errors : logs.

Where can that come from ? I surely did a mistake somewhere, I’m not a pro-dev :grin:


You should have "esModuleInterop": true in your tsconfig.json file.

For the ByteBuffer warning, the ARK team is currently thinking about replacing it with a native implementation (see
For now, you can add its type definitions to your project:

yarn add -D @types/bytebuffer

You can take a look at the uns-faucet GitHub repository to get some example code.

Hi @rigwild !

Thanks a lot for your answer !

It works better now, and I’ll look into your code, to better understand the whole thing. I’m not really familiar with TypeScript, so I’m going to do some research about it :grin:

Have a nice day !


1 Like