Commit Graph

437 Commits

Author SHA1 Message Date
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
aryan
3ae4f7c21c Merge branch 'main' into UjjwalGupta49/main 2025-01-06 18:59:03 +05:30
aryan
db41218038 rm: auto doc generation (#150) 2025-01-06 18:55:02 +05:30
aryan
b78667710c rm: auto doc generation 2025-01-06 18:51:46 +05:30
UjjwalGupta49
9adc80ee32 export actions 2025-01-06 17:56:13 +05:30
UjjwalGupta49
de4e724365 move types and created actions 2025-01-06 17:50:39 +05:30
UjjwalGupta49
224d7ff5b3 flash docs 2025-01-06 10:10:48 +05:30
UjjwalGupta49
6f85cbddcd flash open and close position 2025-01-06 10:07:58 +05:30
Thrishank
c06a86322c Merge branch 'main' into feature/reclaim_rent 2025-01-05 21:37:27 +05:30
UjjwalGupta49
d90ee517d6 hermes client for flash price feed 2025-01-05 20:34:28 +05:30
DonDuala
47f19c4a25 Merge branch 'sendaifun:main' into combine 2025-01-05 09:32:49 -05:00
aryan
c749ebf7a2 rm explcitiy cache (#141)
fix the cache issue in workflow
2025-01-05 18:33:10 +05:30
aryan
07d058e6e7 lint fix 2025-01-05 18:29:59 +05:30
aryan
da050d0147 rm explcitiy cache 2025-01-05 18:27:05 +05:30
aryan
4be67a90c6 cache pnpm config (#140)
Fix the workflow config
2025-01-05 18:22:06 +05:30
aryan
0aacffb78d rever pull req template + add build 2025-01-05 18:21:47 +05:30
aryan
56d638cd96 cache pnpm config 2025-01-05 18:20:06 +05:30
aryan
90e10a913d fix: install pnpm (#138)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- 
- 
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- 
- 

## 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
- [ ] 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-05 18:18:04 +05:30
UjjwalGupta49
a1088797b3 resolve conflicts 2025-01-05 17:21:25 +05:30
Arihant Bansal
8af1b22e91 fix: install pnpm 2025-01-05 16:09:00 +05:30
aryan
8ab4d5ad5a Typo fix Update orca_open_centered_position_with_liquidity.ts (#134)
### Title
Typo fix in `orca_open_centered_position_with_liquidity.ts`

### Description
This pull request fixes a typo in the
`orca_open_centered_position_with_liquidity.ts` file. The word "cuurent"
has been corrected to "current."

### Changes
- Corrected the typo in the description: "a basis point (bps) offset
from the cuurent price of the pool" to "a basis point (bps) offset from
the current price of the pool."

### Impact
This is a documentation fix and does not affect the functionality of the
code.
2025-01-05 15:48:36 +05:30