@dorafactory/maci-sdk 0.0.13 → 0.0.14

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 CHANGED
@@ -4339,6 +4339,17 @@ var Circom = class {
4339
4339
  this.chainId = getDefaultParams(network).chainId;
4340
4340
  }
4341
4341
  async signMessage(signer, address, message) {
4342
+ if (typeof window !== "undefined" && window.keplr) {
4343
+ const sig = await window.keplr.signArbitrary(
4344
+ this.chainId,
4345
+ address,
4346
+ message
4347
+ );
4348
+ return {
4349
+ signature: sig.signature,
4350
+ pubkey: sig.pub_key.value
4351
+ };
4352
+ }
4342
4353
  const accounts = await signer.getAccounts();
4343
4354
  const account = accounts.find((acc) => acc.address === address);
4344
4355
  if (!account) {