@vleap/warps-adapter-fastset 0.1.0-beta.41 → 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.d.cts CHANGED
@@ -27,6 +27,7 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
27
27
  create(mnemonic: string): WarpWalletDetails;
28
28
  generate(): WarpWalletDetails;
29
29
  getAddress(): string | null;
30
+ getPublicKey(): string | null;
30
31
  }
31
32
 
32
33
  export { NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet, getFastsetAdapter };
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ declare class WarpFastsetWallet implements AdapterWarpWallet {
27
27
  create(mnemonic: string): WarpWalletDetails;
28
28
  generate(): WarpWalletDetails;
29
29
  getAddress(): string | null;
30
+ getPublicKey(): string | null;
30
31
  }
31
32
 
32
33
  export { NativeTokenSet, WarpFastsetExecutor, WarpFastsetWallet, getFastsetAdapter };
package/dist/index.js CHANGED
@@ -2951,6 +2951,22 @@ var WarpFastsetWallet = class {
2951
2951
  getAddress() {
2952
2952
  return (0, import_warps5.getWarpWalletAddressFromConfig)(this.config, this.chain.name);
2953
2953
  }
2954
+ getPublicKey() {
2955
+ const privateKey = (0, import_warps5.getWarpWalletPrivateKeyFromConfig)(this.config, this.chain.name);
2956
+ if (privateKey) {
2957
+ const privateKeyBytes = hexToUint8Array(privateKey);
2958
+ const publicKey = ed25519_exports.getPublicKey(privateKeyBytes);
2959
+ return uint8ArrayToHex(publicKey);
2960
+ }
2961
+ const address = (0, import_warps5.getWarpWalletAddressFromConfig)(this.config, this.chain.name);
2962
+ if (!address) return null;
2963
+ try {
2964
+ const addressBytes = FastsetClient.decodeBech32Address(address);
2965
+ return uint8ArrayToHex(addressBytes);
2966
+ } catch {
2967
+ return null;
2968
+ }
2969
+ }
2954
2970
  };
2955
2971
 
2956
2972
  // src/main.ts