Skip to content

Commit 3632b50

Browse files
authored
Merge branch 'main' into main
2 parents 02c3f22 + aae57f8 commit 3632b50

File tree

20 files changed

+9093
-928
lines changed

20 files changed

+9093
-928
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ Anyone - whether an SF-based AI researcher or a crypto-native builder - can brin
3535
- Balance checks
3636
- Stake SOL
3737
- Zk compressed Airdrop by Light Protocol and Helius
38-
38+
- **NFTs on 3.Land**
39+
- Create your own collection
40+
- NFT creation and automatic listing on 3.land
41+
- List your NFT for sale in any SPL token
3942
- **NFT Management via Metaplex**
4043
- Collection deployment
4144
- NFT minting
@@ -127,6 +130,57 @@ const result = await agent.deployToken(
127130

128131
console.log("Token Mint Address:", result.mint.toString());
129132
```
133+
### Create NFT Collection on 3Land
134+
```typescript
135+
const optionsWithBase58: StoreInitOptions = {
136+
privateKey: "",
137+
isMainnet: true, // if false, collection will be created on devnet 3.land (dev.3.land)
138+
};
139+
140+
const collectionOpts: CreateCollectionOptions = {
141+
collectionName: "",
142+
collectionSymbol: "",
143+
collectionDescription: "",
144+
mainImageUrl: ""
145+
};
146+
147+
const result = await agent.create3LandCollection(
148+
optionsWithBase58,
149+
collectionOpts
150+
);
151+
```
152+
153+
### Create NFT on 3Land
154+
When creating an NFT using 3Land's tool, it automatically goes for sale on 3.land website
155+
```typescript
156+
const optionsWithBase58: StoreInitOptions = {
157+
privateKey: "",
158+
isMainnet: true, // if false, listing will be on devnet 3.land (dev.3.land)
159+
};
160+
const collectionAccount = ""; //hash for the collection
161+
const createItemOptions: CreateSingleOptions = {
162+
itemName: "",
163+
sellerFee: 500, //5%
164+
itemAmount: 100, //total items to be created
165+
itemSymbol: "",
166+
itemDescription: "",
167+
traits: [
168+
{ trait_type: "", value: "" },
169+
],
170+
price: 0, //100000000 == 0.1 sol, can be set to 0 for a free mint
171+
mainImageUrl: "",
172+
splHash: "", //present if listing is on a specific SPL token, if not present sale will be on $SOL
173+
};
174+
const isMainnet = true;
175+
const result = await agent.create3LandNft(
176+
optionsWithBase58,
177+
collectionAccount,
178+
createItemOptions,
179+
isMainnet
180+
);
181+
182+
```
183+
130184

131185
### Create NFT Collection
132186

examples/agent-kit-langgraph/src/utils/solanaAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SolanaAgentKit, createSolanaTools } from "solana-agent-kit";
33
export const agentKit = new SolanaAgentKit(
44
process.env.SOLANA_PRIVATE_KEY!,
55
process.env.RPC_URL!,
6-
process.env.OPENAI_API_KEY!,
6+
{ OPENAI_API_KEY: process.env.OPENAI_API_KEY! },
77
);
88

99
export const solanaTools = createSolanaTools(agentKit);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
OPENAI_API_KEY=
2+
RPC_URL=
3+
SOLANA_PRIVATE_KEY=
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# AI Guided Market Making Agent
2+
3+
This agent showcases an ai guided market maker on Manifest, Solana's CLOB DEX. The agent guides the user to setup basic two-sided quotes on Manifest markets.
4+
[Reference](https://github.com/CKS-Systems/manifest)
5+
6+
## Key Features
7+
8+
- **Automated Quoting**: The agent automatically refreshes quotes on an interval.
9+
- **Reducing Complexity**: Designed to abstract away parameters for setting up market making.
10+
- **Random Model**: The market making introduces randomness to prevent front running or other negative botting behavoirs.
11+
12+
13+
## Example
14+
=== Market Maker Configuration ===
15+
16+
Enter the market ID: 2Uj8277fkaVBtTU6Wp2GPRbQC86SkSdgQ2mp1Q5N2LHc
17+
Enter the base token symbol (e.g., SEND): SEND
18+
Enter the quote token symbol (e.g., USDC): USDC
19+
20+
=== Quote Parameters (applies to both buy and sell sides) ===
21+
Enter number of quotes to place on each side: 4
22+
Enter minimum quote depth (% distance from mid price): 0.1
23+
Enter maximum quote depth (% distance from mid price): 2
24+
25+
=== Token Allowances ===
26+
Enter total SEND allowance: 2
27+
Enter total USDC allowance: 3
28+
29+
Enter update interval in seconds: 20
30+
31+
=== Configuration Summary ===
32+
{
33+
"marketId": "2Uj8277fkaVBtTU6Wp2GPRbQC86SkSdgQ2mp1Q5N2LHc",
34+
"baseToken": "SEND",
35+
"quoteToken": "USDC",
36+
"quoteParams": {
37+
"number": 4,
38+
"minDepth": 0.1,
39+
"maxDepth": 2
40+
},
41+
"allowance": {
42+
"base": 2,
43+
"quote": 3
44+
},
45+
"intervalSeconds": 20
46+
}
47+
48+
Is this configuration correct? (yes/no): yes
49+
50+
Starting market maker mode for SEND/USDC...

0 commit comments

Comments
 (0)