@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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2933,6 +2933,22 @@ var WarpFastsetWallet = class {
|
|
|
2933
2933
|
getAddress() {
|
|
2934
2934
|
return getWarpWalletAddressFromConfig3(this.config, this.chain.name);
|
|
2935
2935
|
}
|
|
2936
|
+
getPublicKey() {
|
|
2937
|
+
const privateKey = getWarpWalletPrivateKeyFromConfig(this.config, this.chain.name);
|
|
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
|
+
}
|
|
2951
|
+
}
|
|
2936
2952
|
};
|
|
2937
2953
|
|
|
2938
2954
|
// src/main.ts
|