Skip to content

Commit 30aad4e

Browse files
committed
Improve Kinobi IDL
1 parent 0f3607b commit 30aad4e

File tree

1 file changed

+50
-33
lines changed

1 file changed

+50
-33
lines changed

p-token/idl.json

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@
22622262
"isWritable": true,
22632263
"isSigner": true,
22642264
"isOptional": false,
2265-
"docs": [],
2265+
"docs": ["Funding account (must be a system account)."],
22662266
"defaultValue": { "kind": "payerValueNode" }
22672267
},
22682268
{
@@ -2271,35 +2271,34 @@
22712271
"isWritable": true,
22722272
"isSigner": false,
22732273
"isOptional": false,
2274-
"docs": []
2274+
"docs": ["Associated token account address to be created."]
22752275
},
22762276
{
22772277
"kind": "instructionAccountNode",
22782278
"name": "owner",
22792279
"isWritable": false,
22802280
"isSigner": false,
22812281
"isOptional": false,
2282-
"docs": []
2282+
"docs": ["Wallet address for the new associated token account."]
22832283
},
22842284
{
22852285
"kind": "instructionAccountNode",
22862286
"name": "mint",
22872287
"isWritable": false,
22882288
"isSigner": false,
22892289
"isOptional": false,
2290-
"docs": []
2290+
"docs": ["The token mint for the new associated token account."]
22912291
},
22922292
{
22932293
"kind": "instructionAccountNode",
22942294
"name": "systemProgram",
22952295
"isWritable": false,
22962296
"isSigner": false,
22972297
"isOptional": false,
2298-
"docs": [],
2298+
"docs": ["System program."],
22992299
"defaultValue": {
23002300
"kind": "publicKeyValueNode",
2301-
"publicKey": "11111111111111111111111111111111",
2302-
"identifier": "splSystem"
2301+
"publicKey": "11111111111111111111111111111111"
23032302
}
23042303
},
23052304
{
@@ -2308,17 +2307,19 @@
23082307
"isWritable": false,
23092308
"isSigner": false,
23102309
"isOptional": false,
2311-
"docs": [],
2310+
"docs": ["SPL Token program."],
23122311
"defaultValue": {
23132312
"kind": "publicKeyValueNode",
2314-
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
2315-
"identifier": "splToken"
2313+
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
23162314
}
23172315
}
23182316
],
23192317
"arguments": [],
23202318
"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+
],
23222323
"optionalAccountStrategy": "programId"
23232324
},
23242325
{
@@ -2330,7 +2331,7 @@
23302331
"isWritable": true,
23312332
"isSigner": true,
23322333
"isOptional": false,
2333-
"docs": [],
2334+
"docs": ["Funding account (must be a system account)."],
23342335
"defaultValue": { "kind": "payerValueNode" }
23352336
},
23362337
{
@@ -2339,35 +2340,34 @@
23392340
"isWritable": true,
23402341
"isSigner": false,
23412342
"isOptional": false,
2342-
"docs": []
2343+
"docs": ["Associated token account address to be created."]
23432344
},
23442345
{
23452346
"kind": "instructionAccountNode",
23462347
"name": "owner",
23472348
"isWritable": false,
23482349
"isSigner": false,
23492350
"isOptional": false,
2350-
"docs": []
2351+
"docs": ["Wallet address for the new associated token account."]
23512352
},
23522353
{
23532354
"kind": "instructionAccountNode",
23542355
"name": "mint",
23552356
"isWritable": false,
23562357
"isSigner": false,
23572358
"isOptional": false,
2358-
"docs": []
2359+
"docs": ["The token mint for the new associated token account."]
23592360
},
23602361
{
23612362
"kind": "instructionAccountNode",
23622363
"name": "systemProgram",
23632364
"isWritable": false,
23642365
"isSigner": false,
23652366
"isOptional": false,
2366-
"docs": [],
2367+
"docs": ["System program."],
23672368
"defaultValue": {
23682369
"kind": "publicKeyValueNode",
2369-
"publicKey": "11111111111111111111111111111111",
2370-
"identifier": "splSystem"
2370+
"publicKey": "11111111111111111111111111111111"
23712371
}
23722372
},
23732373
{
@@ -2376,17 +2376,20 @@
23762376
"isWritable": false,
23772377
"isSigner": false,
23782378
"isOptional": false,
2379-
"docs": [],
2379+
"docs": ["SPL Token program."],
23802380
"defaultValue": {
23812381
"kind": "publicKeyValueNode",
2382-
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
2383-
"identifier": "splToken"
2382+
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
23842383
}
23852384
}
23862385
],
23872386
"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+
],
23902393
"optionalAccountStrategy": "programId"
23912394
},
23922395
{
@@ -2398,65 +2401,79 @@
23982401
"isWritable": true,
23992402
"isSigner": false,
24002403
"isOptional": false,
2401-
"docs": []
2404+
"docs": [
2405+
"Nested associated token account, must be owned by `ownerAssociatedAccountAddress`."
2406+
]
24022407
},
24032408
{
24042409
"kind": "instructionAccountNode",
24052410
"name": "nestedTokenMintAddress",
24062411
"isWritable": false,
24072412
"isSigner": false,
24082413
"isOptional": false,
2409-
"docs": []
2414+
"docs": ["Token mint for the nested associated token account."]
24102415
},
24112416
{
24122417
"kind": "instructionAccountNode",
24132418
"name": "destinationAssociatedAccountAddress",
24142419
"isWritable": true,
24152420
"isSigner": false,
24162421
"isOptional": false,
2417-
"docs": []
2422+
"docs": ["Wallet's associated token account."]
24182423
},
24192424
{
24202425
"kind": "instructionAccountNode",
24212426
"name": "ownerAssociatedAccountAddress",
24222427
"isWritable": false,
24232428
"isSigner": false,
24242429
"isOptional": false,
2425-
"docs": []
2430+
"docs": [
2431+
"Owner associated token account address, must be owned by `walletAddress`."
2432+
]
24262433
},
24272434
{
24282435
"kind": "instructionAccountNode",
24292436
"name": "ownerTokenMintAddress",
24302437
"isWritable": false,
24312438
"isSigner": false,
24322439
"isOptional": false,
2433-
"docs": []
2440+
"docs": ["Token mint for the owner associated token account."]
24342441
},
24352442
{
24362443
"kind": "instructionAccountNode",
24372444
"name": "walletAddress",
24382445
"isWritable": true,
24392446
"isSigner": true,
24402447
"isOptional": false,
2441-
"docs": []
2448+
"docs": ["Wallet address for the owner associated token account."]
24422449
},
24432450
{
24442451
"kind": "instructionAccountNode",
24452452
"name": "tokenProgram",
24462453
"isWritable": false,
24472454
"isSigner": false,
24482455
"isOptional": false,
2449-
"docs": [],
2456+
"docs": ["SPL Token program."],
24502457
"defaultValue": {
24512458
"kind": "publicKeyValueNode",
2452-
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
2453-
"identifier": "splToken"
2459+
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
24542460
}
24552461
}
24562462
],
24572463
"arguments": [],
24582464
"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+
],
24602477
"optionalAccountStrategy": "programId"
24612478
}
24622479
],

0 commit comments

Comments
 (0)