Commit Graph

258 Commits

Author SHA1 Message Date
A91y
0aa4e5f77e feat: add approve proposal functionality to SolanaAgentKit 2025-01-05 15:44:56 +05:30
A91y
e24ba6e819 Merge branch 'main' into feat/squads_multisig 2024-12-30 11:02:17 +05:30
ARYAN
02130be8e6 Added a Telegram bot starter example (#84)
# Pull Request Description
Added a Telegram bot starter example, with steps on how to run and host
it successfully.

## Related Issue
Fixes #83 

## Changes Made
This PR adds the following changes:
- Adds an example on how we can use agent kit in a telegram bot using
nextjs
- 
  
## Implementation Details
- Used next js and ngrok or vercel to host the bot and telegram bot api
to have it.

## Transaction executed by agent 
Yes it is able to do everything.

## Prompt Used
NA

## Additional Notes
NA

## Checklist
- [ x  ] I have tested these changes locally
2024-12-30 06:43:49 +05:30
ARYAN
f29d0b109e Add support for querying other wallet balance (#79)
# Pull Request Description

## Related Issue
Implements #60 

## Changes Made
This PR adds the following changes:
- Added `getBalanceOther` method in `SolanaAgentKit` class
- Implemented `get_balance_other` tool
  
## Implementation Details
- This tool enables the agent to query SOL and SPL token balances of
other wallets

## Prompt Used
```
Prompt: What is the SOL balance of HHELE9Q7LsARJACq7cMCkoPStjZUomn4JphdHUMyK3op?
-------------------
{"status":"success","balance":49.893951194,"wallet":"HHELE9Q7LsARJACq7cMCkoPStjZUomn4JphdHUMyK3op","token":"SOL"}
-------------------
The wallet balance of HHELE9Q7LsARJACq7cMCkoPStjZUomn4JphdHUMyK3op is approximately 49.89 SOL.
-------------------

Prompt: Now get the balance of sSo14endRuUbvQaJS3dq36Q829a3A6BEfoeeRGJywEh token for that same wallet

-------------------
{"status":"success","balance":60.338328396,"wallet":"HHELE9Q7LsARJACq7cMCkoPStjZUomn4JphdHUMyK3op","token":"sSo14endRuUbvQaJS3dq36Q829a3A6BEfoeeRGJywEh"}
-------------------
The balance of the token sSo14endRuUbvQaJS3dq36Q829a3A6BEfoeeRGJywEh in the wallet HHELE9Q7LsARJACq7cMCkoPStjZUomn4JphdHUMyK3op is approximately 60.34 tokens.
-------------------
```

## 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
2024-12-30 06:35:56 +05:30
aryan
9f4b0324d7 chore: docs 2024-12-30 06:35:46 +05:30
aryan
20a4bcf4b5 Merge branch 'main' into feature/getBalanceOther 2024-12-30 06:33:33 +05:30
aryan
5a2a4c1a83 feat: SECURITY.md 2024-12-30 06:32:44 +05:30
ARYAN
cd7dc35e7d Create SECURITY.md 2024-12-30 05:25:39 +05:30
ARYAN
01a4efb0ce Create SECURITY.md 2024-12-30 05:24:29 +05:30
aryan
1dee947802 fix: pkg version 2024-12-30 05:13:55 +05:30
aryan
29a2ab9763 fix: node requirement 2024-12-30 05:13:33 +05:30
aryan
fab1441a00 chore: docs 2024-12-30 03:26:26 +05:30
ARYAN
ab8d705212 Fix: change lamports by getting mintInfo (#94)
# Pull Request Description

## Related Issue
Fixes #92 

## Changes Made
This PR adds the following changes:
- Fixed token decimal handling in trade function to support tokens with
different decimal places
- Added proper scaling of input amounts based on token's decimal places
- Added getMint import from @solana/spl-token
  
## Implementation Details
- Fetches mint info using `getMint` to determine token decimals
- Calculates correct scaled amount using `Math.pow(10, inputDecimals)`
- Supports tokens with any number of decimal places (e.g., USDC-6,
SOL-9)

## Transaction executed by agent 
Example transaction: [Insert your test transaction hash here]

## Prompt Used
Trade 0.0001 SOL for BONK

## Additional Notes
This fix ensures proper handling of token decimals, which is crucial
for:
- USDC (6 decimals)
- SOL (9 decimals)
- Other SPL tokens with varying decimal places

## 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
2024-12-30 03:03:20 +05:30
ARYAN
f20833976b Updated README.md with contributors and star graph (#99)
Added a PR to add the star graph and the contributors on the home
README.md page
2024-12-30 02:57:36 +05:30
Deepak
0138f7de89 Updated README.md with contributors and star graph 2024-12-30 02:29:51 +05:30
Lautaro
6b9a347f56 Fix: if token is sol 2024-12-29 16:03:40 -03:00
aryan
984f0390b4 feat: replit 2024-12-29 22:38:10 +05:30
Lautaro
3552ffe41c Fix: change lamports by getting mintInfo 2024-12-29 06:01:19 -03:00
A91y
e9922ed39e feat: add create_squads_multisig function and update deposit_to_multisig documentation for clarity 2024-12-28 22:05:14 +05:30
A91y
08b3d24dad refactor: remove unused imports in create_proposal.ts for cleaner code 2024-12-28 22:04:23 +05:30
A91y
28d5110fed feat: add createMultisigProposal method to SolanaAgentKit for creating proposals 2024-12-28 22:03:57 +05:30
A91y
dcdaae1b39 feat: update create_proposal function to include transactionIndex parameter for improved proposal creation 2024-12-28 22:03:50 +05:30
A91y
19b61d1997 feat: update transfer_from_multisig to include isNative parameter for associated token address retrieval 2024-12-28 22:03:00 +05:30
A91y
5c2eace633 feat: add create_proposal function for transferring SOL or SPL tokens from a multisig vault 2024-12-28 21:57:26 +05:30
A91y
9755beb541 feat: set default vaultIndex to 0 in depositToMultisig method for improved usability 2024-12-28 21:57:20 +05:30
A91y
777c88f4b4 feat: add transferFromMultisig method to SolanaAgentKit for transferring tokens from a multisig vault 2024-12-28 21:45:21 +05:30
A91y
ebad2b84f5 feat: add transfer_from_multisig function for transferring SOL or SPL tokens from a multisig vault 2024-12-28 21:44:10 +05:30
A91y
17eeb202d9 feat: add createSquadsMultisig and depositToMultisig methods to SolanaAgentKit 2024-12-28 21:26:13 +05:30
A91y
629a791763 feat: add deposit_to_multisig function for transferring SOL or SPL tokens 2024-12-28 21:26:06 +05:30
A91y
5ed370a2d3 refactor: rename createSquadsMultisig function to create_squads_multisig for consistency 2024-12-28 21:25:57 +05:30
A91y
075242bd91 feat: implement createSquadsMultisig functionality for multisig wallet creation 2024-12-28 20:13:17 +05:30
A91y
675bd399fc feat: add @sqds/multisig package to dependencies 2024-12-28 20:13:00 +05:30
Damjan Dimitrov
cbf67768e6 Merge branch 'main' into feature/getBalanceOther 2024-12-28 10:19:06 +01:00
Arpit Singh Bhatia
4bcbf0502a tg-bot-starter repo 2024-12-28 13:53:48 +05:30
aryan
4f0eaffa55 chore: docs 2024-12-28 03:01:03 +05:30
Damjan Dimitrov
8862570e20 Merge branch 'main' into feature/getBalanceOther 2024-12-27 22:25:26 +01:00
ARYAN
fd15656304 Langgraph (#78)
# Pull Request Description

## Related Issue
Fixes #61

## Changes Made
This PR adds the following changes:
- Added a new example demonstrating LangGraph integration with Solana
Agent Kit
- Implemented a multi-agent system with specialized agents for different
tasks
- Added state management and routing logic using LangGraph's StateGraph
- Integrated Tavily search capabilities for enhanced general-purpose
queries
- Added support for token swaps using Jupiter DEX
- Implemented TypeScript-based project structure with full type safety
- Added comprehensive documentation and architecture diagram

## Implementation Details
- Created a directed workflow using StateGraph with the following
components:
  - Manager Agent: Handles query classification and routing
- General Agent: Processes basic queries with Tavily search integration
  - Transfer/Swap Agent: Handles token transfers and DEX operations
  - Read Agent: Manages blockchain data queries
- Implemented state management using LangGraph annotations for query
classification
- Added environment-based configuration for API keys and RPC endpoints
- Integrated with external dependencies:
  - @langchain/community v0.3.20
  - @langchain/core v0.3.26
  - @langchain/langgraph v0.2.36
  - solana-agent-kit v1.3.0
- Set up TypeScript configuration with ESM support

## Architecture

<img width="801" alt="Screenshot 2024-12-27 at 5 59 26 PM"
src="https://github.com/user-attachments/assets/a90597ac-3bfc-47e1-b1de-5a17a3de106b"
/>


## Transaction executed by agent 
Example transaction: 


## Additional Notes
- The implementation follows a modular architecture as shown in the
architecture diagram
- Supports both read and write operations on the Solana blockchain
- Includes comprehensive error handling and type safety
- Provides flexible configuration through environment variables
- Project structure follows best practices with clear separation of
concerns
- Includes example queries for testing different agent pathways

## 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
2024-12-28 02:25:28 +05:30
ARYAN
9d14e951ca Implemented a Persistance agent (#77)
# Pull Request Description
It adds a Postgres database to have a persistent agent that remembers
chats even when shut and opened again.
## Related Issue
Fixes #76 

## Changes Made
This PR adds the following changes:
- Added an example of how we can integrate a Postgres db so that the
agent remembers its previous chats.
  
## Implementation Details
- included a postgres db to store chat for future reference
- 

## Transaction executed by agent 
NA

## Prompt Used
<img width="936" alt="image"
src="https://github.com/user-attachments/assets/0aa1bed2-e895-41bf-ad37-a52f679db7cf"
/>

see it remebers my name even when i closed it and ran again .

## Additional Notes

https://langchain-ai.github.io/langgraphjs/reference/classes/checkpoint_postgres.PostgresSaver.html

I used this above link to implement the changes.

## Checklist
- [ x ] I have tested these changes locally
2024-12-28 02:02:08 +05:30
Arpit Singh Bhatia
592c4987df fix 2024-12-28 02:00:49 +05:30
ARYAN
cfbad04e29 Update guides content and code snippets (#80)
# Pull Request Description

## Changes Made
This PR adds updates to the guides:

> `test_it_out.md`
- Fixed outdated code examples

> `add_your_own_tool.md`
- Prepend filename hints to code snippets (for easier navigation)
- Add more code snippets for agent usage and custom tool usage
2024-12-28 01:46:58 +05:30
Arpit Singh Bhatia
9de0153b9e readme 2024-12-28 01:41:17 +05:30
Arpit Singh Bhatia
9a454336b6 Merge branch 'sendaifun:main' into persistance-agent 2024-12-28 01:17:08 +05:30
ARYAN
929fc9df67 feat: created tiplink for Sol and spl tokens (#64)
# Pull Request Description
Agent can now create links with sol and spl tokens

## Related Issue
Fixes #21

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Added support for tiplinks for SOL 
- Also supports spl tokens

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 
![Screenshot 2024-12-26
115547](https://github.com/user-attachments/assets/29bc9110-57e8-4458-a563-dc8ccc6823be)
![Screenshot 2024-12-26
115606](https://github.com/user-attachments/assets/8789a346-5993-4277-9dc9-79271c400402)


## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```create me a tiplink for 0.001 sol```


## Checklist
- [x] I have tested these changes locally
- [ ] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2024-12-28 01:15:54 +05:30
aryan
5ab87242fd fix: lint 2024-12-28 01:13:26 +05:30
aryan
6895018562 Merge branch 'main' into add-tiplinks 2024-12-28 01:13:08 +05:30
aryan
e1f7c530ac chore: docs 2024-12-28 01:10:15 +05:30
ARYAN
1f04cbce16 Added Rock paper scissors blink to the solana agent kit (#42) 2024-12-28 01:04:01 +05:30
ARYAN
25ccf3ef9a Merge pull request #1 from SendArcade/SendArcade/main
fix: lint
2024-12-28 01:03:47 +05:30
aryan
6f687187e6 fix: lint 2024-12-28 00:54:50 +05:30
Damjan
5ba8df51d4 Update code snippets for adding new tools 2024-12-27 16:41:46 +01:00