Commit Graph

286 Commits

Author SHA1 Message Date
DonDuala
3d50b4bc3d Merge branch 'main' into manifest 2024-12-31 09:07:47 -04:00
aryan
e623da114e Add Jup Fees to the platform (#98)
# Pull Request Description

## Related Issue
Fixes # (issue number)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- Added jupReferralAccount to allow devs to set Fee Accounts on trade
API (optional parameter)
- Added jupFeeBps to allow devs to set fee in bps  (optional parameter)
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- Added optional Parameter to trade API

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

https://solscan.io/tx/35b1wz1LjU5pEALq6m5Q6Gyc3QB3ejvsjNAYoy9PdHu9WP8SzGLjHi59sRPj8hvtntVMDMEguWuu273FZ3EbUSoZ
## 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
2024-12-31 16:29:40 +05:30
aryan
5048f19c50 feat: config 2024-12-31 16:28:23 +05:30
YCrydev
a20894807b push 2024-12-31 11:38:13 +01:00
YCrydev
c56b03d69f Merge remote-tracking branch 'upstream/main' into jup-referral-fee 2024-12-31 11:33:18 +01:00
aryan
a4548c2280 Fix some typos and grammar (#104)
# Pull Request Description

Not sure if you are interested in PRs fixing typo and grammar, but I
thought it a good way to start with the repo (so here we are 🤗)

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->

- Fixed some obvious typos and grammar
- Renamed persistance-agent to more natural persistent-agent 

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

## Checklist
- [x] I have tested these changes locally
- [ ]  I have updated the documentation
* I did not update the documentation yet, as there were many changes
when I ran `npm run docs`
2024-12-31 14:52:13 +05:30
krill
fcdf174ce8 📝 fix some more typos and grammar 2024-12-31 12:35:12 +09:00
krill
38a88239ca 👔 fix typo in func name 2024-12-31 12:34:44 +09:00
krill
0e6b78b971 🚚 fix more typos; rename example 2024-12-31 12:04:11 +09:00
krill
df386a8cbd 📝 fix typos 2024-12-31 12:02:55 +09:00
YCrydev
7429943942 update 2024-12-31 02:56:21 +01:00
DonDuala
0dea94c5b5 Add cancel and withdraw functionality 2024-12-30 17:59:32 -04:00
aryan
9500b68e1a Add: tensor trade support (#93)
# Pull Request Description
Add Tensor Trade SDK support for NFT trading operations

## Related Issue
Fixes #20

## Changes Made
This PR adds the following changes:
- Added `tensor_trade.ts` file in `src/tools` with NFT trading
functions:
  - `listNFTForSale`
  - `buyNFT`
  - `cancelListing`
- Integrated Tensor Trade functions into Langchain tools
- Added proper error handling and validation for NFT operations

## Implementation Details
- Integrated `@tensor-oss/tensorswap-sdk` for Tensor Trade Swap
- Added support for listing, buying, and canceling NFT listings
- Implemented proper transaction building and signing
- Added validation checks for NFT ownership and wallet balance
- Supports both compressed and non-compressed NFTs

## Transaction executed by agent 
Test transaction on mainnet:

## Prompt Used
I want to list my NFT for sale on Tensor Trade
NFT Mint Address: [NFT_MINT_ADDRESS]
Price: 1 SOL
Expiry Time: 3600

## Additional Notes
- Will add more comprehensive error handling based on testing results

## Checklist
- [x] I have tested these changes locally
- [ ] I have updated the documentation
- [ ] I have added transaction links
- [x] I have added the prompt used to test it
2024-12-31 02:52:33 +05:30
aryan
ba61f1db4b Merge branch 'main' into feature/tensor-sdk 2024-12-31 02:51:29 +05:30
aryan
9b8bd14cf5 chore: deploy to vercel 2024-12-31 02:39:56 +05:30
DonDuala
2246367a86 Fix limit orders 2024-12-30 16:06:34 -04:00
Lautaro Suarez
05effae52a Merge branch 'main' into feature/tensor-sdk 2024-12-30 14:04:12 -03:00
Lautaro
9fba6484b5 Fix: remove buyNFT not working with sdk 2024-12-30 14:00:55 -03:00
DonDuala
3153fd3c88 remove whirlpool solana kit 2024-12-30 12:51:32 -04:00
DonDuala
8ec1ea5f65 Merge branch 'main' into manifest 2024-12-30 12:50:13 -04:00
DonDuala
eaa4b1b155 Delete yarn.lock 2024-12-30 12:47:27 -04:00
DonDuala
6295396ba9 Add SolanaLimitOrderTool 2024-12-30 12:46:54 -04:00
aryan
b4ec76bb6c Update send transaction and orca tool (#59)
This PR adds the following 3 things:
- Single Sided pool creation can now be done on Devnet
- Changed the wrapping strategy for SOL to reduce transaction size in
case the agent does not have WSOL account
- Update send transaction logic. I noticed that Orca's tool is the only
tool that utilizes the `sendTx` function, so I took the liberty to
update the function to optimize it for transaction landing, which is
especially important in DeFi operations, including:
  - Include computeBugetSetUnitLimit instruction
- Replace the deprecated 'confirmTransaction' API method:
https://solana.com/docs/rpc/deprecated/confirmtransaction
- Client-side retry mechanism.
https://www.helius.dev/blog/how-to-land-transactions-on-solana
  
Example transaction executed by the agent:

https://solscan.io/tx/3u59wSqNBGJqKJjN4n9vzhtx1w637wVDDhhsmBmtE1S8hgv1XRLPTbcrahot48Ya9YSZFcYqQHu3f9H87ssE8JNu?cluster=devnet
2024-12-30 14:51:56 +05:30
aryan
93055a8837 Merge branch 'main' into update-orca-single-sided-pools-and-send_transaction 2024-12-30 14:51:22 +05:30
aryan
4c0124da97 chore: lint 2024-12-30 14:37:47 +05:30
aryan
dc181722c5 Upgrade NPM dependencies (#85)
# Pull Request Description

## Changes Made
Upgraded NPM dependencies to keep up to date.

The upgrades do not affect any specific SDKs, they upgrade the langchain
and openai SDK as well as other devDependencies
2024-12-30 14:21:36 +05:30
calintje
43953f262f Update description 2024-12-30 05:23:16 +01:00
calintje
3f9828d672 Update lockfile 2024-12-30 05:05:02 +01:00
calintje
20b1f4ab57 Remove console.logs 2024-12-30 05:00:58 +01:00
calintje
1e1588b3fc Finish Orca tools 2024-12-30 04:53:28 +01:00
DonDuala
8428d99e4b Fix order type import 2024-12-29 22:25:23 -04:00
DonDuala
284338af54 Add limit order support on Manifest 2024-12-29 21:57:51 -04:00
ARYAN
35781f4dc1 fix: rm package-lock.json 2024-12-30 07:05:39 +05:30
aryan
46ff233f35 chore: lint 2024-12-30 07:04:06 +05:30
Lautaro
98369a0912 Fix: change tcomp sdk for tensorswap sdk and fix functions 2024-12-29 22:17:30 -03:00
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
DonDuala
4ae9051957 Add create manifest market support 2024-12-29 19:29:16 -04:00
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