@@ -24,7 +24,7 @@ The Token Program's source is available on
2424
2525The on-chain Token Program is written in Rust and available on crates.io as
2626[ spl-token] ( https://docs.rs/spl-token ) . The program's [ instruction interface
27- documentation] ( https://docs.rs/spl-token/1 .0.2 /spl_token/instruction/enum.TokenInstruction.html )
27+ documentation] ( https://docs.rs/spl-token/2 .0.1 /spl_token/instruction/enum.TokenInstruction.html )
2828can also be found there.
2929
3030Auto-generated C bindings are also available for the on-chain Token Program and
@@ -33,7 +33,7 @@ available
3333
3434[ Javascript
3535bindings] ( https://github.com/solana-labs/solana-program-library/blob/master/token/js/client/token.js )
36- are available that support loading the Token Program on to a chain and issuing
36+ are available that support loading the Token Program on to a chain and issue
3737instructions.
3838
3939## Command-line Utility
@@ -159,24 +159,27 @@ CqAxDdBRnawzx9q4PYM3wrybLHBhDZ4P6BTV13WsRJYJ AQoKYV7tYpTrFZN6P5oUufbQKAUr9mNYGe1
159159### Creating a new token type
160160
161161A new token type can be created by initializing a new Mint with the
162- ` InitializeMint ` instruction. The Mint is used to create or "Mint " new tokens,
162+ ` InitializeMint ` instruction. The Mint is used to create or "mint " new tokens,
163163and these tokens are stored in Accounts. A Mint is associated with each
164164Account, which means that the total supply of a particular token type is equal
165165to the balances of all the associated Accounts.
166166
167- A Mint can either be configured with a fixed-supply or non-fixed supply. The
168- total supply of a fixed-supply Mint is determined during initialization and
169- deposited into a provided destination account. A non-fixed-supply Mint also has
170- an owner associated with it who has the authority to create new tokens in the
171- future with the ` MintTo ` instruction. Both types of Mints can ` Burn ` tokens to
172- decrease supply.ß
173-
174167It's important to note that the ` InitializeMint ` instruction does not require
175168the Solana account being initialized also be a signer. The ` InitializeMint `
176169instruction should be atomically processed with the system instruction that
177170creates the Solana account by including both instructions in the same
178171transaction.
179172
173+ Once a Mint is initialized, the ` mint_authority ` can create new tokens using the
174+ ` MintTo ` instruction. As long as a Mint contains a valid ` mint_authority ` , the
175+ Mint is considered to have a non-fixed supply, and the ` mint_authority ` can
176+ create new tokens with the ` MintTo ` instruction at any time. The ` SetAuthority `
177+ instruction can be used to irreversibly set the Mint's authority to ` None ` ,
178+ rendering the Mint's supply fixed. No further tokens can ever be Minted.
179+
180+ Token supply can be reduced at any time by issuing a ` Burn ` instruction which
181+ removes and discards tokens from an Account.
182+
180183### Creating accounts
181184
182185Accounts hold token balances and are created using the ` InitializeAccount `
@@ -205,13 +208,13 @@ to another Account, effectively removing the token from circulation permanently.
205208
206209Account owners may delegate authority over some or all of their token balance
207210using the ` Approve ` instruction. Delegated authorities may transfer or burn up
208- to the amount they've been delegated. Authority delegation may be revoked by
209- the Account's owner via the ` Revoke ` instruction.
211+ to the amount they've been delegated. Authority delegation may be revoked by the
212+ Account's owner via the ` Revoke ` instruction.
210213
211214### Multisignatures
212215
213- M of N multisignatures are supported and can be used in place of Mint owners, or
214- Account owners or delegates. Multisignature owners or delegates must be
216+ M of N multisignatures are supported and can be used in place of Mint
217+ authorities or Account owners or delegates. Multisignature authorities must be
215218initialized with the ` InitializeMultisig ` instruction. Initialization specifies
216219the set of N public keys that are valid and the number M of those N that must be
217220present as instruction signers for the authority to be legitimate.
@@ -222,6 +225,15 @@ require the Solana account being initialized also be a signer. The
222225instruction that creates the Solana account by including both instructions in
223226the same transaction.
224227
228+ ### Freezing accounts
229+
230+ The Mint may also contain a ` freeze_authority ` can be used to issue
231+ ` FreezeAccount ` instructions that will render an Account unusable. Token
232+ instructions that include a frozen account will fail until the Account is thawed
233+ using the ` ThawAccount ` instruction. The ` SetAuthority ` instruction can be used
234+ to change a Mint's ` freeze_authority ` . If a Mint's ` freeze_authority ` is set to
235+ ` None ` then account freezing is permanently disabled
236+
225237### Wrapping SOL
226238
227239The Token Program can be used to wrap native SOL. Doing so allows native SOL to
@@ -242,9 +254,16 @@ These accounts have a few unique behaviors
242254- Burning is not supported
243255- When closing an Account the balance may be non-zero.
244256
257+ ### Rent-exemption
258+
259+ To ensure a reliable calculation of supply, a consistency valid Mint, and
260+ consistently valid Multisig accounts all Solana accounts holding a Account,
261+ Mint, or Multisig must contain enough SOL to be considered (rent
262+ exempt)[ https://docs.solana.com/implemented-proposals/rent ]
263+
245264### Closing accounts
246265
247266An account may be closed using the ` CloseAccount ` instruction. When closing an
248267Account, all remaining SOL will be transferred to another Solana account
249- (doesn't have to be associated with the Token Program). Non-native accounts
250- must have a balance of zero to be closed.
268+ (doesn't have to be associated with the Token Program). Non-native Accounts must
269+ have a balance of zero to be closed.
0 commit comments