From 2190cba1adb3968c5a546aeb5b463fc65a4d582f Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Fri, 5 Feb 2021 18:53:13 -0700 Subject: [PATCH] token: Wrap C bindings at 80 char --- token/program/inc/token.h | 111 ++++++++++++++++++++++---------------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/token/program/inc/token.h b/token/program/inc/token.h index 954d841b..e027ac57 100644 --- a/token/program/inc/token.h +++ b/token/program/inc/token.h @@ -105,11 +105,14 @@ typedef struct Token_COption_Pubkey { */ typedef enum Token_TokenInstruction_Tag { /** - * Initializes a new mint and optionally deposits all the newly minted tokens in an account. + * Initializes a new mint and optionally deposits all the newly minted + * tokens in an account. * - * The `InitializeMint` instruction requires no signers and MUST be included within - * the same Transaction as the system program's `CreateInstruction` that creates the account - * being initialized. Otherwise another party can acquire ownership of the uninitialized account. + * The `InitializeMint` instruction requires no signers and MUST be + * included within the same Transaction as the system program's + * `CreateInstruction` that creates the account being initialized. + * Otherwise another party can acquire ownership of the uninitialized + * account. * * Accounts expected by this instruction: * @@ -119,14 +122,17 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_InitializeMint, /** - * Initializes a new account to hold tokens. If this account is associated with the native - * mint then the token balance of the initialized account will be equal to the amount of SOL - * in the account. If this account is associated with another mint, that mint must be - * initialized before this command can succeed. + * Initializes a new account to hold tokens. If this account is associated + * with the native mint then the token balance of the initialized account + * will be equal to the amount of SOL in the account. If this account is + * associated with another mint, that mint must be initialized before this + * command can succeed. * - * The `InitializeAccount` instruction requires no signers and MUST be included within - * the same Transaction as the system program's `CreateInstruction` that creates the account - * being initialized. Otherwise another party can acquire ownership of the uninitialized account. + * The `InitializeAccount` instruction requires no signers and MUST be + * included within the same Transaction as the system program's + * `CreateInstruction` that creates the account being initialized. + * Otherwise another party can acquire ownership of the uninitialized + * account. * * Accounts expected by this instruction: * @@ -139,25 +145,30 @@ typedef enum Token_TokenInstruction_Tag { /** * Initializes a multisignature account with N provided signers. * - * Multisignature accounts can used in place of any single owner/delegate accounts in any - * token instruction that require an owner/delegate to be present. The variant field represents the - * number of signers (M) required to validate this multisignature account. + * Multisignature accounts can used in place of any single owner/delegate + * accounts in any token instruction that require an owner/delegate to be + * present. The variant field represents the number of signers (M) + * required to validate this multisignature account. * - * The `InitializeMultisig` instruction requires no signers and MUST be included within - * the same Transaction as the system program's `CreateInstruction` that creates the account - * being initialized. Otherwise another party can acquire ownership of the uninitialized account. + * The `InitializeMultisig` instruction requires no signers and MUST be + * included within the same Transaction as the system program's + * `CreateInstruction` that creates the account being initialized. + * Otherwise another party can acquire ownership of the uninitialized + * account. * * Accounts expected by this instruction: * * 0. `[writable]` The multisignature account to initialize. * 1. `[]` Rent sysvar - * 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11. + * 2. ..2+N. `[]` The signer accounts, must equal to N where 1 <= N <= + * 11. */ Token_TokenInstruction_InitializeMultisig, /** - * Transfers tokens from one account to another either directly or via a delegate. If this - * account is associated with the native mint then equal amounts of SOL and Tokens will be - * transferred to the destination account. + * Transfers tokens from one account to another either directly or via a + * delegate. If this account is associated with the native mint then equal + * amounts of SOL and Tokens will be transferred to the destination + * account. * * Accounts expected by this instruction: * @@ -174,8 +185,8 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_Transfer, /** - * Approves a delegate. A delegate is given the authority over - * tokens on behalf of the source account's owner. + * Approves a delegate. A delegate is given the authority over tokens on + * behalf of the source account's owner. * * Accounts expected by this instruction: * @@ -222,7 +233,8 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_SetAuthority, /** - * Mints new tokens to an account. The native mint does not support minting. + * Mints new tokens to an account. The native mint does not support + * minting. * * Accounts expected by this instruction: * @@ -239,8 +251,8 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_MintTo, /** - * Burns tokens by removing them from an account. `Burn` does not support accounts - * associated with the native mint, use `CloseAccount` instead. + * Burns tokens by removing them from an account. `Burn` does not support + * accounts associated with the native mint, use `CloseAccount` instead. * * Accounts expected by this instruction: * @@ -275,7 +287,8 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_CloseAccount, /** - * Freeze an Initialized account using the Mint's freeze_authority (if set). + * Freeze an Initialized account using the Mint's freeze_authority (if + * set). * * Accounts expected by this instruction: * @@ -309,13 +322,14 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_ThawAccount, /** - * Transfers tokens from one account to another either directly or via a delegate. If this - * account is associated with the native mint then equal amounts of SOL and Tokens will be - * transferred to the destination account. + * Transfers tokens from one account to another either directly or via a + * delegate. If this account is associated with the native mint then equal + * amounts of SOL and Tokens will be transferred to the destination + * account. * - * This instruction differs from Transfer in that the token mint and decimals value is - * asserted by the caller. This may be useful when creating transactions offline or within a - * hardware wallet. + * This instruction differs from Transfer in that the token mint and + * decimals value is asserted by the caller. This may be useful when + * creating transactions offline or within a hardware wallet. * * Accounts expected by this instruction: * @@ -334,12 +348,12 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_Transfer2, /** - * Approves a delegate. A delegate is given the authority over - * tokens on behalf of the source account's owner. + * Approves a delegate. A delegate is given the authority over tokens on + * behalf of the source account's owner. * - * This instruction differs from Approve in that the token mint and decimals value is asserted - * by the caller. This may be useful when creating transactions offline or within a hardware - * wallet. + * This instruction differs from Approve in that the token mint and + * decimals value is asserted by the caller. This may be useful when + * creating transactions offline or within a hardware wallet. * * Accounts expected by this instruction: * @@ -358,10 +372,12 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_Approve2, /** - * Mints new tokens to an account. The native mint does not support minting. + * Mints new tokens to an account. The native mint does not support + * minting. * - * This instruction differs from MintTo in that the decimals value is asserted by the - * caller. This may be useful when creating transactions offline or within a hardware wallet. + * This instruction differs from MintTo in that the decimals value is + * asserted by the caller. This may be useful when creating transactions + * offline or within a hardware wallet. * * Accounts expected by this instruction: * @@ -378,11 +394,13 @@ typedef enum Token_TokenInstruction_Tag { */ Token_TokenInstruction_MintTo2, /** - * Burns tokens by removing them from an account. `Burn2` does not support accounts - * associated with the native mint, use `CloseAccount` instead. + * Burns tokens by removing them from an account. `Burn2` does not + * support accounts associated with the native mint, use `CloseAccount` + * instead. * - * This instruction differs from Burn in that the decimals value is asserted by the caller. - * This may be useful when creating transactions offline or within a hardware wallet. + * This instruction differs from Burn in that the decimals value is asserted + * by the caller. This may be useful when creating transactions offline or + * within a hardware wallet. * * Accounts expected by this instruction: * @@ -417,7 +435,8 @@ typedef struct Token_TokenInstruction_Token_InitializeMint_Body { typedef struct Token_TokenInstruction_Token_InitializeMultisig_Body { /** - * The number of signers (M) required to validate this multisignature account. + * The number of signers (M) required to validate this multisignature + * account. */ uint8_t m; } Token_TokenInstruction_Token_InitializeMultisig_Body;