@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dorafactory/maci-sdk",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "SDK for interacting with maci",
5
5
  "keywords": [
6
6
  "maci",
@@ -24,6 +24,19 @@ export class Circom {
24
24
  address: string,
25
25
  message: string
26
26
  ): Promise<SignResult> {
27
+ if (typeof window !== 'undefined' && (window as any).keplr) {
28
+ const sig = await (window as any).keplr.signArbitrary(
29
+ this.chainId,
30
+ address,
31
+ message
32
+ );
33
+
34
+ return {
35
+ signature: sig.signature,
36
+ pubkey: sig.pub_key.value,
37
+ };
38
+ }
39
+
27
40
  const accounts = await signer.getAccounts();
28
41
  const account = accounts.find((acc) => acc.address === address);
29
42