btc-wallet 0.5.97-beta → 0.5.98-beta
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 +11 -2
- package/dist/index.js.map +2 -2
- package/esm/index.js +11 -2
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3980,7 +3980,16 @@ function signMessage(message) {
|
|
|
3980
3980
|
const { signMessage: signMessage2, getPublicKey } = getBtcProvider();
|
|
3981
3981
|
const publicKey = yield getPublicKey();
|
|
3982
3982
|
const signature = yield signMessage2(message);
|
|
3983
|
-
const
|
|
3983
|
+
const signatureBuffer = Buffer.from(signature, "base64");
|
|
3984
|
+
let signatureWithoutPrefix;
|
|
3985
|
+
if (signatureBuffer.length === 65) {
|
|
3986
|
+
signatureWithoutPrefix = signatureBuffer.subarray(1);
|
|
3987
|
+
} else if (signatureBuffer.length === 64) {
|
|
3988
|
+
signatureWithoutPrefix = signatureBuffer;
|
|
3989
|
+
} else {
|
|
3990
|
+
throw new Error(`Invalid signature length: ${signatureBuffer.length}`);
|
|
3991
|
+
}
|
|
3992
|
+
const signatureBase58 = import_bs582.default.encode(signatureWithoutPrefix);
|
|
3984
3993
|
const publicKeyBuffer = Buffer.from(publicKey, "hex");
|
|
3985
3994
|
let uncompressedPublicKey;
|
|
3986
3995
|
if (publicKeyBuffer.length === 33) {
|
|
@@ -5448,7 +5457,7 @@ function getGroup(state) {
|
|
|
5448
5457
|
|
|
5449
5458
|
// src/index.ts
|
|
5450
5459
|
var getVersion = () => {
|
|
5451
|
-
return "0.5.
|
|
5460
|
+
return "0.5.98-beta";
|
|
5452
5461
|
};
|
|
5453
5462
|
if (typeof window !== "undefined") {
|
|
5454
5463
|
window.__BTC_WALLET_VERSION = getVersion();
|