-
Notifications
You must be signed in to change notification settings - Fork 12
Expand plugin service APIs, add wallet portfolio support (from PR9), and migrate build to Bun #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e8f4633
.env, .elizadb*
odilitime 64be54c
core to latest, bump spl-token, add spl-token-metadata
odilitime c029a73
fix npm org
odilitime edaf09f
general update
odilitime 296a2a7
add declarationDir & exclude
odilitime 70f0881
add declarationDir
odilitime 7b803fd
modernize init, export service symbols, update description
odilitime f0a04b9
new file per PR9
odilitime c5f2503
getAddressesTypes(), getCirculatingSupplies(), getDecimals(), getToke…
odilitime 2c7f488
SOL_ADDRESS isn't required
odilitime be2e9a5
minor clean up
odilitime 7812a62
bump tsup/typescript versions
odilitime a859be4
go to TS 5.9.3
odilitime e93026c
fix ServiceTypeName type
odilitime e4c08ba
bun build
odilitime 878a32d
switch to bun build, include service-interfaces, bun-types, more deps…
odilitime 5a04d1a
modernize, fix types
odilitime c02c208
modernize, guards/fix types
odilitime 47c87b8
newer zod uses issues not errors
odilitime dad5abc
fix types
odilitime dfbe9d0
update comment to match
odilitime 3b1065c
change lib, remove paths/baseUrl, gpt reorder
odilitime 00695c6
bun types, no declaration
odilitime 1dfee25
ISolanaPluginServiceAPI/IWalletService extension/support, type fixes
odilitime 29a91dc
remove types
odilitime ecccb09
make only public key required
odilitime 759f9cb
getPublicKey is not async
odilitime a1d5e52
getPortfolio - fix assets
odilitime f020d0e
implement transferSol, fetchPrices update key, getWalletKeypair use p…
odilitime ae7546e
split SolanaWalletService from SolanaService
odilitime a5afbb5
split SolanaWalletService from SolanaService, adjust private/public, …
odilitime 9b98467
add catch to init promise
odilitime d9396e8
getBalance fixes, clean up subscription, fix types
odilitime 60eda4b
getBalance fix, getAddressesTypes better implementation, fix warning
odilitime dac64af
additional number warning fixes
odilitime fcf5815
fix name in comment
odilitime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| node_modules | ||
| .turbo | ||
| dist | ||
| .env | ||
| .elizadb | ||
| .elizadb-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env bun | ||
| /** | ||
| * Build script for @elizaos/plugin-solana using standardized build utilities | ||
| */ | ||
|
|
||
| import { createBuildRunner } from '../../build-utils'; | ||
odilitime marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // Create and run the standardized build runner | ||
| const run = createBuildRunner({ | ||
| packageName: '@elizaos/plugin-solana', | ||
| buildOptions: { | ||
| entrypoints: ['src/index.ts'], | ||
| outdir: 'dist', | ||
| target: 'bun', // instead of 'node' | ||
| format: 'esm', | ||
| strict: true, | ||
| clean: true, | ||
| external: [ | ||
| // keep third-party externals | ||
| 'dotenv','@reflink/reflink','@node-llama-cpp', | ||
| 'agentkeepalive','safe-buffer','base-x','bs58','borsh', | ||
| '@solana/buffer-layout','querystring', | ||
| '@elizaos/core','@elizaos/service-interfaces','zod', | ||
| 'node:stream/web', // optional if you reference it; bun-types has it | ||
| 'fs','path','https','http','stream','buffer' | ||
| ], | ||
| sourcemap: true, | ||
| minify: false, | ||
| generateDts: false, | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| }); | ||
|
|
||
|
|
||
| // Execute the build | ||
| run().catch((error) => { | ||
| //console.error('Build script error:', error); | ||
| process.exit(1); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Solana Plugin Environment Variables | ||
| # Copy this file to .env and fill in your actual values | ||
|
|
||
| # Solana RPC URL (required) | ||
| # You can use public endpoints or get a dedicated one from providers like Helius, QuickNode, etc. | ||
| SOLANA_RPC_URL=https://api.mainnet-beta.solana.com | ||
|
|
||
| # Birdeye API Key (required for price data and portfolio valuation) | ||
| # Get your free API key from https://birdeye.so/ | ||
| BIRDEYE_API_KEY=YourBirdeyeApiKeyHere | ||
|
|
||
| # Optional: Helius API Key (for enhanced RPC features) | ||
| # Get your API key from https://helius.xyz/ | ||
| HELIUS_API_KEY=YourHeliusApiKeyHere | ||
|
|
||
| # Solana Private Key (base58 encoded) | ||
| # Required for sending transactions (like transfers, swaps) and for account subscriptions. | ||
| # If not provided, the plugin will operate in a read-only mode for basic portfolio viewing (if public key was previously used/cached or if functionality is adapted to not require it for reads). | ||
| # WARNING: Keep this secret and never commit to version control if you put a real one here for testing. | ||
| # For development, if this is not set, a new key may be generated by some test environments. | ||
| SOLANA_PRIVATE_KEY=YourPrivateKeyHere_Base58Encoded_e_g_5jZ2p... | ||
|
|
||
| # Optional: Slippage tolerance for swaps (default: 0.5%) | ||
| SLIPPAGE=0.5 | ||
|
|
||
| # Optional: SOL token address (usually the wrapped SOL address for DeFi interactions) | ||
| SOL_ADDRESS=So11111111111111111111111111111111111111112 | ||
|
|
||
| # Example values for testing (replace with your actual values if needed): | ||
| # SOLANA_RPC_URL=https://api.mainnet-beta.solana.com | ||
| # BIRDEYE_API_KEY=your-birdeye-api-key-here | ||
| # SOLANA_PRIVATE_KEY= # Fill with a testnet/devnet private key for transaction tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.