Hello,
Thanks for this new forum category
I’m trying to send custom tokens by using the NodeJS SDK v2 and it doesn’t work.
Here is my code.
When I use master
branch of the SDK v2, I get:
//token
t {
accountKeySet: t {
...
},
tokenId: '240a1f3d00b3c6027ebbdac4203823ceb56e6813afa53d122a0c28ba59262397',
name: 'Incscan Token',
symbol: 'INCSCAN',
totalSupply: '0',
isPrivacyToken: true,
bridgeInfo: undefined
}
//balance
Token total balance 10
//transfer
[Error]2020-12-13T07:05:29.195Z - Privacy token 240a1f3d00b3c6027ebbdac4203823ceb56e6813afa53d122a0c28ba59262397 transfered failed (Unexpected token u in JSON at position 0)
(node:64265) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at e.<anonymous> (/Users/charles/Workspace/token-distribution/node_modules/incognito-js/build/node/index.js:2:824616)
at /Users/charles/Workspace/token-distribution/node_modules/incognito-js/build/node/index.js:2:823324
at Object.next (/Users/charles/Workspace/token-distribution/node_modules/incognito-js/build/node/index.js:2:823429)
at s (/Users/charles/Workspace/token-distribution/node_modules/incognito-js/build/node/index.js:2:822142)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
When I use develop
branch fo the SDK v2, I get:
//token
[Warning]2020-12-13T07:14:27.938Z - Can not find token with id 240a1f3d00b3c6027ebbdac4203823ceb56e6813afa53d122a0c28ba59262397
undefined