feat: allow passing seed to createNonceAccount

This commit is contained in:
Justin Starry
2020-05-05 13:30:55 +08:00
committed by Michael Vines
parent 5662808b4c
commit c5802bcbb6
5 changed files with 240 additions and 27 deletions

View File

@ -621,6 +621,15 @@ declare module '@solana/web3.js' {
lamports: number,
|};
declare export type CreateNonceAccountWithSeedParams = {|
fromPubkey: PublicKey,
noncePubkey: PublicKey,
authorizedPubkey: PublicKey,
lamports: number,
basePubkey: PublicKey,
seed: string,
|};
declare export type InitializeNonceParams = {|
noncePubkey: PublicKey,
authorizedPubkey: PublicKey,
@ -653,7 +662,9 @@ declare module '@solana/web3.js' {
static createAccountWithSeed(
params: CreateAccountWithSeedParams,
): Transaction;
static createNonceAccount(params: CreateNonceAccountParams): Transaction;
static createNonceAccount(
params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,
): Transaction;
static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction;
static nonceWithdraw(params: WithdrawNonceParams): Transaction;
static nonceAuthorize(params: AuthorizeNonceParams): Transaction;