@@ -36,7 +36,7 @@ pub enum TokenInstruction<'a> {
36
36
/// associated with another mint, that mint must be initialized before this
37
37
/// command can succeed.
38
38
///
39
- /// The `InitializeAccount` instruction requires no signers and MUST be
39
+ /// The [ `InitializeAccount`] instruction requires no signers and MUST be
40
40
/// included within the same Transaction as the system program's
41
41
/// `CreateAccount` instruction that creates the account being initialized.
42
42
/// Otherwise another party can acquire ownership of the uninitialized
@@ -57,7 +57,7 @@ pub enum TokenInstruction<'a> {
57
57
/// present. The variant field represents the number of signers (M)
58
58
/// required to validate this multisignature account.
59
59
///
60
- /// The `InitializeMultisig` instruction requires no signers and MUST be
60
+ /// The [ `InitializeMultisig`] instruction requires no signers and MUST be
61
61
/// included within the same Transaction as the system program's
62
62
/// `CreateAccount` instruction that creates the account being initialized.
63
63
/// Otherwise another party can acquire ownership of the uninitialized
@@ -67,8 +67,7 @@ pub enum TokenInstruction<'a> {
67
67
///
68
68
/// 0. `[writable]` The multisignature account to initialize.
69
69
/// 1. `[]` Rent sysvar
70
- /// 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <=
71
- /// 11.
70
+ /// 2+N. `[signer]` The signer accounts, must equal to N where `1 <= N <= 11`.
72
71
InitializeMultisig {
73
72
/// The number of signers (M) required to validate this multisignature
74
73
/// account.
@@ -91,7 +90,7 @@ pub enum TokenInstruction<'a> {
91
90
/// 0. `[writable]` The source account.
92
91
/// 1. `[writable]` The destination account.
93
92
/// 2. `[]` The source account's multisignature owner/delegate.
94
- /// 3. ..3+M `[signer]` M signer accounts.
93
+ /// 3+M. `[signer]` M signer accounts.
95
94
Transfer {
96
95
/// The amount of tokens to transfer.
97
96
amount : u64 ,
@@ -111,7 +110,7 @@ pub enum TokenInstruction<'a> {
111
110
/// 0. `[writable]` The source account.
112
111
/// 1. `[]` The delegate.
113
112
/// 2. `[]` The source account's multisignature owner.
114
- /// 3. ..3+M `[signer]` M signer accounts
113
+ /// 3+M. `[signer]` M signer accounts
115
114
Approve {
116
115
/// The amount of tokens the delegate is approved for.
117
116
amount : u64 ,
@@ -128,7 +127,7 @@ pub enum TokenInstruction<'a> {
128
127
/// * Multisignature owner
129
128
/// 0. `[writable]` The source account.
130
129
/// 1. `[]` The source account's multisignature owner.
131
- /// 2. ..2+M `[signer]` M signer accounts
130
+ /// 2+M. `[signer]` M signer accounts
132
131
Revoke ,
133
132
134
133
/// Sets a new authority of a mint or account.
@@ -142,7 +141,7 @@ pub enum TokenInstruction<'a> {
142
141
/// * Multisignature authority
143
142
/// 0. `[writable]` The mint or account to change the authority of.
144
143
/// 1. `[]` The mint's or account's current multisignature authority.
145
- /// 2. ..2+M `[signer]` M signer accounts
144
+ /// 2+M. `[signer]` M signer accounts
146
145
SetAuthority {
147
146
/// The type of authority to update.
148
147
authority_type : AuthorityType ,
@@ -164,7 +163,7 @@ pub enum TokenInstruction<'a> {
164
163
/// 0. `[writable]` The mint.
165
164
/// 1. `[writable]` The account to mint tokens to.
166
165
/// 2. `[]` The mint's multisignature mint-tokens authority.
167
- /// 3. ..3+M `[signer]` M signer accounts.
166
+ /// 3+M. `[signer]` M signer accounts.
168
167
MintTo {
169
168
/// The amount of new tokens to mint.
170
169
amount : u64 ,
@@ -184,7 +183,7 @@ pub enum TokenInstruction<'a> {
184
183
/// 0. `[writable]` The account to burn from.
185
184
/// 1. `[writable]` The token mint.
186
185
/// 2. `[]` The account's multisignature owner/delegate.
187
- /// 3. ..3+M `[signer]` M signer accounts.
186
+ /// 3+M. `[signer]` M signer accounts.
188
187
Burn {
189
188
/// The amount of tokens to burn.
190
189
amount : u64 ,
@@ -204,10 +203,10 @@ pub enum TokenInstruction<'a> {
204
203
/// 0. `[writable]` The account to close.
205
204
/// 1. `[writable]` The destination account.
206
205
/// 2. `[]` The account's multisignature owner.
207
- /// 3. ..3+M `[signer]` M signer accounts.
206
+ /// 3+M. `[signer]` M signer accounts.
208
207
CloseAccount ,
209
208
210
- /// Freeze an Initialized account using the Mint's freeze_authority (if
209
+ /// Freeze an Initialized account using the Mint's [` freeze_authority`] (if
211
210
/// set).
212
211
///
213
212
/// Accounts expected by this instruction:
@@ -221,10 +220,10 @@ pub enum TokenInstruction<'a> {
221
220
/// 0. `[writable]` The account to freeze.
222
221
/// 1. `[]` The token mint.
223
222
/// 2. `[]` The mint's multisignature freeze authority.
224
- /// 3. ..3+M `[signer]` M signer accounts.
223
+ /// 3+M. `[signer]` M signer accounts.
225
224
FreezeAccount ,
226
225
227
- /// Thaw a Frozen account using the Mint's freeze_authority (if set).
226
+ /// Thaw a Frozen account using the Mint's [` freeze_authority`] (if set).
228
227
///
229
228
/// Accounts expected by this instruction:
230
229
///
@@ -237,7 +236,7 @@ pub enum TokenInstruction<'a> {
237
236
/// 0. `[writable]` The account to freeze.
238
237
/// 1. `[]` The token mint.
239
238
/// 2. `[]` The mint's multisignature freeze authority.
240
- /// 3. ..3+M `[signer]` M signer accounts.
239
+ /// 3+M. `[signer]` M signer accounts.
241
240
ThawAccount ,
242
241
243
242
/// Transfers tokens from one account to another either directly or via a
@@ -262,7 +261,7 @@ pub enum TokenInstruction<'a> {
262
261
/// 1. `[]` The token mint.
263
262
/// 2. `[writable]` The destination account.
264
263
/// 3. `[]` The source account's multisignature owner/delegate.
265
- /// 4. ..4+M `[signer]` M signer accounts.
264
+ /// 4+M. `[signer]` M signer accounts.
266
265
TransferChecked {
267
266
/// The amount of tokens to transfer.
268
267
amount : u64 ,
@@ -290,7 +289,7 @@ pub enum TokenInstruction<'a> {
290
289
/// 1. `[]` The token mint.
291
290
/// 2. `[]` The delegate.
292
291
/// 3. `[]` The source account's multisignature owner.
293
- /// 4. ..4+M `[signer]` M signer accounts
292
+ /// 4+M. `[signer]` M signer accounts
294
293
ApproveChecked {
295
294
/// The amount of tokens the delegate is approved for.
296
295
amount : u64 ,
@@ -301,7 +300,7 @@ pub enum TokenInstruction<'a> {
301
300
/// Mints new tokens to an account. The native mint does not support
302
301
/// minting.
303
302
///
304
- /// This instruction differs from MintTo in that the decimals value is
303
+ /// This instruction differs from [` MintTo`] in that the decimals value is
305
304
/// checked by the caller. This may be useful when creating transactions
306
305
/// offline or within a hardware wallet.
307
306
///
@@ -316,15 +315,15 @@ pub enum TokenInstruction<'a> {
316
315
/// 0. `[writable]` The mint.
317
316
/// 1. `[writable]` The account to mint tokens to.
318
317
/// 2. `[]` The mint's multisignature mint-tokens authority.
319
- /// 3. ..3+M `[signer]` M signer accounts.
318
+ /// 3+M. `[signer]` M signer accounts.
320
319
MintToChecked {
321
320
/// The amount of new tokens to mint.
322
321
amount : u64 ,
323
322
/// Expected number of base 10 digits to the right of the decimal place.
324
323
decimals : u8 ,
325
324
} ,
326
325
327
- /// Burns tokens by removing them from an account. `BurnChecked` does not
326
+ /// Burns tokens by removing them from an account. [ `BurnChecked`] does not
328
327
/// support accounts associated with the native mint, use `CloseAccount`
329
328
/// instead.
330
329
///
@@ -343,15 +342,15 @@ pub enum TokenInstruction<'a> {
343
342
/// 0. `[writable]` The account to burn from.
344
343
/// 1. `[writable]` The token mint.
345
344
/// 2. `[]` The account's multisignature owner/delegate.
346
- /// 3. ..3+M `[signer]` M signer accounts.
345
+ /// 3+M. `[signer]` M signer accounts.
347
346
BurnChecked {
348
347
/// The amount of tokens to burn.
349
348
amount : u64 ,
350
349
/// Expected number of base 10 digits to the right of the decimal place.
351
350
decimals : u8 ,
352
351
} ,
353
352
354
- /// Like InitializeAccount, but the owner pubkey is passed via instruction
353
+ /// Like [` InitializeAccount`] , but the owner pubkey is passed via instruction
355
354
/// data rather than the accounts list. This variant may be preferable
356
355
/// when using Cross Program Invocation from an instruction that does
357
356
/// not need the owner's `AccountInfo` otherwise.
@@ -378,7 +377,7 @@ pub enum TokenInstruction<'a> {
378
377
/// lamports.
379
378
SyncNative ,
380
379
381
- /// Like InitializeAccount2, but does not require the Rent sysvar to be
380
+ /// Like [` InitializeAccount2`] , but does not require the Rent sysvar to be
382
381
/// provided
383
382
///
384
383
/// Accounts expected by this instruction:
@@ -390,14 +389,13 @@ pub enum TokenInstruction<'a> {
390
389
owner : Pubkey ,
391
390
} ,
392
391
393
- /// Like InitializeMultisig, but does not require the Rent sysvar to be
392
+ /// Like [` InitializeMultisig`] , but does not require the Rent sysvar to be
394
393
/// provided
395
394
///
396
395
/// Accounts expected by this instruction:
397
396
///
398
397
/// 0. `[writable]` The multisignature account to initialize.
399
- /// 1. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <=
400
- /// 11.
398
+ /// 1+N. `[signer]` The signer accounts, must equal to N where `1 <= N <= 11`.
401
399
InitializeMultisig2 {
402
400
/// The number of signers (M) required to validate this multisignature
403
401
/// account.
@@ -433,7 +431,7 @@ pub enum TokenInstruction<'a> {
433
431
/// Initialize the Immutable Owner extension for the given token account
434
432
///
435
433
/// Fails if the account has already been initialized, so must be called
436
- /// before `InitializeAccount`.
434
+ /// before [ `InitializeAccount`] .
437
435
///
438
436
/// No-ops in this version of the program, but is included for compatibility
439
437
/// with the Associated Token Account program.
@@ -446,7 +444,7 @@ pub enum TokenInstruction<'a> {
446
444
/// None
447
445
InitializeImmutableOwner ,
448
446
449
- /// Convert an Amount of tokens to a UiAmount `string`, using the given
447
+ /// Convert an Amount of tokens to a ` UiAmount` `string`, using the given
450
448
/// mint. In this version of the program, the mint can only specify the
451
449
/// number of decimals.
452
450
///
@@ -463,7 +461,7 @@ pub enum TokenInstruction<'a> {
463
461
amount : u64 ,
464
462
} ,
465
463
466
- /// Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using
464
+ /// Convert a ` UiAmount` of tokens to a little-endian `u64` raw Amount, using
467
465
/// the given mint. In this version of the program, the mint can only
468
466
/// specify the number of decimals.
469
467
///
@@ -474,7 +472,7 @@ pub enum TokenInstruction<'a> {
474
472
///
475
473
/// 0. `[]` The mint to calculate for
476
474
UiAmountToAmount {
477
- /// The ui_amount of tokens to reformat.
475
+ /// The ` ui_amount` of tokens to reformat.
478
476
ui_amount : & ' a str ,
479
477
} ,
480
478
// Any new variants also need to be added to program-2022 `TokenInstruction`, so that the
0 commit comments