Noticed a few gaps in the token program's API, seemed like simple fixes that I might want in the future so I just did them. Just adds a few getter functions:
TokenAccount.mint() to get the key of an account's mint,
TokenMint.freeze_authority() to get the key of the token mint's freeze authority,
TokenMint.decimals() to get the number of decimals for a token, and
TokenMint.supply() to get a token's supply.
All were pretty simple, but I did of course check to make sure they compiled to the right thing.
Also there was an unrelated typo that I fixed, looks like a copy-paste error. Was just something small in the .py documentation file for TokenMint, no actual effect to anyone's code.
Noticed a few gaps in the token program's API, seemed like simple fixes that I might want in the future so I just did them. Just adds a few getter functions:
TokenAccount.mint()
to get the key of an account's mint,TokenMint.freeze_authority()
to get the key of the token mint's freeze authority,TokenMint.decimals()
to get the number of decimals for a token, andTokenMint.supply()
to get a token's supply.All were pretty simple, but I did of course check to make sure they compiled to the right thing.
Also there was an unrelated typo that I fixed, looks like a copy-paste error. Was just something small in the .py documentation file for
TokenMint
, no actual effect to anyone's code.