Skip to content

Commit

Permalink
fix: add system program nonce methods to def files
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry authored and mergify[bot] committed Feb 14, 2020
1 parent b17979a commit 5aac9e1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ declare module '@solana/web3.js' {
// === src/system-program.js ===
export class SystemProgram {
static programId: PublicKey;
static nonceSpace: number;

static createAccount(
from: PublicKey,
Expand All @@ -443,6 +444,27 @@ declare module '@solana/web3.js' {
space: number,
programId: PublicKey,
): 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 {
Expand Down
22 changes: 22 additions & 0 deletions module.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ declare module '@solana/web3.js' {
// === src/system-program.js ===
declare export class SystemProgram {
static programId: PublicKey;
static nonceSpace: number;

static createAccount(
from: PublicKey,
Expand All @@ -344,6 +345,27 @@ declare module '@solana/web3.js' {
space: number,
programId: PublicKey,
): 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 {
Expand Down

0 comments on commit 5aac9e1

Please sign in to comment.