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

View File

@@ -268,11 +268,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;
@@ -280,6 +282,7 @@ declare module '@solana/web3.js' {
onSignature(
signature: TransactionSignature,
callback: SignatureResultCallback,
commitment: ?Commitment,
): number;
removeSignatureListener(id: number): Promise<void>;
onRootChange(callback: RootChangeCallback): number;