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;
|
): 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 ===
|
// === src/validator-info.js ===
|
||||||
export const VALIDATOR_INFO_KEY: PublicKey;
|
export const VALIDATOR_INFO_KEY: PublicKey;
|
||||||
export type Info = {
|
export type Info = {
|
||||||
@ -424,6 +396,7 @@ declare module '@solana/web3.js' {
|
|||||||
recentBlockhash?: Blockhash;
|
recentBlockhash?: Blockhash;
|
||||||
|
|
||||||
constructor(opts?: TransactionCtorFields);
|
constructor(opts?: TransactionCtorFields);
|
||||||
|
static from(buffer: Buffer): Transaction;
|
||||||
add(
|
add(
|
||||||
...items: Array<
|
...items: Array<
|
||||||
Transaction | TransactionInstruction | TransactionInstructionCtorFields
|
Transaction | TransactionInstruction | TransactionInstructionCtorFields
|
||||||
@ -435,6 +408,47 @@ declare module '@solana/web3.js' {
|
|||||||
serialize(): Buffer;
|
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 ===
|
// === src/loader.js ===
|
||||||
export class Loader {
|
export class Loader {
|
||||||
static getMinNumSignatures(dataLength: number): number;
|
static getMinNumSignatures(dataLength: number): number;
|
||||||
|
@ -342,6 +342,19 @@ declare module '@solana/web3.js' {
|
|||||||
): Transaction;
|
): 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 ===
|
// === src/validator-info.js ===
|
||||||
declare export var VALIDATOR_INFO_KEY;
|
declare export var VALIDATOR_INFO_KEY;
|
||||||
declare export type Info = {|
|
declare export type Info = {|
|
||||||
@ -438,6 +451,7 @@ declare module '@solana/web3.js' {
|
|||||||
recentBlockhash: ?Blockhash;
|
recentBlockhash: ?Blockhash;
|
||||||
|
|
||||||
constructor(opts?: TransactionCtorFields): Transaction;
|
constructor(opts?: TransactionCtorFields): Transaction;
|
||||||
|
static from(buffer: Buffer): Transaction;
|
||||||
add(
|
add(
|
||||||
...items: Array<
|
...items: Array<
|
||||||
Transaction | TransactionInstruction | TransactionInstructionCtorFields,
|
Transaction | TransactionInstruction | TransactionInstructionCtorFields,
|
||||||
|
Reference in New Issue
Block a user