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

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

@ -606,6 +606,15 @@ declare module '@solana/web3.js' {
lamports: number;
};
export type CreateNonceAccountWithSeedParams = {
fromPubkey: PublicKey;
noncePubkey: PublicKey;
authorizedPubkey: PublicKey;
lamports: number;
basePubkey: PublicKey;
seed: string;
};
export type InitializeNonceParams = {
noncePubkey: PublicKey;
authorizedPubkey: PublicKey;
@ -638,7 +647,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;