@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/CHANGELOG.md +12 -0
- package/dist/index.js +5 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -16
- package/dist/index.mjs.map +1 -1
- package/examples/evm/accounts/createAccount.ts +1 -3
- package/examples/evm/accounts/exportAccount.ts +0 -1
- package/examples/evm/accounts/getAccount.ts +1 -3
- package/examples/evm/accounts/importAccount.ts +0 -1
- package/examples/evm/accounts/listAccounts.ts +2 -2
- package/examples/evm/embedded/pregenerate.ts +1 -1
- package/examples/evm/signing/signHash.ts +1 -3
- package/examples/evm/signing/signMessage.ts +1 -3
- package/examples/evm/signing/signTransaction.ts +1 -3
- package/examples/evm/signing/signTypedData.ts +1 -3
- package/examples/policies/createAccountPolicy.ts +1 -3
- package/examples/solana/accounts/createAccount.ts +1 -3
- package/examples/solana/accounts/exportAccount.ts +1 -3
- package/examples/solana/accounts/getAccount.ts +1 -3
- package/examples/solana/accounts/importAccount.ts +0 -1
- package/examples/solana/accounts/listAccounts.ts +2 -2
- package/examples/solana/signing/signMessage.ts +1 -3
- package/examples/solana/signing/signTransaction.ts +1 -3
- package/package.json +1 -1
- package/pnpm-workspace.yaml +3 -0
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.
|
|
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
|
|
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
|
-
|
|
3792
|
-
|
|
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
|
|
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 {
|
|
4592
|
+
import { toHex, toPrefixedMessage as toPrefixedMessage2 } from "viem";
|
|
4600
4593
|
|
|
4601
4594
|
// src/wallets/evm/actions/signTransaction.ts
|
|
4602
4595
|
import {
|
|
4603
|
-
keccak256
|
|
4596
|
+
keccak256,
|
|
4604
4597
|
parseSignature as parseSignature2,
|
|
4605
4598
|
serializeTransaction as serializeTransaction2
|
|
4606
4599
|
} from "viem";
|