Skip to content

Commit

Permalink
rename and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrostr committed Jan 18, 2025
1 parent 23883e6 commit 6afa461
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 47 deletions.
45 changes: 0 additions & 45 deletions listen-core/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion listen-core/Cargo.lock → listen-kit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion listen-core/Cargo.toml → listen-kit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "listen-core"
name = "listen-kit"
version = "0.2.0"
edition = "2021"
license = "MIT"
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions listen-kit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# listen-kit

Blazingly fast actions for AI Agents

## Quick Start

```rust
use listen_kit::{actions::Actions, util::env, constants::WSOL};
use solana_sdk::native_token::sol_to_lamports;

#[tokio::main]
async fn main() {
dotenv::dotenv().ok();
let actions = Actions::new(env("PRIVATE_KEY"), env("RPC_URL"));

let balance = actions.get_balance().await.unwrap();
println!("Balance: {}", balance);

let mint = "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump".to_string();
let price = actions.fetch_token_price(mint.clone()).await.unwrap();
println!("Price: {}", price);

// Trade 0.01 SOL for $Fartcoin
let slippage_bps = 100;
let tx_id = actions.trade(
WSOL.to_string(),
sol_to_lamports(0.01),
mint,
slippage_bps
).await.unwrap();
println!("Signature: {}", tx_id);
}
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions listen-kit/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
pub mod actions;
pub mod agent;
pub mod balance;
pub mod constants;
pub mod deploy_token;
pub mod jito;
pub mod jup;
pub mod price;
pub mod pump;
pub mod trade;
pub mod transfer;
pub mod util;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6afa461

Please sign in to comment.