btc-wallet 0.5.96-beta → 0.5.97-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 +16 -2
 - package/dist/index.js.map +2 -2
 - package/esm/index.js +16 -2
 - package/esm/index.js.map +2 -2
 - package/package.json +1 -1
 
    
        package/dist/index.js
    CHANGED
    
    | 
         @@ -3981,7 +3981,21 @@ function signMessage(message) { 
     | 
|
| 
       3981 
3981 
     | 
    
         
             
                const publicKey = yield getPublicKey();
         
     | 
| 
       3982 
3982 
     | 
    
         
             
                const signature = yield signMessage2(message);
         
     | 
| 
       3983 
3983 
     | 
    
         
             
                const signatureBase58 = import_bs582.default.encode(Buffer.from(signature, "base64"));
         
     | 
| 
       3984 
     | 
    
         
            -
                const  
     | 
| 
      
 3984 
     | 
    
         
            +
                const publicKeyBuffer = Buffer.from(publicKey, "hex");
         
     | 
| 
      
 3985 
     | 
    
         
            +
                let uncompressedPublicKey;
         
     | 
| 
      
 3986 
     | 
    
         
            +
                if (publicKeyBuffer.length === 33) {
         
     | 
| 
      
 3987 
     | 
    
         
            +
                  const decompressed = ecc.pointCompress(publicKeyBuffer, false);
         
     | 
| 
      
 3988 
     | 
    
         
            +
                  if (!decompressed) {
         
     | 
| 
      
 3989 
     | 
    
         
            +
                    throw new Error("Failed to decompress public key");
         
     | 
| 
      
 3990 
     | 
    
         
            +
                  }
         
     | 
| 
      
 3991 
     | 
    
         
            +
                  uncompressedPublicKey = decompressed;
         
     | 
| 
      
 3992 
     | 
    
         
            +
                } else if (publicKeyBuffer.length === 65) {
         
     | 
| 
      
 3993 
     | 
    
         
            +
                  uncompressedPublicKey = publicKeyBuffer;
         
     | 
| 
      
 3994 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 3995 
     | 
    
         
            +
                  throw new Error(`Invalid public key length: ${publicKeyBuffer.length}`);
         
     | 
| 
      
 3996 
     | 
    
         
            +
                }
         
     | 
| 
      
 3997 
     | 
    
         
            +
                const publicKeyWithoutPrefix = uncompressedPublicKey.subarray(1);
         
     | 
| 
      
 3998 
     | 
    
         
            +
                const publicKeyBase58 = import_bs582.default.encode(publicKeyWithoutPrefix);
         
     | 
| 
       3985 
3999 
     | 
    
         
             
                return {
         
     | 
| 
       3986 
4000 
     | 
    
         
             
                  signature,
         
     | 
| 
       3987 
4001 
     | 
    
         
             
                  publicKey,
         
     | 
| 
         @@ -5434,7 +5448,7 @@ function getGroup(state) { 
     | 
|
| 
       5434 
5448 
     | 
    
         | 
| 
       5435 
5449 
     | 
    
         
             
            // src/index.ts
         
     | 
| 
       5436 
5450 
     | 
    
         
             
            var getVersion = () => {
         
     | 
| 
       5437 
     | 
    
         
            -
              return "0.5. 
     | 
| 
      
 5451 
     | 
    
         
            +
              return "0.5.97-beta";
         
     | 
| 
       5438 
5452 
     | 
    
         
             
            };
         
     | 
| 
       5439 
5453 
     | 
    
         
             
            if (typeof window !== "undefined") {
         
     | 
| 
       5440 
5454 
     | 
    
         
             
              window.__BTC_WALLET_VERSION = getVersion();
         
     |