feat: add simulateTransaction API
This commit is contained in:
committed by
Justin Starry
parent
0c97e39675
commit
177c9c3aec
9
web3.js/module.d.ts
vendored
9
web3.js/module.d.ts
vendored
@ -121,6 +121,11 @@ declare module '@solana/web3.js' {
|
||||
version?: string;
|
||||
};
|
||||
|
||||
export type SimulatedTransactionResponse = {
|
||||
err: TransactionError | string | null;
|
||||
logs: Array<string> | null;
|
||||
};
|
||||
|
||||
export type ConfirmedTransactionMeta = {
|
||||
fee: number;
|
||||
preBalances: Array<number>;
|
||||
@ -404,6 +409,10 @@ declare module '@solana/web3.js' {
|
||||
wireTransaction: Buffer | Uint8Array | Array<number>,
|
||||
options?: SendOptions,
|
||||
): Promise<TransactionSignature>;
|
||||
simulateTransaction(
|
||||
transaction: Transaction,
|
||||
signers?: Array<Account>,
|
||||
): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
|
||||
onAccountChange(
|
||||
publickey: PublicKey,
|
||||
callback: AccountChangeCallback,
|
||||
|
Reference in New Issue
Block a user