SDK V2 Errors


Light Shadow Box team met some errors while implementing SDK v2

Problem 1: Send native token. The sending can be initiated while message is empty, but if the message is filled, then it said: can’t init transfer


Problem 2: Send privacy token. The API from SDK returned forEach of undefined even though we implemented every info needed in the document


Problem 3: getTxHistoryByPublicKey only returned send history, there is no receive history

@andrey @Peter @Ducky


Hi, we are in the process of completing the SDK-v2.
You can use branch develop by cmd
yarn add to fix your problem 1 & 2.
getTxHistoryByPublicKey only saves local tx (send tx) so we will support a method to get receive history next time.


We got this error after importing and requesting to your server


** Updated:

We still got errors from server side even with these fullnode APIs:

@binh @phathoang @andrey

1 Like

Hi, please configs your project by this link or re-check function incognito.setConfig({…})

configs: { //mainnet
chainURL: ‘’,
apiURL: ‘’,
mainnet: true,
wasmPath: path-to-file/privacy.wasm,
configs: { //testnet
chainURL: ',
apiURL: ‘’,
mainnet: false,
wasmPath: path-to-file/privacy.wasm,

1 Like

@taind can you post your code ?
here example call to fullnode with respone ok.

var axios = require('axios');
var data = '{\n    "jsonrpc": "1.0",\n    "method": "getblockchaininfo",\n    "params": [],\n    "id": 1\n    }';

var config = {
  method: 'post',
  url: '',
  headers: { 
    'Content-Type': 'text/plain', 
    'Cookie': '__cfduid=da6fc1cc5f6ce18165d11c93424d5af0c1605371330'
  data : data

.then(function (response) {
.catch(function (error) {
1 Like

@binh @phathoang
We got the server works, thanks.

However, when it comes to send privacy token, we got some issues
ErrorCode is not defined


Here is our code:


130112619_750639132211626_1989326980588244896_n (1)

Also, when sending token, do we need to request accessToken? We got this while calculating the fee.

Please help us on this :smiley:

1 Like

Please check your code by following this config below and make sure you are using branch #develop to have the newest code.

1 Like

We tried these configurations

1. Same configurations you gave us



  • Cannot request to server, error occurs
  • Cannot do any further functionality

2. Our configurations

131275899_812762789574816_4295199843095120566_n (1)


  • Successfully send & receive in-network
  • Cannot send & receive outnetwork

Please have a look @binh @phathoang

1 Like

You can install chrome extension CORS to resolve this problem on develop mode and follow configs at file

We tried exactly your config above, and still got this error with Shield & Unshield,
I dont think it’s related to the server config @phathoang


We will support Shield and Unshield next time. SDK is still developing

Do you have the estimated timeline?
Also does the request trade & staking feature completed in SDK v2?

1 Like

We encountered this error while sending in-network, any thoughts ? @binh @phathoang


Yah maybe

Can you share your code? (Config env, your token id, v…v) or follow topic

Native fee or privacy fee must be string. You can use typescript to check it easier


  • Send in-network worked before, until last-week
  • When we switched to use the master branch, it works, but if we used the develop branch, it got errors.

Our configs and code:




@andrey @binh @phathoang,
Can you guys do a weekly update on the SDK development, as builder i want to know:

  1. What changes on the SDK function, and does it affect on our implementation, do we need to change anything to keep the function works. (take our send in-network as example, i believe it’s due to some coreteam changes on the SDK)
  2. What’s new features on SDK => this will take us ahead on what’s new, better for our planning.

for develop branch it work for test-net.

  1. Current to sdk we have still update for a improve in chain. this we will release in this week.
  2. for new features ok SDK, current we dont have plain to bring news feature for sdk, all almost want to make sdk stable first.
1 Like

So you mean SDK is not ready to send privacy token? We used the develop branch to make sending privacy token works.

When can the master branch could send privacy token, please give me the estimated timeline. We’re pushing our updates on the store.