fix: Revert s/tokens/lamports in comments in token program
This commit is contained in:
committed by
Michael Vines
parent
84163af734
commit
3cb328f1eb
@ -16,7 +16,7 @@ import {sendAndConfirmTransaction} from './util/send-and-confirm-transaction';
|
|||||||
import type {Connection} from './connection';
|
import type {Connection} from './connection';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some amount of lamports
|
* Some amount of tokens
|
||||||
*/
|
*/
|
||||||
export class TokenAmount extends BN {
|
export class TokenAmount extends BN {
|
||||||
/**
|
/**
|
||||||
@ -55,7 +55,7 @@ export class TokenAmount extends BN {
|
|||||||
*/
|
*/
|
||||||
type TokenInfo = {|
|
type TokenInfo = {|
|
||||||
/**
|
/**
|
||||||
* Total supply of lamports
|
* Total supply of tokens
|
||||||
*/
|
*/
|
||||||
supply: TokenAmount,
|
supply: TokenAmount,
|
||||||
|
|
||||||
@ -100,21 +100,21 @@ type TokenAccountInfo = {|
|
|||||||
owner: PublicKey,
|
owner: PublicKey,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of lamports this account holds
|
* Amount of tokens this account holds
|
||||||
*/
|
*/
|
||||||
amount: TokenAmount,
|
amount: TokenAmount,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The source account for the lamports.
|
* The source account for the tokens.
|
||||||
*
|
*
|
||||||
* If `source` is null, the source is this account.
|
* If `source` is null, the source is this account.
|
||||||
* If `source` is not null, the `amount` of lamports in this account represent
|
* If `source` is not null, the `amount` of tokens in this account represent
|
||||||
* an allowance of lamports that may be transferred from the source account
|
* an allowance of tokens that may be transferred from the source account
|
||||||
*/
|
*/
|
||||||
source: null | PublicKey,
|
source: null | PublicKey,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Original amount of lamports this delegate account was authorized to spend
|
* Original amount of tokens this delegate account was authorized to spend
|
||||||
* If `source` is null, originalAmount is zero
|
* If `source` is null, originalAmount is zero
|
||||||
*/
|
*/
|
||||||
originalAmount: TokenAmount,
|
originalAmount: TokenAmount,
|
||||||
@ -185,7 +185,7 @@ export class Token {
|
|||||||
* @param symbol Symbol for this token
|
* @param symbol Symbol for this token
|
||||||
* @param decimals Location of the decimal place
|
* @param decimals Location of the decimal place
|
||||||
* @param programId Optional token programId, uses the system programId by default
|
* @param programId Optional token programId, uses the system programId by default
|
||||||
* @return Token object for the newly minted token, Public key of the Token Account holding the total supply of new lamports
|
* @return Token object for the newly minted token, Public key of the Token Account holding the total supply of new tokens
|
||||||
*/
|
*/
|
||||||
static async createNewToken(
|
static async createNewToken(
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
@ -253,7 +253,7 @@ export class Token {
|
|||||||
*
|
*
|
||||||
* @param owner User account that will own the new token account
|
* @param owner User account that will own the new token account
|
||||||
* @param source If not null, create a delegate account that when authorized
|
* @param source If not null, create a delegate account that when authorized
|
||||||
* may transfer lamports from this `source` account
|
* may transfer tokens from this `source` account
|
||||||
* @return Public key of the new empty token account
|
* @return Public key of the new empty token account
|
||||||
*/
|
*/
|
||||||
async newAccount(
|
async newAccount(
|
||||||
@ -363,12 +363,12 @@ export class Token {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transfer lamports to another account
|
* Transfer tokens to another account
|
||||||
*
|
*
|
||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param source Source token account
|
* @param source Source token account
|
||||||
* @param destination Destination token account
|
* @param destination Destination token account
|
||||||
* @param amount Number of lamports to transfer
|
* @param amount Number of tokens to transfer
|
||||||
*/
|
*/
|
||||||
async transfer(
|
async transfer(
|
||||||
owner: Account,
|
owner: Account,
|
||||||
@ -391,12 +391,12 @@ export class Token {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant a third-party permission to transfer up the specified number of lamports from an account
|
* Grant a third-party permission to transfer up the specified number of tokens from an account
|
||||||
*
|
*
|
||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param account Public key of the token account
|
* @param account Public key of the token account
|
||||||
* @param delegate Token account authorized to perform a transfer lamports from the source account
|
* @param delegate Token account authorized to perform a transfer tokens from the source account
|
||||||
* @param amount Maximum number of lamports the delegate may transfer
|
* @param amount Maximum number of tokens the delegate may transfer
|
||||||
*/
|
*/
|
||||||
async approve(
|
async approve(
|
||||||
owner: Account,
|
owner: Account,
|
||||||
@ -414,7 +414,7 @@ export class Token {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove approval for the transfer of any remaining lamports
|
* Remove approval for the transfer of any remaining tokens
|
||||||
*
|
*
|
||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param account Public key of the token account
|
* @param account Public key of the token account
|
||||||
@ -455,7 +455,7 @@ export class Token {
|
|||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param source Source token account
|
* @param source Source token account
|
||||||
* @param destination Destination token account
|
* @param destination Destination token account
|
||||||
* @param amount Number of lamports to transfer
|
* @param amount Number of tokens to transfer
|
||||||
*/
|
*/
|
||||||
async transferInstruction(
|
async transferInstruction(
|
||||||
owner: PublicKey,
|
owner: PublicKey,
|
||||||
@ -498,8 +498,8 @@ export class Token {
|
|||||||
*
|
*
|
||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param account Public key of the token account
|
* @param account Public key of the token account
|
||||||
* @param delegate Token account authorized to perform a transfer lamports from the source account
|
* @param delegate Token account authorized to perform a transfer tokens from the source account
|
||||||
* @param amount Maximum number of lamports the delegate may transfer
|
* @param amount Maximum number of tokens the delegate may transfer
|
||||||
*/
|
*/
|
||||||
approveInstruction(
|
approveInstruction(
|
||||||
owner: PublicKey,
|
owner: PublicKey,
|
||||||
@ -533,7 +533,7 @@ export class Token {
|
|||||||
*
|
*
|
||||||
* @param owner Owner of the source token account
|
* @param owner Owner of the source token account
|
||||||
* @param account Public key of the token account
|
* @param account Public key of the token account
|
||||||
* @param delegate Token account authorized to perform a transfer lamports from the source account
|
* @param delegate Token account authorized to perform a transfer tokens from the source account
|
||||||
*/
|
*/
|
||||||
revokeInstruction(
|
revokeInstruction(
|
||||||
owner: PublicKey,
|
owner: PublicKey,
|
||||||
|
Reference in New Issue
Block a user