Skip to content

Commit

Permalink
[token][js]: add missing checked instruction method declarations to m…
Browse files Browse the repository at this point in the history
…odule.d.ts (solana-labs#2484)

The following methods:
- createApproveCheckedInstruction
- createMintToCheckedInstruction
- createBurnCheckedInstruction
- createSyncNativeInstruction

are missing from the `module.d.ts` file which means they won't be included in
the `lib/index.d.ts` module declaration file and therefore cannot be
referenced to when using the package with typescript.

Added the missing declarations.
  • Loading branch information
kklas authored Oct 13, 2021
1 parent c99f419 commit 889ccd6
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions token/js/module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,38 @@ declare module '@solana/spl-token' {
amount: number | u64,
decimals: number,
): TransactionInstruction;
static createApproveCheckedInstruction(
programId: PublicKey,
account: PublicKey,
mint: PublicKey,
delegate: PublicKey,
owner: PublicKey,
multiSigners: Array<Signer>,
amount: number | u64,
decimals: number,
): TransactionInstruction;
static createMintToCheckedInstruction(
programId: PublicKey,
mint: PublicKey,
dest: PublicKey,
authority: PublicKey,
multiSigners: Array<Signer>,
amount: number | u64,
decimals: number,
): TransactionInstruction;
static createBurnCheckedInstruction(
programId: PublicKey,
mint: PublicKey,
account: PublicKey,
owner: PublicKey,
multiSigners: Array<Signer>,
amount: number | u64,
decimals: number,
): TransactionInstruction;
static createSyncNativeInstruction(
programId: PublicKey,
nativeAccount: PublicKey,
): TransactionInstruction;
static createAssociatedTokenAccountInstruction(
associatedProgramId: PublicKey,
programId: PublicKey,
Expand Down

0 comments on commit 889ccd6

Please sign in to comment.