|
2262 | 2262 | "isWritable": true, |
2263 | 2263 | "isSigner": true, |
2264 | 2264 | "isOptional": false, |
2265 | | - "docs": [], |
| 2265 | + "docs": ["Funding account (must be a system account)."], |
2266 | 2266 | "defaultValue": { "kind": "payerValueNode" } |
2267 | 2267 | }, |
2268 | 2268 | { |
|
2271 | 2271 | "isWritable": true, |
2272 | 2272 | "isSigner": false, |
2273 | 2273 | "isOptional": false, |
2274 | | - "docs": [] |
| 2274 | + "docs": ["Associated token account address to be created."] |
2275 | 2275 | }, |
2276 | 2276 | { |
2277 | 2277 | "kind": "instructionAccountNode", |
2278 | 2278 | "name": "owner", |
2279 | 2279 | "isWritable": false, |
2280 | 2280 | "isSigner": false, |
2281 | 2281 | "isOptional": false, |
2282 | | - "docs": [] |
| 2282 | + "docs": ["Wallet address for the new associated token account."] |
2283 | 2283 | }, |
2284 | 2284 | { |
2285 | 2285 | "kind": "instructionAccountNode", |
2286 | 2286 | "name": "mint", |
2287 | 2287 | "isWritable": false, |
2288 | 2288 | "isSigner": false, |
2289 | 2289 | "isOptional": false, |
2290 | | - "docs": [] |
| 2290 | + "docs": ["The token mint for the new associated token account."] |
2291 | 2291 | }, |
2292 | 2292 | { |
2293 | 2293 | "kind": "instructionAccountNode", |
2294 | 2294 | "name": "systemProgram", |
2295 | 2295 | "isWritable": false, |
2296 | 2296 | "isSigner": false, |
2297 | 2297 | "isOptional": false, |
2298 | | - "docs": [], |
| 2298 | + "docs": ["System program."], |
2299 | 2299 | "defaultValue": { |
2300 | 2300 | "kind": "publicKeyValueNode", |
2301 | | - "publicKey": "11111111111111111111111111111111", |
2302 | | - "identifier": "splSystem" |
| 2301 | + "publicKey": "11111111111111111111111111111111" |
2303 | 2302 | } |
2304 | 2303 | }, |
2305 | 2304 | { |
|
2308 | 2307 | "isWritable": false, |
2309 | 2308 | "isSigner": false, |
2310 | 2309 | "isOptional": false, |
2311 | | - "docs": [], |
| 2310 | + "docs": ["SPL Token program."], |
2312 | 2311 | "defaultValue": { |
2313 | 2312 | "kind": "publicKeyValueNode", |
2314 | | - "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", |
2315 | | - "identifier": "splToken" |
| 2313 | + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" |
2316 | 2314 | } |
2317 | 2315 | } |
2318 | 2316 | ], |
2319 | 2317 | "arguments": [], |
2320 | 2318 | "name": "createAssociatedToken", |
2321 | | - "docs": [], |
| 2319 | + "docs": [ |
| 2320 | + "Creates an associated token account for the given wallet address and", |
| 2321 | + "token mint Returns an error if the account exists." |
| 2322 | + ], |
2322 | 2323 | "optionalAccountStrategy": "programId" |
2323 | 2324 | }, |
2324 | 2325 | { |
|
2330 | 2331 | "isWritable": true, |
2331 | 2332 | "isSigner": true, |
2332 | 2333 | "isOptional": false, |
2333 | | - "docs": [], |
| 2334 | + "docs": ["Funding account (must be a system account)."], |
2334 | 2335 | "defaultValue": { "kind": "payerValueNode" } |
2335 | 2336 | }, |
2336 | 2337 | { |
|
2339 | 2340 | "isWritable": true, |
2340 | 2341 | "isSigner": false, |
2341 | 2342 | "isOptional": false, |
2342 | | - "docs": [] |
| 2343 | + "docs": ["Associated token account address to be created."] |
2343 | 2344 | }, |
2344 | 2345 | { |
2345 | 2346 | "kind": "instructionAccountNode", |
2346 | 2347 | "name": "owner", |
2347 | 2348 | "isWritable": false, |
2348 | 2349 | "isSigner": false, |
2349 | 2350 | "isOptional": false, |
2350 | | - "docs": [] |
| 2351 | + "docs": ["Wallet address for the new associated token account."] |
2351 | 2352 | }, |
2352 | 2353 | { |
2353 | 2354 | "kind": "instructionAccountNode", |
2354 | 2355 | "name": "mint", |
2355 | 2356 | "isWritable": false, |
2356 | 2357 | "isSigner": false, |
2357 | 2358 | "isOptional": false, |
2358 | | - "docs": [] |
| 2359 | + "docs": ["The token mint for the new associated token account."] |
2359 | 2360 | }, |
2360 | 2361 | { |
2361 | 2362 | "kind": "instructionAccountNode", |
2362 | 2363 | "name": "systemProgram", |
2363 | 2364 | "isWritable": false, |
2364 | 2365 | "isSigner": false, |
2365 | 2366 | "isOptional": false, |
2366 | | - "docs": [], |
| 2367 | + "docs": ["System program."], |
2367 | 2368 | "defaultValue": { |
2368 | 2369 | "kind": "publicKeyValueNode", |
2369 | | - "publicKey": "11111111111111111111111111111111", |
2370 | | - "identifier": "splSystem" |
| 2370 | + "publicKey": "11111111111111111111111111111111" |
2371 | 2371 | } |
2372 | 2372 | }, |
2373 | 2373 | { |
|
2376 | 2376 | "isWritable": false, |
2377 | 2377 | "isSigner": false, |
2378 | 2378 | "isOptional": false, |
2379 | | - "docs": [], |
| 2379 | + "docs": ["SPL Token program."], |
2380 | 2380 | "defaultValue": { |
2381 | 2381 | "kind": "publicKeyValueNode", |
2382 | | - "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", |
2383 | | - "identifier": "splToken" |
| 2382 | + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" |
2384 | 2383 | } |
2385 | 2384 | } |
2386 | 2385 | ], |
2387 | 2386 | "arguments": [], |
2388 | | - "name": "createIdempotentAssociatedToken", |
2389 | | - "docs": [], |
| 2387 | + "name": "createAssociatedTokenIdempotent", |
| 2388 | + "docs": [ |
| 2389 | + "Creates an associated token account for the given wallet address and", |
| 2390 | + "token mint, if it doesn't already exist. Returns an error if the", |
| 2391 | + "account exists, but with a different owner." |
| 2392 | + ], |
2390 | 2393 | "optionalAccountStrategy": "programId" |
2391 | 2394 | }, |
2392 | 2395 | { |
|
2398 | 2401 | "isWritable": true, |
2399 | 2402 | "isSigner": false, |
2400 | 2403 | "isOptional": false, |
2401 | | - "docs": [] |
| 2404 | + "docs": [ |
| 2405 | + "Nested associated token account, must be owned by `ownerAssociatedAccountAddress`." |
| 2406 | + ] |
2402 | 2407 | }, |
2403 | 2408 | { |
2404 | 2409 | "kind": "instructionAccountNode", |
2405 | 2410 | "name": "nestedTokenMintAddress", |
2406 | 2411 | "isWritable": false, |
2407 | 2412 | "isSigner": false, |
2408 | 2413 | "isOptional": false, |
2409 | | - "docs": [] |
| 2414 | + "docs": ["Token mint for the nested associated token account."] |
2410 | 2415 | }, |
2411 | 2416 | { |
2412 | 2417 | "kind": "instructionAccountNode", |
2413 | 2418 | "name": "destinationAssociatedAccountAddress", |
2414 | 2419 | "isWritable": true, |
2415 | 2420 | "isSigner": false, |
2416 | 2421 | "isOptional": false, |
2417 | | - "docs": [] |
| 2422 | + "docs": ["Wallet's associated token account."] |
2418 | 2423 | }, |
2419 | 2424 | { |
2420 | 2425 | "kind": "instructionAccountNode", |
2421 | 2426 | "name": "ownerAssociatedAccountAddress", |
2422 | 2427 | "isWritable": false, |
2423 | 2428 | "isSigner": false, |
2424 | 2429 | "isOptional": false, |
2425 | | - "docs": [] |
| 2430 | + "docs": [ |
| 2431 | + "Owner associated token account address, must be owned by `walletAddress`." |
| 2432 | + ] |
2426 | 2433 | }, |
2427 | 2434 | { |
2428 | 2435 | "kind": "instructionAccountNode", |
2429 | 2436 | "name": "ownerTokenMintAddress", |
2430 | 2437 | "isWritable": false, |
2431 | 2438 | "isSigner": false, |
2432 | 2439 | "isOptional": false, |
2433 | | - "docs": [] |
| 2440 | + "docs": ["Token mint for the owner associated token account."] |
2434 | 2441 | }, |
2435 | 2442 | { |
2436 | 2443 | "kind": "instructionAccountNode", |
2437 | 2444 | "name": "walletAddress", |
2438 | 2445 | "isWritable": true, |
2439 | 2446 | "isSigner": true, |
2440 | 2447 | "isOptional": false, |
2441 | | - "docs": [] |
| 2448 | + "docs": ["Wallet address for the owner associated token account."] |
2442 | 2449 | }, |
2443 | 2450 | { |
2444 | 2451 | "kind": "instructionAccountNode", |
2445 | 2452 | "name": "tokenProgram", |
2446 | 2453 | "isWritable": false, |
2447 | 2454 | "isSigner": false, |
2448 | 2455 | "isOptional": false, |
2449 | | - "docs": [], |
| 2456 | + "docs": ["SPL Token program."], |
2450 | 2457 | "defaultValue": { |
2451 | 2458 | "kind": "publicKeyValueNode", |
2452 | | - "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", |
2453 | | - "identifier": "splToken" |
| 2459 | + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" |
2454 | 2460 | } |
2455 | 2461 | } |
2456 | 2462 | ], |
2457 | 2463 | "arguments": [], |
2458 | 2464 | "name": "recoverNestedAssociatedToken", |
2459 | | - "docs": [], |
| 2465 | + "docs": [ |
| 2466 | + "Transfers from and closes a nested associated token account: an", |
| 2467 | + "associated token account owned by an associated token account.", |
| 2468 | + "", |
| 2469 | + "The tokens are moved from the nested associated token account to the", |
| 2470 | + "wallet's associated token account, and the nested account lamports are", |
| 2471 | + "moved to the wallet.", |
| 2472 | + "", |
| 2473 | + "Note: Nested token accounts are an anti-pattern, and almost always", |
| 2474 | + "created unintentionally, so this instruction should only be used to", |
| 2475 | + "recover from errors." |
| 2476 | + ], |
2460 | 2477 | "optionalAccountStrategy": "programId" |
2461 | 2478 | } |
2462 | 2479 | ], |
|
0 commit comments