var nacl1 = require('ed2curve');
var nacl = require('tweetnacl');
nacl.util = require('tweetnacl-util');
const theirPublicKey = nacl1.convertSecretKey("GDGM7ZAV5OJIVD375PBOJCBM2FDJOQKDJ5GCNKIGGMX7USFIHNQY2BTT");
console.log(theirPublicKey)
const mySecretKey = nacl1.convertSecretKey("SC77LFF57OC47LBV4D7WZ73FSQ67CL4JPVK65HOZJYCCPTO4IUMECFFJ");
console.log(mySecretKey)
var message = nacl.util.decodeUTF8('Hello!')
console.log(message)
var encryptedMessage = nacl.box(message, theirPublicKey, mySecretKey);
throw new TypeError('unexpected type ' + t + ', use Uint8Array'); ^
TypeError: unexpected type [object Undefined], use Uint8Array at checkArrayTypes (/home/priya/go_test/src/github.com/ed25519/node_modules/tweetnacl/nacl-fast.js:2152:14) at Function.nacl.box.before (/home/priya/go_test/src/github.com/ed25519/node_modules/tweetnacl/nacl-fast.js:2225:3) at Object.nacl.box (/home/priya/go_test/src/github.com/ed25519/node_modules/tweetnacl/nacl-fast.js:2220:20) at Object. (/home/priya/go_test/src/github.com/ed25519/curve.js:14:29) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
This what I am getting. So please help me to resolve this. Thankyou