token: Wrap C bindings at 80 char

This commit is contained in:
Trent Nelson 2021-02-05 18:53:13 -07:00 committed by Trent Nelson
parent 15dbf5fc52
commit 2190cba1ad
1 changed files with 65 additions and 46 deletions

View File

@ -105,11 +105,14 @@ typedef struct Token_COption_Pubkey {
*/ */
typedef enum Token_TokenInstruction_Tag { 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 `InitializeMint` instruction requires no signers and MUST be
* the same Transaction as the system program's `CreateInstruction` that creates the account * included within the same Transaction as the system program's
* being initialized. Otherwise another party can acquire ownership of the uninitialized account. * `CreateInstruction` that creates the account being initialized.
* Otherwise another party can acquire ownership of the uninitialized
* account.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -119,14 +122,17 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_InitializeMint, Token_TokenInstruction_InitializeMint,
/** /**
* Initializes a new account to hold tokens. If this account is associated with the native * Initializes a new account to hold tokens. If this account is associated
* mint then the token balance of the initialized account will be equal to the amount of SOL * with the native mint then the token balance of the initialized account
* in the account. If this account is associated with another mint, that mint must be * will be equal to the amount of SOL in the account. If this account is
* initialized before this command can succeed. * 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 `InitializeAccount` instruction requires no signers and MUST be
* the same Transaction as the system program's `CreateInstruction` that creates the account * included within the same Transaction as the system program's
* being initialized. Otherwise another party can acquire ownership of the uninitialized account. * `CreateInstruction` that creates the account being initialized.
* Otherwise another party can acquire ownership of the uninitialized
* account.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -139,25 +145,30 @@ typedef enum Token_TokenInstruction_Tag {
/** /**
* Initializes a multisignature account with N provided signers. * Initializes a multisignature account with N provided signers.
* *
* Multisignature accounts can used in place of any single owner/delegate accounts in any * Multisignature accounts can used in place of any single owner/delegate
* token instruction that require an owner/delegate to be present. The variant field represents the * accounts in any token instruction that require an owner/delegate to be
* number of signers (M) required to validate this multisignature account. * 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 `InitializeMultisig` instruction requires no signers and MUST be
* the same Transaction as the system program's `CreateInstruction` that creates the account * included within the same Transaction as the system program's
* being initialized. Otherwise another party can acquire ownership of the uninitialized account. * `CreateInstruction` that creates the account being initialized.
* Otherwise another party can acquire ownership of the uninitialized
* account.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
* 0. `[writable]` The multisignature account to initialize. * 0. `[writable]` The multisignature account to initialize.
* 1. `[]` Rent sysvar * 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, Token_TokenInstruction_InitializeMultisig,
/** /**
* Transfers tokens from one account to another either directly or via a delegate. If this * Transfers tokens from one account to another either directly or via a
* account is associated with the native mint then equal amounts of SOL and Tokens will be * delegate. If this account is associated with the native mint then equal
* transferred to the destination account. * amounts of SOL and Tokens will be transferred to the destination
* account.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -174,8 +185,8 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_Transfer, Token_TokenInstruction_Transfer,
/** /**
* Approves a delegate. A delegate is given the authority over * Approves a delegate. A delegate is given the authority over tokens on
* tokens on behalf of the source account's owner. * behalf of the source account's owner.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -222,7 +233,8 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_SetAuthority, 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: * Accounts expected by this instruction:
* *
@ -239,8 +251,8 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_MintTo, Token_TokenInstruction_MintTo,
/** /**
* Burns tokens by removing them from an account. `Burn` does not support accounts * Burns tokens by removing them from an account. `Burn` does not support
* associated with the native mint, use `CloseAccount` instead. * accounts associated with the native mint, use `CloseAccount` instead.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -275,7 +287,8 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_CloseAccount, 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: * Accounts expected by this instruction:
* *
@ -309,13 +322,14 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_ThawAccount, Token_TokenInstruction_ThawAccount,
/** /**
* Transfers tokens from one account to another either directly or via a delegate. If this * Transfers tokens from one account to another either directly or via a
* account is associated with the native mint then equal amounts of SOL and Tokens will be * delegate. If this account is associated with the native mint then equal
* transferred to the destination account. * 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 * This instruction differs from Transfer in that the token mint and
* asserted by the caller. This may be useful when creating transactions offline or within a * decimals value is asserted by the caller. This may be useful when
* hardware wallet. * creating transactions offline or within a hardware wallet.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -334,12 +348,12 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_Transfer2, Token_TokenInstruction_Transfer2,
/** /**
* Approves a delegate. A delegate is given the authority over * Approves a delegate. A delegate is given the authority over tokens on
* tokens on behalf of the source account's owner. * behalf of the source account's owner.
* *
* This instruction differs from Approve in that the token mint and decimals value is asserted * This instruction differs from Approve in that the token mint and
* by the caller. This may be useful when creating transactions offline or within a hardware * decimals value is asserted by the caller. This may be useful when
* wallet. * creating transactions offline or within a hardware wallet.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -358,10 +372,12 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_Approve2, 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 * This instruction differs from MintTo in that the decimals value is
* caller. This may be useful when creating transactions offline or within a hardware wallet. * asserted by the caller. This may be useful when creating transactions
* offline or within a hardware wallet.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -378,11 +394,13 @@ typedef enum Token_TokenInstruction_Tag {
*/ */
Token_TokenInstruction_MintTo2, Token_TokenInstruction_MintTo2,
/** /**
* Burns tokens by removing them from an account. `Burn2` does not support accounts * Burns tokens by removing them from an account. `Burn2` does not
* associated with the native mint, use `CloseAccount` instead. * 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 instruction differs from Burn in that the decimals value is asserted
* This may be useful when creating transactions offline or within a hardware wallet. * by the caller. This may be useful when creating transactions offline or
* within a hardware wallet.
* *
* Accounts expected by this instruction: * Accounts expected by this instruction:
* *
@ -417,7 +435,8 @@ typedef struct Token_TokenInstruction_Token_InitializeMint_Body {
typedef struct Token_TokenInstruction_Token_InitializeMultisig_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; uint8_t m;
} Token_TokenInstruction_Token_InitializeMultisig_Body; } Token_TokenInstruction_Token_InitializeMultisig_Body;