@openfort/openfort-node 0.8.2 → 0.8.4

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
@@ -374,7 +374,7 @@ function requiresWalletAuth(requestMethod, requestPath) {
374
374
  }
375
375
 
376
376
  // src/version.ts
377
- var VERSION = "0.8.2";
377
+ var VERSION = "0.8.4";
378
378
  var PACKAGE = "@openfort/openfort-node";
379
379
 
380
380
  // src/openapi-client/openfortApiClient.ts
@@ -716,7 +716,7 @@ var openfortApiClient = async (config, options) => {
716
716
  );
717
717
  }
718
718
  throw new UnknownError(
719
- "Something went wrong. Please contact support at https://www.openfort.io/support",
719
+ "Something went wrong. Please contact support at support@openfort.xyz",
720
720
  error instanceof Error ? error : void 0
721
721
  );
722
722
  }
@@ -3756,11 +3756,10 @@ var decryptExportedPrivateKey = (encryptedPrivateKeyBase64, privateKeyPem) => {
3756
3756
  // src/wallets/evm/accounts/evmAccount.ts
3757
3757
  import {
3758
3758
  getTypesForEIP712Domain,
3759
- hashMessage,
3760
3759
  hashTypedData,
3761
- keccak256,
3762
3760
  parseSignature,
3763
- serializeTransaction
3761
+ serializeTransaction,
3762
+ toPrefixedMessage
3764
3763
  } from "viem";
3765
3764
 
3766
3765
  // src/wallets/evm/actions/signHash.ts
@@ -3788,19 +3787,13 @@ function toEvmAccount(data) {
3788
3787
  },
3789
3788
  async signMessage(parameters) {
3790
3789
  const { message } = parameters;
3791
- if (typeof message === "string") {
3792
- const hash2 = hashMessage(message);
3793
- const result2 = await sign(id, { data: hash2 });
3794
- return result2.signature;
3795
- }
3796
- const hash = hashMessage(message);
3797
- const result = await sign(id, { data: hash });
3790
+ const preimage = toPrefixedMessage(message);
3791
+ const result = await sign(id, { data: preimage });
3798
3792
  return result.signature;
3799
3793
  },
3800
3794
  async signTransaction(transaction) {
3801
3795
  const serialized = serializeTransaction(transaction);
3802
- const hash = keccak256(serialized);
3803
- const response = await sign(id, { data: hash });
3796
+ const response = await sign(id, { data: serialized });
3804
3797
  const signature2 = parseSignature(response.signature);
3805
3798
  const signedTransaction = serializeTransaction(
3806
3799
  transaction,
@@ -4596,11 +4589,11 @@ var UpdatePolicyBodySchema = z3.object({
4596
4589
  });
4597
4590
 
4598
4591
  // src/wallets/evm/actions/signMessage.ts
4599
- import { hashMessage as hashMessage2, toHex } from "viem";
4592
+ import { toHex, toPrefixedMessage as toPrefixedMessage2 } from "viem";
4600
4593
 
4601
4594
  // src/wallets/evm/actions/signTransaction.ts
4602
4595
  import {
4603
- keccak256 as keccak2562,
4596
+ keccak256,
4604
4597
  parseSignature as parseSignature2,
4605
4598
  serializeTransaction as serializeTransaction2
4606
4599
  } from "viem";