fix: add missing apis to flow and ts definitions
This commit is contained in:
committed by
Michael Vines
parent
de4f20a569
commit
b3aa9fda87
70
web3.js/module.d.ts
vendored
70
web3.js/module.d.ts
vendored
@ -298,34 +298,6 @@ declare module '@solana/web3.js' {
|
||||
): Transaction;
|
||||
}
|
||||
|
||||
// === src/system-program.js ===
|
||||
export class SystemProgram {
|
||||
static programId: PublicKey;
|
||||
|
||||
static createAccount(
|
||||
from: PublicKey,
|
||||
newAccount: PublicKey,
|
||||
lamports: number,
|
||||
space: number,
|
||||
programId: PublicKey,
|
||||
): Transaction;
|
||||
static transfer(
|
||||
from: PublicKey,
|
||||
to: PublicKey,
|
||||
amount: number,
|
||||
): Transaction;
|
||||
static assign(from: PublicKey, programId: PublicKey): Transaction;
|
||||
static createAccountWithSeed(
|
||||
from: PublicKey,
|
||||
newAccount: PublicKey,
|
||||
base: PublicKey,
|
||||
seed: string,
|
||||
lamports: number,
|
||||
space: number,
|
||||
programId: PublicKey,
|
||||
): Transaction;
|
||||
}
|
||||
|
||||
// === src/validator-info.js ===
|
||||
export const VALIDATOR_INFO_KEY: PublicKey;
|
||||
export type Info = {
|
||||
@ -424,6 +396,7 @@ declare module '@solana/web3.js' {
|
||||
recentBlockhash?: Blockhash;
|
||||
|
||||
constructor(opts?: TransactionCtorFields);
|
||||
static from(buffer: Buffer): Transaction;
|
||||
add(
|
||||
...items: Array<
|
||||
Transaction | TransactionInstruction | TransactionInstructionCtorFields
|
||||
@ -435,6 +408,47 @@ declare module '@solana/web3.js' {
|
||||
serialize(): Buffer;
|
||||
}
|
||||
|
||||
// === src/system-program.js ===
|
||||
export class SystemProgram {
|
||||
static programId: PublicKey;
|
||||
|
||||
static createAccount(
|
||||
from: PublicKey,
|
||||
newAccount: PublicKey,
|
||||
lamports: number,
|
||||
space: number,
|
||||
programId: PublicKey,
|
||||
): Transaction;
|
||||
static transfer(
|
||||
from: PublicKey,
|
||||
to: PublicKey,
|
||||
amount: number,
|
||||
): Transaction;
|
||||
static assign(from: PublicKey, programId: PublicKey): Transaction;
|
||||
static createAccountWithSeed(
|
||||
from: PublicKey,
|
||||
newAccount: PublicKey,
|
||||
base: PublicKey,
|
||||
seed: string,
|
||||
lamports: number,
|
||||
space: number,
|
||||
programId: PublicKey,
|
||||
): Transaction;
|
||||
}
|
||||
|
||||
export class SystemInstruction extends TransactionInstruction {
|
||||
type: InstructionType;
|
||||
fromPublicKey: PublicKey | null;
|
||||
toPublicKey: PublicKey | null;
|
||||
amount: number | null;
|
||||
|
||||
constructor(
|
||||
opts?: TransactionInstructionCtorFields,
|
||||
type?: InstructionType,
|
||||
);
|
||||
static from(instruction: TransactionInstruction): SystemInstruction;
|
||||
}
|
||||
|
||||
// === src/loader.js ===
|
||||
export class Loader {
|
||||
static getMinNumSignatures(dataLength: number): number;
|
||||
|
Reference in New Issue
Block a user