fix: add system program nonce methods to def files

This commit is contained in:
Justin Starry 2020-02-14 22:32:23 +08:00 committed by Michael Vines
parent 38213694bd
commit ea1295300d
2 changed files with 44 additions and 0 deletions

22
web3.js/module.d.ts vendored
View File

@ -420,6 +420,7 @@ declare module '@solana/web3.js' {
// === src/system-program.js === // === src/system-program.js ===
export class SystemProgram { export class SystemProgram {
static programId: PublicKey; static programId: PublicKey;
static nonceSpace: number;
static createAccount( static createAccount(
from: PublicKey, from: PublicKey,
@ -443,6 +444,27 @@ declare module '@solana/web3.js' {
space: number, space: number,
programId: PublicKey, programId: PublicKey,
): Transaction; ): Transaction;
static createNonceAccount(
from: PublicKey,
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
lamports: number,
): Transaction;
static nonceAdvance(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
): TransactionInstruction;
static nonceWithdraw(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
to: PublicKey,
lamports: number,
): Transaction;
static nonceAuthorize(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
newAuthorized: PublicKey,
): Transaction;
} }
export class SystemInstruction extends TransactionInstruction { export class SystemInstruction extends TransactionInstruction {

View File

@ -321,6 +321,7 @@ declare module '@solana/web3.js' {
// === src/system-program.js === // === src/system-program.js ===
declare export class SystemProgram { declare export class SystemProgram {
static programId: PublicKey; static programId: PublicKey;
static nonceSpace: number;
static createAccount( static createAccount(
from: PublicKey, from: PublicKey,
@ -344,6 +345,27 @@ declare module '@solana/web3.js' {
space: number, space: number,
programId: PublicKey, programId: PublicKey,
): Transaction; ): Transaction;
static createNonceAccount(
from: PublicKey,
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
lamports: number,
): Transaction;
static nonceAdvance(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
): TransactionInstruction;
static nonceWithdraw(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
to: PublicKey,
lamports: number,
): Transaction;
static nonceAuthorize(
nonceAccount: PublicKey,
authorizedPubkey: PublicKey,
newAuthorized: PublicKey,
): Transaction;
} }
declare export class SystemInstruction extends TransactionInstruction { declare export class SystemInstruction extends TransactionInstruction {