fix: add missing apis to flow and ts definitions
This commit is contained in:
parent
de4f20a569
commit
b3aa9fda87
|
@ -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;
|
||||
|
|
|
@ -342,6 +342,19 @@ declare module '@solana/web3.js' {
|
|||
): Transaction;
|
||||
}
|
||||
|
||||
declare export class SystemInstruction extends TransactionInstruction {
|
||||
type: InstructionType;
|
||||
fromPublicKey: PublicKey | null;
|
||||
toPublicKey: PublicKey | null;
|
||||
amount: number | null;
|
||||
|
||||
constructor(
|
||||
opts?: TransactionInstructionCtorFields,
|
||||
type?: InstructionType,
|
||||
): SystemInstruction;
|
||||
static from(instruction: TransactionInstruction): SystemInstruction;
|
||||
}
|
||||
|
||||
// === src/validator-info.js ===
|
||||
declare export var VALIDATOR_INFO_KEY;
|
||||
declare export type Info = {|
|
||||
|
@ -438,6 +451,7 @@ declare module '@solana/web3.js' {
|
|||
recentBlockhash: ?Blockhash;
|
||||
|
||||
constructor(opts?: TransactionCtorFields): Transaction;
|
||||
static from(buffer: Buffer): Transaction;
|
||||
add(
|
||||
...items: Array<
|
||||
Transaction | TransactionInstruction | TransactionInstructionCtorFields,
|
||||
|
|
Loading…
Reference in New Issue