Commit Graph

360 Commits

Author SHA1 Message Date
aryan
6446244dee Fix manifest integration (#133) 2025-01-05 12:37:43 +05:30
DonDuala
3752d3f656 Fix manifest integration 2025-01-04 16:39:52 -04:00
aryan
805ff71f97 feat: fetch pyth price feed id (#82)
# Pull Request Description

## Related Issue
Fixes #19 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Add method to fetch pyth price feed ID
- Move to using Pyth Hermes API v2
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- Modify Pyth implementation to use hermes v2 api which is not supported
in the SDK yet
- Fetch price feed ID for given token symbol and then price


## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
fetch pyth price for SOL
```

<img width="713" alt="image"
src="https://github.com/user-attachments/assets/2c59186f-f31f-4d56-a76b-4c8682a0ca96"
/>


## Additional Notes
<!-- Any additional information that reviewers should know -->

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [ ] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-05 00:57:48 +05:30
Arihant Bansal
7fc51c5302 chore: lint + docs 2025-01-05 00:50:19 +05:30
Arihant Bansal
42ffa3da29 fix: pyth price feed 2025-01-05 00:48:31 +05:30
Arihant Bansal
a4f990f4c8 fix: url 2025-01-05 00:40:27 +05:30
aryan
9da44f0be3 fix: manifest sdk 2025-01-05 00:22:04 +05:30
Arihant Bansal
15a5a6b08d merge and docs 2025-01-04 23:41:47 +05:30
Arihant Bansal
8bd0b462d2 feat: update to hermes v2 2025-01-04 23:37:51 +05:30
aryan
06ad5ba728 chore: docs + lint 2025-01-04 15:29:47 +05:30
aryan
b3a15fb019 update FUNDING info 2025-01-04 15:19:44 +05:30
aryan
07fcc7e213 Add Adrena Protocol Open/Close PERP trade support (#108)
# Pull Request Description

## Changes Made
Add support for Open/Close PERP trade in the agent.
  
## Implementation Details
Rely on adrena IDL (anchor) and custom `src/utils/AdrenaClient.ts` to
derive necessary PDA and build `openOrIncreasePositionWithSwapLong`,
`openOrIncreasePositionWithSwapShort`, `closePositionLong` and
`closePositionShort` instructions.

## Transaction executed by agent 
Tested with the following:

```
const signature = await agent.openPerpTradeLong({
  price: 300, // $300 SOL Max price
  collateralAmount: 0.1, // 0.1 jitoSOL in
  collateralMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
  leverage: 50000, // x5
  tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
  slippage: 0.3, // 0.3%
});
```


https://explorer.solana.com/tx/33iLQ7BrS5xpMfhrXDGzCjrP3g7BHH63Sv6QEQw5qBzP2YnHVjNL9iHEDkDdzw2cF6zYECGVzoUV6qjth7r4wioT

and

```
const signature = await agent.closePerpTradeLong({
  price: 100, 
  tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL
});
```


https://explorer.solana.com/tx/3stHhJsVvxsJZEeWJwMrmXD6gFT29mM97a7Tj6cqtrY5joqAoHJgT1T6QtndZqNP6hFqdNqptvrtaPzLrxyJgCmZ

## Additional Notes

Can connect to https://app.adrena.xyz/ and see live positions and
positions history

![Screenshot 2025-01-01 at 15 14
46](https://github.com/user-attachments/assets/0d522704-7bb6-4e00-a6bd-72d86d8df0a2)

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-04 14:23:46 +05:30
Orex
a68f26d009 Add Adrena Protocol Open/Close PERP trade support 2025-01-04 10:26:12 +04:00
aryan
61abe10b0d feat: add Solayer staking tool (#116)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Add staking to Solayer through a Solana Actions/Blink endpoint
- 
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- Added stakeWithSolayer action
- Added stake_with_solayer tool
- Added tool to langchain

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction:
[https://solscan.io/tx/3jauR9XevrX9BFaz7VicPe3m3Xw3co6SPmCfZsj69WVAdkM8D4M3CkUH3Wayd794tEsmdHJ2zoqEmp7i5eX9L6uE](https://solscan.io/tx/3jauR9XevrX9BFaz7VicPe3m3Xw3co6SPmCfZsj69WVAdkM8D4M3CkUH3Wayd794tEsmdHJ2zoqEmp7i5eX9L6uE)

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
```

## Additional Notes
<!-- Any additional information that reviewers should know -->

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [ ] I have added the prompt used to test it
2025-01-04 04:07:11 +05:30
JoshuaSum
058877b4d5 Merge remote-tracking branch 'upstream/main' 2025-01-03 14:35:16 -08:00
aryan
7c3f4180a0 chore: docs + lint 2025-01-04 03:42:56 +05:30
aryan
da09193d9d feat: vercel-ai-sdk (#67)
# Pull Request Description

## Related Issue
Fixes #54 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Adds support for the Vercel AI SDK.
- Adds tests showcasing that the feature addition works.
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- In order to add support for the SDK I installed all required
dependencies such as `ai, @ai-sdk/openai, and zod`
- The overall integration was simple, however, quite tedious as it
required a lot of conversions from the existing langchain integration

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 
- TX link:
[4W5LFS9GnxeSffD1S2teUhg5e6VgL6P2DAQ4LQYqygk2nQJJLTtyi38zj5FaM2RiZe53ZmhRjuVqp47fXgnQwtva](https://solscan.io/tx/4W5LFS9GnxeSffD1S2teUhg5e6VgL6P2DAQ4LQYqygk2nQJJLTtyi38zj5FaM2RiZe53ZmhRjuVqp47fXgnQwtva)
- TX link:
[3oqHWwxUV6iz1ASxSyUikTPwA5MNySiUeBxzb5r2craoxEQXWdtXwtRkLnuDmYECvZZHZe6KvP7kTrydDrckGNXf](https://solscan.io/tx/3oqHWwxUV6iz1ASxSyUikTPwA5MNySiUeBxzb5r2craoxEQXWdtXwtRkLnuDmYECvZZHZe6KvP7kTrydDrckGNXf)
- TX link:
[51Wb8aQz1HE6X9pXmR9QJDoeEbV8chv8uEjzKdyTJfskngNiJj32VeEvRRHD8JKEXR6ydqqbCvfyDygWmdqQHtDx](https://solscan.io/tx/51Wb8aQz1HE6X9pXmR9QJDoeEbV8chv8uEjzKdyTJfskngNiJj32VeEvRRHD8JKEXR6ydqqbCvfyDygWmdqQHtDx)
- TX link:
[5yu133Sj2vztDHa43f7VASkibziDwSrYiZUuv1S9E6ov3S6N1bXyUa7MXDtV2E4XJLK4SfAepRC3fZqMEa4SnNyj](https://solscan.io/tx/5yu133Sj2vztDHa43f7VASkibziDwSrYiZUuv1S9E6ov3S6N1bXyUa7MXDtV2E4XJLK4SfAepRC3fZqMEa4SnNyj)
- Screenshot:
![Screenshot 2024-12-26 at 16 14
54](https://github.com/user-attachments/assets/69bbcdba-0c82-4af2-874d-c07493677124)


## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
- No particular prompt was used. I ran `pnpm run test:vercel-ai`, chose
the autonomous option and let it do it's thing.

## Additional Notes
<!-- Any additional information that reviewers should know -->
The code `_call`/`execute` can be made reusable in case of any future
agent/platform integrations. This could be made into another bounty as
it will be quite tedious as well and type standards would need to be set
for maximum compatibility and least overhead down the line.

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-03 23:16:38 +05:30
Michael Essiet
9b96db03f9 Merge branch 'main' into feature/vercel-ai-sdk 2025-01-03 18:27:53 +01:00
aryan
cb0e3a682a Rugcheck API Integrated [Latest] (#109)
# Pull Request Description
Provides a streamlined integration with the RugCheck API for Solana
tokens, allowing developers to access and interact with key features
like token reports, statistics, and voting functionality.
## Related Issue
Fixes # (issue number)
#17 
and it's a followm up and latest pull for this PR #90 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
Integrated Endpoints and Methods : 
**GET** `/tokens/{mint}/report/summary`: Generate a summary report for a
specific token.
**GET** `/tokens/{mint}/report`: Fetch a detailed report for a specific
token.

## Implementation Details
<!-- Provide technical details about the implementation -->

This integration enables efficient access to RugCheck's token data and
analytics, making it a valuable tool for developers.

**Features** : 
- Generate a summary report for a specific token.
- Retrieve a detailed report for a specific token.

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
```

## Additional Notes
<!-- Any additional information that reviewers should know -->

## Checklist
- [x] I have tested these changes locally
- [ ] I have updated the documentation
- [ ] I have added a transaction link
- [ ] I have added the prompt used to test it
2025-01-03 22:55:30 +05:30
aryan
b3a02fe24b Merge branch 'main' into main 2025-01-03 22:55:22 +05:30
michaelessiet
014af521aa fix: catch up langchain tool to main 2025-01-03 18:25:01 +01:00
michaelessiet
c2bf6191ff fix: lint 2025-01-03 18:22:32 +01:00
michaelessiet
a8952f3308 fix: revert changes to the langchain tool 2025-01-03 18:13:08 +01:00
Michael Essiet
487a0bd037 Merge branch 'main' into feature/vercel-ai-sdk 2025-01-03 17:49:45 +01:00
Joshua Sum
09ffec2763 Remove (input is a JSON string) from Langchain tool 2025-01-03 16:44:24 +08:00
aryan
bfa7872a81 Add batch order from Manifest (#114)
# Pull Request Description

## Related Issue

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Adds batch order functionality from Manifest for easier market making
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- Allow pattern based prompts for easier quote production

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction:
https://solscan.io/tx/64P3YHsC4Zh9GKmT6EubHfy8pEc2vYNPYF8NApb8P4LD57to1WisQfQZ7vFhwup3UgJqtGCmiRy7TW6VCrkmNTHP

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->

![image](https://github.com/user-attachments/assets/d62d8908-5de5-4784-adf3-8a3a2afa3ae7)

## Additional Notes
<!-- Any additional information that reviewers should know -->

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-03 02:10:26 +05:30
aryan
566480344e typo fix Update README.md (#119)
# Pull Request Title  
**Fix Typo in `README.md`**

## Description  
This pull request corrects a minor typo in the `README.md` file for the
`persistent-agent` example. Specifically, "ur PostgreSQL databse" was
corrected to "your PostgreSQL database" for improved readability and
professionalism.

### Changes Made:
- **File Modified:** `examples/persistent-agent/README.md`
- **Summary of Changes:**  
  - Corrected "databse" to "database."

## Checklist  
- [x] Typos corrected to enhance clarity and professionalism.
- [x] Verified that the overall instructions remain accurate and
unchanged.

## Additional Notes  
This change is purely editorial and does not affect the functionality or
structure of the code.

---

**Allow edits by maintainers:** [x]
2025-01-03 02:05:49 +05:30
teenager-ETH
f1c5213742 typo fix Update README.md 2025-01-02 19:46:36 +01:00
JoshuaSum
1a34e9a4e5 Add Solayer staking through blinks 2025-01-01 17:41:46 -08:00
DonDuala
e8f8e453e5 Add batch order from Manifest 2025-01-01 18:35:14 -04:00
simplysabir
376eaadffe fix: latest pull 2025-01-01 17:17:24 +05:30
michaelessiet
e363439c80 chore: generate doc 2025-01-01 05:12:23 +01:00
michaelessiet
802f42ca6f fix: update to the new actions architecture and add the wallet address action 2025-01-01 05:11:03 +01:00
Michael Essiet
9b934d636f Merge branch 'main' into feature/vercel-ai-sdk 2025-01-01 04:11:57 +01:00
aryan
42b64f2264 Fix/actions (#106)
# Pull Request Description

## Changes Made
This PR adds the following changes:
- Fixes the naming for each action 
  
## Checklist
- [ Y] I have tested these changes locally
- [ Y] I have updated the documentation
2025-01-01 03:44:58 +05:30
aryan
ff26c252fd fix: pkg for actions 2025-01-01 03:43:14 +05:30
aryan
e2f1536774 fix: naming 2025-01-01 03:37:56 +05:30
aryan
18b719012b fix: pkg version 2025-01-01 03:23:17 +05:30
aryan
31713f9fac chore: docs 2025-01-01 03:22:52 +05:30
aryan
16f7dc62a5 feat: Implement framework-independent Action interface (#72)
This PR implements a framework-independent Action interface inspired by
Eliza, making the tools more flexible and reusable across different
frameworks.

Changes:
- Created independent actions under `src/actions/`
- Implemented Zod validation for type safety
- Converted all LangChain tools to use actions
- Added natural language matching with similes
- Improved error handling and response formats
2025-01-01 03:05:53 +05:30
aryan
9bf1755c75 Merge branch 'main' into gib-bounty-sol756670 2025-01-01 03:04:34 +05:30
aryan
e438f8e4fa fix: dependency 2025-01-01 02:56:34 +05:30
aryan
42e8e4758a wip: langchain 2025-01-01 02:51:40 +05:30
aryan
15034ac749 chore: docs 2025-01-01 02:41:49 +05:30
aryan
52a38bab2a Add Limit Orders Support from Manifest (#100)
# Pull Request Description
Add support for Agents to be able to create limit orders on Manifest.
Implements create market and place limit order. Can consider adding
cancel and other features in follow ups.

## Changes Made
This PR adds the following changes:
- support for manifest limit orders and market creation
  
## Implementation Details
- use manifest-sdk

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 
Create Market:
https://solscan.io/tx/59HgraXSzpmNtDovUfBUErjBwc2ggLtwfaYmrXdwR88HES6pLWHQWobHR85WmR3gHMavoEKLshCyJqx3Y6BZu8ku
Place limit order:
https://solscan.io/tx/41d2CGSGdqkxXbuBDJwBniN3E9tN6hW7Tmo7oHQ1N1p5szejYhugKTLHaMNwS6KVp3DhMcTmZpkJMoWwKEpJAuf5

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
```

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-01 02:20:36 +05:30
DonDuala
8cc8d37d28 Update docs 2024-12-31 16:43:42 -04:00
DonDuala
a23156895f Merge branch 'main' into manifest 2024-12-31 14:53:50 -04:00
aryan
4d6d44afe3 depreceated issue (#105)
# Pull Request Description

## Changes Made
This PR adds the following changes:
- The config object was introduced
- The old constructor was marked as deprecated 

## Checklist
- [ Y] I have tested these changes locally
- [ Y] I have updated the documentation
2024-12-31 23:56:57 +05:30
aryan
f1e4fb21ac depreceated issue 2024-12-31 23:54:31 +05:30
aryan
e17e2138c4 Feat: add langchain nextjs template (#68)
## Related Issue
Fixes #58 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- I added an examples directory with a README file which can be used to
list templates, projects and examples built by the team and community
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- The template link contained in the README is a template I created
using the Nextjs and Langchain template.
- The template includes a proper implementation of the Solana Agent Kit
and Langchain response streaming.

## Additional Notes
<!-- Any additional information that reviewers should know -->
I believe that examples should be left out of library repos, not just
because of bundle size but because the repo itself can get quite big and
maintaining a monorepo never scales well.

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
2024-12-31 23:31:38 +05:30