[wip] adding message signing functionality

Problem is this:

    Uncaught ReferenceError: require is not defined
        <anonymous> moz-extension://b4685fc7-232c-44d9-b653-f51b7c7ea868/dist/jex_include/local-vdk_aecrypt-0.1.0/dist/jex_include/local-blakejs-1.2.1/dist/index.js:1
    index.js:1:13

The issue is that blakejs is written for node and needs to be modified to work
in a browser.

Next task is doing that, but did a ton of work so taking a break
This commit is contained in:
2023-08-12 18:18:03 -06:00
parent 6d715612e4
commit 29defebc2e
19 changed files with 2253 additions and 3 deletions
+5 -2
View File
@@ -51,8 +51,10 @@
*/
import * as awcp from './jex_include/local-awcp-0.2.2/dist/awcp.js';
import * as vdk_aeser from './jex_include/local-vdk_aeser-0.1.0/dist/vdk_aeser.js';
import * as awcp from './jex_include/local-awcp-0.2.2/dist/awcp.js';
import * as vdk_aecrypt from './jex_include/local-vdk_aecrypt-0.1.0/dist/vdk_aecrypt.js';
import * as vdk_aeser from './jex_include/local-vdk_aeser-0.1.0/dist/vdk_aeser.js';
import * as vdk_binary from './jex_include/local-vdk_binary-0.1.0/dist/vdk_binary.js';
export type {
@@ -313,6 +315,7 @@ bi_msg_handler_content
// right now just sign message
case "message.sign":
console.log('jr bg content message handler message sign');
let secret_key : Uint8Array = i_state.keypairs[0].secretKey;
let msg_str : string = msg.data.params.message;
// use nacl detached signatures