@dubsdotapp/expo 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1005,10 +1005,25 @@ var PhantomDeeplinkAdapter = class {
|
|
|
1005
1005
|
async signMessage(message) {
|
|
1006
1006
|
this.assertConnected();
|
|
1007
1007
|
console.log(TAG2, "signMessage() \u2014 message length:", message.length);
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
this.
|
|
1011
|
-
|
|
1008
|
+
const encodedMessage = import_bs582.default.encode(message);
|
|
1009
|
+
const payload = {
|
|
1010
|
+
session: this._sessionToken,
|
|
1011
|
+
message: encodedMessage,
|
|
1012
|
+
display: "utf8"
|
|
1013
|
+
};
|
|
1014
|
+
console.log(TAG2, "signMessage() payload keys:", Object.keys(payload).join(", "));
|
|
1015
|
+
console.log(TAG2, "signMessage() message (first 40 chars):", encodedMessage.substring(0, 40) + "...");
|
|
1016
|
+
console.log(TAG2, "signMessage() session (first 20 chars):", this._sessionToken?.substring(0, 20) + "...");
|
|
1017
|
+
console.log(TAG2, "signMessage() sharedSecret length:", this._sharedSecret.length);
|
|
1018
|
+
console.log(TAG2, "signMessage() dappPubKey:", import_bs582.default.encode(this._dappKeyPair.publicKey));
|
|
1019
|
+
const { nonce, ciphertext } = encryptPayload(payload, this._sharedSecret);
|
|
1020
|
+
console.log(TAG2, "signMessage() encrypted \u2014 nonce length:", import_bs582.default.decode(nonce).length, "ciphertext length:", import_bs582.default.decode(ciphertext).length);
|
|
1021
|
+
try {
|
|
1022
|
+
const selfTest = decryptPayload(ciphertext, nonce, this._sharedSecret);
|
|
1023
|
+
console.log(TAG2, "signMessage() self-test decrypt OK \u2014 keys:", Object.keys(selfTest).join(", "));
|
|
1024
|
+
} catch (err) {
|
|
1025
|
+
console.log(TAG2, "signMessage() SELF-TEST FAILED:", err instanceof Error ? err.message : err);
|
|
1026
|
+
}
|
|
1012
1027
|
const requestId = nextRequestId();
|
|
1013
1028
|
const redirectLink = `${this.config.redirectUri}?dubs_rid=${requestId}`;
|
|
1014
1029
|
console.log(TAG2, `signMessage() requestId=${requestId}`);
|
|
@@ -1019,6 +1034,7 @@ var PhantomDeeplinkAdapter = class {
|
|
|
1019
1034
|
redirect_link: redirectLink
|
|
1020
1035
|
});
|
|
1021
1036
|
const url = `https://phantom.app/ul/v1/signMessage?${params.toString()}`;
|
|
1037
|
+
console.log(TAG2, "signMessage() full URL length:", url.length);
|
|
1022
1038
|
console.log(TAG2, "Opening Phantom signMessage deeplink...");
|
|
1023
1039
|
const response = await this.handler.send(url, requestId, this.timeout);
|
|
1024
1040
|
console.log(TAG2, "Received signMessage response");
|