Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 2190cba

Browse files
committed
token: Wrap C bindings at 80 char
1 parent 15dbf5f commit 2190cba

File tree

1 file changed

+65
-46
lines changed

1 file changed

+65
-46
lines changed

token/program/inc/token.h

Lines changed: 65 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ typedef struct Token_COption_Pubkey {
105105
*/
106106
typedef enum Token_TokenInstruction_Tag {
107107
/**
108-
* Initializes a new mint and optionally deposits all the newly minted tokens in an account.
108+
* Initializes a new mint and optionally deposits all the newly minted
109+
* tokens in an account.
109110
*
110-
* The `InitializeMint` instruction requires no signers and MUST be included within
111-
* the same Transaction as the system program's `CreateInstruction` that creates the account
112-
* being initialized. Otherwise another party can acquire ownership of the uninitialized account.
111+
* The `InitializeMint` instruction requires no signers and MUST be
112+
* included within the same Transaction as the system program's
113+
* `CreateInstruction` that creates the account being initialized.
114+
* Otherwise another party can acquire ownership of the uninitialized
115+
* account.
113116
*
114117
* Accounts expected by this instruction:
115118
*
@@ -119,14 +122,17 @@ typedef enum Token_TokenInstruction_Tag {
119122
*/
120123
Token_TokenInstruction_InitializeMint,
121124
/**
122-
* Initializes a new account to hold tokens. If this account is associated with the native
123-
* mint then the token balance of the initialized account will be equal to the amount of SOL
124-
* in the account. If this account is associated with another mint, that mint must be
125-
* initialized before this command can succeed.
125+
* Initializes a new account to hold tokens. If this account is associated
126+
* with the native mint then the token balance of the initialized account
127+
* will be equal to the amount of SOL in the account. If this account is
128+
* associated with another mint, that mint must be initialized before this
129+
* command can succeed.
126130
*
127-
* The `InitializeAccount` instruction requires no signers and MUST be included within
128-
* the same Transaction as the system program's `CreateInstruction` that creates the account
129-
* being initialized. Otherwise another party can acquire ownership of the uninitialized account.
131+
* The `InitializeAccount` instruction requires no signers and MUST be
132+
* included within the same Transaction as the system program's
133+
* `CreateInstruction` that creates the account being initialized.
134+
* Otherwise another party can acquire ownership of the uninitialized
135+
* account.
130136
*
131137
* Accounts expected by this instruction:
132138
*
@@ -139,25 +145,30 @@ typedef enum Token_TokenInstruction_Tag {
139145
/**
140146
* Initializes a multisignature account with N provided signers.
141147
*
142-
* Multisignature accounts can used in place of any single owner/delegate accounts in any
143-
* token instruction that require an owner/delegate to be present. The variant field represents the
144-
* number of signers (M) required to validate this multisignature account.
148+
* Multisignature accounts can used in place of any single owner/delegate
149+
* accounts in any token instruction that require an owner/delegate to be
150+
* present. The variant field represents the number of signers (M)
151+
* required to validate this multisignature account.
145152
*
146-
* The `InitializeMultisig` instruction requires no signers and MUST be included within
147-
* the same Transaction as the system program's `CreateInstruction` that creates the account
148-
* being initialized. Otherwise another party can acquire ownership of the uninitialized account.
153+
* The `InitializeMultisig` instruction requires no signers and MUST be
154+
* included within the same Transaction as the system program's
155+
* `CreateInstruction` that creates the account being initialized.
156+
* Otherwise another party can acquire ownership of the uninitialized
157+
* account.
149158
*
150159
* Accounts expected by this instruction:
151160
*
152161
* 0. `[writable]` The multisignature account to initialize.
153162
* 1. `[]` Rent sysvar
154-
* 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11.
163+
* 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <=
164+
* 11.
155165
*/
156166
Token_TokenInstruction_InitializeMultisig,
157167
/**
158-
* Transfers tokens from one account to another either directly or via a delegate. If this
159-
* account is associated with the native mint then equal amounts of SOL and Tokens will be
160-
* transferred to the destination account.
168+
* Transfers tokens from one account to another either directly or via a
169+
* delegate. If this account is associated with the native mint then equal
170+
* amounts of SOL and Tokens will be transferred to the destination
171+
* account.
161172
*
162173
* Accounts expected by this instruction:
163174
*
@@ -174,8 +185,8 @@ typedef enum Token_TokenInstruction_Tag {
174185
*/
175186
Token_TokenInstruction_Transfer,
176187
/**
177-
* Approves a delegate. A delegate is given the authority over
178-
* tokens on behalf of the source account's owner.
188+
* Approves a delegate. A delegate is given the authority over tokens on
189+
* behalf of the source account's owner.
179190
*
180191
* Accounts expected by this instruction:
181192
*
@@ -222,7 +233,8 @@ typedef enum Token_TokenInstruction_Tag {
222233
*/
223234
Token_TokenInstruction_SetAuthority,
224235
/**
225-
* Mints new tokens to an account. The native mint does not support minting.
236+
* Mints new tokens to an account. The native mint does not support
237+
* minting.
226238
*
227239
* Accounts expected by this instruction:
228240
*
@@ -239,8 +251,8 @@ typedef enum Token_TokenInstruction_Tag {
239251
*/
240252
Token_TokenInstruction_MintTo,
241253
/**
242-
* Burns tokens by removing them from an account. `Burn` does not support accounts
243-
* associated with the native mint, use `CloseAccount` instead.
254+
* Burns tokens by removing them from an account. `Burn` does not support
255+
* accounts associated with the native mint, use `CloseAccount` instead.
244256
*
245257
* Accounts expected by this instruction:
246258
*
@@ -275,7 +287,8 @@ typedef enum Token_TokenInstruction_Tag {
275287
*/
276288
Token_TokenInstruction_CloseAccount,
277289
/**
278-
* Freeze an Initialized account using the Mint's freeze_authority (if set).
290+
* Freeze an Initialized account using the Mint's freeze_authority (if
291+
* set).
279292
*
280293
* Accounts expected by this instruction:
281294
*
@@ -309,13 +322,14 @@ typedef enum Token_TokenInstruction_Tag {
309322
*/
310323
Token_TokenInstruction_ThawAccount,
311324
/**
312-
* Transfers tokens from one account to another either directly or via a delegate. If this
313-
* account is associated with the native mint then equal amounts of SOL and Tokens will be
314-
* transferred to the destination account.
325+
* Transfers tokens from one account to another either directly or via a
326+
* delegate. If this account is associated with the native mint then equal
327+
* amounts of SOL and Tokens will be transferred to the destination
328+
* account.
315329
*
316-
* This instruction differs from Transfer in that the token mint and decimals value is
317-
* asserted by the caller. This may be useful when creating transactions offline or within a
318-
* hardware wallet.
330+
* This instruction differs from Transfer in that the token mint and
331+
* decimals value is asserted by the caller. This may be useful when
332+
* creating transactions offline or within a hardware wallet.
319333
*
320334
* Accounts expected by this instruction:
321335
*
@@ -334,12 +348,12 @@ typedef enum Token_TokenInstruction_Tag {
334348
*/
335349
Token_TokenInstruction_Transfer2,
336350
/**
337-
* Approves a delegate. A delegate is given the authority over
338-
* tokens on behalf of the source account's owner.
351+
* Approves a delegate. A delegate is given the authority over tokens on
352+
* behalf of the source account's owner.
339353
*
340-
* This instruction differs from Approve in that the token mint and decimals value is asserted
341-
* by the caller. This may be useful when creating transactions offline or within a hardware
342-
* wallet.
354+
* This instruction differs from Approve in that the token mint and
355+
* decimals value is asserted by the caller. This may be useful when
356+
* creating transactions offline or within a hardware wallet.
343357
*
344358
* Accounts expected by this instruction:
345359
*
@@ -358,10 +372,12 @@ typedef enum Token_TokenInstruction_Tag {
358372
*/
359373
Token_TokenInstruction_Approve2,
360374
/**
361-
* Mints new tokens to an account. The native mint does not support minting.
375+
* Mints new tokens to an account. The native mint does not support
376+
* minting.
362377
*
363-
* This instruction differs from MintTo in that the decimals value is asserted by the
364-
* caller. This may be useful when creating transactions offline or within a hardware wallet.
378+
* This instruction differs from MintTo in that the decimals value is
379+
* asserted by the caller. This may be useful when creating transactions
380+
* offline or within a hardware wallet.
365381
*
366382
* Accounts expected by this instruction:
367383
*
@@ -378,11 +394,13 @@ typedef enum Token_TokenInstruction_Tag {
378394
*/
379395
Token_TokenInstruction_MintTo2,
380396
/**
381-
* Burns tokens by removing them from an account. `Burn2` does not support accounts
382-
* associated with the native mint, use `CloseAccount` instead.
397+
* Burns tokens by removing them from an account. `Burn2` does not
398+
* support accounts associated with the native mint, use `CloseAccount`
399+
* instead.
383400
*
384-
* This instruction differs from Burn in that the decimals value is asserted by the caller.
385-
* This may be useful when creating transactions offline or within a hardware wallet.
401+
* This instruction differs from Burn in that the decimals value is asserted
402+
* by the caller. This may be useful when creating transactions offline or
403+
* within a hardware wallet.
386404
*
387405
* Accounts expected by this instruction:
388406
*
@@ -417,7 +435,8 @@ typedef struct Token_TokenInstruction_Token_InitializeMint_Body {
417435

418436
typedef struct Token_TokenInstruction_Token_InitializeMultisig_Body {
419437
/**
420-
* The number of signers (M) required to validate this multisignature account.
438+
* The number of signers (M) required to validate this multisignature
439+
* account.
421440
*/
422441
uint8_t m;
423442
} Token_TokenInstruction_Token_InitializeMultisig_Body;

0 commit comments

Comments
 (0)