btc-wallet 0.5.97-beta → 0.5.99-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/core/btcUtils.d.ts +1 -2
- package/dist/index.js +13 -11
- package/dist/index.js.map +3 -3
- package/esm/index.js +13 -11
- package/esm/index.js.map +3 -3
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -3901,12 +3901,10 @@ function sendBitcoin(address, amount, feeRate) {
|
|
|
3901
3901
|
return txHash;
|
|
3902
3902
|
});
|
|
3903
3903
|
}
|
|
3904
|
-
function
|
|
3904
|
+
function getPublicKeyBase58() {
|
|
3905
3905
|
return __async(this, null, function* () {
|
|
3906
|
-
const {
|
|
3906
|
+
const { getPublicKey } = getBtcProvider();
|
|
3907
3907
|
const publicKey = yield getPublicKey();
|
|
3908
|
-
const signature = yield signMessage2(message);
|
|
3909
|
-
const signatureBase58 = bs582.encode(Buffer.from(signature, "base64"));
|
|
3910
3908
|
const publicKeyBuffer = Buffer.from(publicKey, "hex");
|
|
3911
3909
|
let uncompressedPublicKey;
|
|
3912
3910
|
if (publicKeyBuffer.length === 33) {
|
|
@@ -3922,12 +3920,15 @@ function signMessage(message) {
|
|
|
3922
3920
|
}
|
|
3923
3921
|
const publicKeyWithoutPrefix = uncompressedPublicKey.subarray(1);
|
|
3924
3922
|
const publicKeyBase58 = bs582.encode(publicKeyWithoutPrefix);
|
|
3925
|
-
return
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
};
|
|
3923
|
+
return publicKeyBase58;
|
|
3924
|
+
});
|
|
3925
|
+
}
|
|
3926
|
+
function signMessage(message) {
|
|
3927
|
+
return __async(this, null, function* () {
|
|
3928
|
+
const { signMessage: signMessage2, getPublicKey } = getBtcProvider();
|
|
3929
|
+
const publicKey = yield getPublicKey();
|
|
3930
|
+
const signature = yield signMessage2(message);
|
|
3931
|
+
return { signature, publicKey };
|
|
3931
3932
|
});
|
|
3932
3933
|
}
|
|
3933
3934
|
function estimateDepositAmount(amount, option) {
|
|
@@ -5376,7 +5377,7 @@ function getGroup(state) {
|
|
|
5376
5377
|
|
|
5377
5378
|
// src/index.ts
|
|
5378
5379
|
var getVersion = () => {
|
|
5379
|
-
return "0.5.
|
|
5380
|
+
return "0.5.99-beta";
|
|
5380
5381
|
};
|
|
5381
5382
|
if (typeof window !== "undefined") {
|
|
5382
5383
|
window.__BTC_WALLET_VERSION = getVersion();
|
|
@@ -5412,6 +5413,7 @@ export {
|
|
|
5412
5413
|
getBtcUtxos,
|
|
5413
5414
|
getCsnaAccountId,
|
|
5414
5415
|
getDepositAmount,
|
|
5416
|
+
getPublicKeyBase58,
|
|
5415
5417
|
getVersion,
|
|
5416
5418
|
getWalletConfig,
|
|
5417
5419
|
getWithdrawTransaction,
|