declare module '@solana/spl-token' { import {Buffer} from 'buffer'; import { PublicKey, TransactionInstruction, TransactionSignature, Connection } from "@solana/web3.js"; import BN from 'bn.js'; // === client/token.js === export class u64 extends BN { toBuffer(): Buffer; static fromBuffer(buffer: Buffer): u64; } export type MintInfo = { owner: null | PublicKey, decimals: number, initialized: boolean, }; export type AccountInfo = { mint: PublicKey, owner: PublicKey, amount: u64, delegate: null | PublicKey, delegatedAmount: u64, isInitialized: boolean, isNative: boolean, }; export type MultisigInfo = { m: number, n: number, initialized: boolean, signer1: PublicKey, signer2: PublicKey, signer3: PublicKey, signer4: PublicKey, signer5: PublicKey, signer6: PublicKey, signer7: PublicKey, signer8: PublicKey, signer9: PublicKey, signer10: PublicKey, signer11: PublicKey, }; export type TokenAndPublicKey = [Token, PublicKey]; export class Token { constructor( connection: Connection, publicKey: PublicKey, programId: PublicKey, payer: Account, ); static createMint( connection: Connection, payer: Account, mintOwner: PublicKey, accountOwner: PublicKey, supply: u64, decimals: number, programId: PublicKey, is_owned: boolean, ): Promise; static getAccount(connection: Connection): Promise; createAccount(owner: PublicKey): Promise; createMultisig(m: number, signers: Array): Promise; getMintInfo(): Promise; getAccountInfo(account: PublicKey): Promise; getMultisigInfo(multisig: PublicKey): Promise; transfer( source: PublicKey, destination: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number | u64, ): Promise; approve( account: PublicKey, delegate: PublicKey, owner: Account | PublicKey, multiSigners: Array, amount: number | u64, ): Promise; revoke( account: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): Promise; setOwner( owned: PublicKey, newOwner: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): Promise; mintTo( dest: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number, ): Promise; burn( account: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number, ): Promise; closeAccount( account: PublicKey, dest: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): Promise; static createTransferInstruction( programId: PublicKey, source: PublicKey, destination: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number | u64, ): TransactionInstruction; static createApproveInstruction( programId: PublicKey, account: PublicKey, delegate: PublicKey, owner: Account | PublicKey, multiSigners: Array, amount: number | u64, ): TransactionInstruction; static createRevokeInstruction( programId: PublicKey, account: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): TransactionInstruction; static createSetOwnerInstruction( programId: PublicKey, owned: PublicKey, newOwner: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): TransactionInstruction; static createMintToInstruction( programId: PublicKey, mint: PublicKey, dest: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number, ): TransactionInstruction; static createBurnInstruction( programId: PublicKey, account: PublicKey, authority: Account | PublicKey, multiSigners: Array, amount: number, ): TransactionInstruction; static createCloseAccountInstruction( programId: PublicKey, account: PublicKey, dest: PublicKey, owner: Account | PublicKey, multiSigners: Array, ): TransactionInstruction; } }