var f=(t,n,s)=>new Promise((i,r)=>{var g=e=>{try{o(s.next(e))}catch(a){r(a)}},c=e=>{try{o(s.throw(e))}catch(a){r(a)}},o=e=>e.done?i(e.value):Promise.resolve(e.value).then(g,c);o((s=s.apply(t,n)).next())});import{hexlify as w}from"@ethersproject/bytes";import{toUtf8Bytes as M}from"@ethersproject/strings";var y=(t,n,s)=>f(void 0,null,function*(){var i,r;if((i=t.provider)!=null&&i.wc){let g=w(M(s));return yield(r=t.provider)==null?void 0:r.wc.signPersonalMessage([g,n])}return t.getSigner(n).signMessage(s)});export{y as signMessage};
