Function getProgramAccountInfoAndSubscribe
- getProgramAccountInfoAndSubscribe<T>(connection: Connection, publicKey: PublicKey, coder: Coder<string, string>, accountType: string, callback: ((acc: AccountInfo<T>, context: Context) => void), commitment?: Commitment): Promise<number>
-
Parameters
-
connection: Connection
-
publicKey: PublicKey
-
coder: Coder<string, string>
-
accountType: string
-
callback: ((acc: AccountInfo<T>, context: Context) => void)
-
- (acc: AccountInfo<T>, context: Context): void
-
Parameters
-
acc: AccountInfo<T>
-
context: Context
Returns void
-
Optional
commitment: Commitment
Returns Promise<number>
Fetch an account for the specified public key and subscribe a callback to be invoked whenever the specified account changes.
Returns
subscription id