fix: expose token program instructions

This commit is contained in:
Michael Vines
2018-10-24 14:58:55 -07:00
parent e1c2498f74
commit 99e6b44d03
3 changed files with 173 additions and 56 deletions

View File

@ -101,7 +101,7 @@ declare module '@solana/web3.js' {
fee: number;
constructor(opts?: TransactionCtorFields): Transaction;
add(item: Transaction | TransactionInstructionCtorFields): Transaction;
add(item: TransactionInstruction | TransactionInstructionCtorFields): Transaction;
sign(from: Account): void;
serialize(): Buffer;
}
@ -167,6 +167,29 @@ declare module '@solana/web3.js' {
account: PublicKey,
newOwner: PublicKey
): Promise<void>;
transferInstruction(
owner: PublicKey,
source: PublicKey,
destination: PublicKey,
amount: number | TokenAmount,
): Promise<TransactionInstruction>;
approveInstruction(
owner: PublicKey,
account: PublicKey,
delegate: PublicKey,
amount: number | TokenAmount
): TransactionInstruction;
revokeInstruction(
owner: PublicKey,
account: PublicKey,
delegate: PublicKey,
): TransactionInstruction;
setOwnerInstruction(
owner: PublicKey,
account: PublicKey,
newOwner: PublicKey,
): TransactionInstruction;
}
// === src/loader.js ===