Skip to content

Commit

Permalink
Merge pull request #38 from arihantbansal/rename-and-fixes
Browse files Browse the repository at this point in the history
feat: fix tools, and lint
  • Loading branch information
thearyanag authored Dec 24, 2024
2 parents 838a265 + 9552908 commit 2753794
Show file tree
Hide file tree
Showing 43 changed files with 638 additions and 566 deletions.
48 changes: 1 addition & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,60 +183,14 @@ import { PublicKey } from "@solana/web3.js";
### Fetch Price Data from Pyth

```typescript
import { pythFetchPrice } from "solana-agent-kit";

const price = await pythFetchPrice(
agent,
const price = await agent.pythFetchPrice(
"0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
);

console.log("Price in BTC/USD:", price);
```

## API Reference

### Core Functions

#### `deploy_token(agent, decimals?, name, uri, symbol, initialSupply?)`

Deploy a new SPL token with optional initial supply. If not specified, decimals default to 9.

#### `deploy_collection(agent, options)`

Create a new NFT collection with customizable metadata and royalties.

#### `mintCollectionNFT(agent, collectionMint, metadata, recipient?)`

Mint a new NFT as part of an existing collection.

#### `transfer(agent, to, amount, mint?)`

Transfer SOL or SPL tokens to a recipient.

#### `trade(agent, outputMint, inputAmount, inputMint?, slippageBps?)`

Swap tokens using Jupiter Exchange integration.

#### `get_balance(agent, token_address)`

Check SOL or token balance for the agent's wallet.

#### `lendAsset(agent, assetMint, amount, apiKey)`

Lend idle assets to earn interest with Lulo.

#### `stakeWithJup(agent, amount)`

Stake SOL with Jupiter to earn rewards.

#### `sendCompressedAirdrop(agent, mintAddress, amount, recipients, priorityFeeInLamports?, shouldLog?)`

Send an SPL token airdrop to many recipients at low cost via ZK Compression.

#### `pythFetchPrice(agent, priceFeedID)`

Fetch price data from Pyth's Hermes service.

## Dependencies

The toolkit relies on several key Solana and Metaplex libraries:
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

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

2 changes: 1 addition & 1 deletion docs/assets/search.js

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

Loading

0 comments on commit 2753794

Please sign in to comment.