@vleap/warps-adapter-fastset 0.1.0-beta.42 → 0.1.0-beta.43

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.mjs CHANGED
@@ -2935,10 +2935,19 @@ var WarpFastsetWallet = class {
2935
2935
  }
2936
2936
  getPublicKey() {
2937
2937
  const privateKey = getWarpWalletPrivateKeyFromConfig(this.config, this.chain.name);
2938
- if (!privateKey) return null;
2939
- const privateKeyBytes = hexToUint8Array(privateKey);
2940
- const publicKey = ed25519_exports.getPublicKey(privateKeyBytes);
2941
- return uint8ArrayToHex(publicKey);
2938
+ if (privateKey) {
2939
+ const privateKeyBytes = hexToUint8Array(privateKey);
2940
+ const publicKey = ed25519_exports.getPublicKey(privateKeyBytes);
2941
+ return uint8ArrayToHex(publicKey);
2942
+ }
2943
+ const address = getWarpWalletAddressFromConfig3(this.config, this.chain.name);
2944
+ if (!address) return null;
2945
+ try {
2946
+ const addressBytes = FastsetClient.decodeBech32Address(address);
2947
+ return uint8ArrayToHex(addressBytes);
2948
+ } catch {
2949
+ return null;
2950
+ }
2942
2951
  }
2943
2952
  };
2944
2953