Commit Graph

487 Commits

Author SHA1 Message Date
aryan
eb25c6b07b feat: move to tsx (#194)
Doing this because couple of folks (including myself) have faced issues
running `pnpm run test` on our local machines. `ts-node` has an open
issue on this, where it occasionally won't execute ESM files with the
new Typescript version (post v5.5)
https://github.com/TypeStrong/ts-node/issues/2086
2025-01-12 02:55:58 +05:30
aryan
dca508bda6 Refactored code to separate files protocol wise (#180)
Refactored code to separate files on a protocol folder basis and updated
agent code to be more maintainable..
This pull request was created for
https://app.gib.work/bounties/0b78790e-6d48-4ec3-b67f-46c96dac6b7d in an
attempt to solve a bounty #173 . Payment for the bounty is immediately
sent to the contributor after merge.
2025-01-12 02:51:32 +05:30
Arihant Bansal
338cc410ea feat: move to tsx 2025-01-12 00:16:13 +05:30
0xCipherCoder
a6f9b05e2a Updated protocol name instead of library name 2025-01-11 21:27:54 +05:30
0xCipherCoder
af85a502e0 Removed types in solayer 2025-01-11 14:42:51 +05:30
0xCipherCoder
48c81ac7e0 Added fix for the issue 2025-01-11 14:41:55 +05:30
0xCipherCoder
f1b8a118ac Merged main 2025-01-11 10:09:56 +05:30
0xCipherCoder
04a27f974c Merged main 2025-01-11 10:09:09 +05:30
aryan
677d17491c chore: docs + lint 2025-01-11 02:29:52 +05:30
aryan
88023dfe2d Update browser wallet for Whirlpools SDK (#182)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
- Created a custom Wallet class to support browser use of Orca tools


## Transaction executed by agent 
Example transaction:
https://solscan.io/tx/GNmgxM4ZRHURDWcgmhLmBrSG5RgF9yw5B4jzEXzWX2jpNvCbUsQyaMdkkH77au7pisJ89hJdrcs8dv54U8H3J8V?cluster=devnet

## Prompt Used
Using Devnet
```
i want to open a single sided position in pool 7MghXMotsf9CLr6Z9obV8g9Kt2y1Mqn6wXm2mdPhRnMe
```
then provide details

## Additional Notes

## 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
2025-01-11 02:27:33 +05:30
calintje
e5e25b0ab0 Fix 2025-01-10 20:39:43 +01:00
0xCipherCoder
3548321198 Removed tooling added 2025-01-10 19:33:55 +05:30
0xCipherCoder
054f825b97 Removed tooling added 2025-01-10 19:33:07 +05:30
0xCipherCoder
76bfa9764b Removed tooling added 2025-01-10 19:29:58 +05:30
0xCipherCoder
85eabc2263 Removed tooling added 2025-01-10 19:15:37 +05:30
0xCipherCoder
7032ed7d99 Added refactoring changes for agent, action and tools 2025-01-10 17:34:13 +05:30
aryan
fc92d443cf adding 2/2 multisig \w agent & user (#88)
# Pull Request Description

## Related Issue
Fixes #149 

## Changes Made
This PR adds the following changes:
- added create squads multisig
- deposit to multisig
- tx from multisig
- create proposal from multisig
- approve proposal from multisig
- reject proposal from multisig
- exexute proposal from multisig
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- added `@sqds/multisig` sdk

## Tests are added in comment below

## Transaction Links:

https://explorer.solana.com/tx/4weMdQnnkV3SW3JAngdpZz3WEeugWni2ep2MP71KTbtLGHTLF7ok2EVKZP9Ug8T4twqr9HsB3tjLUyrGLnngzYVS?cluster=devnet

https://explorer.solana.com/tx/4QUxE5VQGWZw1LCYbj3BYtzGfn2o45Zk71K8LBkTva8hAdv4o1jUNEwWmuQRMJpXY9yKKwiwD59tZRh6oXgd4Jzc?cluster=devnet

https://explorer.solana.com/tx/TVuzkLBkCtJ5PvroXLnnW1PTeLMQ4R9NeoiHeoHhsGR2gJX3cLjq1Ndq6DVD72dQLLbJM6CqnJZDYu9VSp4YbxV?cluster=devnet

https://explorer.solana.com/tx/62PDfY46rGFezTnVCbDHUeCMyoVCEfWdGJWkkDhFL1GoAcfznWgCYXo2DnSgpgZu59vvYuaNj5C32bjAkNnJZvtJ?cluster=devnet

https://explorer.solana.com/tx/3Pxvyo2MVEEbqcPcQ6Q6ErFTEu9EGHPwgciMuXUXzLsB8XTdyCZbxfrscxJbCbW8DgRVA6AomTXX6Uup9Bnubzpu?cluster=devnet

https://explorer.solana.com/tx/5MyWxoTUzL3Zb4rStXzqsX1Cp3L3ToQdYyPq2sDDHBHsJV9idoHZYcKQjzfmgkGdwg3mtJZdUeywuTGvhcdvzkGU?cluster=devnet

https://explorer.solana.com/tx/3haMJ9EoLfDA7H5ACPb1K1A9Eyezfx9DtB2eCUgNE38CkQd95KtZNEjRopaMva2bqtRvTzRNqkLVvbVcu2Gjzphs?cluster=devnet

https://explorer.solana.com/tx/4Rn1AD9bUGwQzN661pexyPEffp25bUujRUXk18NvfxinZD12rrBLdeASdtnb7QnDfgvwkfzwk2akgU4Sf8ek7XwR?cluster=devnet

## 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-10 05:18:08 +05:30
aryan
5ba7178399 Merge branch 'main' into feat/squads_multisig 2025-01-10 05:17:46 +05:30
aryan
6c66606d59 feat: change jup api to fetch token directly (#122)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- change jup api to fetch token directly
  
## Implementation Details
<!-- Provide technical details about the implementation -->
doc api: https://station.jup.ag/docs/token-list/token-list-api

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

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
Get token data from either a token address or ticker symbol
```

## Additional Notes
<!-- Any additional information that reviewers should know -->
<img width="1455" alt="image"
src="https://github.com/user-attachments/assets/1a95ec16-ad10-461e-8ca9-90f4f89616aa"
/>


## Checklist
- [x] I have tested these changes locally
- [ ] I have updated the documentation
- [ ] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-10 05:02:39 +05:30
A91y
06e025c1a8 Merge branch 'main' into feat/squads_multisig 2025-01-08 22:58:50 +05:30
aryan
75af298812 fix: lint 2025-01-08 22:43:27 +05:30
aryan
9540f48cd6 Feat: Add Docs to Readme (#162)
# Pull Request Description
Add Docs link to Readme
2025-01-07 20:24:00 +05:30
Scriptscrypt
e8338d1acc Fix: Readme 2025-01-07 20:21:28 +05:30
Scriptscrypt
21798bfa77 Chore: Readme to Ignore pattern 2025-01-07 20:13:58 +05:30
Scriptscrypt
d12f23451f Feat: README w docs 2025-01-07 20:13:30 +05:30
aryan
b57eb29e65 feat: add close empty spl-token accounts transaction (#118)
# Pull Request Description


## Changes Made
This PR adds the following changes:
-  all the close instruction for empty token accounts 
-  this instruction closes the token account and reclaim's the rent
  
## Implementation Details
- createCloseAccountInstruction from @solana/spl-token library to close
the spl-token account

## Transaction executed by agent 
 
<img width="1467" alt="Screenshot 2025-01-04 at 11 22 20 PM"
src="https://github.com/user-attachments/assets/1a48bb54-b76d-49f9-b425-b76b84e924e8"
/>

Example transaction: 

[transaction](https://explorer.solana.com/tx/3KmPyiZvJQk8CfBVVaz8nf3c2crb6iqjQVDqNxknnusyb1FTFpXqD8zVSCBAd1X3rUcD8WiG1bdSjFbeHsmcYGXY)


## Prompt Used
close my empty token accounts 

 

## 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-07 19:00:04 +05:30
aryan
afcf0ad9c1 Merge branch 'main' into feature/reclaim_rent 2025-01-07 18:58:59 +05:30
aryan
1073b6779d updated flash privilege settings and improved token support (#151)
# updated privilege settings for flash.trade

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- updated the open and close positions to read privilege from .env and
default to NONE
- added support for supported Token update based on flash-idk
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- updated /tools/flash_open_order and /tools/flash_close_order
- updated /utils/flashUItils to return the privilege set in .env

## Transaction executed by agent 
<!-- If applicable, provide example usage, transactions, or screenshots
-->
Example transaction: 
open trade:
https://explorer.solana.com/tx/RQh483VqoB8cwekPvpqNjQMydR1E9wwev3xiVXEJJfRdE2ozg3TjYTHQHJrjMB1EUhpbYhmX3dzfKuqdMMDdz61

close trade:

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

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```
open trade: open a 10x leveraged trade on flash trade with 10 USD of collateral using SOL long
close trade: close the existing SOL long trade with 10x leverage on flash trade
```

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

## Checklist
- [] 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-07 17:55:12 +05:30
aryan
3632b5028f Merge branch 'main' into main 2025-01-07 17:54:10 +05:30
aryan
aae57f881d Implemented 3Land SDK into solana-agent-kit (#136)
# Pull Request Description

## Changes Made
This PR adds the following changes:
- Integrated 3land SDK into send-ai-sdk to enable AI agents to create
Collections and NFTs
- Every  NFT creation automatically lists on 3.land marketplace
- Added comprehensive test suite for 3land tools integration
- Updated documentation with usage examples and implementation details

## Implementation Details
- Implemented new 3land tools module in `/test/tools/3land.ts`
- Added SDK wrapper functions for NFT and collection creation 

## Transaction executed by agent 
Example collection creation:
```typescript
const optionsWithBase58: StoreInitOptions = {
  privateKey: "",
  isMainnet: true, // if false, collection will be created on devnet 3.land (dev.3.land)
};

 const collectionOpts: CreateCollectionOptions = {
    collectionName: "",
    collectionSymbol: "",
    collectionDescription: "",
    mainImageUrl: ""
  };

const result = await agent.create3LandCollection(
      optionsWithBase58,
      collectionOpts
    );
```
example nft creation
```typescript
const optionsWithBase58: StoreInitOptions = {
  privateKey: "",
  isMainnet: true, // if false, listing will be on devnet 3.land (dev.3.land)
};
const collectionAccount = ""; //hash for the collection
const createItemOptions: CreateSingleOptions = {
  itemName: "",
  sellerFee: 500, //5%
  itemAmount: 100, //total items to be created
  itemSymbol: "",
  itemDescription: "",
  traits: [
    { trait_type: "", value: "" },
  ],
  price: 0, //100000000 == 0.1 sol, can be set to 0 for a free mint
  mainImageUrl: "",
  splHash: "", //present if listing is on a specific SPL token, if not present sale will be on $SOL
};
const isMainnet = true;
const result = await agent.create3LandNft(
  optionsWithBase58,
  collectionAccount,
  createItemOptions,
  isMainnet
);
```
## Additional Notes
- The integration enables seamless NFT creation and marketplace listing
through a single API call
- NFT listings can be done in any SPL token
- Test collection creation TX:
https://solscan.io/tx/4ypfwWedTwvVX5HLP9hZzc86CGbSLbBPStNNuXHw9eq9rmFeHtCZgccCkZhuKrNVWdy2RNEDBnYRY1Tq6t2iYAsj?cluster=devnet

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
2025-01-07 17:52:14 +05:30
Thrishank
8172654fbf Merge branch 'main' into feature/reclaim_rent 2025-01-07 16:43:21 +05:30
UjjwalGupta49
02c3f226c3 read flash privilege from agent config 2025-01-07 15:12:29 +05:30
biccsdev
9892b39a0c refactor 2025-01-06 21:43:36 -06:00
Victor Torres
7b4c4ffc2c Update README.md 2025-01-06 21:40:46 -06:00
biccsdev
bca4f6074c refactor create single and added create collection tool 2025-01-06 21:40:46 -06:00
biccsdev
99ae523734 env example 2025-01-06 21:39:31 -06:00
biccsdev
ae7878cca1 finished touches on testing file 2025-01-06 21:39:31 -06:00
biccsdev
b3555ebded test 2025-01-06 21:39:31 -06:00
biccsdev
4a86c2a688 missed this file 2025-01-06 21:37:54 -06:00
biccsdev
e680ddd4f3 3land tools implementation 2025-01-06 21:37:08 -06:00
UjjwalGupta49
ac7059eefb updated Config interface and generated docs 2025-01-06 23:08:51 +05:30
aryan
f987d8bda6 Add Market Making mode & Manifest cleanup (#144)
# Pull Request Description
Adds an AI guided Market Making mode and moves all Manifest tools to a
single file

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Creates a new mm mode (3) for market making
- Combines all manifest related tools into a single file
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- Added a mode which prompts the user to enter parameters to market make
on Manifest

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

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

![image](https://github.com/user-attachments/assets/2dbfe04e-4cfe-4495-86d2-24a9573b7c3f)
Subsequent aiMM

![image](https://github.com/user-attachments/assets/70cecd37-0acd-4cc4-b5d2-fa0ad863c821)

## 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-06 22:25:08 +05:30
DonDuala
f03f5dd3ff Move mm agent to examples 2025-01-06 12:35:52 -04:00
UjjwalGupta49
f77cada52a updated flash privilige settings and improved token support 2025-01-06 21:35:28 +05:30
DonDuala
57ce14f8b1 Merge branch 'main' into combine 2025-01-06 10:58:38 -05:00
aryan
249cd70d23 fix: pkg version 2025-01-06 20:41:14 +05:30
aryan
2504450e1a chore: docs + lint 2025-01-06 20:39:55 +05:30
thrishank
f827b3104c fix log 2025-01-06 19:05:13 +05:30
Thrishank
69c000d5c6 Merge branch 'main' into feature/reclaim_rent 2025-01-06 19:01:24 +05:30
aryan
94af73e3a5 Add Flash.Trade to Solana-agent-kit (#147)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- /utils/flashUtils.ts
- /tools/flash_open_trade.ts and /tools/flash_close_trade.ts
-
/langchain/index.ts
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- added /utils/flashUtils.ts - includes price fetching from Hermes,
loading for Beast NFT accounts and constants from the flash sdk
- added /tools/flash_open_trade.ts and flash_close_trade.ts to implement
opening and closing of leveraged trade orders using flash-idk
- updated
/langchain/index.ts with prompts JSON extraction and validation

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

https://solana.fm/tx/DvLKDvyTJFckhGQSLaJ7Dfj7djNj6UMbpBXXgNNdMFoHycuRcHZsgSGpAeLtTrfszSESFn3PEDQ3JKPb29KCGDT?cluster=mainnet-alpha

close position:

https://solana.fm/tx/dEKkBTzT5wbJSbYT8q2Vtc3G2cLzxSHheC8dZUFAAsxFEUXQES2amfvywkm8zGHu4Pe11dX4h1GbXMDkTwWvrL6?cluster=mainnet-alpha

## Prompt Used
<!-- If relevant, include the prompt or configuration used -->
```prompt to open a trade: open a 5x leveraged trade for SOL on long side using flash trade with 10 USD as collateral

prompt to close an existing trade: Close an existing 10x leveraged trade for SOL on long side
```

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


## Checklist
- [] 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-06 19:01:01 +05:30