Error: bad secret key size


I am learning

const client = await Universal({ url: ‘http://localhost:3013’,internalUrl: ‘http://localhost:3113’, keypair: { publicKey: publicKey, secretKey: ‘mypass’ }, networkId: ‘ae_mainnet’, nativeMode: true });

‘mypass’ is the password that generated my PUBLIC_KEY address, but I got:

UnhandledPromiseRejectionWarning: Error: bad secret key size

Something with my operations?


Hello, the secretKey needs to be the private key in hex format, as it would be generated using the CLI


Also I just updated as the formatting was broken


Thank you very much~I’ll try later.