@pear-protocol/symmio-client 0.2.40 → 0.2.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.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { isAddress, encodeFunctionData } from 'viem';
2
+ import { SiweMessage } from 'siwe';
2
3
 
3
4
  var __defProp = Object.defineProperty;
4
5
  var __export = (target, all) => {
@@ -24416,19 +24417,17 @@ function createSiweMessage(params) {
24416
24417
  const expirationTime = new Date(
24417
24418
  Date.now() + 30 * 24 * 60 * 60 * 1e3
24418
24419
  ).toISOString();
24419
- const message = [
24420
- `${params.domain} wants you to sign in with your Ethereum account:`,
24421
- params.address,
24422
- "",
24423
- params.statement,
24424
- "",
24425
- `URI: ${params.uri}`,
24426
- `Version: ${version}`,
24427
- `Chain ID: ${params.chainId}`,
24428
- `Nonce: ${params.nonce}`,
24429
- `Issued At: ${issuedAt}`,
24430
- `Expiration Time: ${expirationTime}`
24431
- ].join("\n");
24420
+ const message = new SiweMessage({
24421
+ domain: params.domain,
24422
+ address: params.address,
24423
+ statement: params.statement,
24424
+ chainId: params.chainId,
24425
+ nonce: params.nonce,
24426
+ version,
24427
+ uri: params.uri,
24428
+ issuedAt,
24429
+ expirationTime
24430
+ }).prepareMessage();
24432
24431
  return { message, issuedAt, expirationTime };
24433
24432
  }
24434
24433
  async function getNonce(chainId, subAccount) {