-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(para): update Para pregen wallet flow with userShare
Changes: - Refactored createParaPregenWallet to remove agent-specific userShare mapping - Updated useParaPregenWallet to accept userShare instead of email - Modified action and tool schemas to use userShare - Removed unnecessary agent method modifications - Updated input handling in Para-related tools and actions
- Loading branch information
1 parent
c768c32
commit e20f034
Showing
11 changed files
with
32 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,34 +9,33 @@ const useParaPregenWalletAction: Action = { | |
|
||
], | ||
description: | ||
"Create a pregen wallet for Para", | ||
"Use a pregen wallet created with the CREATE_PARA_PREGEN_WALLET action", | ||
examples: [ | ||
[ | ||
{ | ||
input: { | ||
email: "[email protected]" | ||
userShare: "dawdaawdaw", | ||
}, | ||
output: { | ||
status: "success", | ||
message: "Pre-generated wallet used successfully.", | ||
address: "0xdasdnas", | ||
email:"[email protected]" | ||
address: "0xdasdnas" | ||
}, | ||
explanation: "Use a pregen wallet created with the CREATE_PARA_PREGEN_WALLET action", | ||
}, | ||
], | ||
], | ||
schema: z.object({ | ||
email: z | ||
userShare: z | ||
.string() | ||
.describe("The user share to use the wallet for") | ||
.describe("The user share to use the wallet for"), | ||
}), | ||
handler: async ( agent: SolanaAgentKit , input: Record<string, any>) => { | ||
try { | ||
|
||
|
||
const { email } = input; | ||
const response = await agent.useParaPregenWallet(email); | ||
const { userShare } = input; | ||
const response = await agent.useParaPregenWallet(userShare); | ||
|
||
return { | ||
status: "success", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters