@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/browser.js +11 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +11 -0
- package/dist/browser.mjs.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/circom/index.ts +13 -0
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) {
|