@zyfai/sdk 0.1.24 → 0.1.26
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/README.md +2 -0
- package/dist/index.js +1 -21
- package/dist/index.mjs +1 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
TypeScript SDK for interacting with the ZyFAI Yield Optimization Engine. This SDK provides easy-to-use methods for deploying Safe smart wallets, managing DeFi positions, and optimizing yield across multiple protocols.
|
|
7
7
|
|
|
8
|
+
You can generate an api key from here: https://sdk.zyf.ai/
|
|
9
|
+
|
|
8
10
|
## Features
|
|
9
11
|
|
|
10
12
|
- **Safe Smart Wallet Deployment**: Deploy Safe wallets with deterministic addresses
|
package/dist/index.js
CHANGED
|
@@ -579,29 +579,9 @@ var getSafeAccount = async (config) => {
|
|
|
579
579
|
threshold: 1
|
|
580
580
|
});
|
|
581
581
|
const saltHex = (0, import_viem3.fromHex)((0, import_viem3.toHex)(effectiveSalt), "bigint");
|
|
582
|
-
const signer = {
|
|
583
|
-
...owner,
|
|
584
|
-
address: signerAddress,
|
|
585
|
-
// Override with the signer address at top level
|
|
586
|
-
signMessage: async (message) => {
|
|
587
|
-
if (typeof message === "string") {
|
|
588
|
-
return await owner.signMessage({
|
|
589
|
-
account: owner.account,
|
|
590
|
-
message
|
|
591
|
-
});
|
|
592
|
-
} else {
|
|
593
|
-
return await owner.signMessage({
|
|
594
|
-
account: owner.account,
|
|
595
|
-
message: {
|
|
596
|
-
raw: message.raw
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
582
|
const safeAccount = await (0, import_accounts.toSafeSmartAccount)({
|
|
603
583
|
client: publicClient,
|
|
604
|
-
owners: [
|
|
584
|
+
owners: [owner.account],
|
|
605
585
|
// Pass the owner object with address and signMessage capability
|
|
606
586
|
version: "1.4.1",
|
|
607
587
|
entryPoint: {
|
package/dist/index.mjs
CHANGED
|
@@ -564,29 +564,9 @@ var getSafeAccount = async (config) => {
|
|
|
564
564
|
threshold: 1
|
|
565
565
|
});
|
|
566
566
|
const saltHex = fromHex(toHex(effectiveSalt), "bigint");
|
|
567
|
-
const signer = {
|
|
568
|
-
...owner,
|
|
569
|
-
address: signerAddress,
|
|
570
|
-
// Override with the signer address at top level
|
|
571
|
-
signMessage: async (message) => {
|
|
572
|
-
if (typeof message === "string") {
|
|
573
|
-
return await owner.signMessage({
|
|
574
|
-
account: owner.account,
|
|
575
|
-
message
|
|
576
|
-
});
|
|
577
|
-
} else {
|
|
578
|
-
return await owner.signMessage({
|
|
579
|
-
account: owner.account,
|
|
580
|
-
message: {
|
|
581
|
-
raw: message.raw
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
567
|
const safeAccount = await toSafeSmartAccount({
|
|
588
568
|
client: publicClient,
|
|
589
|
-
owners: [
|
|
569
|
+
owners: [owner.account],
|
|
590
570
|
// Pass the owner object with address and signMessage capability
|
|
591
571
|
version: "1.4.1",
|
|
592
572
|
entryPoint: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyfai/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "TypeScript SDK for ZyFAI Yield Optimization Engine - Deploy Safe smart wallets, manage session keys, and interact with DeFi protocols",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|