feat: add commitment param to subscription apis

This commit is contained in:
Justin Starry
2020-05-21 12:17:38 +08:00
committed by Michael Vines
parent 803910bf08
commit 722adb66c2
4 changed files with 35 additions and 4 deletions

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

@ -255,11 +255,13 @@ declare module '@solana/web3.js' {
onAccountChange(
publickey: PublicKey,
callback: AccountChangeCallback,
commitment?: Commitment,
): number;
removeAccountChangeListener(id: number): Promise<void>;
onProgramAccountChange(
programId: PublicKey,
callback: ProgramAccountChangeCallback,
commitment?: Commitment,
): number;
removeProgramAccountChangeListener(id: number): Promise<void>;
onSlotChange(callback: SlotChangeCallback): number;
@ -267,6 +269,7 @@ declare module '@solana/web3.js' {
onSignature(
signature: TransactionSignature,
callback: SignatureResultCallback,
commitment?: Commitment,
): number;
removeSignatureListener(id: number): Promise<void>;
onRootChange(callback: RootChangeCallback): number;